-
Notifications
You must be signed in to change notification settings - Fork 31
/
5125.ae97bf62.iframe.bundle.js
1 lines (1 loc) · 266 KB
/
5125.ae97bf62.iframe.bundle.js
1
(globalThis.webpackChunkmetamask_crx=globalThis.webpackChunkmetamask_crx||[]).push([[5125,18079],{"./ui/components/ui/loading-indicator/loading-indicator.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>LoadingIndicator});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__),_component_library__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./ui/components/component-library/index.ts");function _define_property(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _object_spread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{},ownKeys=Object.keys(source);"function"==typeof Object.getOwnPropertySymbols&&(ownKeys=ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym){return Object.getOwnPropertyDescriptor(source,sym).enumerable}))),ownKeys.forEach(function(key){_define_property(target,key,source[key])})}return target}function _object_without_properties(source,excluded){if(null==source)return{};var key,i,target=_object_without_properties_loose(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i<sourceSymbolKeys.length;i++)key=sourceSymbolKeys[i],!(excluded.indexOf(key)>=0)&&Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function _object_without_properties_loose(source,excluded){if(null==source)return{};var key,i,target={},sourceKeys=Object.keys(source);for(i=0;i<sourceKeys.length;i++)key=sourceKeys[i],excluded.indexOf(key)>=0||(target[key]=source[key]);return target}function LoadingIndicator(_param){var alt=_param.alt,title1=_param.title,isLoading=_param.isLoading,_param_children=_param.children,props=_object_without_properties(_param,["alt","title","isLoading","children"]);return isLoading?react__WEBPACK_IMPORTED_MODULE_0__.createElement(_component_library__WEBPACK_IMPORTED_MODULE_1__.az,_object_spread({className:"loading-indicator"},props),react__WEBPACK_IMPORTED_MODULE_0__.createElement("img",{className:"loading-indicator__spinner",alt:alt,title:title1,src:"images/loading.svg"})):void 0===_param_children?null:_param_children}LoadingIndicator.propTypes={isLoading:prop_types__WEBPACK_IMPORTED_MODULE_2___default().bool.isRequired,alt:prop_types__WEBPACK_IMPORTED_MODULE_2___default().string.isRequired,title:prop_types__WEBPACK_IMPORTED_MODULE_2___default().string.isRequired,children:prop_types__WEBPACK_IMPORTED_MODULE_2___default().node},LoadingIndicator.__docgenInfo={description:"",methods:[],displayName:"LoadingIndicator",props:{children:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"node"},required:!1},isLoading:{description:"",type:{name:"bool"},required:!0},alt:{description:"",type:{name:"string"},required:!0},title:{description:"",type:{name:"string"},required:!0}}}},"./ui/hooks/snaps/useInsightSnaps.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{P:()=>useInsightSnaps});var SeverityLevel,es=__webpack_require__("./node_modules/react-redux/es/index.js");(SeverityLevel||(SeverityLevel={})).Critical="critical";var selectors=__webpack_require__("./ui/selectors/index.js");function useInsightSnaps(id){var insight=(0,es.d4)(function(state){return(0,selectors.wOE)(state,id)}),data=insight?Object.values(insight):[],warnings=data.filter(function(result){return result.severity===SeverityLevel.Critical});return{data:data,warnings:warnings}}},"./ui/hooks/useMMICustodySignMessage.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{m:()=>useMMICustodySignMessage});var react_redux__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react-redux/es/index.js"),_store_institutional_institution_background__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./ui/store/institutional/institution-background.ts"),_selectors__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./ui/selectors/index.js"),_store_actions__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./ui/store/actions.ts"),_shared_constants_custody__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./shared/constants/custody.ts");function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg),value=info.value}catch(error){reject(error);return}info.done?resolve(value):Promise.resolve(value).then(_next,_throw)}function _async_to_generator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value)}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err)}_next(void 0)})}}function _ts_generator(thisArg,body){var f,y,t,g,_={label:0,sent:function(){if(1&t[0])throw t[1];return t[1]},trys:[],ops:[]};return g={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(g[Symbol.iterator]=function(){return this}),g;function verb(n){return function(v){return step([n,v])}}function step(op){if(f)throw TypeError("Generator is already executing.");for(;_;)try{if(f=1,y&&(t=2&op[0]?y.return:op[0]?y.throw||((t=y.return)&&t.call(y),0):y.next)&&!(t=t.call(y,op[1])).done)return t;switch(y=0,t&&(op=[2&op[0],t.value]),op[0]){case 0:case 1:t=op;break;case 4:return _.label++,{value:op[1],done:!1};case 5:_.label++,y=op[1],op=[0];continue;case 7:op=_.ops.pop(),_.trys.pop();continue;default:if(!(t=(t=_.trys).length>0&&t[t.length-1])&&(6===op[0]||2===op[0])){_=0;continue}if(3===op[0]&&(!t||op[1]>t[0]&&op[1]<t[3])){_.label=op[1];break}if(6===op[0]&&_.label<t[1]){_.label=t[1],t=op;break}if(t&&_.label<t[2]){_.label=t[2],_.ops.push(op);break}t[2]&&_.ops.pop(),_.trys.pop();continue}op=body.call(thisArg,_)}catch(e){op=[6,e],y=0}finally{f=t=0}if(5&op[0])throw op[1];return{value:op[0]?op[1]:void 0,done:!0}}}function useMMICustodySignMessage(){var _ref,dispatch=(0,react_redux__WEBPACK_IMPORTED_MODULE_0__.wA)(),mmiActions=(0,_store_institutional_institution_background__WEBPACK_IMPORTED_MODULE_1__.bB)(),accountType=(0,react_redux__WEBPACK_IMPORTED_MODULE_0__.d4)(_selectors__WEBPACK_IMPORTED_MODULE_2__.U8f);return{custodySignFn:(_ref=_async_to_generator(function(_msgData){var err;return _ts_generator(this,function(_state){switch(_state.label){case 0:if(accountType!==_shared_constants_custody__WEBPACK_IMPORTED_MODULE_4__.C.CUSTODY)return[3,8];_state.label=1;case 1:return _state.trys.push([1,4,,7]),[4,dispatch((0,_store_actions__WEBPACK_IMPORTED_MODULE_3__.resolvePendingApproval)(_msgData.id))];case 2:return _state.sent(),(0,_store_actions__WEBPACK_IMPORTED_MODULE_3__.completedTx)(_msgData.id),[4,dispatch(mmiActions.setWaitForConfirmDeepLinkDialog(!0))];case 3:case 6:return _state.sent(),[3,7];case 4:return err=_state.sent(),[4,dispatch(mmiActions.setWaitForConfirmDeepLinkDialog(!0))];case 5:return _state.sent(),[4,dispatch((0,_store_actions__WEBPACK_IMPORTED_MODULE_3__.showModal)({name:"TRANSACTION_FAILED",errorMessage:err.message,closeNotification:!0,operationFailed:!0}))];case 7:return[3,10];case 8:return[4,dispatch((0,_store_actions__WEBPACK_IMPORTED_MODULE_3__.resolvePendingApproval)(_msgData.id))];case 9:_state.sent(),(0,_store_actions__WEBPACK_IMPORTED_MODULE_3__.completedTx)(_msgData.id),_state.label=10;case 10:return[2]}})}),function custodySignFn(_msgData){return _ref.apply(this,arguments)})}}},"./ui/hooks/useScrollRequired.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{c:()=>useScrollRequired});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),lodash__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/lodash/lodash.js"),_usePrevious__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./ui/hooks/usePrevious.ts");function _array_like_to_array(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function _array_with_holes(arr){if(Array.isArray(arr))return arr}function _array_without_holes(arr){if(Array.isArray(arr))return _array_like_to_array(arr)}function _iterable_to_array(iter){if("undefined"!=typeof Symbol&&null!=iter[Symbol.iterator]||null!=iter["@@iterator"])return Array.from(iter)}function _iterable_to_array_limit(arr,i){var _s,_e,_i=null==arr?null:"undefined"!=typeof Symbol&&arr[Symbol.iterator]||arr["@@iterator"];if(null!=_i){var _arr=[],_n=!0,_d=!1;try{for(_i=_i.call(arr);!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{_n||null==_i.return||_i.return()}finally{if(_d)throw _e}}return _arr}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _non_iterable_spread(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array(arr,i){return _array_with_holes(arr)||_iterable_to_array_limit(arr,i)||_unsupported_iterable_to_array(arr,i)||_non_iterable_rest()}function _to_consumable_array(arr){return _array_without_holes(arr)||_iterable_to_array(arr)||_unsupported_iterable_to_array(arr)||_non_iterable_spread()}function _unsupported_iterable_to_array(o,minLen){if(o){if("string"==typeof o)return _array_like_to_array(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if("Object"===n&&o.constructor&&(n=o.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _array_like_to_array(o,minLen)}}var useScrollRequired=function(){var _ref_current,_ref_current1,dependencies=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],_ref=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},_ref_offsetPxFromBottom=_ref.offsetPxFromBottom,offsetPxFromBottom=void 0===_ref_offsetPxFromBottom?16:_ref_offsetPxFromBottom,ref=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null),prevOffsetHeight=(0,_usePrevious__WEBPACK_IMPORTED_MODULE_2__.Z)(null===(_ref_current=ref.current)||void 0===_ref_current?void 0:_ref_current.offsetHeight),_useState=_sliced_to_array((0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1),2),hasScrolledToBottomState=_useState[0],setHasScrolledToBottom=_useState[1],_useState1=_sliced_to_array((0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1),2),isScrollableState=_useState1[0],setIsScrollable=_useState1[1],_useState2=_sliced_to_array((0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1),2),isScrolledToBottomState=_useState2[0],setIsScrolledToBottom=_useState2[1],update=function(){if(ref.current){var isScrollable=ref.current&&ref.current.scrollHeight>ref.current.clientHeight,isScrolledToBottom=isScrollable&&Math.round(ref.current.scrollTop)+ref.current.offsetHeight+offsetPxFromBottom>=ref.current.scrollHeight;isScrollable!==isScrollableState&&(setHasScrolledToBottom(!1),setIsScrollable(isScrollable)),setIsScrolledToBottom(!isScrollable||isScrolledToBottom),(!isScrollable||isScrolledToBottom)&&setHasScrolledToBottom(!0)}};return(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(update,[ref].concat(_to_consumable_array(dependencies))),(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function(){var _ref_current;prevOffsetHeight!==(null===(_ref_current=ref.current)||void 0===_ref_current?void 0:_ref_current.offsetHeight)&&update()},[null===(_ref_current1=ref.current)||void 0===_ref_current1?void 0:_ref_current1.offsetHeight]),{isScrollable:isScrollableState,isScrolledToBottom:isScrolledToBottomState,hasScrolledToBottom:hasScrolledToBottomState,scrollToBottom:function(){setIsScrolledToBottom(!0),setHasScrolledToBottom(!0),ref.current&&ref.current.scrollTo({top:ref.current.scrollHeight,behavior:"smooth"})},setHasScrolledToBottom:setHasScrolledToBottom,ref:ref,onScroll:(0,lodash__WEBPACK_IMPORTED_MODULE_1__.debounce)(update,25)}}},"./ui/pages/confirmations/components/security-provider-banner-alert/blockaid-banner-alert/blockaid-banner-alert.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{i8:()=>REASON_TO_DESCRIPTION_TKEY,cJ:()=>REASON_TO_TITLE_TKEY,Ay:()=>blockaid_banner_alert});var _obj,_obj1,react=__webpack_require__("./node_modules/react/index.js"),prop_types=__webpack_require__("./node_modules/prop-types/index.js"),prop_types_default=__webpack_require__.n(prop_types),esm_exports=__webpack_require__("./node_modules/@sentry/core/build/esm/exports.js"),ppom_release_package=__webpack_require__("./node_modules/@blockaid/ppom_release/package.json"),network=__webpack_require__("./shared/constants/network.ts"),design_system=__webpack_require__("./ui/helpers/constants/design-system.ts"),i18n=__webpack_require__("./ui/contexts/i18n.js"),security_provider=__webpack_require__("./shared/constants/security-provider.ts"),component_library=__webpack_require__("./ui/components/component-library/index.ts"),useTransactionEventFragment=__webpack_require__("./ui/pages/confirmations/hooks/useTransactionEventFragment.js"),security_provider_banner_alert=__webpack_require__("./ui/pages/confirmations/components/security-provider-banner-alert/security-provider-banner-alert.js"),loading_indicator=__webpack_require__("./ui/components/ui/loading-indicator/loading-indicator.js");function _define_property(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _object_spread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{},ownKeys=Object.keys(source);"function"==typeof Object.getOwnPropertySymbols&&(ownKeys=ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym){return Object.getOwnPropertyDescriptor(source,sym).enumerable}))),ownKeys.forEach(function(key){_define_property(target,key,source[key])})}return target}function _object_without_properties(source,excluded){if(null==source)return{};var key,i,target=_object_without_properties_loose(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i<sourceSymbolKeys.length;i++)key=sourceSymbolKeys[i],!(excluded.indexOf(key)>=0)&&Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function _object_without_properties_loose(source,excluded){if(null==source)return{};var key,i,target={},sourceKeys=Object.keys(source);for(i=0;i<sourceKeys.length;i++)key=sourceKeys[i],excluded.indexOf(key)>=0||(target[key]=source[key]);return target}var zlib=__webpack_require__("?e569"),REASON_TO_DESCRIPTION_TKEY=Object.freeze((_define_property(_obj={},security_provider.W4.approvalFarming,"blockaidDescriptionApproveFarming"),_define_property(_obj,security_provider.W4.permitFarming,"blockaidDescriptionApproveFarming"),_define_property(_obj,security_provider.W4.setApprovalForAll,"blockaidDescriptionApproveFarming"),_define_property(_obj,security_provider.W4.blurFarming,"blockaidDescriptionBlurFarming"),_define_property(_obj,security_provider.W4.errored,"blockaidDescriptionErrored"),_define_property(_obj,security_provider.W4.seaportFarming,"blockaidDescriptionSeaportFarming"),_define_property(_obj,security_provider.W4.maliciousDomain,"blockaidDescriptionMaliciousDomain"),_define_property(_obj,security_provider.W4.rawSignatureFarming,"blockaidDescriptionMightLoseAssets"),_define_property(_obj,security_provider.W4.tradeOrderFarming,"blockaidDescriptionMightLoseAssets"),_define_property(_obj,security_provider.W4.rawNativeTokenTransfer,"blockaidDescriptionTransferFarming"),_define_property(_obj,security_provider.W4.transferFarming,"blockaidDescriptionTransferFarming"),_define_property(_obj,security_provider.W4.transferFromFarming,"blockaidDescriptionTransferFarming"),_define_property(_obj,security_provider.W4.other,"blockaidDescriptionMightLoseAssets"),_obj)),REASON_TO_TITLE_TKEY=Object.freeze((_define_property(_obj1={},security_provider.W4.errored,"blockaidTitleMayNotBeSafe"),_define_property(_obj1,security_provider.W4.rawSignatureFarming,"blockaidTitleSuspicious"),_obj1));function BlockaidBannerAlert(_param){var _zlib_gzipSync,_ref,_zlib_gzipSync1,jsonData,encodedData,title1,description,txData=_param.txData,props=_object_without_properties(_param,["txData"]),securityAlertResponse=txData.securityAlertResponse,origin=txData.origin,msgParams=txData.msgParams,type=txData.type,txParams=txData.txParams,chainId=txData.chainId,t=(0,react.useContext)(i18n.gJ),updateTransactionEventFragment=(0,useTransactionEventFragment.W)().updateTransactionEventFragment;if(!securityAlertResponse||0===Object.keys(securityAlertResponse).length)return null;if(securityAlertResponse.result_type===security_provider.p0.Loading)return react.createElement(loading_indicator.A,{isLoading:!0,style:{position:"relative",flex:"0 0 auto",margin:"8px auto 0"}});var block=securityAlertResponse.block,features=securityAlertResponse.features,reason=securityAlertResponse.reason,resultType=securityAlertResponse.result_type;if(resultType===security_provider.p0.Benign)return null;resultType===security_provider.p0.Warning?(title1=t(REASON_TO_TITLE_TKEY[security_provider.W4.errored]),description=t("blockaidDescriptionWarning")):(REASON_TO_DESCRIPTION_TKEY[reason]||(0,esm_exports.Cp)("BlockaidBannerAlert: Unidentified reason '".concat(reason,"'")),title1=t(REASON_TO_TITLE_TKEY[reason]||"blockaidTitleDeceptive"),description=t(REASON_TO_DESCRIPTION_TKEY[reason]||REASON_TO_DESCRIPTION_TKEY.other));var details=(null==features?void 0:features.length)?react.createElement(component_library.EY,{as:"ul",overflowWrap:design_system.Np.BreakWord},features.map(function(feature,i){return react.createElement("li",{key:"blockaid-detail-".concat(i)},"• ",feature)})):null,isFailedResultType=resultType===security_provider.p0.Errored,severity=resultType===security_provider.p0.Malicious?component_library.OU.Danger:component_library.OU.Warning,reportUrl=(jsonData=JSON.stringify({blockNumber:block,blockaidVersion:ppom_release_package.rE,chain:network.qJ[chainId],classification:isFailedResultType?"error":reason,domain:null!==(_ref=null!=origin?origin:null==msgParams?void 0:msgParams.origin)&&void 0!==_ref?_ref:null==txParams?void 0:txParams.origin,jsonRpcMethod:type,jsonRpcParams:JSON.stringify(null!=txParams?txParams:msgParams),resultType:isFailedResultType?security_provider.p0.Errored:resultType,reproduce:JSON.stringify(features)}),encodedData=null!==(_zlib_gzipSync1=null==zlib?void 0:null===(_zlib_gzipSync=zlib.gzipSync)||void 0===_zlib_gzipSync?void 0:_zlib_gzipSync.call(zlib,jsonData))&&void 0!==_zlib_gzipSync1?_zlib_gzipSync1:jsonData,"".concat(security_provider.NE,"?data=").concat(encodeURIComponent(encodedData.toString("base64")),"&utm_source=").concat(security_provider.K$));return react.createElement(security_provider_banner_alert.A,_object_spread({description:description,details:details,provider:security_provider.O5.Blockaid,reportUrl:reportUrl,severity:severity,title:title1,onClickSupportLink:function(){updateTransactionEventFragment({properties:{external_link_clicked:"security_alert_support_link"}},txData.id)}},props))}BlockaidBannerAlert.propTypes={txData:prop_types_default().object};let blockaid_banner_alert=BlockaidBannerAlert;BlockaidBannerAlert.__docgenInfo={description:"",methods:[],displayName:"BlockaidBannerAlert",props:{txData:{description:"",type:{name:"object"},required:!1}}}},"./ui/pages/confirmations/components/security-provider-banner-alert/security-provider-banner-alert.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_8___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_8__),_components_component_library__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./ui/components/component-library/index.ts"),_components_ui_disclosure__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./ui/components/ui/disclosure/index.js"),_components_ui_disclosure_disclosure_constants__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./ui/components/ui/disclosure/disclosure.constants.ts"),_contexts_i18n__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./ui/contexts/i18n.js"),_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./ui/helpers/constants/design-system.ts"),_shared_constants_security_provider__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./shared/constants/security-provider.ts"),_helpers_constants_zendesk_url__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./ui/helpers/constants/zendesk-url.js");function _define_property(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _object_spread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{},ownKeys=Object.keys(source);"function"==typeof Object.getOwnPropertySymbols&&(ownKeys=ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym){return Object.getOwnPropertyDescriptor(source,sym).enumerable}))),ownKeys.forEach(function(key){_define_property(target,key,source[key])})}return target}function _object_without_properties(source,excluded){if(null==source)return{};var key,i,target=_object_without_properties_loose(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i<sourceSymbolKeys.length;i++)key=sourceSymbolKeys[i],!(excluded.indexOf(key)>=0)&&Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function _object_without_properties_loose(source,excluded){if(null==source)return{};var key,i,target={},sourceKeys=Object.keys(source);for(i=0;i<sourceKeys.length;i++)key=sourceKeys[i],excluded.indexOf(key)>=0||(target[key]=source[key]);return target}function SecurityProviderBannerAlert(_param){var description=_param.description,details=_param.details,onClickSupportLink=_param.onClickSupportLink,provider=_param.provider,severity=_param.severity,title1=_param.title,reportUrl=_param.reportUrl,props=_object_without_properties(_param,["description","details","onClickSupportLink","provider","severity","title","reportUrl"]),t=(0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_contexts_i18n__WEBPACK_IMPORTED_MODULE_4__.gJ);return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_1__.b8,_object_spread({"data-testid":"security-provider-banner-alert",title:title1,severity:severity},props),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_1__.EY,{marginTop:2},description),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_1__.az,{marginTop:3},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_ui_disclosure__WEBPACK_IMPORTED_MODULE_2__.A,{title:t("seeDetails"),variant:_components_ui_disclosure_disclosure_constants__WEBPACK_IMPORTED_MODULE_3__.h.Arrow},details,react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_1__.EY,{marginTop:3,display:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_5__.nl.Flex},t("somethingDoesntLookRight",[react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_1__.vx,{key:"security-provider-button-supporturl-".concat(provider),size:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_5__.or.inherit,href:reportUrl||_helpers_constants_zendesk_url__WEBPACK_IMPORTED_MODULE_7__.A.SUPPORT_URL,externalLink:!0,onClick:onClickSupportLink},t("reportIssue"))])))),provider&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_1__.EY,{marginTop:3,display:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_5__.nl.Flex,alignItems:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_5__.k2.center,color:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_5__.Q1.textAlternative,variant:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_5__.J3.bodySm},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_1__.In,{className:"disclosure__summary--icon",color:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_5__.Li.primaryDefault,name:_components_component_library__WEBPACK_IMPORTED_MODULE_1__.$M.SecurityTick,size:_components_component_library__WEBPACK_IMPORTED_MODULE_1__.lK.Sm,marginInlineEnd:1}),t("securityProviderPoweredBy",[react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_1__.vx,{key:"security-provider-button-link-".concat(provider),size:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_5__.or.inherit,href:_shared_constants_security_provider__WEBPACK_IMPORTED_MODULE_6__.ob[provider].url,externalLink:!0},t(_shared_constants_security_provider__WEBPACK_IMPORTED_MODULE_6__.ob[provider].tKeyName))])))}SecurityProviderBannerAlert.propTypes={description:prop_types__WEBPACK_IMPORTED_MODULE_8___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_8___default().string,prop_types__WEBPACK_IMPORTED_MODULE_8___default().element]).isRequired,severity:prop_types__WEBPACK_IMPORTED_MODULE_8___default().oneOf([_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_5__.AI.Danger,_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_5__.AI.Warning]).isRequired,title:prop_types__WEBPACK_IMPORTED_MODULE_8___default().string.isRequired,details:prop_types__WEBPACK_IMPORTED_MODULE_8___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_8___default().string,prop_types__WEBPACK_IMPORTED_MODULE_8___default().element]),provider:prop_types__WEBPACK_IMPORTED_MODULE_8___default().oneOf(Object.values(_shared_constants_security_provider__WEBPACK_IMPORTED_MODULE_6__.O5)),onClickSupportLink:prop_types__WEBPACK_IMPORTED_MODULE_8___default().func,reportUrl:prop_types__WEBPACK_IMPORTED_MODULE_8___default().string};let __WEBPACK_DEFAULT_EXPORT__=SecurityProviderBannerAlert;SecurityProviderBannerAlert.__docgenInfo={description:"",methods:[],displayName:"SecurityProviderBannerAlert",props:{description:{description:"Description content that may be plain text or contain hyperlinks",type:{name:"union",value:[{name:"string"},{name:"element"}]},required:!0},severity:{description:"Severity level",type:{name:"enum",value:[{value:"Severity.Danger",computed:!0},{value:"Severity.Warning",computed:!0}]},required:!0},title:{description:"Title to be passed as <BannerAlert> param",type:{name:"string"},required:!0},details:{description:"Additional details to be displayed under the description",type:{name:"union",value:[{name:"string"},{name:"element"}]},required:!1},provider:{description:"Name of the security provider",type:{name:"enum",computed:!0,value:"Object.values(SecurityProvider)"},required:!1},onClickSupportLink:{description:"Function to be called when the support link is clicked",type:{name:"func"},required:!1},reportUrl:{description:"URL to open when report an issue link is clicked",type:{name:"string"},required:!1}}}},"./ui/components/app/alert-system/confirm-alert-modal/confirm-alert-modal.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{g:()=>ConfirmAlertModal1});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_component_library__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./ui/components/component-library/index.ts"),_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./ui/helpers/constants/design-system.ts"),_hooks_useI18nContext__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./ui/hooks/useI18nContext.js"),_hooks_useAlerts__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./ui/hooks/useAlerts.ts"),_alert_modal__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./ui/components/app/alert-system/alert-modal/index.tsx"),_alert_modal_alert_modal__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./ui/components/app/alert-system/alert-modal/alert-modal.tsx"),_multiple_alert_modal__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./ui/components/app/alert-system/multiple-alert-modal/index.tsx"),_shared_constants_metametrics__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./shared/constants/metametrics.ts");function _array_like_to_array(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function _array_with_holes(arr){if(Array.isArray(arr))return arr}function _iterable_to_array_limit(arr,i){var _s,_e,_i=null==arr?null:"undefined"!=typeof Symbol&&arr[Symbol.iterator]||arr["@@iterator"];if(null!=_i){var _arr=[],_n=!0,_d=!1;try{for(_i=_i.call(arr);!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{_n||null==_i.return||_i.return()}finally{if(_d)throw _e}}return _arr}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array(arr,i){return _array_with_holes(arr)||_iterable_to_array_limit(arr,i)||_unsupported_iterable_to_array(arr,i)||_non_iterable_rest()}function _unsupported_iterable_to_array(o,minLen){if(o){if("string"==typeof o)return _array_like_to_array(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if("Object"===n&&o.constructor&&(n=o.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _array_like_to_array(o,minLen)}}function ConfirmButtons(param){var onCancel=param.onCancel,onSubmit=param.onSubmit,isConfirmed=param.isConfirmed,t=(0,_hooks_useI18nContext__WEBPACK_IMPORTED_MODULE_3__.P)(),onAlertCancel=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function(){onCancel({location:_shared_constants_metametrics__WEBPACK_IMPORTED_MODULE_8__.If.AlertFrictionModal})},[onCancel]);return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement(_component_library__WEBPACK_IMPORTED_MODULE_1__.$n,{block:!0,onClick:onAlertCancel,size:_component_library__WEBPACK_IMPORTED_MODULE_1__.Mp.Lg,variant:_component_library__WEBPACK_IMPORTED_MODULE_1__.Ak.Secondary,"data-testid":"confirm-alert-modal-cancel-button"},t("reject")),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_component_library__WEBPACK_IMPORTED_MODULE_1__.$n,{variant:_component_library__WEBPACK_IMPORTED_MODULE_1__.Ak.Primary,onClick:onSubmit,size:_component_library__WEBPACK_IMPORTED_MODULE_1__.Mp.Lg,"data-testid":"confirm-alert-modal-submit-button",disabled:!isConfirmed,danger:!0,startIconName:_component_library__WEBPACK_IMPORTED_MODULE_1__.$M.Danger},t("confirm")))}function ConfirmDetails(param){var onAlertLinkClick=param.onAlertLinkClick,t=(0,_hooks_useI18nContext__WEBPACK_IMPORTED_MODULE_3__.P)();return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement(_component_library__WEBPACK_IMPORTED_MODULE_1__.az,{alignItems:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.k2.center,textAlign:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.nO.Center},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_component_library__WEBPACK_IMPORTED_MODULE_1__.EY,{variant:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.J3.bodyMd},t("confirmationAlertModalDetails")),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_component_library__WEBPACK_IMPORTED_MODULE_1__.vx,{marginTop:4,size:_component_library__WEBPACK_IMPORTED_MODULE_1__.wL.Inherit,textProps:{variant:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.J3.bodyMd,alignItems:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.k2.flexStart},as:"a",onClick:onAlertLinkClick,target:"_blank",rel:"noopener noreferrer","data-testid":"confirm-alert-modal-review-all-alerts"},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_component_library__WEBPACK_IMPORTED_MODULE_1__.In,{name:_component_library__WEBPACK_IMPORTED_MODULE_1__.$M.SecuritySearch,size:_component_library__WEBPACK_IMPORTED_MODULE_1__.lK.Inherit}),t("alertModalReviewAllAlerts"))))}function ConfirmAlertModal1(param){var onCancel=param.onCancel,onClose=param.onClose,onSubmit=param.onSubmit,ownerId=param.ownerId,t=(0,_hooks_useI18nContext__WEBPACK_IMPORTED_MODULE_3__.P)(),_useAlerts=(0,_hooks_useAlerts__WEBPACK_IMPORTED_MODULE_4__.A)(ownerId),fieldAlerts=_useAlerts.fieldAlerts,alerts=_useAlerts.alerts,hasUnconfirmedFieldDangerAlerts=_useAlerts.hasUnconfirmedFieldDangerAlerts,_useState=_sliced_to_array((0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1),2),confirmCheckbox=_useState[0],setConfirmCheckbox=_useState[1],hasDangerBlockingAlerts=fieldAlerts.some(function(alert){return alert.severity===_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.AI.Danger&&alert.isBlocking}),_useState1=_sliced_to_array((0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(hasUnconfirmedFieldDangerAlerts),2),multipleAlertModalVisible=_useState1[0],setMultipleAlertModalVisible=_useState1[1],handleCloseMultipleAlertModal=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function(request){setMultipleAlertModalVisible(!1),((null==request?void 0:request.recursive)||hasUnconfirmedFieldDangerAlerts||hasDangerBlockingAlerts)&&onClose()},[onClose,hasUnconfirmedFieldDangerAlerts,hasDangerBlockingAlerts]),handleOpenMultipleAlertModal=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function(){setMultipleAlertModalVisible(!0)},[]),handleConfirmCheckbox=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function(){setConfirmCheckbox(!confirmCheckbox)},[confirmCheckbox]);if(multipleAlertModalVisible)return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_multiple_alert_modal__WEBPACK_IMPORTED_MODULE_7__.C,{ownerId:ownerId,onFinalAcknowledgeClick:handleCloseMultipleAlertModal,onClose:handleCloseMultipleAlertModal,showCloseIcon:!1});var selectedAlert=alerts[0];return selectedAlert?react__WEBPACK_IMPORTED_MODULE_0__.createElement(_alert_modal__WEBPACK_IMPORTED_MODULE_5__.W,{ownerId:ownerId,onAcknowledgeClick:onClose,alertKey:selectedAlert.key,onClose:onClose,customTitle:t("confirmationAlertModalTitle"),customDetails:react__WEBPACK_IMPORTED_MODULE_0__.createElement(ConfirmDetails,{onAlertLinkClick:handleOpenMultipleAlertModal}),customAcknowledgeCheckbox:react__WEBPACK_IMPORTED_MODULE_0__.createElement(_alert_modal_alert_modal__WEBPACK_IMPORTED_MODULE_6__.F,{selectedAlert:selectedAlert,isConfirmed:confirmCheckbox,onCheckboxClick:handleConfirmCheckbox,label:t(1===alerts.length?"confirmAlertModalAcknowledgeSingle":"confirmAlertModalAcknowledgeMultiple")}),customAcknowledgeButton:react__WEBPACK_IMPORTED_MODULE_0__.createElement(ConfirmButtons,{onCancel:onCancel,onSubmit:onSubmit,isConfirmed:confirmCheckbox})}):null}try{ConfirmAlertModal1.displayName="ConfirmAlertModal",ConfirmAlertModal1.__docgenInfo={description:"",displayName:"ConfirmAlertModal",props:{onCancel:{defaultValue:null,description:"Callback function that is called when the cancel button is clicked.",name:"onCancel",required:!0,type:{name:"OnCancelHandler"}},onClose:{defaultValue:null,description:"The function to be executed when the modal needs to be closed.",name:"onClose",required:!0,type:{name:"() => void"}},onSubmit:{defaultValue:null,description:"Callback function that is called when the submit button is clicked.",name:"onSubmit",required:!0,type:{name:"() => void"}},ownerId:{defaultValue:null,description:"The owner ID of the relevant alert from the `confirmAlerts` reducer.",name:"ownerId",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["ui/components/app/alert-system/confirm-alert-modal/confirm-alert-modal.tsx#ConfirmAlertModal"]={docgenInfo:ConfirmAlertModal1.__docgenInfo,name:"ConfirmAlertModal",path:"ui/components/app/alert-system/confirm-alert-modal/confirm-alert-modal.tsx#ConfirmAlertModal"})}catch(__react_docgen_typescript_loader_error){}},"./ui/components/app/alert-system/general-alert/general-alert.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>general_alert});var react=__webpack_require__("./node_modules/react/index.js"),component_library=__webpack_require__("./ui/components/component-library/index.ts"),disclosure=__webpack_require__("./ui/components/ui/disclosure/index.js"),disclosure_constants=__webpack_require__("./ui/components/ui/disclosure/disclosure.constants.ts"),useI18nContext=__webpack_require__("./ui/hooks/useI18nContext.js"),design_system=__webpack_require__("./ui/helpers/constants/design-system.ts"),zendesk_url=__webpack_require__("./ui/helpers/constants/zendesk-url.js"),utils=__webpack_require__("./ui/components/app/alert-system/utils.ts"),security_provider=__webpack_require__("./shared/constants/security-provider.ts");function alert_provider_AlertProvider(param){var _SECURITY_PROVIDER_CONFIG_provider,_SECURITY_PROVIDER_CONFIG_provider1,provider=param.provider,_param_paddingTop=param.paddingTop,textAlign=param.textAlign,t=(0,useI18nContext.P)();return provider?react.createElement(component_library.az,{paddingTop:void 0===_param_paddingTop?0:_param_paddingTop,textAlign:textAlign},react.createElement(component_library.EY,{marginTop:1,display:design_system.nl.InlineFlex,alignItems:design_system.k2.center,color:design_system.r7.textAlternative,variant:design_system.J3.bodySm},react.createElement(component_library.In,{color:design_system.Li.primaryDefault,name:component_library.$M.SecurityTick,size:component_library.lK.Sm,marginInlineEnd:1}),t("securityProviderPoweredBy",[react.createElement(component_library.vx,{key:"security-provider-button-link-".concat(provider),size:component_library.wL.Inherit,href:null===(_SECURITY_PROVIDER_CONFIG_provider=security_provider.ob[provider])||void 0===_SECURITY_PROVIDER_CONFIG_provider?void 0:_SECURITY_PROVIDER_CONFIG_provider.url,externalLink:!0},t(null===(_SECURITY_PROVIDER_CONFIG_provider1=security_provider.ob[provider])||void 0===_SECURITY_PROVIDER_CONFIG_provider1?void 0:_SECURITY_PROVIDER_CONFIG_provider1.tKeyName))]))):null}try{alert_provider_AlertProvider.displayName="AlertProvider",alert_provider_AlertProvider.__docgenInfo={description:"",displayName:"AlertProvider",props:{provider:{defaultValue:null,description:"",name:"provider",required:!1,type:{name:"enum",value:[{value:'"blockaid"'}]}},paddingTop:{defaultValue:{value:"0"},description:"",name:"paddingTop",required:!1,type:{name:"SizeNumber"}},textAlign:{defaultValue:null,description:"",name:"textAlign",required:!1,type:{name:"enum",value:[{value:'"left"'},{value:'"center"'},{value:'"right"'},{value:'"justify"'},{value:'"end"'},{value:'"start"'}]}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["ui/components/app/alert-system/alert-provider/alert-provider.tsx#AlertProvider"]={docgenInfo:alert_provider_AlertProvider.__docgenInfo,name:"AlertProvider",path:"ui/components/app/alert-system/alert-provider/alert-provider.tsx#AlertProvider"})}catch(__react_docgen_typescript_loader_error){}try{AlertProvider.displayName="AlertProvider",AlertProvider.__docgenInfo={description:"",displayName:"AlertProvider",props:{provider:{defaultValue:null,description:"",name:"provider",required:!1,type:{name:"enum",value:[{value:'"blockaid"'}]}},paddingTop:{defaultValue:{value:"0"},description:"",name:"paddingTop",required:!1,type:{name:"SizeNumber"}},textAlign:{defaultValue:null,description:"",name:"textAlign",required:!1,type:{name:"enum",value:[{value:'"left"'},{value:'"center"'},{value:'"right"'},{value:'"justify"'},{value:'"end"'},{value:'"start"'}]}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["ui/components/app/alert-system/alert-provider/index.tsx#AlertProvider"]={docgenInfo:AlertProvider.__docgenInfo,name:"AlertProvider",path:"ui/components/app/alert-system/alert-provider/index.tsx#AlertProvider"})}catch(__react_docgen_typescript_loader_error){}function _define_property(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _instanceof(left,right){return null!=right&&"undefined"!=typeof Symbol&&right[Symbol.hasInstance]?!!right[Symbol.hasInstance](left):left instanceof right}function _object_spread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{},ownKeys=Object.keys(source);"function"==typeof Object.getOwnPropertySymbols&&(ownKeys=ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym){return Object.getOwnPropertyDescriptor(source,sym).enumerable}))),ownKeys.forEach(function(key){_define_property(target,key,source[key])})}return target}function _object_without_properties(source,excluded){if(null==source)return{};var key,i,target=_object_without_properties_loose(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i<sourceSymbolKeys.length;i++)key=sourceSymbolKeys[i],!(excluded.indexOf(key)>=0)&&Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function _object_without_properties_loose(source,excluded){if(null==source)return{};var key,i,target={},sourceKeys=Object.keys(source);for(i=0;i<sourceKeys.length;i++)key=sourceKeys[i],excluded.indexOf(key)>=0||(target[key]=source[key]);return target}function ReportLink(param){var reportUrl=param.reportUrl,provider=param.provider,onClickSupportLink=param.onClickSupportLink,t=(0,useI18nContext.P)();return react.createElement(component_library.EY,{marginTop:1,display:design_system.nl.Flex},t("somethingDoesntLookRight",[react.createElement(component_library.vx,{key:"security-provider-button-supporturl-".concat(provider),size:component_library.wL.Inherit,href:null!=reportUrl?reportUrl:zendesk_url.A.SUPPORT_URL,externalLink:!0,onClick:onClickSupportLink},t("reportIssue"))]))}function AlertDetails(param){var details=param.details,reportUrl=param.reportUrl,onClickSupportLink=param.onClickSupportLink,provider=param.provider,t=(0,useI18nContext.P)();return details?react.createElement(component_library.az,{marginTop:1},react.createElement(disclosure.A,{title:t("seeDetails"),variant:disclosure_constants.h.Arrow},_instanceof(details,Array)?react.createElement(component_library.az,{as:"ul",className:"alert-modal__alert-details",paddingLeft:6},details.map(function(detail,index){return react.createElement(component_library.az,{as:"li",key:"disclosure-detail-".concat(index)},react.createElement(component_library.EY,{variant:design_system.J3.bodyMdMedium,fontWeight:design_system.IT.Normal},detail))})):details,react.createElement(ReportLink,{reportUrl:reportUrl,provider:provider,onClickSupportLink:onClickSupportLink}))):null}function GeneralAlert(_param){var description=_param.description,details=_param.details,onClickSupportLink=_param.onClickSupportLink,provider=_param.provider,severity=_param.severity,title1=_param.title,reportUrl=_param.reportUrl,props=_object_without_properties(_param,["description","details","onClickSupportLink","provider","severity","title","reportUrl"]);return react.createElement(component_library.b8,_object_spread({title:title1,severity:(0,utils.Sp)(severity),description:description},props),props.children,react.createElement(AlertDetails,{details:details,reportUrl:reportUrl,onClickSupportLink:onClickSupportLink,provider:provider}),react.createElement(alert_provider_AlertProvider,{provider:provider}))}let general_alert=GeneralAlert;try{GeneralAlert.displayName="GeneralAlert",GeneralAlert.__docgenInfo={description:"",displayName:"GeneralAlert",props:{description:{defaultValue:null,description:"",name:"description",required:!1,type:{name:"string"}},details:{defaultValue:null,description:"",name:"details",required:!1,type:{name:"ReactNode | string[]"}},onClickSupportLink:{defaultValue:null,description:"",name:"onClickSupportLink",required:!1,type:{name:"(() => void)"}},provider:{defaultValue:null,description:"",name:"provider",required:!1,type:{name:"enum",value:[{value:'"blockaid"'}]}},reportUrl:{defaultValue:null,description:"",name:"reportUrl",required:!1,type:{name:"string"}},severity:{defaultValue:null,description:"",name:"severity",required:!0,type:{name:"enum",value:[{value:'"danger"'},{value:'"warning"'},{value:'"info"'}]}},title:{defaultValue:null,description:"",name:"title",required:!1,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["ui/components/app/alert-system/general-alert/general-alert.tsx#GeneralAlert"]={docgenInfo:GeneralAlert.__docgenInfo,name:"GeneralAlert",path:"ui/components/app/alert-system/general-alert/general-alert.tsx#GeneralAlert"})}catch(__react_docgen_typescript_loader_error){}},"./ui/components/component-library/textarea/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{$:()=>_textarea_types__WEBPACK_IMPORTED_MODULE_1__.$,T:()=>_textarea__WEBPACK_IMPORTED_MODULE_0__.T});var _textarea__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./ui/components/component-library/textarea/textarea.tsx"),_textarea_types__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./ui/components/component-library/textarea/textarea.types.ts")},"./ui/components/component-library/textarea/textarea.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{T:()=>Textarea});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),classnames__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/classnames/index.js"),classnames__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__),_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./ui/helpers/constants/design-system.ts"),___WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./ui/components/component-library/index.ts"),_textarea_types__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./ui/components/component-library/textarea/textarea.types.ts");function _define_property(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _object_spread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{},ownKeys=Object.keys(source);"function"==typeof Object.getOwnPropertySymbols&&(ownKeys=ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym){return Object.getOwnPropertyDescriptor(source,sym).enumerable}))),ownKeys.forEach(function(key){_define_property(target,key,source[key])})}return target}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable})),keys.push.apply(keys,symbols)}return keys}function _object_spread_props(target,source){return source=null!=source?source:{},Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))}),target}function _object_without_properties(source,excluded){if(null==source)return{};var key,i,target=_object_without_properties_loose(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i<sourceSymbolKeys.length;i++)key=sourceSymbolKeys[i],!(excluded.indexOf(key)>=0)&&Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function _object_without_properties_loose(source,excluded){if(null==source)return{};var key,i,target={},sourceKeys=Object.keys(source);for(i=0;i<sourceKeys.length;i++)key=sourceKeys[i],excluded.indexOf(key)>=0||(target[key]=source[key]);return target}var Textarea=react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(function(_param,ref){var autoFocus=_param.autoFocus,_param_className=_param.className,defaultValue=_param.defaultValue,isDisabled=_param.isDisabled,disabled=_param.disabled,error=_param.error,id=_param.id,_param_resize=_param.resize,resize=void 0===_param_resize?_textarea_types__WEBPACK_IMPORTED_MODULE_4__.$.Vertical:_param_resize,rows=_param.rows,cols=_param.cols,maxLength=_param.maxLength,name=_param.name,onBlur=_param.onBlur,onChange=_param.onChange,onClick=_param.onClick,onFocus=_param.onFocus,placeholder=_param.placeholder,readOnly=_param.readOnly,required=_param.required,value=_param.value,props=_object_without_properties(_param,["autoFocus","className","defaultValue","isDisabled","disabled","error","id","resize","rows","cols","maxLength","name","onBlur","onChange","onClick","onFocus","placeholder","readOnly","required","value"]);return react__WEBPACK_IMPORTED_MODULE_0__.createElement(___WEBPACK_IMPORTED_MODULE_3__.EY,_object_spread(_object_spread_props(_object_spread({className:classnames__WEBPACK_IMPORTED_MODULE_1___default()("mm-textarea","mm-textarea--resize-".concat(resize),{"mm-textarea--disabled":!!(isDisabled||disabled)},void 0===_param_className?"":_param_className),as:"textarea",ref:ref,placeholder:placeholder,readOnly:readOnly,required:required,autoFocus:autoFocus,defaultValue:defaultValue,disabled:isDisabled||disabled},error&&{"aria-invalid":error}),{id:id,maxLength:maxLength,name:name,value:value,onBlur:function(event){null==onBlur||onBlur(event)},onChange:onChange,onClick:function(event){!onClick||isDisabled&&disabled||null==onClick||onClick(event)},onFocus:function(event){null==onFocus||onFocus(event)},resize:resize,rows:rows,cols:cols,backgroundColor:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.i0.backgroundDefault,borderColor:error?_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.cG.errorDefault:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.cG.borderDefault,borderRadius:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.Z6.SM,borderWidth:1,paddingBottom:1,paddingLeft:4,paddingRight:4,paddingTop:1}),props))});try{Textarea.displayName="Textarea",Textarea.__docgenInfo={description:"",displayName:"Textarea",props:{autoFocus:{defaultValue:null,description:"If `true`, the textarea will be focused during the first mount.",name:"autoFocus",required:!1,type:{name:"boolean"}},className:{defaultValue:{value:""},description:"An additional className to apply to the textarea",name:"className",required:!1,type:{name:"string"}},defaultValue:{defaultValue:null,description:"The default textarea value, useful when not controlling the component.",name:"defaultValue",required:!1,type:{name:"string"}},isDisabled:{defaultValue:null,description:"If `true`, the textarea will be disabled.",name:"isDisabled",required:!1,type:{name:"boolean"}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}},error:{defaultValue:null,description:"If `true`, the textarea will indicate an error",name:"error",required:!1,type:{name:"boolean"}},id:{defaultValue:null,description:"The id of the textarea element.",name:"id",required:!1,type:{name:"string"}},maxLength:{defaultValue:null,description:"Max number of characters to allow",name:"maxLength",required:!1,type:{name:"number"}},name:{defaultValue:null,description:"Name attribute of the textarea element.",name:"name",required:!1,type:{name:"string"}},onBlur:{defaultValue:null,description:"Callback fired on blur",name:"onBlur",required:!1,type:{name:"((event: FocusEvent<HTMLTextAreaElement>) => void)"}},onChange:{defaultValue:null,description:"Callback fired when the value is changed.",name:"onChange",required:!1,type:{name:"((event: ChangeEvent<HTMLTextAreaElement>) => void)"}},onClick:{defaultValue:null,description:"Callback fired when the Textarea is clicked on",name:"onClick",required:!1,type:{name:"((event: MouseEvent<HTMLTextAreaElement, MouseEvent>) => void)"}},onFocus:{defaultValue:null,description:"Callback fired on focus",name:"onFocus",required:!1,type:{name:"((event: FocusEvent<HTMLTextAreaElement>) => void)"}},placeholder:{defaultValue:null,description:"The short hint displayed in the textarea before the user enters a value.",name:"placeholder",required:!1,type:{name:"string"}},readOnly:{defaultValue:null,description:"It prevents the user from changing the value of the field (not from interacting with the field).",name:"readOnly",required:!1,type:{name:"boolean"}},required:{defaultValue:null,description:"If `true`, the textarea will be required. Currently no visual difference is shown.",name:"required",required:!1,type:{name:"boolean"}},resize:{defaultValue:{value:"TextareaResize.Vertical"},description:"The resize property specifies whether or not an element is resizable by the user.",name:"resize",required:!1,type:{name:"enum",value:[{value:'"none"'},{value:'"both"'},{value:'"horizontal"'},{value:'"vertical"'},{value:'"initial"'},{value:'"inherit"'}]}},rows:{defaultValue:null,description:"Number of rows to display when multiline option is set to true",name:"rows",required:!1,type:{name:"number"}},cols:{defaultValue:null,description:"Number of columns to display when multiline option is set to true",name:"cols",required:!1,type:{name:"number"}},value:{defaultValue:null,description:"The textarea value, required for a controlled component.",name:"value",required:!1,type:{name:"string | number"}},flexDirection:{defaultValue:null,description:"The flex direction of the component.\nUse the FlexDirection enum from '../../../helpers/constants/design-system';\nAccepts responsive props in the form of an array.",name:"flexDirection",required:!1,type:{name:"FlexDirection | FlexDirectionArray"}},flexWrap:{defaultValue:null,description:"The flex wrap of the component.\nUse the FlexWrap enum from '../../../helpers/constants/design-system';\nAccepts responsive props in the form of an array.",name:"flexWrap",required:!1,type:{name:"FlexWrap | FlexWrapArray"}},gap:{defaultValue:null,description:"The gap between the component's children.\nUse 1-12 for a gap of 4px-48px.\nAccepts responsive props in the form of an array.",name:"gap",required:!1,type:{name:"SizeNumber | SizeNumberArray"}},margin:{defaultValue:null,description:"The margin of the component.\nUse 1-12 for 4px-48px or 'auto'.\nAccepts responsive props in the form of an array.",name:"margin",required:!1,type:{name:"SizeNumberAndAuto | SizeNumberAndAutoArray"}},marginTop:{defaultValue:null,description:"The margin-top of the component.\nUse 1-12 for 4px-48px or 'auto'.\nAccepts responsive props in the form of an array.",name:"marginTop",required:!1,type:{name:"SizeNumberAndAuto | SizeNumberAndAutoArray"}},marginBottom:{defaultValue:null,description:"The margin-bottom of the component.\nUse 1-12 for 4px-48px or 'auto'.\nAccepts responsive props in the form of an array.",name:"marginBottom",required:!1,type:{name:"SizeNumberAndAuto | SizeNumberAndAutoArray"}},marginRight:{defaultValue:null,description:"The margin-right of the component.\nUse 1-12 for 4px-48px or 'auto'.\nAccepts responsive props in the form of an array.",name:"marginRight",required:!1,type:{name:"SizeNumberAndAuto | SizeNumberAndAutoArray"}},marginLeft:{defaultValue:null,description:"The margin-left of the component.\nUse 1-12 for 4px-48px or 'auto'.\nAccepts responsive props in the form of an array.",name:"marginLeft",required:!1,type:{name:"SizeNumberAndAuto | SizeNumberAndAutoArray"}},marginInline:{defaultValue:null,description:"The margin-inline of the component.\nUse 1-12 for 4px-48px or 'auto'.\nAccepts responsive props in the form of an array.",name:"marginInline",required:!1,type:{name:"SizeNumberAndAuto | SizeNumberAndAutoArray"}},marginInlineStart:{defaultValue:null,description:"The margin-inline-start of the component.\nUse 1-12 for 4px-48px or 'auto'.\nAccepts responsive props in the form of an array.",name:"marginInlineStart",required:!1,type:{name:"SizeNumberAndAuto | SizeNumberAndAutoArray"}},marginInlineEnd:{defaultValue:null,description:"The margin-inline-end of the component.\nUse 1-12 for 4px-48px or 'auto'.\nAccepts responsive props in the form of an array.",name:"marginInlineEnd",required:!1,type:{name:"SizeNumberAndAuto | SizeNumberAndAutoArray"}},padding:{defaultValue:null,description:"The padding of the component.\nUse 1-12 for 4px-48px.\nAccepts responsive props in the form of an array.",name:"padding",required:!1,type:{name:"SizeNumber | SizeNumberArray"}},paddingTop:{defaultValue:null,description:"The padding-top of the component.\nUse 1-12 for 4px-48px.\nAccepts responsive props in the form of an array.",name:"paddingTop",required:!1,type:{name:"SizeNumber | SizeNumberArray"}},paddingBottom:{defaultValue:null,description:"The padding-bottom of the component.\nUse 1-12 for 4px-48px.\nAccepts responsive props in the form of an array.",name:"paddingBottom",required:!1,type:{name:"SizeNumber | SizeNumberArray"}},paddingRight:{defaultValue:null,description:"The padding-right of the component.\nUse 1-12 for 4px-48px.\nAccepts responsive props in the form of an array.",name:"paddingRight",required:!1,type:{name:"SizeNumber | SizeNumberArray"}},paddingLeft:{defaultValue:null,description:"The padding-left of the component.\nUse 1-12 for 4px-48px.\nAccepts responsive props in the form of an array.",name:"paddingLeft",required:!1,type:{name:"SizeNumber | SizeNumberArray"}},paddingInline:{defaultValue:null,description:"The padding-inline of the component.\nUse 1-12 for 4px-48px.\nAccepts responsive props in the form of an array.",name:"paddingInline",required:!1,type:{name:"SizeNumber | SizeNumberArray"}},paddingInlineStart:{defaultValue:null,description:"The padding-inline-start of the component.\nUse 1-12 for 4px-48px.\nAccepts responsive props in the form of an array.",name:"paddingInlineStart",required:!1,type:{name:"SizeNumber | SizeNumberArray"}},paddingInlineEnd:{defaultValue:null,description:"The padding-inline-end of the component.\nUse 1-12 for 4px-48px.\nAccepts responsive props in the form of an array.",name:"paddingInlineEnd",required:!1,type:{name:"SizeNumber | SizeNumberArray"}},borderColor:{defaultValue:null,description:"The border-color of the component.\nUse BorderColor enum from '../../../helpers/constants/design-system';\nAccepts responsive props in the form of an array.",name:"borderColor",required:!1,type:{name:"BorderColor | BorderColorArray"}},borderWidth:{defaultValue:null,description:"The border-width of the component.\nUse 1-12 for 1px-12px.\nAccepts responsive props in the form of an array.",name:"borderWidth",required:!1,type:{name:"SizeNumber | SizeNumberArray"}},borderRadius:{defaultValue:null,description:"The border-radius of the component.\nUse BorderRadius enum from '../../../helpers/constants/design-system';\nAccepts responsive props in the form of an array.",name:"borderRadius",required:!1,type:{name:"BorderRadius | BorderRadiusArray"}},borderStyle:{defaultValue:null,description:"The border-style of the component.\nUse BorderStyle enum from '../../../helpers/constants/design-system';\nAccepts responsive props in the form of an array.",name:"borderStyle",required:!1,type:{name:"BorderStyle | BorderStyleArray"}},alignItems:{defaultValue:null,description:"The align-items of the component.\nUse AlignItems enum from '../../../helpers/constants/design-system';\nAccepts responsive props in the form of an array.",name:"alignItems",required:!1,type:{name:"AlignItems | AlignItemsArray"}},justifyContent:{defaultValue:null,description:"The justify-content of the component.\nUse JustifyContent enum from '../../../helpers/constants/design-system';\nAccepts responsive props in the form of an array.",name:"justifyContent",required:!1,type:{name:"JustifyContent | JustifyContentArray"}},textAlign:{defaultValue:null,description:"The text-align of the component.\nUse TextAlign enum from '../../../helpers/constants/design-system';\nAccepts responsive props in the form of an array.",name:"textAlign",required:!1,type:{name:"TextAlign | TextAlignArray"}},display:{defaultValue:null,description:"The display of the component.\nUse Display enum from '../../../helpers/constants/design-system';\nAccepts responsive props in the form of an array.",name:"display",required:!1,type:{name:"Display | DisplayArray"}},width:{defaultValue:null,description:"The width of the component.\nUse BlockSize enum from '../../../helpers/constants/design-system';\nAccepts responsive props in the form of an array.",name:"width",required:!1,type:{name:"BlockSize | BlockSizeArray"}},minWidth:{defaultValue:null,description:"The min-width of the component.\nUse BlockSize enum from '../../../helpers/constants/design-system';\nAccepts responsive props in the form of an array.",name:"minWidth",required:!1,type:{name:"BlockSize | BlockSizeArray"}},height:{defaultValue:null,description:"The height of the component.\nUse BlockSize enum from '../../../helpers/constants/design-system';\nAccepts responsive props in the form of an array.",name:"height",required:!1,type:{name:"BlockSize | BlockSizeArray"}},backgroundColor:{defaultValue:null,description:"The background-color of the component.\nUse BackgroundColor enum from '../../../helpers/constants/design-system';\nAccepts responsive props in the form of an array.",name:"backgroundColor",required:!1,type:{name:"BackgroundColor | BackgroundColorArray"}},color:{defaultValue:null,description:"The text-color of the component.\nUse TextColor enum from '../../../helpers/constants/design-system';\nAccepts responsive props in the form of an array.",name:"color",required:!1,type:{name:"TextColor | IconColor | TextColorArray | IconColorArray"}},"data-testid":{defaultValue:null,description:"An optional data-testid to apply to the component.\nTypeScript is complaining about data- attributes which means we need to explicitly define this as a prop.\nTODO: Allow data- attributes.",name:"data-testid",required:!1,type:{name:"string"}},as:{defaultValue:null,description:"An override of the default HTML tag.\nCan also be a React component.",name:"as",required:!1,type:{name:"ElementType<any>"}},ref:{defaultValue:null,description:"",name:"ref",required:!1,type:{name:"any"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["ui/components/component-library/textarea/textarea.tsx#Textarea"]={docgenInfo:Textarea.__docgenInfo,name:"Textarea",path:"ui/components/component-library/textarea/textarea.tsx#Textarea"})}catch(__react_docgen_typescript_loader_error){}},"./ui/components/component-library/textarea/textarea.types.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";var TextareaResize;__webpack_require__.d(__webpack_exports__,{$:()=>TextareaResize}),__webpack_require__("./node_modules/react/index.js"),function(TextareaResize){TextareaResize.None="none",TextareaResize.Both="both",TextareaResize.Horizontal="horizontal",TextareaResize.Vertical="vertical",TextareaResize.Initial="initial",TextareaResize.Inherit="inherit"}(TextareaResize||(TextareaResize={}))},"./ui/components/institutional/note-to-trader/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>note_to_trader});var react=__webpack_require__("./node_modules/react/index.js"),es=__webpack_require__("./node_modules/react-redux/es/index.js"),design_system=__webpack_require__("./ui/helpers/constants/design-system.ts"),component_library=__webpack_require__("./ui/components/component-library/index.ts"),component_library_textarea=__webpack_require__("./ui/components/component-library/textarea/index.ts"),institution_background=__webpack_require__("./ui/store/institutional/institution-background.ts"),selectors=__webpack_require__("./ui/selectors/institutional/selectors.ts"),hexstring_utils=__webpack_require__("./shared/modules/hexstring-utils.ts"),context_confirm=__webpack_require__("./ui/pages/confirmations/context/confirm/index.tsx"),utils=__webpack_require__("./ui/pages/confirmations/components/confirm/utils.ts"),useI18nContext=__webpack_require__("./ui/hooks/useI18nContext.js"),confirmations_utils=__webpack_require__("./ui/pages/confirmations/utils/index.ts");function _array_like_to_array(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function _array_with_holes(arr){if(Array.isArray(arr))return arr}function _iterable_to_array_limit(arr,i){var _s,_e,_i=null==arr?null:"undefined"!=typeof Symbol&&arr[Symbol.iterator]||arr["@@iterator"];if(null!=_i){var _arr=[],_n=!0,_d=!1;try{for(_i=_i.call(arr);!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{_n||null==_i.return||_i.return()}finally{if(_d)throw _e}}return _arr}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array(arr,i){return _array_with_holes(arr)||_iterable_to_array_limit(arr,i)||_unsupported_iterable_to_array(arr,i)||_non_iterable_rest()}function _unsupported_iterable_to_array(o,minLen){if(o){if("string"==typeof o)return _array_like_to_array(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if("Object"===n&&o.constructor&&(n=o.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _array_like_to_array(o,minLen)}}let note_to_trader=function(){var dispatch=(0,es.wA)(),t=(0,useI18nContext.P)(),_useState=_sliced_to_array((0,react.useState)(""),2),noteText=_useState[0],setNoteText=_useState[1],currentConfirmation=(0,context_confirm.TW)().currentConfirmation,isSignature=(0,confirmations_utils.rS)(currentConfirmation),from=(0,utils.B)(currentConfirmation).from,fromChecksumHexAddress=(0,hexstring_utils.sX)(from||""),isNoteToTraderSupported=(0,es.d4)(function(state){return(0,selectors.ii)(state,fromChecksumHexAddress)});return((0,react.useEffect)(function(){var timer=setTimeout(function(){dispatch((0,institution_background.vn)(noteText))},700);return function(){return clearTimeout(timer)}},[noteText]),!isNoteToTraderSupported||isSignature)?null:react.createElement(component_library.az,{backgroundColor:design_system.i0.backgroundDefault,borderRadius:design_system.Z6.MD,padding:0,marginBottom:4},react.createElement(component_library.az,{display:design_system.nl.Flex,flexDirection:design_system.bo.Column,padding:4},react.createElement(component_library.az,{className:"note-header",display:design_system.nl.Flex,justifyContent:design_system.A9.spaceBetween},react.createElement(component_library.JU,{htmlFor:"transaction-note"},t("transactionNote")),react.createElement(component_library.EY,{className:"note-header__counter"},noteText.length,"/",280)),react.createElement(component_library.az,{display:design_system.nl.Flex,flexDirection:design_system.bo.Column,className:"note-field"},react.createElement(component_library_textarea.T,{id:"transaction-note","data-testid":"transaction-note",onChange:function(param){return setNoteText(param.target.value)},value:noteText,height:design_system.Zf.Full,width:design_system.Zf.Full,maxLength:280,placeholder:t("notePlaceholder"),padding:2}))))};try{notetotrader.displayName="notetotrader",notetotrader.__docgenInfo={description:"",displayName:"notetotrader",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["ui/components/institutional/note-to-trader/note-to-trader.tsx#notetotrader"]={docgenInfo:notetotrader.__docgenInfo,name:"notetotrader",path:"ui/components/institutional/note-to-trader/note-to-trader.tsx#notetotrader"})}catch(__react_docgen_typescript_loader_error){}},"./ui/components/institutional/signature-mismatch-banner/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{S:()=>signature_mismatch_banner});var react=__webpack_require__("./node_modules/react/index.js"),es=__webpack_require__("./node_modules/react-redux/es/index.js"),types=__webpack_require__("./node_modules/@metamask/transaction-controller/dist/types.mjs"),useI18nContext=__webpack_require__("./ui/hooks/useI18nContext.js"),selectors=__webpack_require__("./ui/selectors/index.js"),util=__webpack_require__("./ui/helpers/utils/util.js"),context_confirm=__webpack_require__("./ui/pages/confirmations/context/confirm/index.tsx"),utils_confirm=__webpack_require__("./ui/pages/confirmations/utils/confirm.ts"),component_library=__webpack_require__("./ui/components/component-library/index.ts");let signature_mismatch_banner=(0,react.memo)(function(){var t=(0,useI18nContext.P)(),currentConfirmation=(0,context_confirm.TW)().currentConfirmation,selectedAccount=(0,es.d4)(selectors._rF),allAccounts=(0,es.d4)(selectors.uQt),fromAccount=(0,react.useMemo)(function(){var isSIWE=(0,utils_confirm.q9)(currentConfirmation);if(!currentConfirmation||isSIWE||currentConfirmation.type!==types.D_.personalSign&¤tConfirmation.type!==types.D_.signTypedData||!currentConfirmation.msgParams)return null;var from=currentConfirmation.msgParams.from;return(0,util.N_)(allAccounts,from)},[currentConfirmation,allAccounts]);if(!selectedAccount||!fromAccount||selectedAccount.address===fromAccount.address)return null;var message=t("mismatchAccount",[(0,util.Wr)(null==selectedAccount?void 0:selectedAccount.address),(0,util.Wr)(null==fromAccount?void 0:fromAccount.address)]);return react.createElement(component_library.b8,{marginTop:3,title:message})});try{signaturemismatchbanner.displayName="signaturemismatchbanner",signaturemismatchbanner.__docgenInfo={description:"",displayName:"signaturemismatchbanner",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["ui/components/institutional/signature-mismatch-banner/signature-mismatch-banner.tsx#signaturemismatchbanner"]={docgenInfo:signaturemismatchbanner.__docgenInfo,name:"signaturemismatchbanner",path:"ui/components/institutional/signature-mismatch-banner/signature-mismatch-banner.tsx#signaturemismatchbanner"})}catch(__react_docgen_typescript_loader_error){}},"./ui/components/ui/delineator/delineator.types.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";var DelineatorType;__webpack_require__.d(__webpack_exports__,{c:()=>DelineatorType}),function(DelineatorType){DelineatorType.Error="error",DelineatorType.Default="default"}(DelineatorType||(DelineatorType={}))},"./ui/components/ui/delineator/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{I:()=>Delineator});var react=__webpack_require__("./node_modules/react/index.js"),classnames=__webpack_require__("./node_modules/classnames/index.js"),classnames_default=__webpack_require__.n(classnames),design_system=__webpack_require__("./ui/helpers/constants/design-system.ts"),component_library=__webpack_require__("./ui/components/component-library/index.ts"),preloader_icon_component=__webpack_require__("./ui/components/ui/icon/preloader/preloader-icon.component.js"),delineator_types=__webpack_require__("./ui/components/ui/delineator/delineator.types.ts");function _define_property(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _object_spread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{},ownKeys=Object.keys(source);"function"==typeof Object.getOwnPropertySymbols&&(ownKeys=ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym){return Object.getOwnPropertyDescriptor(source,sym).enumerable}))),ownKeys.forEach(function(key){_define_property(target,key,source[key])})}return target}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable})),keys.push.apply(keys,symbols)}return keys}function _object_spread_props(target,source){return source=null!=source?source:{},Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))}),target}var defaultIconProps={size:component_library.OQ.Xs},getIconPropsByType=function(type){var backgroundColor,inverseIconColorProp={color:design_system.Li.infoInverse};return backgroundColor=type===delineator_types.c.Error?design_system.i0.errorDefault:design_system.i0.overlayAlternative,_object_spread_props(_object_spread({},defaultIconProps),{iconProps:inverseIconColorProp,backgroundColor:backgroundColor})},overrideTextComponentColorByType=function(param){var component=param.component,color=param.type===delineator_types.c.Error?design_system.r7.errorDefault:design_system.r7.textDefault;return react.cloneElement(component,{color:color})};function _array_like_to_array(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function _array_with_holes(arr){if(Array.isArray(arr))return arr}function delineator_define_property(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _iterable_to_array_limit(arr,i){var _s,_e,_i=null==arr?null:"undefined"!=typeof Symbol&&arr[Symbol.iterator]||arr["@@iterator"];if(null!=_i){var _arr=[],_n=!0,_d=!1;try{for(_i=_i.call(arr);!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{_n||null==_i.return||_i.return()}finally{if(_d)throw _e}}return _arr}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function delineator_object_spread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{},ownKeys=Object.keys(source);"function"==typeof Object.getOwnPropertySymbols&&(ownKeys=ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym){return Object.getOwnPropertyDescriptor(source,sym).enumerable}))),ownKeys.forEach(function(key){delineator_define_property(target,key,source[key])})}return target}function _sliced_to_array(arr,i){return _array_with_holes(arr)||_iterable_to_array_limit(arr,i)||_unsupported_iterable_to_array(arr,i)||_non_iterable_rest()}function _unsupported_iterable_to_array(o,minLen){if(o){if("string"==typeof o)return _array_like_to_array(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if("Object"===n&&o.constructor&&(n=o.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _array_like_to_array(o,minLen)}}var Loader=function(){return react.createElement("div",{role:"progressbar"},react.createElement(preloader_icon_component.A,{size:16}))},ExpandableIcon=function(param){var isExpanded=param.isExpanded;return react.createElement(component_library.In,{name:isExpanded?component_library.$M.ArrowUp:component_library.$M.ArrowDown,size:component_library.lK.Sm,color:design_system.Li.primaryDefault})},Header=function(param){var headerComponent=param.headerComponent,iconName=param.iconName,isCollapsible=param.isCollapsible,isExpanded=param.isExpanded,isLoading=param.isLoading,isDisabled=param.isDisabled,onHeaderClick=param.onHeaderClick,type=param.type,iconProps=getIconPropsByType(type);return react.createElement(component_library.az,{className:classnames_default()({delineator__header:!0,"delineator__header--expanded":isExpanded,"delineator__header--loading":isLoading,"delineator__header--disabled":isDisabled}),display:design_system.nl.Flex,alignItems:design_system.k2.center,justifyContent:design_system.A9.spaceBetween,paddingTop:2,paddingRight:4,paddingBottom:isExpanded?0:2,paddingLeft:4,onClick:onHeaderClick},react.createElement(component_library.az,{display:design_system.nl.Flex,alignItems:design_system.k2.center},iconName&&react.createElement(component_library.hS,delineator_object_spread({iconName:iconName},iconProps)),overrideTextComponentColorByType({component:headerComponent,type:type})),isCollapsible&&(isLoading?react.createElement(Loader,null):react.createElement(ExpandableIcon,{isExpanded:isExpanded})))},Content=function(param){var children=param.children,contentBoxProps=param.contentBoxProps;return react.createElement(component_library.az,delineator_object_spread({paddingTop:2,paddingRight:4,paddingBottom:4,paddingLeft:4,flexDirection:design_system.bo.Column},contentBoxProps),children)},Container=function(param){var children=param.children,wrapperBoxProps=param.wrapperBoxProps;return react.createElement(component_library.az,delineator_object_spread({className:"delineator__wrapper",display:design_system.nl.Flex,flexDirection:design_system.bo.Column,backgroundColor:design_system.i0.backgroundDefault,borderRadius:design_system.Z6.LG},wrapperBoxProps),children)},Delineator=function(param){var children=param.children,headerComponent=param.headerComponent,iconName=param.iconName,_param_isCollapsible=param.isCollapsible,isCollapsible=void 0===_param_isCollapsible||_param_isCollapsible,isExpandedProp=param.isExpanded,_param_isLoading=param.isLoading,isLoading=void 0!==_param_isLoading&&_param_isLoading,_param_isDisabled=param.isDisabled,isDisabled=void 0!==_param_isDisabled&&_param_isDisabled,onExpandChange=param.onExpandChange,type=param.type,wrapperBoxProps=param.wrapperBoxProps,contentBoxProps=param.contentBoxProps,_useState=_sliced_to_array((0,react.useState)(isExpandedProp||!1),2),isExpanded=_useState[0],setIsExpanded=_useState[1],shouldShowContent=!isCollapsible||isCollapsible&&isExpanded,handleHeaderClick=(0,react.useCallback)(function(){if(!isDisabled&&!isLoading&&isCollapsible){var newExpandedState=!isExpanded;null==onExpandChange||onExpandChange(newExpandedState),setIsExpanded(newExpandedState)}},[isLoading,isCollapsible,isExpanded,isDisabled,onExpandChange]);return react.createElement(Container,{wrapperBoxProps:wrapperBoxProps},react.createElement(Header,{headerComponent:headerComponent,iconName:iconName,isCollapsible:isCollapsible,isExpanded:isExpanded,isLoading:isLoading,isDisabled:isDisabled,onHeaderClick:handleHeaderClick,type:type}),shouldShowContent&&!isLoading&&react.createElement(Content,{contentBoxProps:contentBoxProps},children))};try{Delineator.displayName="Delineator",Delineator.__docgenInfo={description:"",displayName:"Delineator",props:{headerComponent:{defaultValue:null,description:"",name:"headerComponent",required:!0,type:{name:"ReactElement<TextComponent, string | JSXElementConstructor<any>>"}},iconName:{defaultValue:null,description:"",name:"iconName",required:!1,type:{name:"enum",value:[{value:'"add-square"'},{value:'"add"'},{value:'"arrow-2-down"'},{value:'"arrow-2-left"'},{value:'"arrow-2-right"'},{value:'"arrow-2-up"'},{value:'"arrow-2-up-right"'},{value:'"arrow-double-left"'},{value:'"arrow-double-right"'},{value:'"arrow-down"'},{value:'"arrow-left"'},{value:'"arrow-right"'},{value:'"arrow-up"'},{value:'"bank-token"'},{value:'"bank"'},{value:'"book"'},{value:'"bookmark"'},{value:'"bridge"'},{value:'"collapse"'},{value:'"calculator"'},{value:'"card-pos"'},{value:'"card-token"'},{value:'"card"'},{value:'"category"'},{value:'"chart"'},{value:'"check-bold"'},{value:'"check"'},{value:'"clock"'},{value:'"close"'},{value:'"code-circle"'},{value:'"coin"'},{value:'"confirmation"'},{value:'"connect"'},{value:'"copy-success"'},{value:'"copy"'},{value:'"customize"'},{value:'"danger"'},{value:'"dark"'},{value:'"data"'},{value:'"diagram"'},{value:'"document-code"'},{value:'"drag-drop"'},{value:'"dragging-animation"'},{value:'"pinning-animation"'},{value:'"edit"'},{value:'"eraser"'},{value:'"ethereum"'},{value:'"expand"'},{value:'"explore"'},{value:'"export"'},{value:'"eye-slash"'},{value:'"eye"'},{value:'"filter"'},{value:'"flag"'},{value:'"flash-slash"'},{value:'"flash"'},{value:'"full-circle"'},{value:'"gas"'},{value:'"global-search"'},{value:'"global"'},{value:'"graph"'},{value:'"hardware"'},{value:'"heart"'},{value:'"hierarchy"'},{value:'"home"'},{value:'"import"'},{value:'"info"'},{value:'"key"'},{value:'"light"'},{value:'"link"'},{value:'"loading"'},{value:'"lock-circle"'},{value:'"lock-slash"'},{value:'"lock"'},{value:'"login"'},{value:'"logout"'},{value:'"menu"'},{value:'"message-question"'},{value:'"messages"'},{value:'"minus-bold"'},{value:'"minus-square"'},{value:'"minus"'},{value:'"mobile"'},{value:'"money"'},{value:'"monitor"'},{value:'"more-horizontal"'},{value:'"more-vertical"'},{value:'"notification-circle"'},{value:'"notification"'},{value:'"password-check"'},{value:'"people"'},{value:'"pin"'},{value:'"programming-arrows"'},{value:'"custody"'},{value:'"question"'},{value:'"received"'},{value:'"refresh"'},{value:'"save"'},{value:'"scan-barcode"'},{value:'"scan-focus"'},{value:'"scan"'},{value:'"scroll"'},{value:'"search"'},{value:'"security-card"'},{value:'"security-cross"'},{value:'"security-key"'},{value:'"security-search"'},{value:'"security-slash"'},{value:'"security-tick"'},{value:'"security-time"'},{value:'"security-user"'},{value:'"security"'},{value:'"send-1"'},{value:'"send-2"'},{value:'"setting"'},{value:'"slash"'},{value:'"snaps-mobile"'},{value:'"snaps-plus"'},{value:'"snaps"'},{value:'"speedometer"'},{value:'"star"'},{value:'"stake"'},{value:'"student"'},{value:'"swap-horizontal"'},{value:'"swap-vertical"'},{value:'"tag"'},{value:'"tilde"'},{value:'"timer"'},{value:'"trash"'},{value:'"trend-down"'},{value:'"trend-up"'},{value:'"user-circle-add"'},{value:'"user-circle-link"'},{value:'"user-circle-remove"'},{value:'"user-circle"'},{value:'"user"'},{value:'"wallet-card"'},{value:'"wallet-money"'},{value:'"wallet"'},{value:'"warning"'},{value:'"twitter"'},{value:'"qr-code"'},{value:'"user-check"'},{value:'"unpin"'},{value:'"ban"'},{value:'"bold"'},{value:'"circle-x"'},{value:'"download"'},{value:'"file"'},{value:'"flask"'},{value:'"plug"'},{value:'"share"'},{value:'"square"'},{value:'"tint"'},{value:'"upload"'},{value:'"usb"'},{value:'"wifi"'},{value:'"plus-minus"'}]}},isCollapsible:{defaultValue:{value:"true"},description:"",name:"isCollapsible",required:!1,type:{name:"boolean"}},isExpanded:{defaultValue:null,description:"",name:"isExpanded",required:!1,type:{name:"boolean"}},isLoading:{defaultValue:{value:"false"},description:"",name:"isLoading",required:!1,type:{name:"boolean"}},isDisabled:{defaultValue:{value:"false"},description:"",name:"isDisabled",required:!1,type:{name:"boolean"}},onExpandChange:{defaultValue:null,description:"",name:"onExpandChange",required:!1,type:{name:"((isExpanded: boolean) => void)"}},type:{defaultValue:null,description:"",name:"type",required:!1,type:{name:"enum",value:[{value:'"error"'},{value:'"default"'}]}},wrapperBoxProps:{defaultValue:null,description:"",name:"wrapperBoxProps",required:!1,type:{name:'(Props & AsProp<ElementType<any>> & { children?: ReactNode; } & Omit<Pick<any, string | number | symbol>, "as" | keyof Props> & { ...; })'}},contentBoxProps:{defaultValue:null,description:"",name:"contentBoxProps",required:!1,type:{name:'(Props & AsProp<ElementType<any>> & { children?: ReactNode; } & Omit<Pick<any, string | number | symbol>, "as" | keyof Props> & { ...; })'}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["ui/components/ui/delineator/delineator.tsx#Delineator"]={docgenInfo:Delineator.__docgenInfo,name:"Delineator",path:"ui/components/ui/delineator/delineator.tsx#Delineator"})}catch(__react_docgen_typescript_loader_error){}},"./ui/pages/confirmations/components/confirm/footer/footer.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>footer});var types=__webpack_require__("./node_modules/@metamask/transaction-controller/dist/types.mjs"),errors=__webpack_require__("./node_modules/@metamask/rpc-errors/dist/errors.mjs"),utils=__webpack_require__("./node_modules/@metamask/rpc-errors/dist/utils.mjs"),react=__webpack_require__("./node_modules/react/index.js"),es=__webpack_require__("./node_modules/react-redux/es/index.js"),confirm_alert_modal=__webpack_require__("./ui/components/app/alert-system/confirm-alert-modal/confirm-alert-modal.tsx");try{ConfirmAlertModal.displayName="ConfirmAlertModal",ConfirmAlertModal.__docgenInfo={description:"",displayName:"ConfirmAlertModal",props:{onCancel:{defaultValue:null,description:"Callback function that is called when the cancel button is clicked.",name:"onCancel",required:!0,type:{name:"OnCancelHandler"}},onClose:{defaultValue:null,description:"The function to be executed when the modal needs to be closed.",name:"onClose",required:!0,type:{name:"() => void"}},onSubmit:{defaultValue:null,description:"Callback function that is called when the submit button is clicked.",name:"onSubmit",required:!0,type:{name:"() => void"}},ownerId:{defaultValue:null,description:"The owner ID of the relevant alert from the `confirmAlerts` reducer.",name:"ownerId",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["ui/components/app/alert-system/confirm-alert-modal/index.tsx#ConfirmAlertModal"]={docgenInfo:ConfirmAlertModal.__docgenInfo,name:"ConfirmAlertModal",path:"ui/components/app/alert-system/confirm-alert-modal/index.tsx#ConfirmAlertModal"})}catch(__react_docgen_typescript_loader_error){}var component_library=__webpack_require__("./ui/components/component-library/index.ts"),page=__webpack_require__("./ui/components/multichain/pages/page/index.ts"),useI18nContext=__webpack_require__("./ui/hooks/useI18nContext.js"),selectors=__webpack_require__("./ui/selectors/index.js"),context_confirm=__webpack_require__("./ui/pages/confirmations/context/confirm/index.tsx"),useMMICustodySignMessage=__webpack_require__("./ui/hooks/useMMICustodySignMessage.js"),react_router=__webpack_require__("./node_modules/react-router-dom/node_modules/react-router/esm/react-router.js"),dist=__webpack_require__("./node_modules/@metamask-institutional/extension/dist/index.js"),actions=__webpack_require__("./ui/store/actions.ts"),custody=__webpack_require__("./shared/constants/custody.ts"),history_history=__webpack_require__("./ui/ducks/history/history.js"),confirm_transaction_duck=__webpack_require__("./ui/ducks/confirm-transaction/confirm-transaction.duck.js"),selectors_selectors=__webpack_require__("./ui/selectors/selectors.js"),institution_background=__webpack_require__("./ui/store/institutional/institution-background.ts"),institution_actions=__webpack_require__("./ui/store/institutional/institution-actions.ts"),institutional_selectors=__webpack_require__("./ui/selectors/institutional/selectors.ts"),confirm_utils=__webpack_require__("./ui/pages/confirmations/components/confirm/utils.ts"),hexstring_utils=__webpack_require__("./shared/modules/hexstring-utils.ts"),modules_selectors=__webpack_require__("./shared/modules/selectors/index.ts"),network=__webpack_require__("./shared/constants/network.ts"),networks=__webpack_require__("./shared/modules/selectors/networks.ts");function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg),value=info.value}catch(error){reject(error);return}info.done?resolve(value):Promise.resolve(value).then(_next,_throw)}function _async_to_generator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value)}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err)}_next(void 0)})}}function _ts_generator(thisArg,body){var f,y,t,g,_={label:0,sent:function(){if(1&t[0])throw t[1];return t[1]},trys:[],ops:[]};return g={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(g[Symbol.iterator]=function(){return this}),g;function verb(n){return function(v){return step([n,v])}}function step(op){if(f)throw TypeError("Generator is already executing.");for(;_;)try{if(f=1,y&&(t=2&op[0]?y.return:op[0]?y.throw||((t=y.return)&&t.call(y),0):y.next)&&!(t=t.call(y,op[1])).done)return t;switch(y=0,t&&(op=[2&op[0],t.value]),op[0]){case 0:case 1:t=op;break;case 4:return _.label++,{value:op[1],done:!1};case 5:_.label++,y=op[1],op=[0];continue;case 7:op=_.ops.pop(),_.trys.pop();continue;default:if(!(t=(t=_.trys).length>0&&t[t.length-1])&&(6===op[0]||2===op[0])){_=0;continue}if(3===op[0]&&(!t||op[1]>t[0]&&op[1]<t[3])){_.label=op[1];break}if(6===op[0]&&_.label<t[1]){_.label=t[1],t=op;break}if(t&&_.label<t[2]){_.label=t[2],_.ops.push(op);break}t[2]&&_.ops.pop(),_.trys.pop();continue}op=body.call(thisArg,_)}catch(e){op=[6,e],y=0}finally{f=t=0}if(5&op[0])throw op[1];return{value:op[0]?op[1]:void 0,done:!0}}}function useMMICustodySendTransaction(){var _ref,dispatch=(0,es.wA)(),history=(0,react_router.W6)(),mmiActions=(0,institution_background.bB)(),accountType=(0,es.d4)(selectors_selectors.U8f),mostRecentOverviewPage=(0,es.d4)(history_history.fs),currentConfirmation=(0,context_confirm.TW)().currentConfirmation,from=(0,confirm_utils.B)(currentConfirmation).from,fromChecksumHexAddress=(0,hexstring_utils.sX)(from||""),isNoteToTraderSupported=(0,es.d4)(function(state){return(0,institutional_selectors.ii)(state,fromChecksumHexAddress)}),custodianPublishesTransaction=(0,es.d4)(function(state){return(0,institutional_selectors.EA)(state,fromChecksumHexAddress)}),isSmartTransactionsEnabled=(0,es.d4)(modules_selectors.Q6),_ref1=(0,es.d4)(networks.Iv)||{},chainId=_ref1.chainId,customRpcUrl=_ref1.rpcUrl,builtinRpcUrl=network.R_[chainId],rpcUrl=customRpcUrl||builtinRpcUrl;return{custodyTransactionFn:(_ref=_async_to_generator(function(_transactionData,noteToTraderMessage){var confirmation,txId,fromAddress,closeNotification;return _ts_generator(this,function(_state){switch(_state.label){case 0:if(!((confirmation=_transactionData)&&accountType===custody.C.CUSTODY))return[3,2];return confirmation.custodyStatus=custody.g.CREATED,confirmation.metadata=confirmation.metadata||{},isNoteToTraderSupported&&(confirmation.metadata.note=noteToTraderMessage),isSmartTransactionsEnabled&&(confirmation.origin+="#smartTransaction"),confirmation.metadata.custodianPublishesTransaction=custodianPublishesTransaction,confirmation.metadata.rpcUrl=rpcUrl,dispatch(mmiActions.setWaitForConfirmDeepLinkDialog(!0)),txId=confirmation.id,fromAddress=confirmation.txParams.from,closeNotification=!1,[4,dispatch((0,actions.updateAndApproveTx)(confirmation,!0,""))];case 1:return _state.sent(),(0,dist.ep)({dispatch:dispatch,mmiActions:mmiActions,txId:txId,fromAddress:fromAddress,closeNotification:closeNotification,isSignature:!1,custodyId:"",onDeepLinkFetched:function(){},onDeepLinkShown:function(){dispatch((0,confirm_transaction_duck.GB)())},showCustodyConfirmLink:institution_actions.RQ}),[3,4];case 2:return[4,dispatch((0,actions.updateAndApproveTx)(_transactionData,!0,""))];case 3:_state.sent(),dispatch((0,confirm_transaction_duck.GB)()),history.push(mostRecentOverviewPage),_state.label=4;case 4:return[2]}})}),function custodyTransactionFn(_transactionData,noteToTraderMessage){return _ref.apply(this,arguments)})}}function useMMIConfirmations(){var custodySignFn=(0,useMMICustodySignMessage.m)().custodySignFn,custodyTransactionFn=useMMICustodySendTransaction().custodyTransactionFn,currentConfirmation=(0,context_confirm.TW)().currentConfirmation;return{mmiSubmitDisabled:currentConfirmation&&(currentConfirmation.type===types.D_.personalSign||currentConfirmation.type===types.D_.signTypedData)&&!!(null==currentConfirmation?void 0:currentConfirmation.custodyId),mmiOnSignCallback:function(){return custodySignFn(currentConfirmation)},mmiOnTransactionCallback:function(transactionData,noteToTraderMessage){return custodyTransactionFn(transactionData,noteToTraderMessage)}}}var useAlerts=__webpack_require__("./ui/hooks/useAlerts.ts"),preferences=__webpack_require__("./ui/pages/confirmations/selectors/preferences.ts"),confirmations_utils=__webpack_require__("./ui/pages/confirmations/utils/index.ts"),metametrics=__webpack_require__("./shared/constants/metametrics.ts"),design_system=__webpack_require__("./ui/helpers/constants/design-system.ts"),confirmation_utils=__webpack_require__("./shared/lib/confirmation.utils.ts");function _array_like_to_array(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function _array_with_holes(arr){if(Array.isArray(arr))return arr}function _define_property(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _iterable_to_array_limit(arr,i){var _s,_e,_i=null==arr?null:"undefined"!=typeof Symbol&&arr[Symbol.iterator]||arr["@@iterator"];if(null!=_i){var _arr=[],_n=!0,_d=!1;try{for(_i=_i.call(arr);!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{_n||null==_i.return||_i.return()}finally{if(_d)throw _e}}return _arr}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{},ownKeys=Object.keys(source);"function"==typeof Object.getOwnPropertySymbols&&(ownKeys=ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym){return Object.getOwnPropertyDescriptor(source,sym).enumerable}))),ownKeys.forEach(function(key){_define_property(target,key,source[key])})}return target}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable})),keys.push.apply(keys,symbols)}return keys}function _object_spread_props(target,source){return source=null!=source?source:{},Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))}),target}function _sliced_to_array(arr,i){return _array_with_holes(arr)||_iterable_to_array_limit(arr,i)||_unsupported_iterable_to_array(arr,i)||_non_iterable_rest()}function _unsupported_iterable_to_array(o,minLen){if(o){if("string"==typeof o)return _array_like_to_array(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if("Object"===n&&o.constructor&&(n=o.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _array_like_to_array(o,minLen)}}function reviewAlertButtonText(unconfirmedDangerAlerts,t){return t(1===unconfirmedDangerAlerts.length?"reviewAlert":unconfirmedDangerAlerts.length>1?"reviewAlerts":"confirm")}function getButtonDisabledState(hasUnconfirmedDangerAlerts,hasBlockingAlerts,disabled){return!!hasBlockingAlerts||!hasUnconfirmedDangerAlerts&&disabled}var ConfirmButton=function(param){var _param_alertOwnerId=param.alertOwnerId,alertOwnerId=void 0===_param_alertOwnerId?"":_param_alertOwnerId,disabled=param.disabled,onSubmit=param.onSubmit,onCancel=param.onCancel,t=(0,useI18nContext.P)(),_useState=_sliced_to_array((0,react.useState)(!1),2),confirmModalVisible=_useState[0],setConfirmModalVisible=_useState[1],_useAlerts=(0,useAlerts.A)(alertOwnerId),alerts=_useAlerts.alerts,hasDangerAlerts=_useAlerts.hasDangerAlerts,hasUnconfirmedDangerAlerts=_useAlerts.hasUnconfirmedDangerAlerts,hasUnconfirmedFieldDangerAlerts=_useAlerts.hasUnconfirmedFieldDangerAlerts,unconfirmedFieldDangerAlerts=_useAlerts.unconfirmedFieldDangerAlerts,hasDangerBlockingAlerts=alerts.some(function(alert){return alert.severity===design_system.AI.Danger&&alert.isBlocking}),handleCloseConfirmModal=(0,react.useCallback)(function(){setConfirmModalVisible(!1)},[]),handleOpenConfirmModal=(0,react.useCallback)(function(){setConfirmModalVisible(!0)},[]);return react.createElement(react.Fragment,null,confirmModalVisible&&react.createElement(confirm_alert_modal.g,{ownerId:alertOwnerId,onClose:handleCloseConfirmModal,onCancel:onCancel,onSubmit:onSubmit}),hasDangerAlerts?react.createElement(component_library.$n,{block:!0,danger:!0,"data-testid":"confirm-footer-button",disabled:getButtonDisabledState(hasUnconfirmedDangerAlerts,hasDangerBlockingAlerts,disabled),onClick:handleOpenConfirmModal,size:component_library.Mp.Lg,startIconName:hasUnconfirmedFieldDangerAlerts?component_library.$M.SecuritySearch:component_library.$M.Danger},reviewAlertButtonText(unconfirmedFieldDangerAlerts,t)):react.createElement(component_library.$n,{block:!0,"data-testid":"confirm-footer-button",disabled:disabled,onClick:onSubmit,size:component_library.Mp.Lg},t("confirm")))};let footer=function(){var dispatch=(0,es.wA)(),t=(0,useI18nContext.P)(),customNonceValue=(0,es.d4)(selectors.gRb),useTransactionSimulations=(0,es.d4)(preferences.C),_useConfirmContext=(0,context_confirm.TW)(),currentConfirmation=_useConfirmContext.currentConfirmation,isScrollToBottomCompleted=_useConfirmContext.isScrollToBottomCompleted,from=(0,confirm_utils.B)(currentConfirmation).from,noteToTraderMessage=(0,es.d4)(institutional_selectors.Rw),_useMMIConfirmations=useMMIConfirmations(),mmiOnTransactionCallback=_useMMIConfirmations.mmiOnTransactionCallback,mmiOnSignCallback=_useMMIConfirmations.mmiOnSignCallback,mmiSubmitDisabled=_useMMIConfirmations.mmiSubmitDisabled,hardwareWalletRequiresConnection=(0,es.d4)(function(state){return!!from&&(0,selectors.VXz)(state,from)}),isSIWE=(0,confirmations_utils.q9)(currentConfirmation),isPermit=(0,confirmations_utils.VO)(currentConfirmation),isPersonalSign=(null==currentConfirmation?void 0:currentConfirmation.type)===types.D_.personalSign,onCancel=(0,react.useCallback)(function(param){var location=param.location;if(currentConfirmation){var error=errors.P.userRejectedRequest();error.data={location:location},dispatch((0,actions.rejectPendingApproval)(currentConfirmation.id,(0,utils.P5)(error))),dispatch((0,actions.updateCustomNonce)("")),dispatch((0,actions.setNextNonce)(""))}},[currentConfirmation]),onSubmit=(0,react.useCallback)(function(){if(currentConfirmation){if((0,confirmation_utils.nO)(null==currentConfirmation?void 0:currentConfirmation.type)){var updatedTx=customNonceValue?_object_spread_props(_object_spread({},currentConfirmation),{customNonceValue:customNonceValue}):currentConfirmation;mmiOnTransactionCallback(updatedTx,noteToTraderMessage),dispatch((0,actions.updateAndApproveTx)(updatedTx,!0,""))}else dispatch((0,actions.resolvePendingApproval)(currentConfirmation.id,void 0)),mmiOnSignCallback();dispatch((0,actions.updateCustomNonce)("")),dispatch((0,actions.setNextNonce)(""))}},[currentConfirmation,customNonceValue,noteToTraderMessage]),onFooterCancel=(0,react.useCallback)(function(){onCancel({location:metametrics.If.Confirmation})},[currentConfirmation,onCancel]);return react.createElement(page.wi,{className:"confirm-footer_page-footer"},react.createElement(component_library.$n,{block:!0,"data-testid":"confirm-footer-cancel-button",onClick:onFooterCancel,size:component_library.Mp.Lg,variant:component_library.Ak.Secondary},t("cancel")),react.createElement(ConfirmButton,{alertOwnerId:null==currentConfirmation?void 0:currentConfirmation.id,onSubmit:function(){return onSubmit()},disabled:!isScrollToBottomCompleted&&!isSIWE&&!(isPermit&&useTransactionSimulations)&&!isPersonalSign||mmiSubmitDisabled||hardwareWalletRequiresConnection,onCancel:onCancel}))}},"./ui/pages/confirmations/components/confirm/info/base-transaction-info/base-transaction-info.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_context_confirm__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./ui/pages/confirmations/context/confirm/index.tsx"),_simulation_details__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./ui/pages/confirmations/components/simulation-details/index.ts"),_shared_advanced_details_advanced_details__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./ui/pages/confirmations/components/confirm/info/shared/advanced-details/advanced-details.tsx"),_shared_gas_fees_section_gas_fees_section__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./ui/pages/confirmations/components/confirm/info/shared/gas-fees-section/gas-fees-section.tsx"),_shared_transaction_details_transaction_details__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./ui/pages/confirmations/components/confirm/info/shared/transaction-details/transaction-details.tsx");let __WEBPACK_DEFAULT_EXPORT__=function(){var transactionMeta=(0,_context_confirm__WEBPACK_IMPORTED_MODULE_1__.TW)().currentConfirmation;return(null==transactionMeta?void 0:transactionMeta.txParams)?react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement(_simulation_details__WEBPACK_IMPORTED_MODULE_2__._,{transaction:transactionMeta,isTransactionsRedesign:!0,enableMetrics:!0}),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_shared_transaction_details_transaction_details__WEBPACK_IMPORTED_MODULE_5__.hB,null),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_shared_gas_fees_section_gas_fees_section__WEBPACK_IMPORTED_MODULE_4__.i,null),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_shared_advanced_details_advanced_details__WEBPACK_IMPORTED_MODULE_3__.v,null)):null}},"./ui/pages/confirmations/components/confirm/info/hooks/useSendingValueMetric.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{p:()=>useSendingValueMetric});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_hooks_useTransactionEventFragment__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./ui/pages/confirmations/hooks/useTransactionEventFragment.js"),useSendingValueMetric=function(param){var transactionMeta=param.transactionMeta,fiatValue=param.fiatValue,updateTransactionEventFragment=(0,_hooks_useTransactionEventFragment__WEBPACK_IMPORTED_MODULE_1__.W)().updateTransactionEventFragment,transactionId=transactionMeta.id,params={properties:{sending_value:fiatValue},sensitiveProperties:{}};(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function(){void 0!==fiatValue&&""!==fiatValue&&updateTransactionEventFragment(params,transactionId)},[updateTransactionEventFragment,transactionId,JSON.stringify(params)])}},"./ui/pages/confirmations/components/confirm/info/hooks/useSupportsEIP1559.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{M:()=>useSupportsEIP1559});var _metamask_transaction_controller__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/@metamask/transaction-controller/dist/types.mjs"),react_redux__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react-redux/es/index.js"),_helpers_utils_transactions_util__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./ui/helpers/utils/transactions.util.js"),_selectors__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./ui/selectors/index.js"),_shared_modules_selectors_networks__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./shared/modules/selectors/networks.ts");function useSupportsEIP1559(transactionMeta){var _transactionMeta_txParams,isLegacyTxn=(null==transactionMeta?void 0:null===(_transactionMeta_txParams=transactionMeta.txParams)||void 0===_transactionMeta_txParams?void 0:_transactionMeta_txParams.type)===_metamask_transaction_controller__WEBPACK_IMPORTED_MODULE_4__.tB.legacy||(0,_helpers_utils_transactions_util__WEBPACK_IMPORTED_MODULE_1__.yj)(transactionMeta),selectedNetworkClientId=(0,react_redux__WEBPACK_IMPORTED_MODULE_0__.d4)(_shared_modules_selectors_networks__WEBPACK_IMPORTED_MODULE_3__.EQ);return{supportsEIP1559:(0,react_redux__WEBPACK_IMPORTED_MODULE_0__.d4)(function(state){return(0,_selectors__WEBPACK_IMPORTED_MODULE_2__.PQP)(state,selectedNetworkClientId)})&&!isLegacyTxn}}},"./ui/pages/confirmations/components/confirm/info/native-transfer/native-transfer.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>native_transfer});var react=__webpack_require__("./node_modules/react/index.js"),context_confirm=__webpack_require__("./ui/pages/confirmations/context/confirm/index.tsx"),simulation_details=__webpack_require__("./ui/pages/confirmations/components/simulation-details/index.ts"),advanced_details=__webpack_require__("./ui/pages/confirmations/components/confirm/info/shared/advanced-details/advanced-details.tsx"),gas_fees_section=__webpack_require__("./ui/pages/confirmations/components/confirm/info/shared/gas-fees-section/gas-fees-section.tsx"),bignumber=__webpack_require__("./node_modules/bignumber.js/bignumber.js"),es=__webpack_require__("./node_modules/react-redux/es/index.js"),constants_network=__webpack_require__("./shared/constants/network.ts"),transactions_controller_utils=__webpack_require__("./shared/lib/transactions-controller-utils.js"),networks=__webpack_require__("./shared/modules/selectors/networks.ts"),component_library=__webpack_require__("./ui/components/component-library/index.ts"),tooltip=__webpack_require__("./ui/components/ui/tooltip/index.js"),locale_locale=__webpack_require__("./ui/ducks/locale/locale.ts"),design_system=__webpack_require__("./ui/helpers/constants/design-system.ts"),useFiatFormatter=__webpack_require__("./ui/hooks/useFiatFormatter.ts"),selectors=__webpack_require__("./ui/selectors/index.js"),multichain=__webpack_require__("./ui/selectors/multichain.ts"),formatAmount=__webpack_require__("./ui/pages/confirmations/components/simulation-details/formatAmount.ts"),useSendingValueMetric=__webpack_require__("./ui/pages/confirmations/components/confirm/info/hooks/useSendingValueMetric.ts");let native_send_heading=function(){var _multichainNetwork_network,transactionMeta=(0,context_confirm.TW)().currentConfirmation,chainId=transactionMeta.chainId,nativeAssetTransferValue=(0,transactions_controller_utils.dU)(transactionMeta.txParams.value,18),conversionRate=(0,es.d4)(function(state){return(0,selectors._po)(state,chainId)}),fiatValue=conversionRate&&nativeAssetTransferValue&&new bignumber.BigNumber(conversionRate).times(nativeAssetTransferValue,10).toNumber(),fiatFormatter=(0,useFiatFormatter.y)(),fiatDisplayValue=fiatValue&&fiatFormatter(fiatValue,{shorten:!0}),multichainNetwork=(0,es.d4)(multichain.X3),ticker=null==multichainNetwork?void 0:null===(_multichainNetwork_network=multichainNetwork.network)||void 0===_multichainNetwork_network?void 0:_multichainNetwork_network.ticker,networkConfigurationsByChainId=(0,es.d4)(networks.hX),nativeCurrency=(null==networkConfigurationsByChainId?void 0:networkConfigurationsByChainId[transactionMeta.chainId]).nativeCurrency,locale=(0,es.d4)(locale_locale.gA),roundedTransferValue=(0,formatAmount.e)(locale,nativeAssetTransferValue),transferValue=nativeAssetTransferValue.toFixed(),isTestnet=constants_network.YP.includes(transactionMeta.chainId),showFiatInTestnets=(0,es.d4)(selectors.lX9).showFiatInTestnets,NetworkImage=react.createElement(component_library.hQ,{src:constants_network.RB[transactionMeta.chainId],name:nativeCurrency,size:component_library.gh.Xl,backgroundColor:design_system.i0.backgroundDefault}),NativeAssetAmount=roundedTransferValue===transferValue?react.createElement(component_library.EY,{variant:design_system.J3.headingLg,color:design_system.r7.inherit,marginTop:3},"".concat(roundedTransferValue," ").concat(ticker)):react.createElement(tooltip.A,{title:transferValue,position:"right"},react.createElement(component_library.EY,{variant:design_system.J3.headingLg,color:design_system.r7.inherit,marginTop:3},"".concat(roundedTransferValue," ").concat(ticker))),NativeAssetFiatConversion=!!fiatDisplayValue&&(!isTestnet||showFiatInTestnets)&&react.createElement(component_library.EY,{variant:design_system.J3.bodyMd,color:design_system.r7.textAlternative},fiatDisplayValue);return(0,useSendingValueMetric.p)({transactionMeta:transactionMeta,fiatValue:fiatValue}),react.createElement(component_library.az,{display:design_system.nl.Flex,flexDirection:design_system.bo.Column,justifyContent:design_system.A9.center,alignItems:design_system.k2.center,padding:4},NetworkImage,NativeAssetAmount,NativeAssetFiatConversion)};var token_details_section=__webpack_require__("./ui/pages/confirmations/components/confirm/info/token-transfer/token-details-section.tsx"),transaction_flow_section=__webpack_require__("./ui/pages/confirmations/components/confirm/info/token-transfer/transaction-flow-section.tsx");let native_transfer=function(){var transactionMeta=(0,context_confirm.TW)().currentConfirmation,isWalletInitiated="metamask"===transactionMeta.origin;return react.createElement(react.Fragment,null,react.createElement(native_send_heading,null),react.createElement(transaction_flow_section.g,null),react.createElement(simulation_details._,{transaction:transactionMeta,isTransactionsRedesign:!0,enableMetrics:!0,metricsOnly:isWalletInitiated}),react.createElement(token_details_section.n,null),react.createElement(gas_fees_section.i,null),react.createElement(advanced_details.v,null))}},"./ui/pages/confirmations/components/confirm/info/nft-token-transfer/nft-token-transfer.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_context_confirm__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./ui/pages/confirmations/context/confirm/index.tsx"),_simulation_details__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./ui/pages/confirmations/components/simulation-details/index.ts"),_shared_advanced_details_advanced_details__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./ui/pages/confirmations/components/confirm/info/shared/advanced-details/advanced-details.tsx"),_shared_gas_fees_section_gas_fees_section__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./ui/pages/confirmations/components/confirm/info/shared/gas-fees-section/gas-fees-section.tsx"),_shared_nft_send_heading_nft_send_heading__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./ui/pages/confirmations/components/confirm/info/shared/nft-send-heading/nft-send-heading.tsx"),_token_transfer_token_details_section__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./ui/pages/confirmations/components/confirm/info/token-transfer/token-details-section.tsx"),_token_transfer_transaction_flow_section__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./ui/pages/confirmations/components/confirm/info/token-transfer/transaction-flow-section.tsx");let __WEBPACK_DEFAULT_EXPORT__=function(){var transactionMeta=(0,_context_confirm__WEBPACK_IMPORTED_MODULE_1__.TW)().currentConfirmation,isWalletInitiated="metamask"===transactionMeta.origin;return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement(_shared_nft_send_heading_nft_send_heading__WEBPACK_IMPORTED_MODULE_5__.A,null),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_token_transfer_transaction_flow_section__WEBPACK_IMPORTED_MODULE_7__.g,null),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_simulation_details__WEBPACK_IMPORTED_MODULE_2__._,{transaction:transactionMeta,isTransactionsRedesign:!0,enableMetrics:!0,metricsOnly:isWalletInitiated}),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_token_transfer_token_details_section__WEBPACK_IMPORTED_MODULE_6__.n,null),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_shared_gas_fees_section_gas_fees_section__WEBPACK_IMPORTED_MODULE_4__.i,null),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_shared_advanced_details_advanced_details__WEBPACK_IMPORTED_MODULE_3__.v,null))}},"./ui/pages/confirmations/components/confirm/info/personal-sign/personal-sign.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>personal_sign});var react=__webpack_require__("./node_modules/react/index.js"),es=__webpack_require__("./node_modules/react-redux/es/index.js"),row=__webpack_require__("./ui/components/app/confirm/info/row/index.ts"),alert_row=__webpack_require__("./ui/components/app/confirm/info/row/alert-row/alert-row.tsx"),constants=__webpack_require__("./ui/components/app/confirm/info/row/constants.ts"),section=__webpack_require__("./ui/components/app/confirm/info/row/section.tsx"),component_library=__webpack_require__("./ui/components/component-library/index.ts"),tooltip=__webpack_require__("./ui/components/ui/tooltip/index.js"),design_system=__webpack_require__("./ui/helpers/constants/design-system.ts"),snaps=__webpack_require__("./ui/helpers/utils/snaps.ts"),util=__webpack_require__("./ui/helpers/utils/util.js"),useI18nContext=__webpack_require__("./ui/hooks/useI18nContext.js"),context_confirm=__webpack_require__("./ui/pages/confirmations/context/confirm/index.tsx"),preferences=__webpack_require__("./ui/pages/confirmations/selectors/preferences.ts"),utils=__webpack_require__("./ui/pages/confirmations/utils/index.ts"),sign_in_with_row=__webpack_require__("./ui/pages/confirmations/components/confirm/info/shared/sign-in-with-row/sign-in-with-row.tsx"),info_utils=__webpack_require__("./ui/pages/confirmations/components/confirm/info/utils.ts"),siwe_sign=__webpack_require__("./ui/pages/confirmations/components/confirm/info/personal-sign/siwe-sign/siwe-sign.tsx"),getMessageText=function(hexString){if(!hexString)return hexString;var messageText=(0,util.xV)((0,util.eo)(hexString));return(0,info_utils.Q0)(messageText)?messageText:hexString};let personal_sign=function(){var _currentConfirmation_msgParams,toolTipMessage,t=(0,useI18nContext.P)(),currentConfirmation=(0,context_confirm.TW)().currentConfirmation,useTransactionSimulations=(0,es.d4)(preferences.C);if(!(null==currentConfirmation?void 0:currentConfirmation.msgParams))return null;var isSIWE=(0,utils.q9)(currentConfirmation),messageText=getMessageText(null===(_currentConfirmation_msgParams=currentConfirmation.msgParams)||void 0===_currentConfirmation_msgParams?void 0:_currentConfirmation_msgParams.data);isSIWE||(toolTipMessage=t((0,snaps.cX)(currentConfirmation.msgParams.origin)?"requestFromInfoSnap":"requestFromInfo"));var SimulationDetailsKey=react.createElement(component_library.az,{display:design_system.nl.Flex,flexDirection:design_system.bo.Row,alignItems:design_system.k2.center,gap:1},react.createElement(component_library.EY,{variant:design_system.J3.bodyMdMedium},t("simulationDetailsTitle")),react.createElement(tooltip.A,{interactive:!0,position:"top",containerClassName:"info-tooltip__tooltip-container",tooltipInnerClassName:"info-tooltip__tooltip-content",tooltipArrowClassName:"info-tooltip__top-tooltip-arrow",html:t("simulationDetailsTitleTooltip"),theme:"tippy-tooltip-info",style:{display:design_system.nl.Flex}},react.createElement(component_library.In,{name:component_library.$M.Question,marginLeft:1,color:design_system.Li.iconMuted,size:component_library.lK.Sm}))),SimulationDetailsValue=react.createElement(component_library.EY,{color:design_system.r7.textAlternative,variant:design_system.J3.bodyMd},t("simulationDetailsNoChanges"));return react.createElement(react.Fragment,null,isSIWE&&useTransactionSimulations&&react.createElement(section.C,null,react.createElement(component_library.az,{"data-testid":"simulation-details-layout",className:"simulation-details-layout",display:design_system.nl.Flex,flexDirection:design_system.bo.Column,borderRadius:design_system.Z6.LG,borderColor:design_system.cG.transparent,padding:2,gap:3},react.createElement(component_library.az,{display:design_system.nl.Flex,flexDirection:design_system.bo.Row,alignItems:design_system.k2.center,justifyContent:design_system.A9.spaceBetween},SimulationDetailsKey,SimulationDetailsValue))),react.createElement(section.C,null,react.createElement(alert_row.n,{alertKey:constants.oE.RequestFrom,ownerId:currentConfirmation.id,label:t("requestFrom"),tooltip:toolTipMessage},react.createElement(row.u7,{url:currentConfirmation.msgParams.origin})),react.createElement(sign_in_with_row.$,null)),react.createElement(section.C,null,isSIWE?react.createElement(siwe_sign.A,null):react.createElement(alert_row.n,{alertKey:"message",ownerId:currentConfirmation.id,label:t("message"),collapsed:!1,copyEnabled:!0,copyText:messageText},react.createElement(row.UK,{text:messageText}))))};try{personalsign.displayName="personalsign",personalsign.__docgenInfo={description:"",displayName:"personalsign",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["ui/pages/confirmations/components/confirm/info/personal-sign/personal-sign.tsx#personalsign"]={docgenInfo:personalsign.__docgenInfo,name:"personalsign",path:"ui/pages/confirmations/components/confirm/info/personal-sign/personal-sign.tsx#personalsign"})}catch(__react_docgen_typescript_loader_error){}},"./ui/pages/confirmations/components/confirm/info/personal-sign/siwe-sign/siwe-sign.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),luxon__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/luxon/src/luxon.js"),_metamask_controller_utils__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./node_modules/@metamask/controller-utils/dist/util.mjs"),_shared_constants_network__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./shared/constants/network.ts"),_hooks_useI18nContext__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./ui/hooks/useI18nContext.js"),_components_app_confirm_info_row__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./ui/components/app/confirm/info/row/index.ts"),_components_component_library__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./ui/components/component-library/index.ts"),_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./ui/helpers/constants/design-system.ts"),_context_confirm__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./ui/pages/confirmations/context/confirm/index.tsx");let __WEBPACK_DEFAULT_EXPORT__=function(){var _currentConfirmation_msgParams_siwe,_currentConfirmation_msgParams,_NETWORK_TO_NAME_MAP_hexChainId,t=(0,_hooks_useI18nContext__WEBPACK_IMPORTED_MODULE_3__.P)(),currentConfirmation=(0,_context_confirm__WEBPACK_IMPORTED_MODULE_7__.TW)().currentConfirmation,siweMessage=null==currentConfirmation?void 0:null===(_currentConfirmation_msgParams=currentConfirmation.msgParams)||void 0===_currentConfirmation_msgParams?void 0:null===(_currentConfirmation_msgParams_siwe=_currentConfirmation_msgParams.siwe)||void 0===_currentConfirmation_msgParams_siwe?void 0:_currentConfirmation_msgParams_siwe.parsedMessage;if(!siweMessage)return null;var address=siweMessage.address,chainId=siweMessage.chainId,issuedAt=siweMessage.issuedAt,nonce=siweMessage.nonce,requestId=siweMessage.requestId,statement=siweMessage.statement,resources=siweMessage.resources,uri=siweMessage.uri,version=siweMessage.version,hexChainId=(0,_metamask_controller_utils__WEBPACK_IMPORTED_MODULE_8__.nj)(chainId),network=null!==(_NETWORK_TO_NAME_MAP_hexChainId=_shared_constants_network__WEBPACK_IMPORTED_MODULE_2__.qJ[hexChainId])&&void 0!==_NETWORK_TO_NAME_MAP_hexChainId?_NETWORK_TO_NAME_MAP_hexChainId:hexChainId;return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_app_confirm_info_row__WEBPACK_IMPORTED_MODULE_4__.z$,{label:t("message"),collapsed:!0,copyEnabled:!0,copyText:JSON.stringify(siweMessage)},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_5__.az,{style:{marginLeft:-8,marginRight:-8}},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_5__.EY,{color:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_6__.r7.inherit,style:{whiteSpace:"pre-wrap",marginLeft:8,marginRight:8}},null!=statement?statement:""),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_app_confirm_info_row__WEBPACK_IMPORTED_MODULE_4__.z$,{label:t("siweURI")},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_app_confirm_info_row__WEBPACK_IMPORTED_MODULE_4__.UK,{text:uri})),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_app_confirm_info_row__WEBPACK_IMPORTED_MODULE_4__.z$,{label:t("siweNetwork")},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_app_confirm_info_row__WEBPACK_IMPORTED_MODULE_4__.UK,{text:network})),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_app_confirm_info_row__WEBPACK_IMPORTED_MODULE_4__.z$,{label:t("account")},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_app_confirm_info_row__WEBPACK_IMPORTED_MODULE_4__.L0,{address:address,chainId:hexChainId})),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_app_confirm_info_row__WEBPACK_IMPORTED_MODULE_4__.z$,{label:t("version")},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_app_confirm_info_row__WEBPACK_IMPORTED_MODULE_4__.UK,{text:version})),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_app_confirm_info_row__WEBPACK_IMPORTED_MODULE_4__.z$,{label:t("chainId")},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_app_confirm_info_row__WEBPACK_IMPORTED_MODULE_4__.UK,{text:"".concat(chainId)})),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_app_confirm_info_row__WEBPACK_IMPORTED_MODULE_4__.z$,{label:t("nonce")},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_app_confirm_info_row__WEBPACK_IMPORTED_MODULE_4__.UK,{text:nonce})),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_app_confirm_info_row__WEBPACK_IMPORTED_MODULE_4__.z$,{label:t("siweIssued")},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_app_confirm_info_row__WEBPACK_IMPORTED_MODULE_4__.pm,{unixTimestamp:luxon__WEBPACK_IMPORTED_MODULE_1__.c9.fromISO(issuedAt,{zone:"utc"}).toUnixInteger()})),requestId&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_app_confirm_info_row__WEBPACK_IMPORTED_MODULE_4__.z$,{label:t("siweRequestId")},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_app_confirm_info_row__WEBPACK_IMPORTED_MODULE_4__.UK,{text:requestId})),resources&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_app_confirm_info_row__WEBPACK_IMPORTED_MODULE_4__.z$,{label:t("siweResources")},resources.map(function(resource,index){return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_app_confirm_info_row__WEBPACK_IMPORTED_MODULE_4__.UK,{key:"resource-".concat(index),text:resource})}))))};try{siwesign.displayName="siwesign",siwesign.__docgenInfo={description:"",displayName:"siwesign",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["ui/pages/confirmations/components/confirm/info/personal-sign/siwe-sign/siwe-sign.tsx#siwesign"]={docgenInfo:siwesign.__docgenInfo,name:"siwesign",path:"ui/pages/confirmations/components/confirm/info/personal-sign/siwe-sign/siwe-sign.tsx#siwesign"})}catch(__react_docgen_typescript_loader_error){}},"./ui/pages/confirmations/components/confirm/info/set-approval-for-all-info/revoke-set-approval-for-all-static-simulation/revoke-set-approval-for-all-static-simulation.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{v:()=>RevokeSetApprovalForAllStaticSimulation});var _metamask_name_controller__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./node_modules/@metamask/name-controller/dist/chunk-6W3DEAGA.mjs"),react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_components_app_confirm_info_row__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./ui/components/app/confirm/info/row/index.ts"),_components_app_name__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./ui/components/app/name/index.ts"),_components_component_library__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./ui/components/component-library/index.ts"),_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./ui/helpers/constants/design-system.ts"),_hooks_useI18nContext__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./ui/hooks/useI18nContext.js"),_context_confirm__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./ui/pages/confirmations/context/confirm/index.tsx"),_shared_static_simulation_static_simulation__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./ui/pages/confirmations/components/confirm/info/shared/static-simulation/static-simulation.tsx"),RevokeSetApprovalForAllStaticSimulation=function(param){var spender=param.spender,t=(0,_hooks_useI18nContext__WEBPACK_IMPORTED_MODULE_5__.P)(),transactionMeta=(0,_context_confirm__WEBPACK_IMPORTED_MODULE_6__.TW)().currentConfirmation,chainId=transactionMeta.chainId,nftsRow=react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_app_confirm_info_row__WEBPACK_IMPORTED_MODULE_1__.z$,{label:t("nfts")},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_3__.az,{style:{marginLeft:"auto",maxWidth:"100%"}},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_3__.az,{display:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_4__.nl.Flex,alignItems:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_4__.k2.center},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_app_name__WEBPACK_IMPORTED_MODULE_2__.A,{value:transactionMeta.txParams.to,type:_metamask_name_controller__WEBPACK_IMPORTED_MODULE_8__.k.ETHEREUM_ADDRESS,preferContractSymbol:!0,variation:chainId})))),permissionFromRow=react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_app_confirm_info_row__WEBPACK_IMPORTED_MODULE_1__.z$,{label:t("permissionFrom")},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_3__.az,{style:{marginLeft:"auto",maxWidth:"100%"}},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_3__.az,{display:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_4__.nl.Flex,alignItems:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_4__.k2.center},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_app_name__WEBPACK_IMPORTED_MODULE_2__.A,{value:spender,type:_metamask_name_controller__WEBPACK_IMPORTED_MODULE_8__.k.ETHEREUM_ADDRESS,preferContractSymbol:!0,variation:chainId})))),RevokeSetApprovalForAllRows=react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,nftsRow,permissionFromRow);return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_shared_static_simulation_static_simulation__WEBPACK_IMPORTED_MODULE_7__.A,{title:t("simulationDetailsTitle"),titleTooltip:t("simulationDetailsTitleTooltip"),description:t("simulationDetailsRevokeSetApprovalForAllDesc"),simulationElements:RevokeSetApprovalForAllRows})};try{RevokeSetApprovalForAllStaticSimulation.displayName="RevokeSetApprovalForAllStaticSimulation",RevokeSetApprovalForAllStaticSimulation.__docgenInfo={description:"",displayName:"RevokeSetApprovalForAllStaticSimulation",props:{spender:{defaultValue:null,description:"",name:"spender",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["ui/pages/confirmations/components/confirm/info/set-approval-for-all-info/revoke-set-approval-for-all-static-simulation/revoke-set-approval-for-all-static-simulation.tsx#RevokeSetApprovalForAllStaticSimulation"]={docgenInfo:RevokeSetApprovalForAllStaticSimulation.__docgenInfo,name:"RevokeSetApprovalForAllStaticSimulation",path:"ui/pages/confirmations/components/confirm/info/set-approval-for-all-info/revoke-set-approval-for-all-static-simulation/revoke-set-approval-for-all-static-simulation.tsx#RevokeSetApprovalForAllStaticSimulation"})}catch(__react_docgen_typescript_loader_error){}},"./ui/pages/confirmations/components/confirm/info/set-approval-for-all-info/set-approval-for-all-info.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>set_approval_for_all_info});var react=__webpack_require__("./node_modules/react/index.js"),context_confirm=__webpack_require__("./ui/pages/confirmations/context/confirm/index.tsx"),approve_details=__webpack_require__("./ui/pages/confirmations/components/confirm/info/approve/approve-details/approve-details.tsx"),advanced_details=__webpack_require__("./ui/pages/confirmations/components/confirm/info/shared/advanced-details/advanced-details.tsx"),gas_fees_section=__webpack_require__("./ui/pages/confirmations/components/confirm/info/shared/gas-fees-section/gas-fees-section.tsx"),utils=__webpack_require__("./ui/pages/confirmations/components/confirm/info/utils.ts"),useTokenTransactionData=__webpack_require__("./ui/pages/confirmations/components/confirm/info/hooks/useTokenTransactionData.ts"),revoke_set_approval_for_all_static_simulation=__webpack_require__("./ui/pages/confirmations/components/confirm/info/set-approval-for-all-info/revoke-set-approval-for-all-static-simulation/revoke-set-approval-for-all-static-simulation.tsx"),chunk_6W3DEAGA=__webpack_require__("./node_modules/@metamask/name-controller/dist/chunk-6W3DEAGA.mjs"),row=__webpack_require__("./ui/components/app/confirm/info/row/index.ts"),app_name=__webpack_require__("./ui/components/app/name/index.ts"),component_library=__webpack_require__("./ui/components/component-library/index.ts"),design_system=__webpack_require__("./ui/helpers/constants/design-system.ts"),useI18nContext=__webpack_require__("./ui/hooks/useI18nContext.js"),static_simulation=__webpack_require__("./ui/pages/confirmations/components/confirm/info/shared/static-simulation/static-simulation.tsx"),SetApprovalForAllStaticSimulation=function(){var t=(0,useI18nContext.P)(),transactionMeta=(0,context_confirm.TW)().currentConfirmation,chainId=transactionMeta.chainId,SetApprovalForAllRow=react.createElement(row.z$,{label:t("withdrawing")},react.createElement(component_library.az,{style:{marginLeft:"auto",maxWidth:"100%"}},react.createElement(component_library.az,{display:design_system.nl.Flex,alignItems:design_system.k2.center},react.createElement(component_library.az,{display:design_system.nl.Inline,marginInlineEnd:1,minWidth:design_system.Zf.Zero},react.createElement(component_library.EY,{"data-testid":"simulation-token-value",backgroundColor:design_system.i0.backgroundAlternative,borderRadius:design_system.Z6.XL,paddingInline:2,textAlign:design_system.nO.Center,alignItems:design_system.k2.center},t("all"))),react.createElement(app_name.A,{value:transactionMeta.txParams.to,type:chunk_6W3DEAGA.k.ETHEREUM_ADDRESS,preferContractSymbol:!0,variation:chainId}))));return react.createElement(static_simulation.A,{title:t("simulationDetailsTitle"),titleTooltip:t("simulationDetailsTitleTooltip"),description:t("simulationDetailsSetApprovalForAllDesc"),simulationElements:SetApprovalForAllRow})};let set_approval_for_all_info=function(){var _parsedTransactionData_args,transactionMeta=(0,context_confirm.TW)().currentConfirmation,parsedTransactionData=(0,useTokenTransactionData.d)(),spender=null==parsedTransactionData?void 0:null===(_parsedTransactionData_args=parsedTransactionData.args)||void 0===_parsedTransactionData_args?void 0:_parsedTransactionData_args._operator,isRevokeSetApprovalForAll=(0,utils.ah)(parsedTransactionData);return(null==transactionMeta?void 0:transactionMeta.txParams)?react.createElement(react.Fragment,null,isRevokeSetApprovalForAll?react.createElement(revoke_set_approval_for_all_static_simulation.v,{spender:spender}):react.createElement(SetApprovalForAllStaticSimulation,null),react.createElement(approve_details.M,{isSetApprovalForAll:!0}),react.createElement(gas_fees_section.i,null),react.createElement(advanced_details.v,null)):null}},"./ui/pages/confirmations/components/confirm/info/shared/edit-gas-fees-row/edit-gas-fees-row.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{H:()=>EditGasFeesRow});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),react_redux__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react-redux/es/index.js"),_shared_constants_network__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./shared/constants/network.ts"),_components_app_confirm_info_row_alert_row_alert_row__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./ui/components/app/confirm/info/row/alert-row/alert-row.tsx"),_components_app_confirm_info_row_constants__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./ui/components/app/confirm/info/row/constants.ts"),_components_component_library__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./ui/components/component-library/index.ts"),_components_ui_tooltip__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./ui/components/ui/tooltip/index.js"),_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./ui/helpers/constants/design-system.ts"),_hooks_useI18nContext__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./ui/hooks/useI18nContext.js"),_selectors__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./ui/selectors/index.js"),_context_confirm__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./ui/pages/confirmations/context/confirm/index.tsx"),_edit_gas_icon_edit_gas_icon_button__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("./ui/pages/confirmations/components/confirm/info/shared/edit-gas-icon/edit-gas-icon-button.tsx"),EditGasFeesRow=function(param){var fiatFee=param.fiatFee,fiatFeeWith18SignificantDigits=param.fiatFeeWith18SignificantDigits,nativeFee=param.nativeFee,supportsEIP1559=param.supportsEIP1559,setShowCustomizeGasPopover=param.setShowCustomizeGasPopover,t=(0,_hooks_useI18nContext__WEBPACK_IMPORTED_MODULE_8__.P)(),transactionMeta=(0,_context_confirm__WEBPACK_IMPORTED_MODULE_10__.TW)().currentConfirmation,isTestnet=_shared_constants_network__WEBPACK_IMPORTED_MODULE_2__.YP.includes(transactionMeta.chainId),showFiatInTestnets=(0,react_redux__WEBPACK_IMPORTED_MODULE_1__.d4)(_selectors__WEBPACK_IMPORTED_MODULE_9__.lX9).showFiatInTestnets;return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_app_confirm_info_row_alert_row_alert_row__WEBPACK_IMPORTED_MODULE_3__.n,{alertKey:_components_app_confirm_info_row_constants__WEBPACK_IMPORTED_MODULE_4__.oE.EstimatedFee,ownerId:transactionMeta.id,"data-testid":"edit-gas-fees-row",label:t("networkFee"),tooltip:t("estimatedFeeTooltip")},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_5__.az,{display:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_7__.nl.Flex,flexDirection:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_7__.bo.Row,justifyContent:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_7__.A9.spaceBetween,alignItems:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_7__.k2.center,textAlign:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_7__.nO.Center},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_edit_gas_icon_edit_gas_icon_button__WEBPACK_IMPORTED_MODULE_11__.N,{supportsEIP1559:supportsEIP1559,setShowCustomizeGasPopover:setShowCustomizeGasPopover}),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_5__.EY,{marginRight:1,color:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_7__.r7.textDefault,"data-testid":"first-gas-field"},nativeFee),(!isTestnet||showFiatInTestnets)&&fiatFeeWith18SignificantDigits?react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_ui_tooltip__WEBPACK_IMPORTED_MODULE_6__.A,{title:fiatFeeWith18SignificantDigits},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_5__.EY,{marginRight:2,color:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_7__.r7.textAlternative,"data-testid":"native-currency"},fiatFee)):react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_5__.EY,{marginRight:2,color:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_7__.r7.textAlternative,"data-testid":"native-currency"},fiatFee)))};try{EditGasFeesRow.displayName="EditGasFeesRow",EditGasFeesRow.__docgenInfo={description:"",displayName:"EditGasFeesRow",props:{fiatFee:{defaultValue:null,description:"",name:"fiatFee",required:!0,type:{name:"string"}},fiatFeeWith18SignificantDigits:{defaultValue:null,description:"",name:"fiatFeeWith18SignificantDigits",required:!0,type:{name:"string | null"}},nativeFee:{defaultValue:null,description:"",name:"nativeFee",required:!0,type:{name:"string"}},supportsEIP1559:{defaultValue:null,description:"",name:"supportsEIP1559",required:!0,type:{name:"boolean"}},setShowCustomizeGasPopover:{defaultValue:null,description:"",name:"setShowCustomizeGasPopover",required:!0,type:{name:"Dispatch<SetStateAction<boolean>>"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["ui/pages/confirmations/components/confirm/info/shared/edit-gas-fees-row/edit-gas-fees-row.tsx#EditGasFeesRow"]={docgenInfo:EditGasFeesRow.__docgenInfo,name:"EditGasFeesRow",path:"ui/pages/confirmations/components/confirm/info/shared/edit-gas-fees-row/edit-gas-fees-row.tsx#EditGasFeesRow"})}catch(__react_docgen_typescript_loader_error){}},"./ui/pages/confirmations/components/confirm/info/shared/edit-gas-icon/edit-gas-icon-button.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{N:()=>EditGasIconButton});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_components_component_library__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./ui/components/component-library/index.ts"),_contexts_transaction_modal__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./ui/contexts/transaction-modal.js"),_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./ui/helpers/constants/design-system.ts"),_hooks_useTransactionEventFragment__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./ui/pages/confirmations/hooks/useTransactionEventFragment.js"),EditGasIconButton=function(param){var supportsEIP1559=param.supportsEIP1559,setShowCustomizeGasPopover=param.setShowCustomizeGasPopover,openModal=(0,_contexts_transaction_modal__WEBPACK_IMPORTED_MODULE_2__.gb)().openModal,updateTransactionEventFragment=(0,_hooks_useTransactionEventFragment__WEBPACK_IMPORTED_MODULE_4__.W)().updateTransactionEventFragment,openEditEIP1559TxGasFeeModal=function(){updateTransactionEventFragment({gas_edit_attempted:"basic"}),openModal("editGasFee")},openEditGasFeeLegacyTxModal=function(){setShowCustomizeGasPopover(!0)};return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_1__.$n,{style:{textDecoration:"none"},size:_components_component_library__WEBPACK_IMPORTED_MODULE_1__.Mp.Sm,variant:_components_component_library__WEBPACK_IMPORTED_MODULE_1__.Ak.Link,startIconName:_components_component_library__WEBPACK_IMPORTED_MODULE_1__.$M.Edit,color:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_3__.Li.primaryDefault,"data-testid":"edit-gas-fee-icon",onClick:function(){return supportsEIP1559?openEditEIP1559TxGasFeeModal():openEditGasFeeLegacyTxModal()}})};try{EditGasIconButton.displayName="EditGasIconButton",EditGasIconButton.__docgenInfo={description:"",displayName:"EditGasIconButton",props:{supportsEIP1559:{defaultValue:null,description:"",name:"supportsEIP1559",required:!0,type:{name:"boolean"}},setShowCustomizeGasPopover:{defaultValue:null,description:"",name:"setShowCustomizeGasPopover",required:!0,type:{name:"Dispatch<SetStateAction<boolean>>"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["ui/pages/confirmations/components/confirm/info/shared/edit-gas-icon/edit-gas-icon-button.tsx#EditGasIconButton"]={docgenInfo:EditGasIconButton.__docgenInfo,name:"EditGasIconButton",path:"ui/pages/confirmations/components/confirm/info/shared/edit-gas-icon/edit-gas-icon-button.tsx#EditGasIconButton"})}catch(__react_docgen_typescript_loader_error){}},"./ui/pages/confirmations/components/confirm/info/shared/gas-fees-details/gas-fees-details.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{j:()=>GasFeesDetails});var react=__webpack_require__("./node_modules/react/index.js"),es=__webpack_require__("./node_modules/react-redux/es/index.js"),component_library=__webpack_require__("./ui/components/component-library/index.ts"),design_system=__webpack_require__("./ui/helpers/constants/design-system.ts"),useI18nContext=__webpack_require__("./ui/hooks/useI18nContext.js"),preferences=__webpack_require__("./ui/pages/confirmations/selectors/preferences.ts"),context_confirm=__webpack_require__("./ui/pages/confirmations/context/confirm/index.tsx"),gas_timing_component=__webpack_require__("./ui/pages/confirmations/components/gas-timing/gas-timing.component.js"),conversion_utils=__webpack_require__("./shared/modules/conversion.utils.ts"),useEIP1559TxFees=function(transactionMeta){var _transactionMeta_txParams,_transactionMeta_txParams1,hexMaxFeePerGas=null==transactionMeta?void 0:null===(_transactionMeta_txParams=transactionMeta.txParams)||void 0===_transactionMeta_txParams?void 0:_transactionMeta_txParams.maxFeePerGas,hexMaxPriorityFeePerGas=null==transactionMeta?void 0:null===(_transactionMeta_txParams1=transactionMeta.txParams)||void 0===_transactionMeta_txParams1?void 0:_transactionMeta_txParams1.maxPriorityFeePerGas;return(0,react.useMemo)(function(){return{maxFeePerGas:hexMaxFeePerGas?(0,conversion_utils.I0)(hexMaxFeePerGas):"0",maxPriorityFeePerGas:hexMaxPriorityFeePerGas?(0,conversion_utils.I0)(hexMaxPriorityFeePerGas):"0"}},[hexMaxFeePerGas,hexMaxPriorityFeePerGas])},common=__webpack_require__("./shared/constants/common.ts"),Numeric=__webpack_require__("./shared/modules/Numeric.ts"),useFiatFormatter=__webpack_require__("./ui/hooks/useFiatFormatter.ts"),useGasFeeEstimates=__webpack_require__("./ui/hooks/useGasFeeEstimates.js"),metamask=__webpack_require__("./ui/ducks/metamask/metamask.js"),selectors=__webpack_require__("./ui/selectors/index.js"),multichain=__webpack_require__("./ui/selectors/multichain.ts"),constants=__webpack_require__("./ui/pages/confirmations/components/confirm/info/shared/constants.ts"),useSupportsEIP1559=__webpack_require__("./ui/pages/confirmations/components/confirm/info/hooks/useSupportsEIP1559.ts");function useTransactionGasFeeEstimate(transactionMeta,supportsEIP1559){var _transactionMeta_txParams,_transactionMeta_txParams1,gasEstimate,_transactionMeta_txParams2=transactionMeta.txParams,gasLimit=_transactionMeta_txParams2.gas,gasPrice=_transactionMeta_txParams2.gasPrice,gasFeeEstimates=(0,useGasFeeEstimates.K)(transactionMeta.networkClientId).gasFeeEstimates,estimatedBaseFee=null==gasFeeEstimates?void 0:gasFeeEstimates.estimatedBaseFee;gasLimit=gasLimit||constants.L,gasPrice=gasPrice||constants.L;var maxPriorityFeePerGas=(null===(_transactionMeta_txParams=transactionMeta.txParams)||void 0===_transactionMeta_txParams?void 0:_transactionMeta_txParams.maxPriorityFeePerGas)||constants.L,maxFeePerGas=(null===(_transactionMeta_txParams1=transactionMeta.txParams)||void 0===_transactionMeta_txParams1?void 0:_transactionMeta_txParams1.maxFeePerGas)||constants.L;if(supportsEIP1559){var minimumFeePerGas=(0,conversion_utils.XH)(estimatedBaseFee||constants.L,maxPriorityFeePerGas);new Numeric.e(minimumFeePerGas,16).greaterThan(maxFeePerGas,16)&&(minimumFeePerGas=maxFeePerGas),gasEstimate=(0,conversion_utils.Is)(minimumFeePerGas,gasLimit)}else gasEstimate=(0,conversion_utils.Is)(gasPrice,gasLimit);return gasEstimate}var EMPTY_FEES={currentCurrencyFee:"",currentCurrencyFeeWith18SignificantDigits:"",nativeCurrencyFee:""};function useFeeCalculations(transactionMeta){var _multichainNetwork_network,_transactionMeta_txParams,_transactionMeta_txParams1,currentCurrency=(0,es.d4)(metamask.Fx),chainId=transactionMeta.chainId,fiatFormatter=(0,useFiatFormatter.y)(),conversionRate=(0,es.d4)(function(state){return(0,selectors._po)(state,chainId)}),multichainNetwork=(0,es.d4)(multichain.X3),ticker=null==multichainNetwork?void 0:null===(_multichainNetwork_network=multichainNetwork.network)||void 0===_multichainNetwork_network?void 0:_multichainNetwork_network.ticker,getFeesFromHex=(0,react.useCallback)(function(hexFee){var currentCurrencyFee,currentCurrencyFeeWith18SignificantDigits,nativeCurrencyFee="".concat((0,conversion_utils.gh)({value:hexFee,fromCurrency:common.sk.GWEI,numberOfDecimals:4})||0," ").concat(ticker),decimalCurrentCurrencyFee=Number((0,conversion_utils.gh)({value:hexFee,conversionRate:conversionRate,fromCurrency:common.sk.GWEI,toCurrency:currentCurrency,numberOfDecimals:2}));return 0===decimalCurrentCurrencyFee?(currentCurrencyFee="< ".concat(fiatFormatter(.01)),currentCurrencyFeeWith18SignificantDigits=(0,conversion_utils.gh)({value:hexFee,conversionRate:conversionRate,fromCurrency:common.sk.GWEI,toCurrency:currentCurrency,numberOfDecimals:18})):(currentCurrencyFee=fiatFormatter(decimalCurrentCurrencyFee),currentCurrencyFeeWith18SignificantDigits=null),{currentCurrencyFee:currentCurrencyFee,currentCurrencyFeeWith18SignificantDigits:currentCurrencyFeeWith18SignificantDigits,nativeCurrencyFee:nativeCurrencyFee}},[conversionRate,currentCurrency,fiatFormatter]),_useEIP1559TxFees=useEIP1559TxFees(transactionMeta),maxFeePerGas=_useEIP1559TxFees.maxFeePerGas,maxPriorityFeePerGas=_useEIP1559TxFees.maxPriorityFeePerGas,supportsEIP1559=(0,useSupportsEIP1559.M)(transactionMeta).supportsEIP1559,gasFeeEstimate=useTransactionGasFeeEstimate(transactionMeta,supportsEIP1559),gasFeeEstimates=(0,useGasFeeEstimates.K)(transactionMeta.networkClientId).gasFeeEstimates,estimatedBaseFee=null==gasFeeEstimates?void 0:gasFeeEstimates.estimatedBaseFee,layer1GasFee=null==transactionMeta?void 0:transactionMeta.layer1GasFee,hasLayer1GasFee=!!layer1GasFee,feesL1=(0,react.useMemo)(function(){return hasLayer1GasFee?getFeesFromHex(layer1GasFee):EMPTY_FEES},[layer1GasFee]),feesL2=(0,react.useMemo)(function(){return hasLayer1GasFee?getFeesFromHex(gasFeeEstimate):EMPTY_FEES},[gasFeeEstimate]),gasLimit=(null==transactionMeta?void 0:null===(_transactionMeta_txParams=transactionMeta.txParams)||void 0===_transactionMeta_txParams?void 0:_transactionMeta_txParams.gas)||constants.L,gasPrice=(null==transactionMeta?void 0:null===(_transactionMeta_txParams1=transactionMeta.txParams)||void 0===_transactionMeta_txParams1?void 0:_transactionMeta_txParams1.gasPrice)||constants.L,_getFeesFromHex=getFeesFromHex((0,react.useMemo)(function(){return(0,conversion_utils.Is)(supportsEIP1559?(0,conversion_utils.Ao)(maxFeePerGas):gasPrice,gasLimit)},[supportsEIP1559,maxFeePerGas,gasLimit,gasPrice])),maxFeeFiat=_getFeesFromHex.currentCurrencyFee,maxFeeFiatWith18SignificantDigits=_getFeesFromHex.currentCurrencyFeeWith18SignificantDigits,maxFeeNative=_getFeesFromHex.nativeCurrencyFee,estimatedFees=(0,react.useMemo)(function(){if(hasLayer1GasFee)return getFeesFromHex((0,conversion_utils.XH)(gasFeeEstimate,layer1GasFee));var minimumFeePerGas=(0,conversion_utils.XH)((0,conversion_utils.Sb)(estimatedBaseFee)||constants.L,(0,conversion_utils.Ao)(maxPriorityFeePerGas));return new Numeric.e(minimumFeePerGas,16).greaterThan((0,conversion_utils.Ao)(maxFeePerGas),16)&&(minimumFeePerGas=(0,conversion_utils.Ao)(maxFeePerGas)),getFeesFromHex((0,conversion_utils.Is)(supportsEIP1559?minimumFeePerGas:gasPrice,gasLimit))},[gasFeeEstimate,transactionMeta,estimatedBaseFee,maxPriorityFeePerGas,getFeesFromHex]);return{estimatedFeeFiat:estimatedFees.currentCurrencyFee,estimatedFeeFiatWith18SignificantDigits:estimatedFees.currentCurrencyFeeWith18SignificantDigits,estimatedFeeNative:estimatedFees.nativeCurrencyFee,l1FeeFiat:feesL1.currentCurrencyFee,l1FeeFiatWith18SignificantDigits:feesL1.currentCurrencyFeeWith18SignificantDigits,l1FeeNative:feesL1.nativeCurrencyFee,l2FeeFiat:feesL2.currentCurrencyFee,l2FeeFiatWith18SignificantDigits:feesL2.currentCurrencyFeeWith18SignificantDigits,l2FeeNative:feesL2.nativeCurrencyFee,maxFeeFiat:maxFeeFiat,maxFeeFiatWith18SignificantDigits:maxFeeFiatWith18SignificantDigits,maxFeeNative:maxFeeNative}}var edit_gas_fees_row=__webpack_require__("./ui/pages/confirmations/components/confirm/info/shared/edit-gas-fees-row/edit-gas-fees-row.tsx"),gas_fees_row=__webpack_require__("./ui/pages/confirmations/components/confirm/info/shared/gas-fees-row/gas-fees-row.tsx"),alert_row=__webpack_require__("./ui/components/app/confirm/info/row/alert-row/alert-row.tsx"),row_constants=__webpack_require__("./ui/components/app/confirm/info/row/constants.ts"),GasFeesDetails=function(param){var setShowCustomizeGasPopover=param.setShowCustomizeGasPopover,t=(0,useI18nContext.P)(),transactionMeta=(0,context_confirm.TW)().currentConfirmation,_useEIP1559TxFees=useEIP1559TxFees(transactionMeta),maxFeePerGas=_useEIP1559TxFees.maxFeePerGas,maxPriorityFeePerGas=_useEIP1559TxFees.maxPriorityFeePerGas,supportsEIP1559=(0,useSupportsEIP1559.M)(transactionMeta).supportsEIP1559,hasLayer1GasFee=!!(null==transactionMeta?void 0:transactionMeta.layer1GasFee),_useFeeCalculations=useFeeCalculations(transactionMeta),estimatedFeeFiat=_useFeeCalculations.estimatedFeeFiat,estimatedFeeFiatWith18SignificantDigits=_useFeeCalculations.estimatedFeeFiatWith18SignificantDigits,estimatedFeeNative=_useFeeCalculations.estimatedFeeNative,l1FeeFiat=_useFeeCalculations.l1FeeFiat,l1FeeFiatWith18SignificantDigits=_useFeeCalculations.l1FeeFiatWith18SignificantDigits,l1FeeNative=_useFeeCalculations.l1FeeNative,l2FeeFiat=_useFeeCalculations.l2FeeFiat,l2FeeFiatWith18SignificantDigits=_useFeeCalculations.l2FeeFiatWith18SignificantDigits,l2FeeNative=_useFeeCalculations.l2FeeNative,maxFeeFiat=_useFeeCalculations.maxFeeFiat,maxFeeFiatWith18SignificantDigits=_useFeeCalculations.maxFeeFiatWith18SignificantDigits,maxFeeNative=_useFeeCalculations.maxFeeNative,showAdvancedDetails=(0,es.d4)(preferences.O);return(null==transactionMeta?void 0:transactionMeta.txParams)?react.createElement(react.Fragment,null,react.createElement(edit_gas_fees_row.H,{fiatFee:estimatedFeeFiat,fiatFeeWith18SignificantDigits:estimatedFeeFiatWith18SignificantDigits,nativeFee:estimatedFeeNative,supportsEIP1559:supportsEIP1559,setShowCustomizeGasPopover:setShowCustomizeGasPopover}),showAdvancedDetails&&hasLayer1GasFee&&react.createElement(react.Fragment,null,react.createElement(gas_fees_row.n,{"data-testid":"gas-fee-details-l1",label:t("l1Fee"),tooltipText:t("l1FeeTooltip"),fiatFee:l1FeeFiat,fiatFeeWith18SignificantDigits:l1FeeFiatWith18SignificantDigits,nativeFee:l1FeeNative}),react.createElement(gas_fees_row.n,{"data-testid":"gas-fee-details-l2",label:t("l2Fee"),tooltipText:t("l2FeeTooltip"),fiatFee:l2FeeFiat,fiatFeeWith18SignificantDigits:l2FeeFiatWith18SignificantDigits,nativeFee:l2FeeNative})),supportsEIP1559&&react.createElement(alert_row.n,{alertKey:row_constants.oE.Speed,"data-testid":"gas-fee-details-speed",label:t("speed"),ownerId:transactionMeta.id},react.createElement(component_library.az,{display:design_system.nl.Flex,alignItems:design_system.k2.center},react.createElement(gas_timing_component.A,{maxFeePerGas:maxFeePerGas,maxPriorityFeePerGas:maxPriorityFeePerGas}))),showAdvancedDetails&&react.createElement(gas_fees_row.n,{"data-testid":"gas-fee-details-max-fee",label:t("maxFee"),tooltipText:t("maxFeeTooltip"),fiatFee:maxFeeFiat,fiatFeeWith18SignificantDigits:maxFeeFiatWith18SignificantDigits,nativeFee:maxFeeNative})):null};try{GasFeesDetails.displayName="GasFeesDetails",GasFeesDetails.__docgenInfo={description:"",displayName:"GasFeesDetails",props:{setShowCustomizeGasPopover:{defaultValue:null,description:"",name:"setShowCustomizeGasPopover",required:!0,type:{name:"Dispatch<SetStateAction<boolean>>"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["ui/pages/confirmations/components/confirm/info/shared/gas-fees-details/gas-fees-details.tsx#GasFeesDetails"]={docgenInfo:GasFeesDetails.__docgenInfo,name:"GasFeesDetails",path:"ui/pages/confirmations/components/confirm/info/shared/gas-fees-details/gas-fees-details.tsx#GasFeesDetails"})}catch(__react_docgen_typescript_loader_error){}},"./ui/pages/confirmations/components/confirm/info/shared/gas-fees-row/gas-fees-row.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{n:()=>GasFeesRow});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),react_redux__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react-redux/es/index.js"),_shared_constants_network__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./shared/constants/network.ts"),_components_app_confirm_info_row__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./ui/components/app/confirm/info/row/index.ts"),_components_component_library__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./ui/components/component-library/index.ts"),_components_ui_tooltip__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./ui/components/ui/tooltip/index.js"),_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./ui/helpers/constants/design-system.ts"),_selectors__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./ui/selectors/index.js"),_context_confirm__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./ui/pages/confirmations/context/confirm/index.tsx"),GasFeesRow=function(param){var label=param.label,tooltipText=param.tooltipText,fiatFee=param.fiatFee,fiatFeeWith18SignificantDigits=param.fiatFeeWith18SignificantDigits,nativeFee=param.nativeFee,dataTestId=param["data-testid"],transactionMeta=(0,_context_confirm__WEBPACK_IMPORTED_MODULE_8__.TW)().currentConfirmation,isTestnet=_shared_constants_network__WEBPACK_IMPORTED_MODULE_2__.YP.includes(null==transactionMeta?void 0:transactionMeta.chainId),showFiatInTestnets=(0,react_redux__WEBPACK_IMPORTED_MODULE_1__.d4)(_selectors__WEBPACK_IMPORTED_MODULE_7__.lX9).showFiatInTestnets;return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_app_confirm_info_row__WEBPACK_IMPORTED_MODULE_3__.z$,{"data-testid":dataTestId,label:label,tooltip:tooltipText,variant:_components_app_confirm_info_row__WEBPACK_IMPORTED_MODULE_3__.aj.Default},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_4__.az,{display:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_6__.nl.Flex,flexDirection:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_6__.bo.Row,justifyContent:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_6__.A9.spaceBetween,alignItems:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_6__.k2.center,textAlign:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_6__.nO.Center,marginLeft:8},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_4__.EY,{marginRight:1,color:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_6__.r7.textDefault},nativeFee),(!isTestnet||showFiatInTestnets)&&fiatFeeWith18SignificantDigits?react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_ui_tooltip__WEBPACK_IMPORTED_MODULE_5__.A,{title:fiatFeeWith18SignificantDigits},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_4__.EY,{color:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_6__.r7.textAlternative},fiatFee)):react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_4__.EY,{color:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_6__.r7.textAlternative},fiatFee)))};try{GasFeesRow.displayName="GasFeesRow",GasFeesRow.__docgenInfo={description:"",displayName:"GasFeesRow",props:{label:{defaultValue:null,description:"",name:"label",required:!0,type:{name:"string"}},tooltipText:{defaultValue:null,description:"",name:"tooltipText",required:!0,type:{name:"string"}},fiatFee:{defaultValue:null,description:"",name:"fiatFee",required:!0,type:{name:"string"}},fiatFeeWith18SignificantDigits:{defaultValue:null,description:"",name:"fiatFeeWith18SignificantDigits",required:!0,type:{name:"string | null"}},nativeFee:{defaultValue:null,description:"",name:"nativeFee",required:!0,type:{name:"string"}},"data-testid":{defaultValue:null,description:"",name:"data-testid",required:!1,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["ui/pages/confirmations/components/confirm/info/shared/gas-fees-row/gas-fees-row.tsx#GasFeesRow"]={docgenInfo:GasFeesRow.__docgenInfo,name:"GasFeesRow",path:"ui/pages/confirmations/components/confirm/info/shared/gas-fees-row/gas-fees-row.tsx#GasFeesRow"})}catch(__react_docgen_typescript_loader_error){}},"./ui/pages/confirmations/components/confirm/info/shared/nft-send-heading/nft-send-heading.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),react_redux__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react-redux/es/index.js"),_shared_constants_network__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./shared/constants/network.ts"),_shared_modules_string_utils__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./shared/modules/string-utils.ts"),_components_component_library__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./ui/components/component-library/index.ts"),_components_multichain_nft_item__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./ui/components/multichain/nft-item/index.js"),_ducks_metamask_metamask__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./ui/ducks/metamask/metamask.js"),_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./ui/helpers/constants/design-system.ts"),_helpers_utils_nfts__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("./ui/helpers/utils/nfts.js"),_context_confirm__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./ui/pages/confirmations/context/confirm/index.tsx"),_hooks_useAssetDetails__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./ui/pages/confirmations/hooks/useAssetDetails.js"),_shared_modules_selectors_networks__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./shared/modules/selectors/networks.ts");let __WEBPACK_DEFAULT_EXPORT__=function(){var _currentChain_name,transactionMeta=(0,_context_confirm__WEBPACK_IMPORTED_MODULE_7__.TW)().currentConfirmation,tokenAddress=transactionMeta.txParams.to,userAddress=transactionMeta.txParams.from,data=transactionMeta.txParams.data,chainId=transactionMeta.chainId,_useAssetDetails=(0,_hooks_useAssetDetails__WEBPACK_IMPORTED_MODULE_8__.Y)(tokenAddress,userAddress,data,chainId),assetName=_useAssetDetails.assetName,tokenImage=_useAssetDetails.tokenImage,assetTokenId=_useAssetDetails.tokenId,nfts=(0,react_redux__WEBPACK_IMPORTED_MODULE_1__.d4)(function(state){return(0,_ducks_metamask_metamask__WEBPACK_IMPORTED_MODULE_5__.lS)(state,chainId)}),networkConfigurations=(0,react_redux__WEBPACK_IMPORTED_MODULE_1__.d4)(_shared_modules_selectors_networks__WEBPACK_IMPORTED_MODULE_9__.hX),nft=assetTokenId&&nfts.find(function(param){var address=param.address,tokenId=param.tokenId;return(0,_shared_modules_string_utils__WEBPACK_IMPORTED_MODULE_10__.y)(address,tokenAddress)&&assetTokenId===tokenId.toString()}),imageOriginal=null==nft?void 0:nft.imageOriginal,image=null==nft?void 0:nft.image,nftImageAlt=nft&&(0,_helpers_utils_nfts__WEBPACK_IMPORTED_MODULE_11__.x)(nft),nftSrcUrl=null!=imageOriginal?imageOriginal:image||"",isIpfsURL=null==nftSrcUrl?void 0:nftSrcUrl.startsWith("ipfs:"),currentChain=networkConfigurations[chainId],TokenImage=react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_3__.az,{style:{width:"48px"}},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_multichain_nft_item__WEBPACK_IMPORTED_MODULE_4__.o,{src:tokenImage,alt:image&&nftImageAlt?nftImageAlt:"",name:assetName,tokenId:assetTokenId||"",networkName:null!==(_currentChain_name=currentChain.name)&&void 0!==_currentChain_name?_currentChain_name:"",networkSrc:_shared_constants_network__WEBPACK_IMPORTED_MODULE_2__.Cl[chainId],isIpfsURL:isIpfsURL})),TokenName=react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_3__.EY,{variant:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_6__.J3.headingLg,color:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_6__.r7.inherit,marginTop:3,textAlign:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_6__.nO.Center},assetName),TokenID=react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_3__.EY,{variant:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_6__.J3.bodyMd,color:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_6__.r7.textAlternative},"#".concat(assetTokenId));return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_3__.az,{display:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_6__.nl.Flex,flexDirection:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_6__.bo.Column,justifyContent:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_6__.A9.center,alignItems:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_6__.k2.center,padding:4},TokenImage,TokenName,TokenID)}},"./ui/pages/confirmations/components/confirm/info/shared/send-heading/send-heading.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>send_heading});var react=__webpack_require__("./node_modules/react/index.js"),es=__webpack_require__("./node_modules/react-redux/es/index.js"),network=__webpack_require__("./shared/constants/network.ts"),component_library=__webpack_require__("./ui/components/component-library/index.ts"),tooltip=__webpack_require__("./ui/components/ui/tooltip/index.js"),design_system=__webpack_require__("./ui/helpers/constants/design-system.ts"),useI18nContext=__webpack_require__("./ui/hooks/useI18nContext.js"),selectors=__webpack_require__("./ui/selectors/index.js"),context_confirm=__webpack_require__("./ui/pages/confirmations/context/confirm/index.tsx"),bignumber=__webpack_require__("./node_modules/bignumber.js/bignumber.js"),transactions_controller_utils=__webpack_require__("./shared/lib/transactions-controller-utils.js"),useTokenExchangeRate=__webpack_require__("./ui/components/app/currency-input/hooks/useTokenExchangeRate.tsx"),locale_locale=__webpack_require__("./ui/ducks/locale/locale.ts"),useFiatFormatter=__webpack_require__("./ui/hooks/useFiatFormatter.ts"),useAssetDetails=__webpack_require__("./ui/pages/confirmations/hooks/useAssetDetails.js"),formatAmount=__webpack_require__("./ui/pages/confirmations/components/simulation-details/formatAmount.ts"),useTokenTransactionData=__webpack_require__("./ui/pages/confirmations/components/confirm/info/hooks/useTokenTransactionData.ts"),useTokenValues=function(transactionMeta){var _transactionMeta_txParams,_parsedTransactionData_args,locale=(0,es.d4)(locale_locale.gA),parsedTransactionData=(0,useTokenTransactionData.d)(),exchangeRate=(0,useTokenExchangeRate.A)(null==transactionMeta?void 0:null===(_transactionMeta_txParams=transactionMeta.txParams)||void 0===_transactionMeta_txParams?void 0:_transactionMeta_txParams.to),fiatFormatter=(0,useFiatFormatter.y)(),decimals=(0,useAssetDetails.Y)(transactionMeta.txParams.to,transactionMeta.txParams.from,transactionMeta.txParams.data,transactionMeta.chainId).decimals,value=null==parsedTransactionData?void 0:null===(_parsedTransactionData_args=parsedTransactionData.args)||void 0===_parsedTransactionData_args?void 0:_parsedTransactionData_args._value,decodedTransferValue=void 0!==decimals&&value?(0,transactions_controller_utils.dU)(value,Number(decimals)).toFixed():"0",fiatValue=exchangeRate&&decodedTransferValue&&exchangeRate.times(decodedTransferValue,10).toNumber(),fiatDisplayValue=fiatValue&&fiatFormatter(fiatValue,{shorten:!0}),displayTransferValue=(0,formatAmount.e)(locale,new bignumber.BigNumber(decodedTransferValue));return{decodedTransferValue:decodedTransferValue,displayTransferValue:displayTransferValue,fiatDisplayValue:fiatDisplayValue,fiatValue:fiatValue}},useSendingValueMetric=__webpack_require__("./ui/pages/confirmations/components/confirm/info/hooks/useSendingValueMetric.ts"),useTokenDetails=function(transactionMeta){var _tokenList_transactionMeta_txParams_to,_transactionMeta_txParams,_tokenList_transactionMeta_txParams_to1,_transactionMeta_txParams1,t=(0,useI18nContext.P)(),selectedToken=(0,es.d4)(function(state){return(0,selectors.AZO)(transactionMeta)(state)}),tokenList=(0,es.d4)(selectors.iM3);return{tokenImage:(null==selectedToken?void 0:selectedToken.iconUrl)||(null==selectedToken?void 0:selectedToken.image)||(null===(_tokenList_transactionMeta_txParams_to=tokenList[null==transactionMeta?void 0:null===(_transactionMeta_txParams=transactionMeta.txParams)||void 0===_transactionMeta_txParams?void 0:_transactionMeta_txParams.to])||void 0===_tokenList_transactionMeta_txParams_to?void 0:_tokenList_transactionMeta_txParams_to.iconUrl),tokenSymbol:(null==selectedToken?void 0:selectedToken.symbol)||(null===(_tokenList_transactionMeta_txParams_to1=tokenList[null==transactionMeta?void 0:null===(_transactionMeta_txParams1=transactionMeta.txParams)||void 0===_transactionMeta_txParams1?void 0:_transactionMeta_txParams1.to])||void 0===_tokenList_transactionMeta_txParams_to1?void 0:_tokenList_transactionMeta_txParams_to1.symbol)||t("unknown")}};let send_heading=function(){var t=(0,useI18nContext.P)(),transactionMeta=(0,context_confirm.TW)().currentConfirmation,_useTokenDetails=useTokenDetails(transactionMeta),tokenImage=_useTokenDetails.tokenImage,tokenSymbol=_useTokenDetails.tokenSymbol,_useTokenValues=useTokenValues(transactionMeta),decodedTransferValue=_useTokenValues.decodedTransferValue,displayTransferValue=_useTokenValues.displayTransferValue,fiatDisplayValue=_useTokenValues.fiatDisplayValue,fiatValue=_useTokenValues.fiatValue,isTestnet=network.YP.includes(transactionMeta.chainId),showFiatInTestnets=(0,es.d4)(selectors.lX9).showFiatInTestnets,TokenImage=react.createElement(component_library.hQ,{src:tokenImage,name:tokenSymbol!==t("unknown")&&tokenSymbol,size:component_library.gh.Xl,backgroundColor:tokenSymbol===t("unknown")?design_system.i0.overlayDefault:design_system.i0.backgroundDefault,color:tokenSymbol===t("unknown")?design_system.r7.textMuted:design_system.r7.textDefault}),TokenValue=displayTransferValue===decodedTransferValue?react.createElement(component_library.EY,{variant:design_system.J3.headingLg,color:design_system.r7.inherit,marginTop:3},"".concat(displayTransferValue," ").concat(tokenSymbol)):react.createElement(tooltip.A,{title:decodedTransferValue,position:"right"},react.createElement(component_library.EY,{variant:design_system.J3.headingLg,color:design_system.r7.inherit,marginTop:3},"".concat(displayTransferValue," ").concat(tokenSymbol))),TokenFiatValue=!!fiatDisplayValue&&(!isTestnet||showFiatInTestnets)&&react.createElement(component_library.EY,{variant:design_system.J3.bodyMd,color:design_system.r7.textAlternative},fiatDisplayValue);return(0,useSendingValueMetric.p)({transactionMeta:transactionMeta,fiatValue:fiatValue}),react.createElement(component_library.az,{display:design_system.nl.Flex,flexDirection:design_system.bo.Column,justifyContent:design_system.A9.center,alignItems:design_system.k2.center,padding:4},TokenImage,TokenValue,TokenFiatValue)}},"./ui/pages/confirmations/components/confirm/info/token-transfer/token-transfer.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_context_confirm__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./ui/pages/confirmations/context/confirm/index.tsx"),_simulation_details__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./ui/pages/confirmations/components/simulation-details/index.ts"),_shared_advanced_details_advanced_details__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./ui/pages/confirmations/components/confirm/info/shared/advanced-details/advanced-details.tsx"),_shared_gas_fees_section_gas_fees_section__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./ui/pages/confirmations/components/confirm/info/shared/gas-fees-section/gas-fees-section.tsx"),_shared_send_heading_send_heading__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./ui/pages/confirmations/components/confirm/info/shared/send-heading/send-heading.tsx"),_token_details_section__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./ui/pages/confirmations/components/confirm/info/token-transfer/token-details-section.tsx"),_transaction_flow_section__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./ui/pages/confirmations/components/confirm/info/token-transfer/transaction-flow-section.tsx");let __WEBPACK_DEFAULT_EXPORT__=function(){var transactionMeta=(0,_context_confirm__WEBPACK_IMPORTED_MODULE_1__.TW)().currentConfirmation,isWalletInitiated="metamask"===transactionMeta.origin;return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement(_shared_send_heading_send_heading__WEBPACK_IMPORTED_MODULE_5__.A,null),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_transaction_flow_section__WEBPACK_IMPORTED_MODULE_7__.g,null),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_simulation_details__WEBPACK_IMPORTED_MODULE_2__._,{transaction:transactionMeta,isTransactionsRedesign:!0,enableMetrics:!0,metricsOnly:isWalletInitiated}),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_token_details_section__WEBPACK_IMPORTED_MODULE_6__.n,null),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_shared_gas_fees_section_gas_fees_section__WEBPACK_IMPORTED_MODULE_4__.i,null),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_shared_advanced_details_advanced_details__WEBPACK_IMPORTED_MODULE_3__.v,null))}},"./ui/pages/confirmations/components/confirm/info/typed-sign-v1/typed-sign-v1.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_components_app_confirm_info_row_alert_row_alert_row__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./ui/components/app/confirm/info/row/alert-row/alert-row.tsx"),_components_app_confirm_info_row__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./ui/components/app/confirm/info/row/index.ts"),_components_app_confirm_info_row_constants__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./ui/components/app/confirm/info/row/constants.ts"),_hooks_useI18nContext__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./ui/hooks/useI18nContext.js"),_context_confirm__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./ui/pages/confirmations/context/confirm/index.tsx"),_row_typed_sign_data_v1_typedSignDataV1__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./ui/pages/confirmations/components/confirm/row/typed-sign-data-v1/typedSignDataV1.tsx"),_components_app_confirm_info_row_section__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./ui/components/app/confirm/info/row/section.tsx"),_helpers_utils_snaps__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./ui/helpers/utils/snaps.ts"),_shared_sign_in_with_row_sign_in_with_row__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./ui/pages/confirmations/components/confirm/info/shared/sign-in-with-row/sign-in-with-row.tsx");let __WEBPACK_DEFAULT_EXPORT__=function(){var _currentConfirmation_msgParams,_currentConfirmation_msgParams1,_currentConfirmation_msgParams2,_currentConfirmation_msgParams3,_currentConfirmation_msgParams_origin,_currentConfirmation_msgParams_data,t=(0,_hooks_useI18nContext__WEBPACK_IMPORTED_MODULE_4__.P)(),currentConfirmation=(0,_context_confirm__WEBPACK_IMPORTED_MODULE_5__.TW)().currentConfirmation;if(!(null==currentConfirmation?void 0:currentConfirmation.msgParams))return null;var toolTipMessage=t((0,_helpers_utils_snaps__WEBPACK_IMPORTED_MODULE_8__.cX)(null===(_currentConfirmation_msgParams=currentConfirmation.msgParams)||void 0===_currentConfirmation_msgParams?void 0:_currentConfirmation_msgParams.origin)?"requestFromInfoSnap":"requestFromInfo"),chainId=currentConfirmation.chainId;return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_app_confirm_info_row_section__WEBPACK_IMPORTED_MODULE_7__.C,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_app_confirm_info_row_alert_row_alert_row__WEBPACK_IMPORTED_MODULE_1__.n,{alertKey:_components_app_confirm_info_row_constants__WEBPACK_IMPORTED_MODULE_3__.oE.RequestFrom,ownerId:currentConfirmation.id,label:t("requestFrom"),tooltip:toolTipMessage},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_app_confirm_info_row__WEBPACK_IMPORTED_MODULE_2__.u7,{url:null!==(_currentConfirmation_msgParams_origin=null===(_currentConfirmation_msgParams1=currentConfirmation.msgParams)||void 0===_currentConfirmation_msgParams1?void 0:_currentConfirmation_msgParams1.origin)&&void 0!==_currentConfirmation_msgParams_origin?_currentConfirmation_msgParams_origin:""})),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_shared_sign_in_with_row_sign_in_with_row__WEBPACK_IMPORTED_MODULE_9__.$,null)),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_app_confirm_info_row_section__WEBPACK_IMPORTED_MODULE_7__.C,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_app_confirm_info_row__WEBPACK_IMPORTED_MODULE_2__.z$,{label:t("message"),collapsed:!1,copyEnabled:!0,copyText:JSON.stringify(null!==(_currentConfirmation_msgParams_data=null===(_currentConfirmation_msgParams2=currentConfirmation.msgParams)||void 0===_currentConfirmation_msgParams2?void 0:_currentConfirmation_msgParams2.data)&&void 0!==_currentConfirmation_msgParams_data?_currentConfirmation_msgParams_data:{})},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_row_typed_sign_data_v1_typedSignDataV1__WEBPACK_IMPORTED_MODULE_6__.L,{data:null===(_currentConfirmation_msgParams3=currentConfirmation.msgParams)||void 0===_currentConfirmation_msgParams3?void 0:_currentConfirmation_msgParams3.data,chainId:chainId}))))};try{typedsignv1.displayName="typedsignv1",typedsignv1.__docgenInfo={description:"",displayName:"typedsignv1",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["ui/pages/confirmations/components/confirm/info/typed-sign-v1/typed-sign-v1.tsx#typedsignv1"]={docgenInfo:typedsignv1.__docgenInfo,name:"typedsignv1",path:"ui/pages/confirmations/components/confirm/info/typed-sign-v1/typed-sign-v1.tsx#typedsignv1"})}catch(__react_docgen_typescript_loader_error){}},"./ui/pages/confirmations/components/confirm/ledger-info/ledger-info.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>ledger_info});var react=__webpack_require__("./node_modules/react/index.js"),es=__webpack_require__("./node_modules/react-redux/es/index.js"),util=__webpack_require__("./app/scripts/lib/util.ts"),app=__webpack_require__("./shared/constants/app.ts"),hardware_wallets=__webpack_require__("./shared/constants/hardware-wallets.ts"),component_library=__webpack_require__("./ui/components/component-library/index.ts"),app_app=__webpack_require__("./ui/ducks/app/app.ts"),metamask=__webpack_require__("./ui/ducks/metamask/metamask.js"),design_system=__webpack_require__("./ui/helpers/constants/design-system.ts"),useI18nContext=__webpack_require__("./ui/hooks/useI18nContext.js"),actions=__webpack_require__("./ui/__mocks__/actions.js"),context_confirm=__webpack_require__("./ui/pages/confirmations/context/confirm/index.tsx");function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg),value=info.value}catch(error){reject(error);return}info.done?resolve(value):Promise.resolve(value).then(_next,_throw)}function _async_to_generator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value)}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err)}_next(void 0)})}}function _ts_generator(thisArg,body){var f,y,t,g,_={label:0,sent:function(){if(1&t[0])throw t[1];return t[1]},trys:[],ops:[]};return g={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(g[Symbol.iterator]=function(){return this}),g;function verb(n){return function(v){return step([n,v])}}function step(op){if(f)throw TypeError("Generator is already executing.");for(;_;)try{if(f=1,y&&(t=2&op[0]?y.return:op[0]?y.throw||((t=y.return)&&t.call(y),0):y.next)&&!(t=t.call(y,op[1])).done)return t;switch(y=0,t&&(op=[2&op[0],t.value]),op[0]){case 0:case 1:t=op;break;case 4:return _.label++,{value:op[1],done:!1};case 5:_.label++,y=op[1],op=[0];continue;case 7:op=_.ops.pop(),_.trys.pop();continue;default:if(!(t=(t=_.trys).length>0&&t[t.length-1])&&(6===op[0]||2===op[0])){_=0;continue}if(3===op[0]&&(!t||op[1]>t[0]&&op[1]<t[3])){_.label=op[1];break}if(6===op[0]&&_.label<t[1]){_.label=t[1],t=op;break}if(t&&_.label<t[2]){_.label=t[2],_.ops.push(op);break}t[2]&&_.ops.pop(),_.trys.pop();continue}op=body.call(thisArg,_)}catch(e){op=[6,e],y=0}finally{f=t=0}if(5&op[0])throw op[1];return{value:op[0]?op[1]:void 0,done:!0}}}let hooks_useLedgerConnection=function(){var _currentConfirmation_msgParams,_currentConfirmation_txParams,_currentConfirmation_msgParams_from,dispatch=(0,es.wA)(),currentConfirmation=(0,context_confirm.TW)().currentConfirmation,ledgerTransportType=(0,es.d4)(metamask.zq),transportStatus=(0,es.d4)(app_app.HH),webHidConnectedStatus=(0,es.d4)(app_app.IA),from=null!==(_currentConfirmation_msgParams_from=null==currentConfirmation?void 0:null===(_currentConfirmation_msgParams=currentConfirmation.msgParams)||void 0===_currentConfirmation_msgParams?void 0:_currentConfirmation_msgParams.from)&&void 0!==_currentConfirmation_msgParams_from?_currentConfirmation_msgParams_from:null==currentConfirmation?void 0:null===(_currentConfirmation_txParams=currentConfirmation.txParams)||void 0===_currentConfirmation_txParams?void 0:_currentConfirmation_txParams.from,isLedgerWallet=(0,es.d4)(function(state){return from&&(0,metamask.QQ)(state,from)});return(0,react.useEffect)(function(){if(isLedgerWallet){var _ref,_ref1,initialConnectedDeviceCheck=(_ref=_async_to_generator(function(){var _window_navigator_hid,_window_navigator,devices,webHidIsConnected;return _ts_generator(this,function(_state){switch(_state.label){case 0:if(!(ledgerTransportType===hardware_wallets.ef.webhid&&webHidConnectedStatus!==hardware_wallets.jI.connected))return[3,2];return[4,null===(_window_navigator=window.navigator)||void 0===_window_navigator?void 0:null===(_window_navigator_hid=_window_navigator.hid)||void 0===_window_navigator_hid?void 0:_window_navigator_hid.getDevices()];case 1:webHidIsConnected=null==(devices=_state.sent())?void 0:devices.some(function(device){return device.vendorId===Number(hardware_wallets.e)}),dispatch((0,app_app.u5)(webHidIsConnected?hardware_wallets.jI.connected:hardware_wallets.jI.notConnected)),_state.label=2;case 2:return[2]}})}),function initialConnectedDeviceCheck(){return _ref.apply(this,arguments)});(_ref1=_async_to_generator(function(){var transportedCreated,e;return _ts_generator(this,function(_state){switch(_state.label){case 0:if(!(ledgerTransportType===hardware_wallets.ef.webhid&&webHidConnectedStatus===hardware_wallets.jI.connected&&transportStatus===hardware_wallets.cf.none))return[3,4];_state.label=1;case 1:return _state.trys.push([1,3,,4]),[4,(0,actions.attemptLedgerTransportCreation)()];case 2:return transportedCreated=_state.sent(),dispatch((0,app_app.nX)(transportedCreated?hardware_wallets.cf.verified:hardware_wallets.cf.unknownFailure)),[3,4];case 3:return(e=_state.sent()).message.match("Failed to open the device")?dispatch((0,app_app.nX)(hardware_wallets.cf.deviceOpenFailure)):e.message.match("the device is already open")?dispatch((0,app_app.nX)(hardware_wallets.cf.verified)):dispatch((0,app_app.nX)(hardware_wallets.cf.unknownFailure)),[3,4];case 4:return[2]}})}),function determineTransportStatus(){return _ref1.apply(this,arguments)})(),initialConnectedDeviceCheck()}},[dispatch,ledgerTransportType,isLedgerWallet,webHidConnectedStatus,transportStatus]),(0,react.useEffect)(function(){if(isLedgerWallet)return function(){dispatch((0,app_app.nX)(hardware_wallets.cf.none))}},[dispatch]),{isLedgerWallet:isLedgerWallet}};function ledger_info_asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg),value=info.value}catch(error){reject(error);return}info.done?resolve(value):Promise.resolve(value).then(_next,_throw)}function ledger_info_async_to_generator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){ledger_info_asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value)}function _throw(err){ledger_info_asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err)}_next(void 0)})}}function ledger_info_ts_generator(thisArg,body){var f,y,t,g,_={label:0,sent:function(){if(1&t[0])throw t[1];return t[1]},trys:[],ops:[]};return g={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(g[Symbol.iterator]=function(){return this}),g;function verb(n){return function(v){return step([n,v])}}function step(op){if(f)throw TypeError("Generator is already executing.");for(;_;)try{if(f=1,y&&(t=2&op[0]?y.return:op[0]?y.throw||((t=y.return)&&t.call(y),0):y.next)&&!(t=t.call(y,op[1])).done)return t;switch(y=0,t&&(op=[2&op[0],t.value]),op[0]){case 0:case 1:t=op;break;case 4:return _.label++,{value:op[1],done:!1};case 5:_.label++,y=op[1],op=[0];continue;case 7:op=_.ops.pop(),_.trys.pop();continue;default:if(!(t=(t=_.trys).length>0&&t[t.length-1])&&(6===op[0]||2===op[0])){_=0;continue}if(3===op[0]&&(!t||op[1]>t[0]&&op[1]<t[3])){_.label=op[1];break}if(6===op[0]&&_.label<t[1]){_.label=t[1],t=op;break}if(t&&_.label<t[2]){_.label=t[2],_.ops.push(op);break}t[2]&&_.ops.pop(),_.trys.pop();continue}op=body.call(thisArg,_)}catch(e){op=[6,e],y=0}finally{f=t=0}if(5&op[0])throw op[1];return{value:op[0]?op[1]:void 0,done:!0}}}let ledger_info=function(){var isLedgerWallet=hooks_useLedgerConnection().isLedgerWallet,t=(0,useI18nContext.P)(),dispatch=(0,es.wA)(),webHidConnectedStatus=(0,es.d4)(app_app.IA),ledgerTransportType=(0,es.d4)(metamask.zq),transportStatus=(0,es.d4)(app_app.HH),environmentTypeIsFullScreen=(0,util.mc)()===app.t8;if(!isLedgerWallet)return null;var usingWebHID=ledgerTransportType===hardware_wallets.ef.webhid;return react.createElement(component_library.b8,{severity:component_library.OU.Info,style:{marginTop:16}},react.createElement(component_library.EY,{variant:design_system.J3.headingSm,fontWeight:design_system.IT.Medium},t("ledgerConnectionInstructionHeader")),react.createElement("ul",{style:{listStyle:"disc"}},react.createElement("li",null,react.createElement(component_library.EY,{variant:design_system.J3.bodyMd},t("ledgerConnectionInstructionStepThree"))),react.createElement("li",null,react.createElement(component_library.EY,{variant:design_system.J3.bodyMd},t("ledgerConnectionInstructionStepFour")))),transportStatus===hardware_wallets.cf.deviceOpenFailure&&react.createElement(component_library.$n,{variant:component_library.Ak.Link,textAlign:design_system.nO.Left,fontWeight:design_system.IT.Normal,onClick:ledger_info_async_to_generator(function(){var _global_platform_openExtensionInBrowser,_global_platform;return ledger_info_ts_generator(this,function(_state){return environmentTypeIsFullScreen?window.location.reload():null===(_global_platform_openExtensionInBrowser=(_global_platform=__webpack_require__.g.platform).openExtensionInBrowser)||void 0===_global_platform_openExtensionInBrowser||_global_platform_openExtensionInBrowser.call(_global_platform,null,null,!0),[2]})})},t("ledgerConnectionInstructionCloseOtherApps")),usingWebHID&&webHidConnectedStatus===hardware_wallets.jI.notConnected&&react.createElement(component_library.$n,{variant:component_library.Ak.Link,textAlign:design_system.nO.Left,fontWeight:design_system.IT.Normal,onClick:ledger_info_async_to_generator(function(){var webHidIsConnected,_global_platform_openExtensionInBrowser,_global_platform;return ledger_info_ts_generator(this,function(_state){switch(_state.label){case 0:if(!environmentTypeIsFullScreen)return[3,2];return[4,window.navigator.hid.requestDevice({filters:[{vendorId:Number(hardware_wallets.e)}]})];case 1:return webHidIsConnected=_state.sent().some(function(device){return device.vendorId===Number(hardware_wallets.e)}),dispatch((0,app_app.u5)(webHidIsConnected?hardware_wallets.jI.connected:hardware_wallets.jI.notConnected)),[3,3];case 2:null===(_global_platform_openExtensionInBrowser=(_global_platform=__webpack_require__.g.platform).openExtensionInBrowser)||void 0===_global_platform_openExtensionInBrowser||_global_platform_openExtensionInBrowser.call(_global_platform,null,null,!0),_state.label=3;case 3:return[2]}})})},t(environmentTypeIsFullScreen?"clickToConnectLedgerViaWebHID":"openFullScreenForLedgerWebHid")))};try{ledgerinfo.displayName="ledgerinfo",ledgerinfo.__docgenInfo={description:"",displayName:"ledgerinfo",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["ui/pages/confirmations/components/confirm/ledger-info/ledger-info.tsx#ledgerinfo"]={docgenInfo:ledgerinfo.__docgenInfo,name:"ledgerinfo",path:"ui/pages/confirmations/components/confirm/ledger-info/ledger-info.tsx#ledgerinfo"})}catch(__react_docgen_typescript_loader_error){}},"./ui/pages/confirmations/components/confirm/nav/nav.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{$:()=>Nav,s:()=>ConfirmNav});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),react_redux__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react-redux/es/index.js"),_shared_constants_metametrics__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./shared/constants/metametrics.ts"),_components_component_library__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./ui/components/component-library/index.ts"),_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./ui/helpers/constants/design-system.ts"),_hooks_useI18nContext__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./ui/hooks/useI18nContext.js"),_store_actions__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./ui/store/actions.ts"),_hooks_useQueuedConfirmationEvents__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./ui/pages/confirmations/hooks/useQueuedConfirmationEvents.ts"),_hooks_useConfirmationNavigation__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./ui/pages/confirmations/hooks/useConfirmationNavigation.ts"),_context_confirm__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./ui/pages/confirmations/context/confirm/index.tsx");function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg),value=info.value}catch(error){reject(error);return}info.done?resolve(value):Promise.resolve(value).then(_next,_throw)}function _async_to_generator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value)}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err)}_next(void 0)})}}function _ts_generator(thisArg,body){var f,y,t,g,_={label:0,sent:function(){if(1&t[0])throw t[1];return t[1]},trys:[],ops:[]};return g={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(g[Symbol.iterator]=function(){return this}),g;function verb(n){return function(v){return step([n,v])}}function step(op){if(f)throw TypeError("Generator is already executing.");for(;_;)try{if(f=1,y&&(t=2&op[0]?y.return:op[0]?y.throw||((t=y.return)&&t.call(y),0):y.next)&&!(t=t.call(y,op[1])).done)return t;switch(y=0,t&&(op=[2&op[0],t.value]),op[0]){case 0:case 1:t=op;break;case 4:return _.label++,{value:op[1],done:!1};case 5:_.label++,y=op[1],op=[0];continue;case 7:op=_.ops.pop(),_.trys.pop();continue;default:if(!(t=(t=_.trys).length>0&&t[t.length-1])&&(6===op[0]||2===op[0])){_=0;continue}if(3===op[0]&&(!t||op[1]>t[0]&&op[1]<t[3])){_.label=op[1];break}if(6===op[0]&&_.label<t[1]){_.label=t[1],t=op;break}if(t&&_.label<t[2]){_.label=t[2],_.ops.push(op);break}t[2]&&_.ops.pop(),_.trys.pop();continue}op=body.call(thisArg,_)}catch(e){op=[6,e],y=0}finally{f=t=0}if(5&op[0])throw op[1];return{value:op[0]?op[1]:void 0,done:!0}}}var Nav=function(param){var confirmationId=param.confirmationId,t=(0,_hooks_useI18nContext__WEBPACK_IMPORTED_MODULE_5__.P)(),dispatch=(0,react_redux__WEBPACK_IMPORTED_MODULE_1__.wA)(),_useConfirmationNavigation=(0,_hooks_useConfirmationNavigation__WEBPACK_IMPORTED_MODULE_8__.N)(),count=_useConfirmationNavigation.count,getIndex=_useConfirmationNavigation.getIndex,navigateToIndex=_useConfirmationNavigation.navigateToIndex,position=getIndex(confirmationId),onNavigateButtonClick=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function(change){navigateToIndex(position+change)},[position,navigateToIndex]),onRejectAll=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(_async_to_generator(function(){return _ts_generator(this,function(_state){switch(_state.label){case 0:return[4,dispatch((0,_store_actions__WEBPACK_IMPORTED_MODULE_6__.rejectAllApprovals)())];case 1:return _state.sent(),[2]}})}),[dispatch]);return((0,_hooks_useQueuedConfirmationEvents__WEBPACK_IMPORTED_MODULE_7__.F)(_shared_constants_metametrics__WEBPACK_IMPORTED_MODULE_2__.Gq.NavigationHeader),count<=1)?null:react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_3__.az,{alignItems:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_4__.k2.center,backgroundColor:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_4__.i0.backgroundDefault,display:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_4__.nl.Flex,flexDirection:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_4__.bo.Row,justifyContent:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_4__.A9.spaceBetween,padding:3,width:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_4__.Zf.Full,style:{zIndex:2,position:"relative"}},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_3__.az,{alignItems:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_4__.k2.center,display:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_4__.nl.Flex},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_3__.a2,{ariaLabel:"Previous Confirmation","data-testid":"confirm-nav__previous-confirmation",backgroundColor:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_4__.i0.backgroundAlternative,borderRadius:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_4__.Z6.full,className:"confirm_nav__left_btn",color:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_4__.Li.iconAlternative,disabled:0===position,iconName:_components_component_library__WEBPACK_IMPORTED_MODULE_3__.$M.ArrowLeft,onClick:function(){return onNavigateButtonClick(-1)},size:_components_component_library__WEBPACK_IMPORTED_MODULE_3__.f3.Sm}),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_3__.EY,{color:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_4__.r7.textAlternative,marginInline:2,variant:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_4__.J3.bodySm,"data-testid":"confirm-page-nav-position"},position+1," of ",count),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_3__.a2,{ariaLabel:"Next Confirmation","data-testid":"confirm-nav__next-confirmation",backgroundColor:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_4__.i0.backgroundAlternative,borderRadius:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_4__.Z6.full,className:"confirm_nav__right_btn",color:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_4__.Li.iconAlternative,disabled:position===count-1,iconName:_components_component_library__WEBPACK_IMPORTED_MODULE_3__.$M.ArrowRight,onClick:function(){return onNavigateButtonClick(1)},size:_components_component_library__WEBPACK_IMPORTED_MODULE_3__.f3.Sm})),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_3__.$n,{borderRadius:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_4__.Z6.XL,className:"confirm_nav__reject_all","data-testid":"confirm-nav__reject-all",fontWeight:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_4__.IT.Normal,onClick:onRejectAll,paddingLeft:3,paddingRight:3,startIconName:_components_component_library__WEBPACK_IMPORTED_MODULE_3__.$M.Close,type:_components_component_library__WEBPACK_IMPORTED_MODULE_3__.Ak.Secondary},t("rejectAll")))},ConfirmNav=function(){var currentConfirmation=(0,_context_confirm__WEBPACK_IMPORTED_MODULE_9__.TW)().currentConfirmation;return react__WEBPACK_IMPORTED_MODULE_0__.createElement(Nav,{confirmationId:null==currentConfirmation?void 0:currentConfirmation.id})};try{Nav.displayName="Nav",Nav.__docgenInfo={description:"",displayName:"Nav",props:{confirmationId:{defaultValue:null,description:"",name:"confirmationId",required:!1,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["ui/pages/confirmations/components/confirm/nav/nav.tsx#Nav"]={docgenInfo:Nav.__docgenInfo,name:"Nav",path:"ui/pages/confirmations/components/confirm/nav/nav.tsx#Nav"})}catch(__react_docgen_typescript_loader_error){}},"./ui/pages/confirmations/components/confirm/network-change-toast/index.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{q:()=>network_change_toast,x:()=>network_change_toast_legacy});var react=__webpack_require__("./node_modules/react/index.js"),useCurrentConfirmation=__webpack_require__("./ui/pages/confirmations/hooks/useCurrentConfirmation.ts"),es=__webpack_require__("./node_modules/react-redux/es/index.js"),component_library=__webpack_require__("./ui/components/component-library/index.ts"),multichain=__webpack_require__("./ui/components/multichain/index.js"),actions=__webpack_require__("./ui/store/actions.ts"),useI18nContext=__webpack_require__("./ui/hooks/useI18nContext.js"),selectors=__webpack_require__("./ui/selectors/index.js");function _array_like_to_array(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function _array_with_holes(arr){if(Array.isArray(arr))return arr}function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg),value=info.value}catch(error){reject(error);return}info.done?resolve(value):Promise.resolve(value).then(_next,_throw)}function _async_to_generator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value)}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err)}_next(void 0)})}}function _iterable_to_array_limit(arr,i){var _s,_e,_i=null==arr?null:"undefined"!=typeof Symbol&&arr[Symbol.iterator]||arr["@@iterator"];if(null!=_i){var _arr=[],_n=!0,_d=!1;try{for(_i=_i.call(arr);!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{_n||null==_i.return||_i.return()}finally{if(_d)throw _e}}return _arr}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array(arr,i){return _array_with_holes(arr)||_iterable_to_array_limit(arr,i)||_unsupported_iterable_to_array(arr,i)||_non_iterable_rest()}function _unsupported_iterable_to_array(o,minLen){if(o){if("string"==typeof o)return _array_like_to_array(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if("Object"===n&&o.constructor&&(n=o.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _array_like_to_array(o,minLen)}}function _ts_generator(thisArg,body){var f,y,t,g,_={label:0,sent:function(){if(1&t[0])throw t[1];return t[1]},trys:[],ops:[]};return g={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(g[Symbol.iterator]=function(){return this}),g;function verb(n){return function(v){return step([n,v])}}function step(op){if(f)throw TypeError("Generator is already executing.");for(;_;)try{if(f=1,y&&(t=2&op[0]?y.return:op[0]?y.throw||((t=y.return)&&t.call(y),0):y.next)&&!(t=t.call(y,op[1])).done)return t;switch(y=0,t&&(op=[2&op[0],t.value]),op[0]){case 0:case 1:t=op;break;case 4:return _.label++,{value:op[1],done:!1};case 5:_.label++,y=op[1],op=[0];continue;case 7:op=_.ops.pop(),_.trys.pop();continue;default:if(!(t=(t=_.trys).length>0&&t[t.length-1])&&(6===op[0]||2===op[0])){_=0;continue}if(3===op[0]&&(!t||op[1]>t[0]&&op[1]<t[3])){_.label=op[1];break}if(6===op[0]&&_.label<t[1]){_.label=t[1],t=op;break}if(t&&_.label<t[2]){_.label=t[2],_.ops.push(op);break}t[2]&&_.ops.pop(),_.trys.pop();continue}op=body.call(thisArg,_)}catch(e){op=[6,e],y=0}finally{f=t=0}if(5&op[0])throw op[1];return{value:op[0]?op[1]:void 0,done:!0}}}let network_change_toast_legacy=function(param){var _network_name,confirmation=param.confirmation,newChainId=null==confirmation?void 0:confirmation.chainId,_useState=_sliced_to_array((0,react.useState)(!1),2),toastVisible=_useState[0],setToastVisible=_useState[1],t=(0,useI18nContext.P)(),network=(0,es.d4)(function(state){return(0,selectors.gD7)(state,newChainId)}),hideToast=(0,react.useCallback)(function(){setToastVisible(!1)},[setToastVisible]);return((0,react.useEffect)(function(){var isMounted=!0;if(confirmation)return _async_to_generator(function(){var lastInteractedConfirmationInfo,currentTimestamp;return _ts_generator(this,function(_state){switch(_state.label){case 0:return[4,(0,actions.getLastInteractedConfirmationInfo)()];case 1:return lastInteractedConfirmationInfo=_state.sent(),currentTimestamp=new Date().getTime(),lastInteractedConfirmationInfo&&lastInteractedConfirmationInfo.chainId!==newChainId&¤tTimestamp-lastInteractedConfirmationInfo.timestamp<=6e4&&isMounted&&(setToastVisible(!0),setTimeout(function(){isMounted&&hideToast()},5e3)),(!lastInteractedConfirmationInfo||(null==lastInteractedConfirmationInfo?void 0:lastInteractedConfirmationInfo.id)!==confirmation.id)&&isMounted&&(0,actions.setLastInteractedConfirmationInfo)({id:confirmation.id,chainId:newChainId,timestamp:new Date().getTime()}),[2]}})})(),function(){isMounted=!1}},[null==confirmation?void 0:confirmation.id]),toastVisible)?react.createElement(component_library.az,{className:"toast_wrapper"},react.createElement(multichain.y8,{onClose:hideToast,text:t("networkSwitchMessage",[null!==(_network_name=network.name)&&void 0!==_network_name?_network_name:""]),startAdornment:null})):null};try{networkchangetoastlegacy.displayName="networkchangetoastlegacy",networkchangetoastlegacy.__docgenInfo={description:"",displayName:"networkchangetoastlegacy",props:{confirmation:{defaultValue:null,description:"",name:"confirmation",required:!0,type:{name:"{ id: string; chainId: string; }"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["ui/pages/confirmations/components/confirm/network-change-toast/network-change-toast-legacy.tsx#networkchangetoastlegacy"]={docgenInfo:networkchangetoastlegacy.__docgenInfo,name:"networkchangetoastlegacy",path:"ui/pages/confirmations/components/confirm/network-change-toast/network-change-toast-legacy.tsx#networkchangetoastlegacy"})}catch(__react_docgen_typescript_loader_error){}let network_change_toast=function(){var currentConfirmation=(0,useCurrentConfirmation.A)().currentConfirmation;return react.createElement(network_change_toast_legacy,{confirmation:currentConfirmation})};try{NetworkChangeToastLegacy.displayName="NetworkChangeToastLegacy",NetworkChangeToastLegacy.__docgenInfo={description:"",displayName:"NetworkChangeToastLegacy",props:{confirmation:{defaultValue:null,description:"",name:"confirmation",required:!0,type:{name:"{ id: string; chainId: string; }"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["ui/pages/confirmations/components/confirm/network-change-toast/index.tsx#NetworkChangeToastLegacy"]={docgenInfo:NetworkChangeToastLegacy.__docgenInfo,name:"NetworkChangeToastLegacy",path:"ui/pages/confirmations/components/confirm/network-change-toast/index.tsx#NetworkChangeToastLegacy"})}catch(__react_docgen_typescript_loader_error){}},"./ui/pages/confirmations/components/confirm/row/typed-sign-data-v1/typedSignDataV1.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{L:()=>ConfirmInfoRowTypedSignDataV1});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_components_component_library__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./ui/components/component-library/index.ts"),_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./ui/helpers/constants/design-system.ts"),_dataTree__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./ui/pages/confirmations/components/confirm/row/dataTree.tsx");function _define_property(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _object_spread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{},ownKeys=Object.keys(source);"function"==typeof Object.getOwnPropertySymbols&&(ownKeys=ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym){return Object.getOwnPropertyDescriptor(source,sym).enumerable}))),ownKeys.forEach(function(key){_define_property(target,key,source[key])})}return target}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable})),keys.push.apply(keys,symbols)}return keys}function _object_spread_props(target,source){return source=null!=source?source:{},Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))}),target}var ConfirmInfoRowTypedSignDataV1=function(param){var data=param.data,chainId=param.chainId;if(!data)return null;var parsedData=data.reduce(function(val,param){var name=param.name,value=param.value,type=param.type;return _object_spread_props(_object_spread({},val),_define_property({},name,{type:type,value:value}))},{});return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_1__.az,{width:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.Zf.Full},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_1__.az,{style:{marginLeft:-8}},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_dataTree__WEBPACK_IMPORTED_MODULE_3__.f,{data:parsedData,chainId:chainId})))};try{ConfirmInfoRowTypedSignDataV1.displayName="ConfirmInfoRowTypedSignDataV1",ConfirmInfoRowTypedSignDataV1.__docgenInfo={description:"",displayName:"ConfirmInfoRowTypedSignDataV1",props:{data:{defaultValue:null,description:"",name:"data",required:!1,type:{name:"TypedSignDataV1Type"}},chainId:{defaultValue:null,description:"",name:"chainId",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["ui/pages/confirmations/components/confirm/row/typed-sign-data-v1/typedSignDataV1.tsx#ConfirmInfoRowTypedSignDataV1"]={docgenInfo:ConfirmInfoRowTypedSignDataV1.__docgenInfo,name:"ConfirmInfoRowTypedSignDataV1",path:"ui/pages/confirmations/components/confirm/row/typed-sign-data-v1/typedSignDataV1.tsx#ConfirmInfoRowTypedSignDataV1"})}catch(__react_docgen_typescript_loader_error){}},"./ui/pages/confirmations/components/confirm/scroll-to-bottom/scroll-to-bottom.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),react_redux__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react-redux/es/index.js"),_components_component_library__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./ui/components/component-library/index.ts"),_contexts_i18n__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./ui/contexts/i18n.js"),_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./ui/helpers/constants/design-system.ts"),_hooks_usePrevious__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./ui/hooks/usePrevious.ts"),_hooks_useScrollRequired__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./ui/hooks/useScrollRequired.js"),_context_confirm__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./ui/pages/confirmations/context/confirm/index.tsx"),_selectors_preferences__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./ui/pages/confirmations/selectors/preferences.ts"),_shared_lib_confirmation_utils__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./shared/lib/confirmation.utils.ts");let __WEBPACK_DEFAULT_EXPORT__=function(param){var children=param.children,t=(0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_contexts_i18n__WEBPACK_IMPORTED_MODULE_3__.gJ),_useConfirmContext=(0,_context_confirm__WEBPACK_IMPORTED_MODULE_7__.TW)(),currentConfirmation=_useConfirmContext.currentConfirmation,setIsScrollToBottomCompleted=_useConfirmContext.setIsScrollToBottomCompleted,previousId=(0,_hooks_usePrevious__WEBPACK_IMPORTED_MODULE_5__.Z)(null==currentConfirmation?void 0:currentConfirmation.id),showAdvancedDetails=(0,react_redux__WEBPACK_IMPORTED_MODULE_1__.d4)(_selectors_preferences__WEBPACK_IMPORTED_MODULE_8__.O),_useScrollRequired=(0,_hooks_useScrollRequired__WEBPACK_IMPORTED_MODULE_6__.c)([null==currentConfirmation?void 0:currentConfirmation.id,showAdvancedDetails],{offsetPxFromBottom:0}),hasScrolledToBottom=_useScrollRequired.hasScrolledToBottom,isScrollable=_useScrollRequired.isScrollable,isScrolledToBottom=_useScrollRequired.isScrolledToBottom,onScroll=_useScrollRequired.onScroll,scrollToBottom=_useScrollRequired.scrollToBottom,setHasScrolledToBottom=_useScrollRequired.setHasScrolledToBottom,ref=_useScrollRequired.ref,isTransactionRedesign=(0,_shared_lib_confirmation_utils__WEBPACK_IMPORTED_MODULE_9__.nO)(null==currentConfirmation?void 0:currentConfirmation.type),showScrollToBottom=isScrollable&&!isScrolledToBottom&&!isTransactionRedesign;return(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function(){if(previousId!==(null==currentConfirmation?void 0:currentConfirmation.id)){var currentRef=null==ref?void 0:ref.current;currentRef&&("function"==typeof currentRef.scrollTo&¤tRef.scrollTo(0,0),setHasScrolledToBottom(!1))}},[null==currentConfirmation?void 0:currentConfirmation.id,previousId,null==ref?void 0:ref.current]),(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function(){if(isTransactionRedesign){setIsScrollToBottomCompleted(!0);return}setIsScrollToBottomCompleted(!isScrollable||hasScrolledToBottom)},[isScrollable,hasScrolledToBottom,isTransactionRedesign]),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_2__.az,{backgroundColor:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_4__.i0.backgroundAlternative,width:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_4__.Zf.Full,height:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_4__.Zf.Full,style:{minHeight:"0",overflow:"hidden",position:"relative"}},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_2__.az,{display:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_4__.nl.Flex,flexDirection:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_4__.bo.Column,width:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_4__.Zf.Full,height:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_4__.Zf.Full,paddingLeft:4,paddingRight:4,onScroll:onScroll,ref:ref,style:{overflow:"auto"}},children,showScrollToBottom&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_2__.a2,{className:"confirm-scroll-to-bottom__button",onClick:scrollToBottom,iconName:_components_component_library__WEBPACK_IMPORTED_MODULE_2__.$M.Arrow2Down,ariaLabel:t("scrollDown"),backgroundColor:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_4__.i0.backgroundDefault,borderRadius:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_4__.Z6.full,color:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_4__.Li.primaryDefault,display:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_4__.nl.Flex,size:_components_component_library__WEBPACK_IMPORTED_MODULE_2__.f3.Md})))};try{scrolltobottom.displayName="scrolltobottom",scrolltobottom.__docgenInfo={description:"",displayName:"scrolltobottom",props:{children:{defaultValue:null,description:"Elements that go in the page content section",name:"children",required:!0,type:{name:"ReactNode | ReactNode[]"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["ui/pages/confirmations/components/confirm/scroll-to-bottom/scroll-to-bottom.tsx#scrolltobottom"]={docgenInfo:scrolltobottom.__docgenInfo,name:"scrolltobottom",path:"ui/pages/confirmations/components/confirm/scroll-to-bottom/scroll-to-bottom.tsx#scrolltobottom"})}catch(__react_docgen_typescript_loader_error){}},"./ui/pages/confirmations/components/confirm/title/title.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>title_title});var types=__webpack_require__("./node_modules/@metamask/transaction-controller/dist/types.mjs"),react=__webpack_require__("./node_modules/react/index.js"),transaction=__webpack_require__("./shared/constants/transaction.ts"),general_alert=__webpack_require__("./ui/components/app/alert-system/general-alert/general-alert.tsx"),component_library=__webpack_require__("./ui/components/component-library/index.ts"),design_system=__webpack_require__("./ui/helpers/constants/design-system.ts"),useAlerts=__webpack_require__("./ui/hooks/useAlerts.ts"),useI18nContext=__webpack_require__("./ui/hooks/useI18nContext.js"),constants=__webpack_require__("./ui/pages/confirmations/constants/index.ts"),context_confirm=__webpack_require__("./ui/pages/confirmations/context/confirm/index.tsx"),utils=__webpack_require__("./ui/pages/confirmations/utils/index.ts"),transaction_utils=__webpack_require__("./shared/modules/transaction.utils.ts"),app=__webpack_require__("./shared/constants/app.ts"),useTypedSignSignatureInfo=function(confirmation){var primaryType=(0,react.useMemo)(function(){return confirmation&&(0,utils.rS)(confirmation)&&(null==confirmation?void 0:confirmation.type)===app.$z.ETH_SIGN_TYPED_DATA?(0,utils.VO)(confirmation)?constants.Bz.PERMIT:(0,utils.m4)(confirmation)?constants.Bz.ORDER:void 0:void 0},[confirmation]),tokenStandard=(0,react.useMemo)(function(){var _confirmation_msgParams;if(primaryType===constants.Bz.PERMIT&&void 0!==(0,transaction_utils.z2)(null==confirmation?void 0:null===(_confirmation_msgParams=confirmation.msgParams)||void 0===_confirmation_msgParams?void 0:_confirmation_msgParams.data).message.tokenId)return transaction.ph.ERC721},[confirmation,primaryType]);return{primaryType:primaryType,tokenStandard:tokenStandard}},use_is_nft=__webpack_require__("./ui/pages/confirmations/components/confirm/info/approve/hooks/use-is-nft.ts"),info_utils=__webpack_require__("./ui/pages/confirmations/components/confirm/info/utils.ts"),useTokenTransactionData=__webpack_require__("./ui/pages/confirmations/components/confirm/info/hooks/useTokenTransactionData.ts"),useAssetDetails=__webpack_require__("./ui/pages/confirmations/hooks/useAssetDetails.js"),use_approve_token_simulation=__webpack_require__("./ui/pages/confirmations/components/confirm/info/approve/hooks/use-approve-token-simulation.ts");function useCurrentSpendingCap(currentConfirmation){var isTxWithSpendingCap=void 0!==currentConfirmation&&void 0!==currentConfirmation.txParams&&[types.D_.tokenMethodApprove,types.D_.tokenMethodIncreaseAllowance].includes(currentConfirmation.type),txParamsTo=isTxWithSpendingCap?currentConfirmation.txParams.to:null,txParamsFrom=isTxWithSpendingCap?currentConfirmation.txParams.from:null,txParamsData=isTxWithSpendingCap?currentConfirmation.txParams.data:null,chainId=isTxWithSpendingCap?currentConfirmation.chainId:null,decimals=(0,useAssetDetails.Y)(txParamsTo,txParamsFrom,txParamsData,chainId).decimals,_useApproveTokenSimulation=(0,use_approve_token_simulation.v)(currentConfirmation,decimals),spendingCap=_useApproveTokenSimulation.spendingCap,pending=_useApproveTokenSimulation.pending,customSpendingCap="";return isTxWithSpendingCap&&(customSpendingCap=spendingCap),{customSpendingCap:customSpendingCap,pending:pending}}function ConfirmBannerAlert(param){var ownerId=param.ownerId,generalAlerts=(0,useAlerts.A)(ownerId).generalAlerts;return 0===generalAlerts.length?null:react.createElement(component_library.az,{marginTop:3},generalAlerts.map(function(alert){return react.createElement(component_library.az,{marginTop:1,key:alert.key},react.createElement(general_alert.A,{"data-testid":"confirm-banner-alert",title:alert.reason,description:alert.message,severity:alert.severity,provider:alert.provider,details:alert.alertDetails,reportUrl:alert.reportUrl,children:alert.content}))}))}var getTitle=function(t,confirmation,isNFT,customSpendingCap,isRevokeSetApprovalForAll,pending,primaryType,tokenStandard){if(pending)return"";switch(null==confirmation?void 0:confirmation.type){case types.D_.contractInteraction:return t("confirmTitleTransaction");case types.D_.deployContract:return t("confirmTitleDeployContract");case types.D_.personalSign:if((0,utils.q9)(confirmation))return t("confirmTitleSIWESignature");return t("confirmTitleSignature");case types.D_.signTypedData:if(primaryType===constants.Bz.PERMIT){if(tokenStandard===transaction.ph.ERC721)return t("setApprovalForAllRedesignedTitle");return t("confirmTitlePermitTokens")}return t("confirmTitleSignature");case types.D_.tokenMethodApprove:if(isNFT)return t("confirmTitleApproveTransactionNFT");if("0"===customSpendingCap)return t("confirmTitleRevokeApproveTransaction");return t("confirmTitlePermitTokens");case types.D_.tokenMethodIncreaseAllowance:return t("confirmTitlePermitTokens");case types.D_.tokenMethodSetApprovalForAll:if(isRevokeSetApprovalForAll)return t("confirmTitleSetApprovalForAllRevokeTransaction");return t("setApprovalForAllRedesignedTitle");default:return""}},getDescription=function(t,confirmation,isNFT,customSpendingCap,isRevokeSetApprovalForAll,pending,primaryType,tokenStandard){if(pending)return"";switch(null==confirmation?void 0:confirmation.type){case types.D_.contractInteraction:return"";case types.D_.deployContract:return t("confirmTitleDescDeployContract");case types.D_.personalSign:if((0,utils.q9)(confirmation))return t("confirmTitleDescSIWESignature");return t("confirmTitleDescSign");case types.D_.signTypedData:if(primaryType===constants.Bz.PERMIT){if(tokenStandard===transaction.ph.ERC721)return t("confirmTitleDescApproveTransaction");return t("confirmTitleDescPermitSignature")}return t("confirmTitleDescSign");case types.D_.tokenMethodApprove:if(isNFT)return t("confirmTitleDescApproveTransaction");if("0"===customSpendingCap)return"";return t("confirmTitleDescERC20ApproveTransaction");case types.D_.tokenMethodIncreaseAllowance:return t("confirmTitleDescPermitSignature");case types.D_.tokenMethodSetApprovalForAll:if(isRevokeSetApprovalForAll)return"";return t("confirmTitleDescApproveTransaction");default:return""}};let title_title=(0,react.memo)(function(){var t=(0,useI18nContext.P)(),currentConfirmation=(0,context_confirm.TW)().currentConfirmation,isNFT=(0,use_is_nft.k)(currentConfirmation).isNFT,_useTypedSignSignatureInfo=useTypedSignSignatureInfo(currentConfirmation),primaryType=_useTypedSignSignatureInfo.primaryType,tokenStandard=_useTypedSignSignatureInfo.tokenStandard,_useCurrentSpendingCap=useCurrentSpendingCap(currentConfirmation),customSpendingCap=_useCurrentSpendingCap.customSpendingCap,spendingCapPending=_useCurrentSpendingCap.pending,parsedTransactionData=(0,useTokenTransactionData.d)(),isRevokeSetApprovalForAll=(null==currentConfirmation?void 0:currentConfirmation.type)===types.D_.tokenMethodSetApprovalForAll&&(0,info_utils.ah)(parsedTransactionData),title1=(0,react.useMemo)(function(){return getTitle(t,currentConfirmation,isNFT,customSpendingCap,isRevokeSetApprovalForAll,spendingCapPending,primaryType,tokenStandard)},[currentConfirmation,isNFT,customSpendingCap,isRevokeSetApprovalForAll,spendingCapPending,primaryType,tokenStandard]),description=(0,react.useMemo)(function(){return getDescription(t,currentConfirmation,isNFT,customSpendingCap,isRevokeSetApprovalForAll,spendingCapPending,primaryType,tokenStandard)},[currentConfirmation,isNFT,customSpendingCap,isRevokeSetApprovalForAll,spendingCapPending,primaryType,tokenStandard]);return currentConfirmation?react.createElement(react.Fragment,null,react.createElement(ConfirmBannerAlert,{ownerId:currentConfirmation.id}),""!==title1&&react.createElement(component_library.EY,{variant:design_system.J3.headingLg,paddingTop:4,paddingBottom:4,textAlign:design_system.nO.Center},title1),""!==description&&react.createElement(component_library.EY,{paddingBottom:4,color:design_system.r7.textAlternative,textAlign:design_system.nO.Center},description)):null});try{title.displayName="title",title.__docgenInfo={description:"",displayName:"title",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["ui/pages/confirmations/components/confirm/title/title.tsx#title"]={docgenInfo:title.__docgenInfo,name:"title",path:"ui/pages/confirmations/components/confirm/title/title.tsx#title"})}catch(__react_docgen_typescript_loader_error){}},"./ui/pages/confirmations/confirm/confirm.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>confirm_confirm});var AlertsName,_obj,react=__webpack_require__("./node_modules/react/index.js"),signature_mismatch_banner=__webpack_require__("./ui/components/institutional/signature-mismatch-banner/index.ts"),note_to_trader=__webpack_require__("./ui/components/institutional/note-to-trader/index.ts"),page=__webpack_require__("./ui/components/multichain/pages/page/index.ts"),gasFee=__webpack_require__("./ui/contexts/gasFee.js"),transaction_modal=__webpack_require__("./ui/contexts/transaction-modal.js"),advanced_gas_fee_popover=__webpack_require__("./ui/pages/confirmations/components/advanced-gas-fee-popover/index.js"),preloader=__webpack_require__("./ui/components/ui/icon/preloader/index.js"),security_provider=__webpack_require__("./shared/constants/security-provider.ts"),component_library=__webpack_require__("./ui/components/component-library/index.ts"),es=__webpack_require__("./node_modules/react-redux/es/index.js"),context_confirm=__webpack_require__("./ui/pages/confirmations/context/confirm/index.tsx");let hooks_useCurrentSignatureSecurityAlertResponse=function(){var _currentConfirmation_securityAlertResponse,currentConfirmation=(0,context_confirm.TW)().currentConfirmation,securityAlertId=null==currentConfirmation?void 0:null===(_currentConfirmation_securityAlertResponse=currentConfirmation.securityAlertResponse)||void 0===_currentConfirmation_securityAlertResponse?void 0:_currentConfirmation_securityAlertResponse.securityAlertId;return(0,es.d4)(function(state){var _state_metamask_signatureSecurityAlertResponses;if(void 0!==securityAlertId)return null===(_state_metamask_signatureSecurityAlertResponses=state.metamask.signatureSecurityAlertResponses)||void 0===_state_metamask_signatureSecurityAlertResponses?void 0:_state_metamask_signatureSecurityAlertResponses[securityAlertId]})},blockaid_loading_indicator=function(){var signatureSecurityAlertResponse=hooks_useCurrentSignatureSecurityAlertResponse();return(null==signatureSecurityAlertResponse?void 0:signatureSecurityAlertResponse.result_type)!==security_provider.p0.Loading?null:react.createElement(component_library.az,{marginInline:"auto",marginTop:4},react.createElement(preloader.A,{size:18}))};var alertActionHandler=__webpack_require__("./ui/components/app/alert-system/contexts/alertActionHandler.tsx"),constants=__webpack_require__("./ui/components/app/confirm/info/row/constants.ts"),useRamps=__webpack_require__("./ui/hooks/ramps/useRamps/useRamps.ts");let hooks_useConfirmationAlertActions=function(){var openBuyCryptoInPdapp=(0,useRamps.A)().openBuyCryptoInPdapp,openModal=(0,transaction_modal.gb)().openModal;return(0,react.useCallback)(function(actionKey){switch(actionKey){case constants.GH.Buy:openBuyCryptoInPdapp();break;case constants.GH.ShowAdvancedGasFeeModal:openModal("advancedGasFee");break;case constants.GH.ShowGasFeeModal:openModal("editGasFee");break;default:console.error("Unknown alert action key:",actionKey)}},[openBuyCryptoInPdapp])};var confirm_alerts=__webpack_require__("./ui/ducks/confirm-alerts/confirm-alerts.ts"),design_system=__webpack_require__("./ui/helpers/constants/design-system.ts"),useI18nContext=__webpack_require__("./ui/hooks/useI18nContext.js"),utils=__webpack_require__("./ui/pages/confirmations/components/confirm/utils.ts"),confirmations_utils=__webpack_require__("./ui/pages/confirmations/utils/index.ts");function useAccountMismatchAlerts(){var _currentConfirmation_msgParams_siwe_parsedMessage,_currentConfirmation_msgParams_siwe,_currentConfirmation_msgParams,t=(0,useI18nContext.P)(),currentConfirmation=(0,context_confirm.TW)().currentConfirmation,fromAddress=(0,utils.B)(currentConfirmation).from,isSIWE=(0,confirmations_utils.q9)(currentConfirmation),siweParsedAddress=null==currentConfirmation?void 0:null===(_currentConfirmation_msgParams=currentConfirmation.msgParams)||void 0===_currentConfirmation_msgParams?void 0:null===(_currentConfirmation_msgParams_siwe=_currentConfirmation_msgParams.siwe)||void 0===_currentConfirmation_msgParams_siwe?void 0:null===(_currentConfirmation_msgParams_siwe_parsedMessage=_currentConfirmation_msgParams_siwe.parsedMessage)||void 0===_currentConfirmation_msgParams_siwe_parsedMessage?void 0:_currentConfirmation_msgParams_siwe_parsedMessage.address,isMismatchSIWEAdddress=(null==siweParsedAddress?void 0:siweParsedAddress.toLowerCase())!==(null==fromAddress?void 0:fromAddress.toLowerCase()),isMismatchAccount=isSIWE&&isMismatchSIWEAdddress;return(0,react.useMemo)(function(){return isMismatchAccount?[{field:constants.oE.SigningInWith,key:"signingInWith",message:t("alertMessageSignInWrongAccount"),reason:t("alertReasonWrongAccount"),severity:design_system.AI.Warning}]:[]},[isMismatchAccount,t])}var siwe=__webpack_require__("./node_modules/@metamask/controller-utils/dist/siwe.mjs");function useDomainMismatchAlerts(){var t=(0,useI18nContext.P)(),currentConfirmation=(0,context_confirm.TW)().currentConfirmation,msgParams=(currentConfirmation||{}).msgParams,isInvalidSIWEDomain=(0,confirmations_utils.q9)(currentConfirmation)&&!(0,siwe.PW)(msgParams);return(0,react.useMemo)(function(){return isInvalidSIWEDomain?[{field:constants.oE.RequestFrom,key:"requestFrom",message:t("alertMessageSignInDomainMismatch"),reason:t("alertReasonSignIn"),severity:design_system.AI.Danger}]:[]},[isInvalidSIWEDomain,t])}function useGasEstimateFailedAlerts(){var t=(0,useI18nContext.P)(),currentConfirmation=(0,context_confirm.TW)().currentConfirmation,estimationFailed=!!(null==currentConfirmation?void 0:currentConfirmation.simulationFails);return(0,react.useMemo)(function(){return estimationFailed?[{actions:[{key:constants.GH.ShowAdvancedGasFeeModal,label:t("alertActionUpdateGas")}],field:constants.oE.EstimatedFee,key:"gasEstimateFailed",message:t("alertMessageGasEstimateFailed"),reason:t("alertReasonGasEstimateFailed"),severity:design_system.AI.Warning}]:[]},[estimationFailed])}var gas=__webpack_require__("./shared/constants/gas.ts");function useGasFeeLowAlerts(){var t=(0,useI18nContext.P)(),currentConfirmation=(0,context_confirm.TW)().currentConfirmation,transactionId=(null!=currentConfirmation?currentConfirmation:{}).id,_useGasFeeContext=(0,gasFee.Sz)(),estimateUsed=_useGasFeeContext.estimateUsed,transaction=_useGasFeeContext.transaction,isLowEstimate=transactionId===(null==transaction?void 0:transaction.id)&&estimateUsed===gas.uT.low;return(0,react.useMemo)(function(){return isLowEstimate?[{actions:[{key:constants.GH.ShowGasFeeModal,label:t("alertActionUpdateGasFeeLevel")}],field:constants.oE.EstimatedFee,key:"gasFeeLow",message:t("alertMessageGasFeeLow"),reason:t("alertReasonGasFeeLow"),severity:design_system.AI.Warning}]:[]},[isLowEstimate])}var send_constants=__webpack_require__("./ui/pages/confirmations/send/send.constants.js"),conversion_utils=__webpack_require__("./shared/modules/conversion.utils.ts");function useGasTooLowAlerts(){var _currentConfirmation_txParams,t=(0,useI18nContext.P)(),currentConfirmation=(0,context_confirm.TW)().currentConfirmation,gas=null==currentConfirmation?void 0:null===(_currentConfirmation_txParams=currentConfirmation.txParams)||void 0===_currentConfirmation_txParams?void 0:_currentConfirmation_txParams.gas,gasTooLow=gas&&Number((0,conversion_utils.I0)(gas))<Number(send_constants.I8);return(0,react.useMemo)(function(){return gasTooLow?[{actions:[{key:constants.GH.ShowAdvancedGasFeeModal,label:t("alertActionUpdateGas")}],field:constants.oE.EstimatedFee,isBlocking:!0,key:"gasTooLow",message:t("alertMessageGasTooLow"),reason:t("alertReasonGasTooLow"),severity:design_system.AI.Warning}]:[]},[gasTooLow])}var selectors=__webpack_require__("./ui/selectors/index.js"),send_utils=__webpack_require__("./ui/pages/confirmations/send/send.utils.js");function useInsufficientBalanceAlerts(){var t=(0,useI18nContext.P)(),currentConfirmation=(0,context_confirm.TW)().currentConfirmation,transactionId=(null!=currentConfirmation?currentConfirmation:{}).id,balance=(0,es.d4)(function(state){return(0,selectors.y3W)(state,transactionId)}),value=(0,es.d4)(function(state){return(0,selectors.SI)(state,transactionId)}),hexMaximumTransactionFee=(0,es.d4)(function(state){return(0,selectors.xSb)(state,transactionId)}).hexMaximumTransactionFee,insufficientBalance=!(0,send_utils.Hi)({amount:value,gasTotal:hexMaximumTransactionFee,balance:balance});return(0,react.useMemo)(function(){return insufficientBalance?[{actions:[{key:constants.GH.Buy,label:t("alertActionBuy")}],field:constants.oE.EstimatedFee,isBlocking:!0,key:"insufficientBalance",message:t("alertMessageInsufficientBalance2"),reason:t("alertReasonInsufficientBalance"),severity:design_system.AI.Danger}]:[]},[insufficientBalance])}var metamask=__webpack_require__("./ui/ducks/metamask/metamask.js");function useNetworkBusyAlerts(){var t=(0,useI18nContext.P)(),currentConfirmation=(0,context_confirm.TW)().currentConfirmation,isNetworkBusy=(0,es.d4)(function(state){return(0,metamask.hc)(state,null==currentConfirmation?void 0:currentConfirmation.chainId)}),showAlert=(null==currentConfirmation?void 0:currentConfirmation.chainId)&&isNetworkBusy;return(0,react.useMemo)(function(){return showAlert?[{field:constants.oE.EstimatedFee,key:"networkBusy",message:t("alertMessageNetworkBusy"),reason:t("alertReasonNetworkBusy"),severity:design_system.AI.Warning}]:[]},[showAlert])}var types=__webpack_require__("./node_modules/@metamask/transaction-controller/dist/types.mjs"),transaction_utils=__webpack_require__("./shared/modules/transaction.utils.ts");function useNoGasPriceAlerts(){var t=(0,useI18nContext.P)(),isNoGasPriceFetched=(0,es.d4)(selectors.vMj),currentConfirmation=(0,context_confirm.TW)().currentConfirmation,noGasPrice=(null==currentConfirmation?void 0:currentConfirmation.userFeeLevel)&¤tConfirmation.userFeeLevel!==types.MB.CUSTOM&&!(0,transaction_utils.pJ)(currentConfirmation)&&isNoGasPriceFetched;return(0,react.useMemo)(function(){return noGasPrice?[{actions:[{key:constants.GH.ShowAdvancedGasFeeModal,label:t("alertActionUpdateGasFee")}],field:constants.oE.EstimatedFee,isBlocking:!0,key:"noGasPrice",message:t("alertMessageNoGasPrice"),reason:t("alertReasonNoGasPrice"),severity:design_system.AI.Warning}]:[]},[noGasPrice])}var confirmation_utils=__webpack_require__("./shared/lib/confirmation.utils.ts"),zendesk_url=__webpack_require__("./ui/helpers/constants/zendesk-url.js"),PendingTransactionAlertMessage=function(){var t=(0,useI18nContext.P)();return react.createElement(component_library.EY,{variant:design_system.J3.bodyMd,color:design_system.r7.textDefault,"data-testid":"alert-modal__selected-alert"},t("pendingTransactionAlertMessage",[react.createElement(component_library.vx,{href:zendesk_url.A.SPEEDUP_CANCEL,key:"link",target:"_blank",rel:"noreferrer noopener",color:design_system.r7.primaryDefault},t("pendingTransactionAlertMessageHyperlink"))]))};function usePendingTransactionAlerts(){var t=(0,useI18nContext.P)(),currentConfirmation=(0,context_confirm.TW)().currentConfirmation,type=(null!=currentConfirmation?currentConfirmation:{}).type,pendingTransactions=(0,es.d4)(selectors.xu7),hasPendingTransactions=(0,confirmation_utils.nO)(type)&&!!pendingTransactions.length;return(0,react.useMemo)(function(){return hasPendingTransactions?[{field:constants.oE.Speed,key:"pendingTransactions",content:PendingTransactionAlertMessage(),reason:t("alertReasonPendingTransactions"),severity:design_system.AI.Warning}]:[]},[hasPendingTransactions])}var metametrics=__webpack_require__("./shared/constants/metametrics.ts"),useQueuedConfirmationEvents=__webpack_require__("./ui/pages/confirmations/hooks/useQueuedConfirmationEvents.ts");function useQueuedConfirmationsAlerts(){var t=(0,useI18nContext.P)(),isQueuedConfirmation=(0,es.d4)(selectors.uZ)>0;return(0,useQueuedConfirmationEvents.F)(metametrics.Gq.QueueController),(0,react.useMemo)(function(){return isQueuedConfirmation?[{isBlocking:!1,key:"queuedConfirmations",message:t("existingRequestsBannerAlertDesc"),severity:design_system.AI.Info}]:[]},[isQueuedConfirmation])}function useResimulationAlert(){var _currentConfirmation_simulationData,t=(0,useI18nContext.P)(),currentConfirmation=(0,context_confirm.TW)().currentConfirmation,isUpdatedAfterSecurityCheck=null==currentConfirmation?void 0:null===(_currentConfirmation_simulationData=currentConfirmation.simulationData)||void 0===_currentConfirmation_simulationData?void 0:_currentConfirmation_simulationData.isUpdatedAfterSecurityCheck;return(0,react.useMemo)(function(){return isUpdatedAfterSecurityCheck?[{actions:[],field:constants.oE.Resimulation,isBlocking:!1,key:"simulationDetailsTitle",message:t("alertMessageChangeInSimulationResults"),reason:t("alertReasonChangeInSimulationResults"),severity:design_system.AI.Danger}]:[]},[isUpdatedAfterSecurityCheck,t])}var useTransferRecipient=__webpack_require__("./ui/pages/confirmations/components/confirm/info/hooks/useTransferRecipient.ts");function useFirstTimeInteractionAlert(){var t=(0,useI18nContext.P)(),currentConfirmation=(0,context_confirm.TW)().currentConfirmation,internalAccounts=(0,es.d4)(selectors.atg),to=(0,useTransferRecipient.Y)(),isFirstTimeInteraction=(null!=currentConfirmation?currentConfirmation:{}).isFirstTimeInteraction,showAlert=!internalAccounts.some(function(account){var _account_address;return(null===(_account_address=account.address)||void 0===_account_address?void 0:_account_address.toLowerCase())===(null==to?void 0:to.toLowerCase())})&&isFirstTimeInteraction;return(0,react.useMemo)(function(){return showAlert?[{actions:[],field:constants.oE.FirstTimeInteraction,isBlocking:!1,key:"firstTimeInteractionTitle",message:t("alertMessageFirstTimeInteraction"),reason:t("alertReasonFirstTimeInteraction"),severity:design_system.AI.Warning}]:[]},[showAlert,t])}function useSigningOrSubmittingAlerts(){var t=(0,useI18nContext.P)(),currentConfirmation=(0,context_confirm.TW)().currentConfirmation,type=(null!=currentConfirmation?currentConfirmation:{}).type,signingOrSubmittingTransactions=(0,es.d4)(selectors.eC8),isSigningOrSubmitting=(0,confirmation_utils.nO)(type)&&signingOrSubmittingTransactions.length>0;return(0,react.useMemo)(function(){return isSigningOrSubmitting?[{isBlocking:!0,key:"signingOrSubmitting",message:t("isSigningOrSubmitting"),severity:design_system.AI.Danger}]:[]},[isSigningOrSubmitting])}var utils_confirm=__webpack_require__("./ui/pages/confirmations/utils/confirm.ts");let alerts_useConfirmationOriginAlerts=function(){var _currentConfirmation_msgParams,t=(0,useI18nContext.P)(),currentConfirmation=(0,context_confirm.TW)().currentConfirmation,origin=(0,confirmations_utils.rS)(currentConfirmation)?null==currentConfirmation?void 0:null===(_currentConfirmation_msgParams=currentConfirmation.msgParams)||void 0===_currentConfirmation_msgParams?void 0:_currentConfirmation_msgParams.origin:null==currentConfirmation?void 0:currentConfirmation.origin,originUndefinedOrValid=void 0===origin||"metamask"===origin||(0,utils_confirm.VK)(origin);return(0,react.useMemo)(function(){return originUndefinedOrValid?[]:[{key:"originSpecialCharacterWarning",reason:t("addressMismatch"),field:constants.oE.RequestFrom,severity:design_system.AI.Warning,message:t("alertMessageAddressMismatchWarning"),alertDetails:[t("addressMismatchOriginal",[origin]),t("addressMismatchPunycode",[origin?(0,utils_confirm.CQ)(origin):""])]}]},[origin,originUndefinedOrValid,t])};var ppom_release_package=__webpack_require__("./node_modules/@blockaid/ppom_release/package.json"),network=__webpack_require__("./shared/constants/network.ts"),blockaid_banner_alert=__webpack_require__("./ui/pages/confirmations/components/security-provider-banner-alert/blockaid-banner-alert/blockaid-banner-alert.js");function getProviderAlertSeverity(severity){switch(severity){case security_provider.p0.Malicious:return design_system.AI.Danger;case security_provider.p0.Warning:return design_system.AI.Warning;default:return design_system.AI.Info}}function normalizeProviderAlert(securityAlertResponse,t,reportUrl){return{key:securityAlertResponse.securityAlertId||"",reason:t(blockaid_banner_alert.cJ[securityAlertResponse.reason]||"blockaidTitleDeceptive"),severity:getProviderAlertSeverity(securityAlertResponse.result_type),alertDetails:securityAlertResponse.features,message:t(blockaid_banner_alert.i8[securityAlertResponse.reason]||blockaid_banner_alert.i8.other),provider:security_provider.O5.Blockaid,reportUrl:reportUrl}}var zlib=__webpack_require__("?f505"),IGNORED_RESULT_TYPES=[security_provider.p0.Benign,security_provider.p0.Loading];let alerts_useBlockaidAlerts=function(){var t=(0,useI18nContext.P)(),currentConfirmation=(0,context_confirm.TW)().currentConfirmation,securityAlertId=null==currentConfirmation?void 0:null===(_currentConfirmation_securityAlertResponse=currentConfirmation.securityAlertResponse)||void 0===_currentConfirmation_securityAlertResponse?void 0:_currentConfirmation_securityAlertResponse.securityAlertId,transactionType=null==currentConfirmation?void 0:currentConfirmation.type,signatureSecurityAlertResponse=hooks_useCurrentSignatureSecurityAlertResponse(),transactionSecurityAlertResponse=(0,es.d4)(function(state){var _state_metamask_transactions_find;return null===(_state_metamask_transactions_find=state.metamask.transactions.find(function(transaction){var _transaction_securityAlertResponse;return(null===(_transaction_securityAlertResponse=transaction.securityAlertResponse)||void 0===_transaction_securityAlertResponse?void 0:_transaction_securityAlertResponse.securityAlertId)===securityAlertId}))||void 0===_state_metamask_transactions_find?void 0:_state_metamask_transactions_find.securityAlertResponse}),securityAlertResponse=signatureSecurityAlertResponse||transactionSecurityAlertResponse,isTransactionTypeSupported=(0,confirmation_utils.nO)(transactionType)||confirmations_utils.ig.includes(transactionType),isResultTypeIgnored=IGNORED_RESULT_TYPES.includes(null==securityAlertResponse?void 0:securityAlertResponse.result_type);if(securityAlertResponse&¤tConfirmation){var _currentConfirmation_securityAlertResponse,stringifiedJSONData,_ref,block=securityAlertResponse.block,features=securityAlertResponse.features,reason=securityAlertResponse.reason,resultType=securityAlertResponse.result_type,chainId=currentConfirmation.chainId,msgParams=currentConfirmation.msgParams,origin=currentConfirmation.origin,type=currentConfirmation.type,txParams=currentConfirmation.txParams,isFailedResultType=resultType===security_provider.p0.Errored;stringifiedJSONData=JSON.stringify({blockNumber:block,blockaidVersion:ppom_release_package.rE,chain:network.qJ[chainId],classification:isFailedResultType?"error":reason,domain:null!==(_ref=null!=origin?origin:null==msgParams?void 0:msgParams.origin)&&void 0!==_ref?_ref:origin,jsonRpcMethod:type,jsonRpcParams:JSON.stringify(null!=txParams?txParams:msgParams),resultType:isFailedResultType?security_provider.p0.Errored:resultType,reproduce:JSON.stringify(features)})}return(0,react.useMemo)(function(){if(!isTransactionTypeSupported||isResultTypeIgnored||!securityAlertResponse)return[];var reportUrl=zendesk_url.A.SUPPORT_URL;if(stringifiedJSONData){var _zlib_gzipSync,_zlib_gzipSync1,encodedData=null!==(_zlib_gzipSync1=null==zlib?void 0:null===(_zlib_gzipSync=zlib.gzipSync)||void 0===_zlib_gzipSync?void 0:_zlib_gzipSync.call(zlib,stringifiedJSONData))&&void 0!==_zlib_gzipSync1?_zlib_gzipSync1:stringifiedJSONData;reportUrl="".concat(security_provider.NE,"?data=").concat(encodeURIComponent(encodedData.toString("base64")),"&utm_source=").concat(security_provider.K$)}return[normalizeProviderAlert(securityAlertResponse,t,reportUrl)]},[isTransactionTypeSupported,isResultTypeIgnored,securityAlertResponse,stringifiedJSONData,t])};var useSelectedAccountAlerts=function(){var _currentConfirmation_msgParams,_currentConfirmation_txParams,_selectedAccount_address,_currentConfirmation_msgParams_from,t=(0,useI18nContext.P)(),currentConfirmation=(0,context_confirm.TW)().currentConfirmation,selectedAccount=(0,es.d4)(selectors.PRX),fromAccount=null!==(_currentConfirmation_msgParams_from=null==currentConfirmation?void 0:null===(_currentConfirmation_msgParams=currentConfirmation.msgParams)||void 0===_currentConfirmation_msgParams?void 0:_currentConfirmation_msgParams.from)&&void 0!==_currentConfirmation_msgParams_from?_currentConfirmation_msgParams_from:null==currentConfirmation?void 0:null===(_currentConfirmation_txParams=currentConfirmation.txParams)||void 0===_currentConfirmation_txParams?void 0:_currentConfirmation_txParams.from,confirmationAccountSameAsSelectedAccount=!fromAccount||fromAccount.toLowerCase()===(null==selectedAccount?void 0:null===(_selectedAccount_address=selectedAccount.address)||void 0===_selectedAccount_address?void 0:_selectedAccount_address.toLowerCase());return(0,react.useMemo)(function(){return confirmationAccountSameAsSelectedAccount?[]:[{key:"selectedAccountWarning",reason:t("selectedAccountMismatch"),field:constants.oE.SigningInWith,severity:design_system.AI.Warning,message:t("alertSelectedAccountWarning")}]},[confirmationAccountSameAsSelectedAccount,t])};function _array_like_to_array(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function _array_without_holes(arr){if(Array.isArray(arr))return _array_like_to_array(arr)}function _iterable_to_array(iter){if("undefined"!=typeof Symbol&&null!=iter[Symbol.iterator]||null!=iter["@@iterator"])return Array.from(iter)}function _non_iterable_spread(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _to_consumable_array(arr){return _array_without_holes(arr)||_iterable_to_array(arr)||_unsupported_iterable_to_array(arr)||_non_iterable_spread()}function _unsupported_iterable_to_array(o,minLen){if(o){if("string"==typeof o)return _array_like_to_array(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if("Object"===n&&o.constructor&&(n=o.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _array_like_to_array(o,minLen)}}function useSignatureAlerts(){var accountMismatchAlerts=useAccountMismatchAlerts(),domainMismatchAlerts=useDomainMismatchAlerts();return(0,react.useMemo)(function(){return _to_consumable_array(accountMismatchAlerts).concat(_to_consumable_array(domainMismatchAlerts))},[accountMismatchAlerts,domainMismatchAlerts])}function useTransactionAlerts(){var gasEstimateFailedAlerts=useGasEstimateFailedAlerts(),gasFeeLowAlerts=useGasFeeLowAlerts(),gasTooLowAlerts=useGasTooLowAlerts(),insufficientBalanceAlerts=useInsufficientBalanceAlerts(),networkBusyAlerts=useNetworkBusyAlerts(),noGasPriceAlerts=useNoGasPriceAlerts(),pendingTransactionAlerts=usePendingTransactionAlerts(),resimulationAlert=useResimulationAlert(),firstTimeInteractionAlert=useFirstTimeInteractionAlert(),signingOrSubmittingAlerts=useSigningOrSubmittingAlerts(),queuedConfirmationsAlerts=useQueuedConfirmationsAlerts();return(0,react.useMemo)(function(){return _to_consumable_array(gasEstimateFailedAlerts).concat(_to_consumable_array(gasFeeLowAlerts),_to_consumable_array(gasTooLowAlerts),_to_consumable_array(insufficientBalanceAlerts),_to_consumable_array(networkBusyAlerts),_to_consumable_array(noGasPriceAlerts),_to_consumable_array(pendingTransactionAlerts),_to_consumable_array(resimulationAlert),_to_consumable_array(firstTimeInteractionAlert),_to_consumable_array(signingOrSubmittingAlerts),_to_consumable_array(queuedConfirmationsAlerts))},[gasEstimateFailedAlerts,gasFeeLowAlerts,gasTooLowAlerts,insufficientBalanceAlerts,networkBusyAlerts,noGasPriceAlerts,pendingTransactionAlerts,resimulationAlert,firstTimeInteractionAlert,signingOrSubmittingAlerts,queuedConfirmationsAlerts])}function useConfirmationAlerts(){var blockaidAlerts=alerts_useBlockaidAlerts(),confirmationOriginAlerts=alerts_useConfirmationOriginAlerts(),signatureAlerts=useSignatureAlerts(),transactionAlerts=useTransactionAlerts(),selectedAccountAlerts=useSelectedAccountAlerts();return(0,react.useMemo)(function(){return _to_consumable_array(blockaidAlerts).concat(_to_consumable_array(confirmationOriginAlerts),_to_consumable_array(signatureAlerts),_to_consumable_array(transactionAlerts),_to_consumable_array(selectedAccountAlerts))},[blockaidAlerts,confirmationOriginAlerts,signatureAlerts,transactionAlerts,selectedAccountAlerts])}let hooks_setConfirmationAlerts=function(){var dispatch=(0,es.wA)(),currentConfirmation=(0,context_confirm.TW)().currentConfirmation,alerts=useConfirmationAlerts(),ownerId=null==currentConfirmation?void 0:currentConfirmation.id;(0,react.useEffect)(function(){dispatch((0,confirm_alerts.dH)(ownerId,alerts))},[alerts,ownerId]),(0,react.useEffect)(function(){return function(){dispatch((0,confirm_alerts.lW)(ownerId))}},[])};var alertMetricsContext=__webpack_require__("./ui/components/app/alert-system/contexts/alertMetricsContext.tsx"),validate=__webpack_require__("./node_modules/uuid/dist/esm-browser/validate.js"),useAlerts=__webpack_require__("./ui/hooks/useAlerts.ts");!function(AlertsName){AlertsName.GasEstimateFailed="gasEstimateFailed",AlertsName.GasFeeLow="gasFeeLow",AlertsName.GasTooLow="gasTooLow",AlertsName.InsufficientBalance="insufficientBalance",AlertsName.NetworkBusy="networkBusy",AlertsName.NoGasPrice="noGasPrice",AlertsName.PendingTransaction="pendingTransactions",AlertsName.SigningOrSubmitting="signingOrSubmitting",AlertsName.Blockaid="blockaid"}(AlertsName||(AlertsName={}));var useSignatureEventFragment=__webpack_require__("./ui/pages/confirmations/hooks/useSignatureEventFragment.ts"),useTransactionEventFragment=__webpack_require__("./ui/pages/confirmations/hooks/useTransactionEventFragment.js");function useConfirmationAlertMetrics_array_like_to_array(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function _array_with_holes(arr){if(Array.isArray(arr))return arr}function useConfirmationAlertMetrics_array_without_holes(arr){if(Array.isArray(arr))return useConfirmationAlertMetrics_array_like_to_array(arr)}function _define_property(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function useConfirmationAlertMetrics_iterable_to_array(iter){if("undefined"!=typeof Symbol&&null!=iter[Symbol.iterator]||null!=iter["@@iterator"])return Array.from(iter)}function _iterable_to_array_limit(arr,i){var _s,_e,_i=null==arr?null:"undefined"!=typeof Symbol&&arr[Symbol.iterator]||arr["@@iterator"];if(null!=_i){var _arr=[],_n=!0,_d=!1;try{for(_i=_i.call(arr);!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{_n||null==_i.return||_i.return()}finally{if(_d)throw _e}}return _arr}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function useConfirmationAlertMetrics_non_iterable_spread(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{},ownKeys=Object.keys(source);"function"==typeof Object.getOwnPropertySymbols&&(ownKeys=ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym){return Object.getOwnPropertyDescriptor(source,sym).enumerable}))),ownKeys.forEach(function(key){_define_property(target,key,source[key])})}return target}function _sliced_to_array(arr,i){return _array_with_holes(arr)||_iterable_to_array_limit(arr,i)||useConfirmationAlertMetrics_unsupported_iterable_to_array(arr,i)||_non_iterable_rest()}function useConfirmationAlertMetrics_to_consumable_array(arr){return useConfirmationAlertMetrics_array_without_holes(arr)||useConfirmationAlertMetrics_iterable_to_array(arr)||useConfirmationAlertMetrics_unsupported_iterable_to_array(arr)||useConfirmationAlertMetrics_non_iterable_spread()}function useConfirmationAlertMetrics_unsupported_iterable_to_array(o,minLen){if(o){if("string"==typeof o)return useConfirmationAlertMetrics_array_like_to_array(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if("Object"===n&&o.constructor&&(n=o.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return useConfirmationAlertMetrics_array_like_to_array(o,minLen)}}var ALERTS_NAME_METRICS=(_define_property(_obj={},AlertsName.GasEstimateFailed,"gas_estimate_failed"),_define_property(_obj,AlertsName.GasFeeLow,"gas_fee_low"),_define_property(_obj,AlertsName.GasTooLow,"gas_too_low"),_define_property(_obj,AlertsName.InsufficientBalance,"insufficient_balance"),_define_property(_obj,AlertsName.NetworkBusy,"network_busy"),_define_property(_obj,AlertsName.NoGasPrice,"no_gas_price"),_define_property(_obj,AlertsName.PendingTransaction,"pending_transaction"),_define_property(_obj,AlertsName.SigningOrSubmitting,"signing_or_submitting"),_define_property(_obj,AlertsName.Blockaid,"blockaid"),_obj);function uniqueFreshArrayPush(array,value){return useConfirmationAlertMetrics_to_consumable_array(new Set(useConfirmationAlertMetrics_to_consumable_array(array).concat([value])))}function getAlertNames(alerts){return alerts.map(function(alert){return getAlertName(alert.key)})}function getAlertName(alertKey){var _ALERTS_NAME_METRICS_alertKey;return(0,validate.A)(alertKey)?ALERTS_NAME_METRICS[AlertsName.Blockaid]:null!==(_ALERTS_NAME_METRICS_alertKey=ALERTS_NAME_METRICS[alertKey])&&void 0!==_ALERTS_NAME_METRICS_alertKey?_ALERTS_NAME_METRICS_alertKey:alertKey}function useConfirmationAlertMetrics(){var _currentConfirmation_id,currentConfirmation=(0,context_confirm.TW)().currentConfirmation,ownerId=null!==(_currentConfirmation_id=null==currentConfirmation?void 0:currentConfirmation.id)&&void 0!==_currentConfirmation_id?_currentConfirmation_id:"",_useAlerts=(0,useAlerts.A)(ownerId),alerts=_useAlerts.alerts,isAlertConfirmed=_useAlerts.isAlertConfirmed,updateSignatureEventFragment=(0,useSignatureEventFragment.U)().updateSignatureEventFragment,updateTransactionEventFragment=(0,useTransactionEventFragment.W)().updateTransactionEventFragment,_useState=_sliced_to_array((0,react.useState)({alert_visualized:[],alert_visualized_count:0,alert_key_clicked:[],alert_action_clicked:[]}),2),metricsProperties=_useState[0],setMetricsProperties=_useState[1],properties=alerts.length>0?_object_spread({alert_triggered_count:alerts.length,alert_triggered:getAlertNames(alerts),alert_resolved_count:alerts.filter(function(alert){return isAlertConfirmed(alert.key)}).length,alert_resolved:getAlertNames(alerts.filter(function(alert){return isAlertConfirmed(alert.key)}))},metricsProperties):void 0,trackAlertRender=(0,react.useCallback)(function(alertKey){setMetricsProperties(function(prevState){var newState=_object_spread({},prevState),alertName=getAlertName(alertKey);return newState.alert_visualized=uniqueFreshArrayPush(prevState.alert_visualized,alertName),newState.alert_visualized_count=newState.alert_visualized.length,newState})},[]),trackInlineAlertClicked=(0,react.useCallback)(function(alertKey){setMetricsProperties(function(prevState){var newState=_object_spread({},prevState),alertName=getAlertName(alertKey);return newState.alert_key_clicked=uniqueFreshArrayPush(prevState.alert_key_clicked,alertName),newState})},[]),trackAlertActionClicked=(0,react.useCallback)(function(alertKey){setMetricsProperties(function(prevState){var newState=_object_spread({},prevState),alertName=getAlertName(alertKey);return newState.alert_action_clicked=uniqueFreshArrayPush(prevState.alert_action_clicked,alertName),newState})},[]),updateAlertMetrics=(0,react.useCallback)(function(){properties&&((0,confirmations_utils.rS)(currentConfirmation)?updateSignatureEventFragment({properties:properties}):updateTransactionEventFragment({properties:properties},ownerId))},[JSON.stringify(properties),updateTransactionEventFragment,ownerId]);return(0,react.useEffect)(function(){updateAlertMetrics()},[updateAlertMetrics]),{trackAlertRender:trackAlertRender,trackInlineAlertClicked:trackInlineAlertClicked,trackAlertActionClicked:trackAlertActionClicked}}let confirm_alerts_confirm_alerts=function(param){var children=param.children,_useConfirmationAlertMetrics=useConfirmationAlertMetrics(),trackAlertActionClicked=_useConfirmationAlertMetrics.trackAlertActionClicked,trackAlertRender=_useConfirmationAlertMetrics.trackAlertRender,trackInlineAlertClicked=_useConfirmationAlertMetrics.trackInlineAlertClicked,processAction=hooks_useConfirmationAlertActions();return hooks_setConfirmationAlerts(),react.createElement(alertMetricsContext.n,{metrics:{trackAlertActionClicked:trackAlertActionClicked,trackAlertRender:trackAlertRender,trackInlineAlertClicked:trackInlineAlertClicked}},react.createElement(alertActionHandler.U1,{onProcessAction:processAction},children))};try{confirmalerts.displayName="confirmalerts",confirmalerts.__docgenInfo={description:"",displayName:"confirmalerts",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["ui/pages/confirmations/components/confirm/confirm-alerts/confirm-alerts.tsx#confirmalerts"]={docgenInfo:confirmalerts.__docgenInfo,name:"confirmalerts",path:"ui/pages/confirmations/components/confirm/confirm-alerts/confirm-alerts.tsx#confirmalerts"})}catch(__react_docgen_typescript_loader_error){}try{ConfirmAlerts.displayName="ConfirmAlerts",ConfirmAlerts.__docgenInfo={description:"",displayName:"ConfirmAlerts",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["ui/pages/confirmations/components/confirm/confirm-alerts/index.tsx#ConfirmAlerts"]={docgenInfo:ConfirmAlerts.__docgenInfo,name:"ConfirmAlerts",path:"ui/pages/confirmations/components/confirm/confirm-alerts/index.tsx#ConfirmAlerts"})}catch(__react_docgen_typescript_loader_error){}var footer=__webpack_require__("./ui/pages/confirmations/components/confirm/footer/footer.tsx"),header=__webpack_require__("./ui/pages/confirmations/components/confirm/header/header.tsx"),loglevel=__webpack_require__("./node_modules/loglevel/lib/loglevel.js"),loglevel_default=__webpack_require__.n(loglevel),modules_selectors=__webpack_require__("./shared/modules/selectors/index.ts"),swaps_util=__webpack_require__("./ui/pages/swaps/swaps.util.ts"),actions=__webpack_require__("./ui/__mocks__/actions.js");function useSmartTransactionFeatureFlags_array_like_to_array(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function useSmartTransactionFeatureFlags_array_with_holes(arr){if(Array.isArray(arr))return arr}function useSmartTransactionFeatureFlags_iterable_to_array_limit(arr,i){var _s,_e,_i=null==arr?null:"undefined"!=typeof Symbol&&arr[Symbol.iterator]||arr["@@iterator"];if(null!=_i){var _arr=[],_n=!0,_d=!1;try{for(_i=_i.call(arr);!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{_n||null==_i.return||_i.return()}finally{if(_d)throw _e}}return _arr}}function useSmartTransactionFeatureFlags_non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function useSmartTransactionFeatureFlags_sliced_to_array(arr,i){return useSmartTransactionFeatureFlags_array_with_holes(arr)||useSmartTransactionFeatureFlags_iterable_to_array_limit(arr,i)||useSmartTransactionFeatureFlags_unsupported_iterable_to_array(arr,i)||useSmartTransactionFeatureFlags_non_iterable_rest()}function useSmartTransactionFeatureFlags_unsupported_iterable_to_array(o,minLen){if(o){if("string"==typeof o)return useSmartTransactionFeatureFlags_array_like_to_array(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if("Object"===n&&o.constructor&&(n=o.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return useSmartTransactionFeatureFlags_array_like_to_array(o,minLen)}}function useSmartTransactionFeatureFlags(){var dispatch=(0,es.wA)(),currentConfirmation=(0,context_confirm.TW)().currentConfirmation,_ref=null!=currentConfirmation?currentConfirmation:{},transactionId=_ref.id,isTransaction=!!_ref.txParams,smartTransactionsPreferenceEnabled=(0,es.d4)(modules_selectors.jp),currentChainSupportsSmartTransactions=(0,es.d4)(modules_selectors.dt);(0,react.useEffect)(function(){isTransaction&&transactionId&&smartTransactionsPreferenceEnabled&¤tChainSupportsSmartTransactions&&Promise.all([(0,swaps_util.Ws)(),(0,actions.fetchSmartTransactionsLiveness)()()]).then(function(param){var swapsFeatureFlags=useSmartTransactionFeatureFlags_sliced_to_array(param,1)[0];dispatch((0,actions.setSwapsFeatureFlags)(swapsFeatureFlags))}).catch(function(error){loglevel_default().debug("Error updating smart transaction feature flags",error)})},[isTransaction,transactionId,smartTransactionsPreferenceEnabled,currentChainSupportsSmartTransactions])}var approve=__webpack_require__("./ui/pages/confirmations/components/confirm/info/approve/approve.tsx"),base_transaction_info=__webpack_require__("./ui/pages/confirmations/components/confirm/info/base-transaction-info/base-transaction-info.tsx"),native_transfer=__webpack_require__("./ui/pages/confirmations/components/confirm/info/native-transfer/native-transfer.tsx"),nft_token_transfer=__webpack_require__("./ui/pages/confirmations/components/confirm/info/nft-token-transfer/nft-token-transfer.tsx"),personal_sign=__webpack_require__("./ui/pages/confirmations/components/confirm/info/personal-sign/personal-sign.tsx"),set_approval_for_all_info=__webpack_require__("./ui/pages/confirmations/components/confirm/info/set-approval-for-all-info/set-approval-for-all-info.tsx"),token_transfer=__webpack_require__("./ui/pages/confirmations/components/confirm/info/token-transfer/token-transfer.tsx"),typed_sign_v1=__webpack_require__("./ui/pages/confirmations/components/confirm/info/typed-sign-v1/typed-sign-v1.tsx"),typed_sign=__webpack_require__("./ui/pages/confirmations/components/confirm/info/typed-sign/typed-sign.tsx");function info_define_property(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}let info=function(){var currentConfirmation=(0,context_confirm.TW)().currentConfirmation;useSmartTransactionFeatureFlags();var ConfirmationInfoComponentMap=(0,react.useMemo)(function(){var _obj;return info_define_property(_obj={},types.D_.contractInteraction,function(){return base_transaction_info.A}),info_define_property(_obj,types.D_.deployContract,function(){return base_transaction_info.A}),info_define_property(_obj,types.D_.personalSign,function(){return personal_sign.A}),info_define_property(_obj,types.D_.simpleSend,function(){return native_transfer.A}),info_define_property(_obj,types.D_.signTypedData,function(){var _currentConfirmation_msgParams;return"V1"===(null!==(_currentConfirmation_msgParams=null==currentConfirmation?void 0:currentConfirmation.msgParams)&&void 0!==_currentConfirmation_msgParams?_currentConfirmation_msgParams:{}).version?typed_sign_v1.A:typed_sign.A}),info_define_property(_obj,types.D_.tokenMethodApprove,function(){return approve.A}),info_define_property(_obj,types.D_.tokenMethodIncreaseAllowance,function(){return approve.A}),info_define_property(_obj,types.D_.tokenMethodSafeTransferFrom,function(){return nft_token_transfer.A}),info_define_property(_obj,types.D_.tokenMethodSetApprovalForAll,function(){return set_approval_for_all_info.A}),info_define_property(_obj,types.D_.tokenMethodTransfer,function(){return token_transfer.A}),info_define_property(_obj,types.D_.tokenMethodTransferFrom,function(){return nft_token_transfer.A}),_obj},[currentConfirmation]);if(!(null==currentConfirmation?void 0:currentConfirmation.type))return null;var InfoComponent=ConfirmationInfoComponentMap[null==currentConfirmation?void 0:currentConfirmation.type]();return react.createElement(InfoComponent,null)};var ledger_info=__webpack_require__("./ui/pages/confirmations/components/confirm/ledger-info/ledger-info.tsx"),network_change_toast=__webpack_require__("./ui/pages/confirmations/components/confirm/network-change-toast/index.tsx"),useInsightSnaps=__webpack_require__("./ui/hooks/snaps/useInsightSnaps.js"),snap_ui_renderer=__webpack_require__("./ui/components/app/snaps/snap-ui-renderer/index.js"),delineator=__webpack_require__("./ui/components/ui/delineator/index.ts"),tooltip=__webpack_require__("./ui/components/ui/tooltip/index.js"),SnapInsight=function(param){var snapId=param.snapId,interfaceId=param.interfaceId,loading=param.loading,isExpanded=param.isExpanded,t=(0,useI18nContext.P)(),snapName=(0,es.d4)(function(state){return(0,selectors.oeg)(state,snapId)}).name,headerComponent=react.createElement(component_library.EY,null,t("insightsFromSnap",[react.createElement(component_library.EY,{fontWeight:design_system.IT.Medium,variant:design_system.J3.inherit,color:design_system.r7.inherit},snapName)]));return loading||interfaceId?react.createElement(delineator.I,{headerComponent:headerComponent,isLoading:loading,isExpanded:isExpanded,contentBoxProps:loading?void 0:{paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0}},react.createElement(snap_ui_renderer.a,{snapId:snapId,interfaceId:interfaceId,isLoading:loading,useDelineator:!1})):react.createElement(tooltip.A,{position:"top",title:t("snapsNoInsight")},react.createElement(delineator.I,{headerComponent:headerComponent,isDisabled:!0}))};try{SnapInsight.displayName="SnapInsight",SnapInsight.__docgenInfo={description:"",displayName:"SnapInsight",props:{snapId:{defaultValue:null,description:"",name:"snapId",required:!0,type:{name:"string"}},interfaceId:{defaultValue:null,description:"",name:"interfaceId",required:!0,type:{name:"string"}},loading:{defaultValue:null,description:"",name:"loading",required:!0,type:{name:"boolean"}},isExpanded:{defaultValue:null,description:"",name:"isExpanded",required:!1,type:{name:"boolean"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["ui/pages/confirmations/components/confirm/snaps/snaps-section/snap-insight.tsx#SnapInsight"]={docgenInfo:SnapInsight.__docgenInfo,name:"SnapInsight",path:"ui/pages/confirmations/components/confirm/snaps/snaps-section/snap-insight.tsx#SnapInsight"})}catch(__react_docgen_typescript_loader_error){}var pluggedInSections=[function(){var currentConfirmation=(0,context_confirm.TW)().currentConfirmation,data=(0,useInsightSnaps.P)(null==currentConfirmation?void 0:currentConfirmation.id).data;return 0===data.length?null:react.createElement(component_library.az,{display:design_system.nl.Flex,flexDirection:design_system.bo.Column,gap:4,marginBottom:4},data.map(function(param,index){var snapId=param.snapId,interfaceId=param.interfaceId,loading=param.loading;return react.createElement(SnapInsight,{key:snapId,snapId:snapId,interfaceId:interfaceId,loading:loading,isExpanded:0===index})}))}];let pluggable_section=function(){var currentConfirmation=(0,context_confirm.TW)().currentConfirmation;return react.createElement(react.Fragment,null,pluggedInSections.map(function(Section,index){return react.createElement(Section,{key:"section-".concat(index),confirmation:currentConfirmation})}))};var scroll_to_bottom=__webpack_require__("./ui/pages/confirmations/components/confirm/scroll-to-bottom/scroll-to-bottom.tsx"),title1=__webpack_require__("./ui/pages/confirmations/components/confirm/title/title.tsx"),edit_gas_fee_popover=__webpack_require__("./ui/pages/confirmations/components/edit-gas-fee-popover/index.js"),nav=__webpack_require__("./ui/pages/confirmations/components/confirm/nav/nav.tsx"),EIP1559TransactionGasModal=function(){return react.createElement(react.Fragment,null,react.createElement(edit_gas_fee_popover.A,null),react.createElement(advanced_gas_fee_popover.A,null))},GasFeeContextProviderWrapper=function(param){var children=param.children,currentConfirmation=(0,context_confirm.TW)().currentConfirmation;return react.createElement(gasFee.cB,{transaction:currentConfirmation},children)};let confirm_confirm=function(){return react.createElement(context_confirm.VF,null,react.createElement(transaction_modal.Cr,null,react.createElement(GasFeeContextProviderWrapper,null,react.createElement(EIP1559TransactionGasModal,null),react.createElement(confirm_alerts_confirm_alerts,null,react.createElement(page.YW,{className:"confirm_wrapper"},react.createElement(nav.s,null),react.createElement(header.A,null),react.createElement(scroll_to_bottom.A,null,react.createElement(signature_mismatch_banner.S,null),react.createElement(blockaid_loading_indicator,null),react.createElement(ledger_info.A,null),react.createElement(title1.A,null),react.createElement(info,null),react.createElement(pluggable_section,null),react.createElement(note_to_trader.A,null)),react.createElement(footer.A,null),react.createElement(network_change_toast.q,null))))))}},"./ui/pages/confirmations/confirm/stories/utils.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{kS:()=>ConfirmStoryTemplate,q0:()=>ARG_TYPES_SIGNATURE,vn:()=>CONFIRM_PAGE_DECORATOR});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),react_redux__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react-redux/es/index.js"),_store_store__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./ui/store/store.ts"),_confirm__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./ui/pages/confirmations/confirm/confirm.tsx");function _define_property(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _object_spread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{},ownKeys=Object.keys(source);"function"==typeof Object.getOwnPropertySymbols&&(ownKeys=ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym){return Object.getOwnPropertyDescriptor(source,sym).enumerable}))),ownKeys.forEach(function(key){_define_property(target,key,source[key])})}return target}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable})),keys.push.apply(keys,symbols)}return keys}function _object_spread_props(target,source){return source=null!=source?source:{},Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))}),target}var CONFIRM_PAGE_DECORATOR=[function(story){return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{style:{height:"600px"}},story())}],ARG_TYPES_SIGNATURE={msgParams:{control:"object",description:"(non-param) overrides currentConfirmation.msgParams"}};function ConfirmStoryTemplate(){var metamaskState=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},store=(0,_store_store__WEBPACK_IMPORTED_MODULE_2__.A)(_object_spread_props(_object_spread({},metamaskState),{metamask:_object_spread_props(_object_spread({},metamaskState.metamask),{useTransactionSimulations:!0})}));return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react_redux__WEBPACK_IMPORTED_MODULE_1__.Kq,{store:store},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_confirm__WEBPACK_IMPORTED_MODULE_3__.A,null))}function SignatureStoryTemplate(){var metamaskState=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ConfirmStoryTemplate(metamaskState)}try{ConfirmStoryTemplate.displayName="ConfirmStoryTemplate",ConfirmStoryTemplate.__docgenInfo={description:"",displayName:"ConfirmStoryTemplate",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["ui/pages/confirmations/confirm/stories/utils.tsx#ConfirmStoryTemplate"]={docgenInfo:ConfirmStoryTemplate.__docgenInfo,name:"ConfirmStoryTemplate",path:"ui/pages/confirmations/confirm/stories/utils.tsx#ConfirmStoryTemplate"})}catch(__react_docgen_typescript_loader_error){}try{SignatureStoryTemplate.displayName="SignatureStoryTemplate",SignatureStoryTemplate.__docgenInfo={description:"",displayName:"SignatureStoryTemplate",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["ui/pages/confirmations/confirm/stories/utils.tsx#SignatureStoryTemplate"]={docgenInfo:SignatureStoryTemplate.__docgenInfo,name:"SignatureStoryTemplate",path:"ui/pages/confirmations/confirm/stories/utils.tsx#SignatureStoryTemplate"})}catch(__react_docgen_typescript_loader_error){}},"./ui/pages/confirmations/hooks/useQueuedConfirmationEvents.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{F:()=>useQueuedConfirmationsEvent});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),react_redux__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react-redux/es/index.js"),_shared_constants_metametrics__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./shared/constants/metametrics.ts"),_contexts_metametrics__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./ui/contexts/metametrics.js"),_selectors__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./ui/selectors/index.js"),useQueuedConfirmationsEvent=function(queueType){var pendingApprovals=(0,react_redux__WEBPACK_IMPORTED_MODULE_1__.d4)(_selectors__WEBPACK_IMPORTED_MODULE_4__.aCI),queuedRequestCount=(0,react_redux__WEBPACK_IMPORTED_MODULE_1__.d4)(_selectors__WEBPACK_IMPORTED_MODULE_4__.uZ),trackEvent=(0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_contexts_metametrics__WEBPACK_IMPORTED_MODULE_3__.O2);(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function(){if(pendingApprovals.length>0&&queuedRequestCount>0){var properties={confirmation_type:pendingApprovals[0].type,referrer:pendingApprovals[0].origin,queue_size:queuedRequestCount,queue_type:queueType};trackEvent({event:_shared_constants_metametrics__WEBPACK_IMPORTED_MODULE_2__.gP.ConfirmationQueued,category:_shared_constants_metametrics__WEBPACK_IMPORTED_MODULE_2__.FZ.Confirmations,properties:properties})}},[JSON.stringify(pendingApprovals),queuedRequestCount,queueType,trackEvent])}},"?a04e":()=>{},"?cbdd":()=>{},"?9581":()=>{},"?e569":()=>{},"?f505":()=>{}}]);