-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy path46667.2f085342.iframe.bundle.js
1 lines (1 loc) · 29.9 KB
/
46667.2f085342.iframe.bundle.js
1
"use strict";(globalThis.webpackChunkmetamask_crx=globalThis.webpackChunkmetamask_crx||[]).push([[46667],{"./ui/components/app/confirm/info/row/address.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{L:()=>ConfirmInfoRowAddress});var _metamask_name_controller__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./node_modules/@metamask/name-controller/dist/types.mjs"),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"),_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./ui/helpers/constants/design-system.ts"),_selectors__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./ui/selectors/index.js"),_component_library__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./ui/components/component-library/index.ts"),_modals_nickname_popovers__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./ui/components/app/modals/nickname-popovers/index.js"),_name_name__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./ui/components/app/name/name.tsx"),_helpers_utils_util__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./ui/helpers/utils/util.js"),_ui_identicon__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./ui/components/ui/identicon/index.js"),_hook__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./ui/components/app/confirm/info/row/hook.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)}}var ConfirmInfoRowAddress=(0,react__WEBPACK_IMPORTED_MODULE_0__.memo)(function(param){var address=param.address,chainId=param.chainId,isSnapUsingThis=param.isSnapUsingThis,isPetNamesEnabled=(0,react_redux__WEBPACK_IMPORTED_MODULE_1__.d4)(_selectors__WEBPACK_IMPORTED_MODULE_3__.bHF),_useFallbackDisplayName=(0,_hook__WEBPACK_IMPORTED_MODULE_9__.T)(address),displayName=_useFallbackDisplayName.displayName,hexAddress=_useFallbackDisplayName.hexAddress,_useState=_sliced_to_array((0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1),2),isNicknamePopoverShown=_useState[0],setIsNicknamePopoverShown=_useState[1];return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_component_library__WEBPACK_IMPORTED_MODULE_4__.az,{display:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.nl.Flex,flexDirection:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.bo.Row,alignItems:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.k2.center},isPetNamesEnabled&&!isSnapUsingThis?react__WEBPACK_IMPORTED_MODULE_0__.createElement(_name_name__WEBPACK_IMPORTED_MODULE_6__.A,{value:hexAddress,type:_metamask_name_controller__WEBPACK_IMPORTED_MODULE_10__.k.ETHEREUM_ADDRESS,preferContractSymbol:!0,variation:chainId}):react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement(_component_library__WEBPACK_IMPORTED_MODULE_4__.az,{display:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.nl.Flex,flexDirection:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.bo.Row,alignItems:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.k2.center,onClick:isSnapUsingThis?function(){return null}:function(){return setIsNicknamePopoverShown(!0)}},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_ui_identicon__WEBPACK_IMPORTED_MODULE_8__.A,{address:address,diameter:16}),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_component_library__WEBPACK_IMPORTED_MODULE_4__.EY,{marginLeft:2,color:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.r7.inherit,"data-testid":"confirm-info-row-display-name"},isSnapUsingThis?(0,_helpers_utils_util__WEBPACK_IMPORTED_MODULE_7__.Wr)(address):displayName)),isNicknamePopoverShown?react__WEBPACK_IMPORTED_MODULE_0__.createElement(_modals_nickname_popovers__WEBPACK_IMPORTED_MODULE_5__.A,{onClose:function(){return setIsNicknamePopoverShown(!1)},address:hexAddress}):null))});try{ConfirmInfoRowAddress.displayName="ConfirmInfoRowAddress",ConfirmInfoRowAddress.__docgenInfo={description:"",displayName:"ConfirmInfoRowAddress",props:{address:{defaultValue:null,description:"",name:"address",required:!0,type:{name:"string"}},chainId:{defaultValue:null,description:"",name:"chainId",required:!0,type:{name:"string"}},isSnapUsingThis:{defaultValue:null,description:"",name:"isSnapUsingThis",required:!1,type:{name:"boolean"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["ui/components/app/confirm/info/row/address.tsx#ConfirmInfoRowAddress"]={docgenInfo:ConfirmInfoRowAddress.__docgenInfo,name:"ConfirmInfoRowAddress",path:"ui/components/app/confirm/info/row/address.tsx#ConfirmInfoRowAddress"})}catch(__react_docgen_typescript_loader_error){}},"./ui/components/app/confirm/info/row/date.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{p:()=>ConfirmInfoRowDate});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./ui/helpers/constants/design-system.ts"),_helpers_utils_util__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./ui/helpers/utils/util.js"),_component_library__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./ui/components/component-library/index.ts"),ConfirmInfoRowDate=function(param){var unixTimestamp=param.unixTimestamp;return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_component_library__WEBPACK_IMPORTED_MODULE_3__.az,{display:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_1__.nl.Flex,alignItems:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_1__.k2.center,flexWrap:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_1__.I4.Wrap,gap:2},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_component_library__WEBPACK_IMPORTED_MODULE_3__.EY,{color:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_1__.r7.inherit,style:{whiteSpace:"pre-wrap"}},(0,_helpers_utils_util__WEBPACK_IMPORTED_MODULE_2__.wA)(unixTimestamp)))};try{ConfirmInfoRowDate.displayName="ConfirmInfoRowDate",ConfirmInfoRowDate.__docgenInfo={description:"",displayName:"ConfirmInfoRowDate",props:{unixTimestamp:{defaultValue:null,description:"timestamp as seconds since unix epoch e.g. Solidity block.timestamp (type uint256) value",name:"unixTimestamp",required:!0,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["ui/components/app/confirm/info/row/date.tsx#ConfirmInfoRowDate"]={docgenInfo:ConfirmInfoRowDate.__docgenInfo,name:"ConfirmInfoRowDate",path:"ui/components/app/confirm/info/row/date.tsx#ConfirmInfoRowDate"})}catch(__react_docgen_typescript_loader_error){}},"./ui/components/app/confirm/info/row/hook.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{$:()=>useRowContext,T:()=>useFallbackDisplayName});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_modules_hexstring_utils__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./shared/modules/hexstring-utils.ts"),_helpers_utils_util__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./ui/helpers/utils/util.js"),_selectors__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./ui/selectors/index.js"),_row__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./ui/components/app/confirm/info/row/row.tsx"),useRowContext=function(){return(0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_row__WEBPACK_IMPORTED_MODULE_5__.We)},useFallbackDisplayName=function useFallbackDisplayName(address){var hexAddress=(0,_shared_modules_hexstring_utils__WEBPACK_IMPORTED_MODULE_2__.sX)(address),internalAccounts=(0,react_redux__WEBPACK_IMPORTED_MODULE_1__.d4)(_selectors__WEBPACK_IMPORTED_MODULE_4__.atg),accountName=(0,_selectors__WEBPACK_IMPORTED_MODULE_4__.Ptq)(internalAccounts,hexAddress),addressBookContact=(0,react_redux__WEBPACK_IMPORTED_MODULE_1__.d4)(function(state){return(0,_selectors__WEBPACK_IMPORTED_MODULE_4__.AF5)(state,hexAddress)}),addressBookContactName=null==addressBookContact?void 0:addressBookContact.name,metadataName=(0,react_redux__WEBPACK_IMPORTED_MODULE_1__.d4)(function(state){return(0,_selectors__WEBPACK_IMPORTED_MODULE_4__.rG1)(state,hexAddress)}),ensName=(0,react_redux__WEBPACK_IMPORTED_MODULE_1__.d4)(function(state){return(0,_selectors__WEBPACK_IMPORTED_MODULE_4__._Ti)(state,address)});return{displayName:accountName||addressBookContactName||metadataName||ensName||(0,_helpers_utils_util__WEBPACK_IMPORTED_MODULE_3__.Wr)(hexAddress),hexAddress:hexAddress}}},"./ui/components/app/confirm/info/row/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{z$:()=>row.z$,L0:()=>address.L,pm:()=>date.p,Oz:()=>ConfirmInfoRowDivider,UK:()=>row_text.U,yT:()=>text_token_units.y,u7:()=>url.u,VV:()=>value_double.V,aj:()=>row.aj});var address=__webpack_require__("./ui/components/app/confirm/info/row/address.tsx"),date=__webpack_require__("./ui/components/app/confirm/info/row/date.tsx"),react=__webpack_require__("./node_modules/react/index.js"),ConfirmInfoRowDivider=function(){return react.createElement("div",{style:{height:"1px",backgroundColor:"var(--color-border-muted)",marginLeft:"-8px",marginRight:"-8px"}})};try{ConfirmInfoRowDivider.displayName="ConfirmInfoRowDivider",ConfirmInfoRowDivider.__docgenInfo={description:"",displayName:"ConfirmInfoRowDivider",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["ui/components/app/confirm/info/row/divider.tsx#ConfirmInfoRowDivider"]={docgenInfo:ConfirmInfoRowDivider.__docgenInfo,name:"ConfirmInfoRowDivider",path:"ui/components/app/confirm/info/row/divider.tsx#ConfirmInfoRowDivider"})}catch(__react_docgen_typescript_loader_error){}var row=__webpack_require__("./ui/components/app/confirm/info/row/row.tsx"),row_text=__webpack_require__("./ui/components/app/confirm/info/row/text.tsx"),text_token_units=__webpack_require__("./ui/components/app/confirm/info/row/text-token-units.tsx"),url=__webpack_require__("./ui/components/app/confirm/info/row/url.tsx"),value_double=__webpack_require__("./ui/components/app/confirm/info/row/value-double.tsx")},"./ui/components/app/confirm/info/row/text-token-units.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{y:()=>ConfirmInfoRowTextTokenUnits});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_shared_lib_transactions_controller_utils__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./shared/lib/transactions-controller-utils.js"),_pages_confirmations_components_simulation_details_formatAmount__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./ui/pages/confirmations/components/simulation-details/formatAmount.ts"),_helpers_utils_util__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./ui/helpers/utils/util.js"),_text__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./ui/components/app/confirm/info/row/text.tsx"),ConfirmInfoRowTextTokenUnits=function(param){var value=param.value,decimals=param.decimals,tokenValue=(0,_shared_lib_transactions_controller_utils__WEBPACK_IMPORTED_MODULE_1__.dU)(value,decimals),tokenText=(0,_pages_confirmations_components_simulation_details_formatAmount__WEBPACK_IMPORTED_MODULE_2__.e)("en-US",tokenValue),tokenTextMaxPrecision=(0,_pages_confirmations_components_simulation_details_formatAmount__WEBPACK_IMPORTED_MODULE_2__.o)("en-US",tokenValue);return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_text__WEBPACK_IMPORTED_MODULE_4__.U,{text:(0,_helpers_utils_util__WEBPACK_IMPORTED_MODULE_3__.l1)(tokenText,{truncatedCharLimit:15,truncatedStartChars:15,truncatedEndChars:0,skipCharacterInEnd:!0}),tooltip:tokenTextMaxPrecision})};try{ConfirmInfoRowTextTokenUnits.displayName="ConfirmInfoRowTextTokenUnits",ConfirmInfoRowTextTokenUnits.__docgenInfo={description:"",displayName:"ConfirmInfoRowTextTokenUnits",props:{value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"string | number | BigNumber"}},decimals:{defaultValue:null,description:"",name:"decimals",required:!1,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["ui/components/app/confirm/info/row/text-token-units.tsx#ConfirmInfoRowTextTokenUnits"]={docgenInfo:ConfirmInfoRowTextTokenUnits.__docgenInfo,name:"ConfirmInfoRowTextTokenUnits",path:"ui/components/app/confirm/info/row/text-token-units.tsx#ConfirmInfoRowTextTokenUnits"})}catch(__react_docgen_typescript_loader_error){}},"./ui/components/app/confirm/info/row/text.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{U:()=>ConfirmInfoRowText});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_contexts_i18n__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./ui/contexts/i18n.js"),_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./ui/helpers/constants/design-system.ts"),_component_library__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./ui/components/component-library/index.ts"),_ui_tooltip__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./ui/components/ui/tooltip/index.js"),InfoText=function(param){var text=param.text;return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_component_library__WEBPACK_IMPORTED_MODULE_3__.EY,{color:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.r7.inherit,style:{whiteSpace:"pre-wrap"}},text)},ConfirmInfoRowText=function(param){var text=param.text,onEditClick=param.onEditClick,editIconClassName=param.editIconClassName,tooltip=param.tooltip,dataTestId=param["data-testid"],editIconDataTestId=param.editIconDataTestId,t=(0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_contexts_i18n__WEBPACK_IMPORTED_MODULE_1__.gJ),isEditable=!!onEditClick;return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_component_library__WEBPACK_IMPORTED_MODULE_3__.az,{"data-testid":dataTestId,display:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.nl.Flex,alignItems:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.k2.center,flexWrap:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.I4.Wrap,gap:2,minWidth:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.Zf.Zero},isEditable?react__WEBPACK_IMPORTED_MODULE_0__.createElement(_component_library__WEBPACK_IMPORTED_MODULE_3__.a2,{className:editIconClassName||void 0,color:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.Li.primaryDefault,ariaLabel:t("edit"),iconName:_component_library__WEBPACK_IMPORTED_MODULE_3__.$M.Edit,onClick:onEditClick,size:_component_library__WEBPACK_IMPORTED_MODULE_3__.f3.Sm,style:{marginRight:"-4px"},"data-testid":editIconDataTestId}):null,tooltip?react__WEBPACK_IMPORTED_MODULE_0__.createElement(_ui_tooltip__WEBPACK_IMPORTED_MODULE_4__.A,{position:"bottom",title:tooltip,wrapperStyle:{minWidth:0},interactive:!0},react__WEBPACK_IMPORTED_MODULE_0__.createElement(InfoText,{text:text})):react__WEBPACK_IMPORTED_MODULE_0__.createElement(InfoText,{text:text}))};try{ConfirmInfoRowText.displayName="ConfirmInfoRowText",ConfirmInfoRowText.__docgenInfo={description:"",displayName:"ConfirmInfoRowText",props:{text:{defaultValue:null,description:"",name:"text",required:!0,type:{name:"string"}},onEditClick:{defaultValue:null,description:"",name:"onEditClick",required:!1,type:{name:"(() => void)"}},editIconClassName:{defaultValue:null,description:"",name:"editIconClassName",required:!1,type:{name:"string"}},tooltip:{defaultValue:null,description:"",name:"tooltip",required:!1,type:{name:"string"}},"data-testid":{defaultValue:null,description:"",name:"data-testid",required:!1,type:{name:"string"}},editIconDataTestId:{defaultValue:null,description:"",name:"editIconDataTestId",required:!1,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["ui/components/app/confirm/info/row/text.tsx#ConfirmInfoRowText"]={docgenInfo:ConfirmInfoRowText.__docgenInfo,name:"ConfirmInfoRowText",path:"ui/components/app/confirm/info/row/text.tsx#ConfirmInfoRowText"})}catch(__react_docgen_typescript_loader_error){}},"./ui/components/app/confirm/info/row/url.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{u:()=>ConfirmInfoRowUrl});var react=__webpack_require__("./node_modules/react/index.js"),snaps=__webpack_require__("./node_modules/@metamask/snaps-utils/dist/snaps.mjs"),component_library=__webpack_require__("./ui/components/component-library/index.ts"),design_system=__webpack_require__("./ui/helpers/constants/design-system.ts"),snap_authorship_pill=__webpack_require__("./ui/components/app/snaps/snap-authorship-pill/snap-authorship-pill.tsx"),snap_metadata_modal=__webpack_require__("./ui/components/app/snaps/snap-metadata-modal/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 _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)}}var ConfirmInfoRowUrl=function(param){var urlObject,url=param.url,_useState=_sliced_to_array((0,react.useState)(!1),2),isModalOpen=_useState[0],setIsModalOpen=_useState[1],handlePillClick=(0,react.useCallback)(function(){return setIsModalOpen(!0)},[setIsModalOpen]),handleModalClose=(0,react.useCallback)(function(){return setIsModalOpen(!1)},[setIsModalOpen]);if((0,snaps.cX)(url))return react.createElement(react.Fragment,null,react.createElement(snap_authorship_pill.A,{snapId:url,onClick:handlePillClick}),react.createElement(snap_metadata_modal.L,{snapId:url,isOpen:isModalOpen,onClose:handleModalClose}));try{urlObject=new URL(url)}catch(e){console.log("ConfirmInfoRowUrl: new URL(url) cannot parse ".concat(url))}var isHTTP=(null==urlObject?void 0:urlObject.protocol)==="http:",urlWithoutProtocol=null==url?void 0:url.replace(RegExp("https?:\\/\\/","u"),"");return react.createElement(component_library.az,{display:design_system.nl.Flex,alignItems:design_system.k2.center,flexWrap:design_system.I4.Wrap,gap:2},isHTTP&&react.createElement(component_library.EY,{variant:design_system.J3.bodySm,display:design_system.nl.Flex,alignItems:design_system.k2.center,borderRadius:design_system.Z6.SM,backgroundColor:design_system.i0.warningMuted,paddingLeft:1,paddingRight:1,color:design_system.r7.warningDefault},react.createElement(component_library.In,{name:component_library.$M.Danger,color:design_system.Li.warningDefault,size:component_library.lK.Sm,marginInlineEnd:1}),"HTTP"),react.createElement(component_library.EY,{color:design_system.r7.inherit},urlWithoutProtocol))};try{ConfirmInfoRowUrl.displayName="ConfirmInfoRowUrl",ConfirmInfoRowUrl.__docgenInfo={description:"",displayName:"ConfirmInfoRowUrl",props:{url:{defaultValue:null,description:"",name:"url",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["ui/components/app/confirm/info/row/url.tsx#ConfirmInfoRowUrl"]={docgenInfo:ConfirmInfoRowUrl.__docgenInfo,name:"ConfirmInfoRowUrl",path:"ui/components/app/confirm/info/row/url.tsx#ConfirmInfoRowUrl"})}catch(__react_docgen_typescript_loader_error){}},"./ui/components/app/confirm/info/row/value-double.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{V:()=>ConfirmInfoRowValueDouble});var _obj,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"),_hook__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./ui/components/app/confirm/info/row/hook.ts"),_row__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./ui/components/app/confirm/info/row/row.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}var LEFT_TEXT_COLORS=(_define_property(_obj={},_row__WEBPACK_IMPORTED_MODULE_4__.aj.Default,_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.r7.textMuted),_define_property(_obj,_row__WEBPACK_IMPORTED_MODULE_4__.aj.Critical,_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.Q1.errorAlternative),_define_property(_obj,_row__WEBPACK_IMPORTED_MODULE_4__.aj.Warning,_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.Q1.warningDefault),_obj),ConfirmInfoRowValueDouble=function(param){var left=param.left,right=param.right,variant=(0,_hook__WEBPACK_IMPORTED_MODULE_3__.$)().variant;return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_component_library__WEBPACK_IMPORTED_MODULE_1__.az,{display:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.nl.Flex,flexDirection:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.bo.Row,alignItems:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.k2.center,flexWrap:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.I4.Wrap,gap:1},"string"==typeof left?react__WEBPACK_IMPORTED_MODULE_0__.createElement(_component_library__WEBPACK_IMPORTED_MODULE_1__.EY,{color:LEFT_TEXT_COLORS[variant]},left):left,"string"==typeof right?react__WEBPACK_IMPORTED_MODULE_0__.createElement(_component_library__WEBPACK_IMPORTED_MODULE_1__.EY,{color:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_2__.r7.inherit},right):right)};try{ConfirmInfoRowValueDouble.displayName="ConfirmInfoRowValueDouble",ConfirmInfoRowValueDouble.__docgenInfo={description:"",displayName:"ConfirmInfoRowValueDouble",props:{left:{defaultValue:null,description:"",name:"left",required:!0,type:{name:"ReactNode"}},right:{defaultValue:null,description:"",name:"right",required:!0,type:{name:"ReactNode"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["ui/components/app/confirm/info/row/value-double.tsx#ConfirmInfoRowValueDouble"]={docgenInfo:ConfirmInfoRowValueDouble.__docgenInfo,name:"ConfirmInfoRowValueDouble",path:"ui/components/app/confirm/info/row/value-double.tsx#ConfirmInfoRowValueDouble"})}catch(__react_docgen_typescript_loader_error){}},"./ui/components/app/snaps/snap-authorship-pill/snap-authorship-pill.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__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"),_component_library__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./ui/components/component-library/index.ts"),_snap_icon__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./ui/components/app/snaps/snap-icon/index.ts"),_selectors__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./ui/selectors/index.js"),_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./ui/helpers/constants/design-system.ts");let __WEBPACK_DEFAULT_EXPORT__=function(param){var snapId=param.snapId,onClick=param.onClick,snapName=(0,react_redux__WEBPACK_IMPORTED_MODULE_1__.d4)(function(state){return(0,_selectors__WEBPACK_IMPORTED_MODULE_4__.oeg)(state,snapId)}).name;return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_component_library__WEBPACK_IMPORTED_MODULE_2__.az,{className:"snap-authorship-pill",display:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_5__.nl.Flex,flexDirection:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_5__.bo.Row,alignItems:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_5__.k2.center,borderRadius:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_5__.Z6.pill,paddingTop:1,paddingBottom:1,paddingLeft:1,paddingRight:2,onClick:onClick},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_snap_icon__WEBPACK_IMPORTED_MODULE_3__.W,{avatarSize:_component_library__WEBPACK_IMPORTED_MODULE_2__.lK.Sm,snapId:snapId}),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_component_library__WEBPACK_IMPORTED_MODULE_2__.EY,{color:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_5__.r7.primaryDefault,variant:_helpers_constants_design_system__WEBPACK_IMPORTED_MODULE_5__.J3.bodyMdMedium,ellipsis:!0,paddingLeft:1},snapName))};try{snapauthorshippill.displayName="snapauthorshippill",snapauthorshippill.__docgenInfo={description:"",displayName:"snapauthorshippill",props:{snapId:{defaultValue:null,description:"",name:"snapId",required:!0,type:{name:"string"}},onClick:{defaultValue:null,description:"",name:"onClick",required:!0,type:{name:"() => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["ui/components/app/snaps/snap-authorship-pill/snap-authorship-pill.tsx#snapauthorshippill"]={docgenInfo:snapauthorshippill.__docgenInfo,name:"snapauthorshippill",path:"ui/components/app/snaps/snap-authorship-pill/snap-authorship-pill.tsx#snapauthorshippill"})}catch(__react_docgen_typescript_loader_error){}},"./ui/pages/confirmations/components/simulation-details/formatAmount.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{e:()=>formatAmount,o:()=>formatAmountMaxPrecision});var bignumber_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/bignumber.js/bignumber.js"),_hooks_useCurrencyDisplay__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./ui/hooks/useCurrencyDisplay.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 _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 formatAmountMaxPrecision(locale,num){var bigNumberValue=new bignumber_js__WEBPACK_IMPORTED_MODULE_0__.BigNumber(num),numberOfDecimals=bigNumberValue.decimalPlaces(),_formattedValue_split=_sliced_to_array(bigNumberValue.toFixed(numberOfDecimals).split("."),2),integerPart=_formattedValue_split[0],fractionalPart=_formattedValue_split[1],formattedIntegerPart=new Intl.NumberFormat(locale).format(integerPart);return fractionalPart?"".concat(formattedIntegerPart,".").concat(fractionalPart):formattedIntegerPart}function formatAmount(locale,amount){if(amount.isZero())return"0";if(amount.abs().lessThan(_hooks_useCurrencyDisplay__WEBPACK_IMPORTED_MODULE_1__.Ke))return"<".concat(formatAmountMaxPrecision(locale,_hooks_useCurrencyDisplay__WEBPACK_IMPORTED_MODULE_1__.Ke));if(amount.abs().lessThan(1))return new Intl.NumberFormat(locale,{maximumSignificantDigits:3}).format(amount.round(_hooks_useCurrencyDisplay__WEBPACK_IMPORTED_MODULE_1__.Vi).toNumber());var maximumFractionDigits=Math.max(0,3-amount.abs().truncated().toString().length+1);return new Intl.NumberFormat(locale,{maximumFractionDigits:maximumFractionDigits}).format(amount.toFixed(maximumFractionDigits))}}}]);