-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy path15772.6a116e20.iframe.bundle.js
1 lines (1 loc) · 16.6 KB
/
15772.6a116e20.iframe.bundle.js
1
(globalThis.webpackChunkmetamask_crx=globalThis.webpackChunkmetamask_crx||[]).push([[15772],{"./node_modules/@lavamoat/lavadome-react/build/main.js":(__unused_webpack_module,exports,__webpack_require__)=>{(()=>{"use strict";var e={n:t=>{var o=t&&t.__esModule?()=>t.default:()=>t;return e.d(o,{a:o}),o},d:(t,o)=>{for(var n in o)e.o(o,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:o[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{LavaDome:()=>me,toLavaDomeToken:()=>de});let o=__webpack_require__("./node_modules/react/index.js");var n=e.n(o);let{Object:a,Array:r,Function:s,Math:l,parseInt:i,WeakMap:u,Error:p,JSON:c,navigation:d}=globalThis,{defineProperties:m,assign:f,getOwnPropertyDescriptor:v,entries:g,create:h,hasOwn:y}=a,{from:b}=r,{random:w}=l,{stringify:T}=c,O=(e,t,o)=>e&&s.prototype.call.bind(v(e,t)[o]),S=O(globalThis?.Node?.prototype,"ownerDocument","get"),D=O(globalThis?.EventTarget?.prototype,"addEventListener","value"),M=O(globalThis?.DocumentFragment?.prototype,"replaceChildren","value"),E=O(globalThis?.Element?.prototype,"attachShadow","value"),x=O(globalThis?.Document?.prototype,"createElement","value"),_=O(globalThis?.Node?.prototype,"appendChild","value"),k=O(globalThis?.Node?.prototype,"textContent","set"),I=O(globalThis?.Element?.prototype,"setAttribute","value"),L=O(globalThis?.String?.prototype,"toUpperCase","value"),N=O(globalThis?.String?.prototype,"includes","value"),j=O(globalThis?.Array?.prototype,"map","value"),P=O(globalThis?.Array?.prototype,"join","value"),C=O(globalThis?.Array?.prototype,"keys","value"),A=O(globalThis?.Array?.prototype,"at","value"),$=O(globalThis?.WeakMap?.prototype,"get","value"),F=O(globalThis?.WeakMap?.prototype,"set","value"),z=O(globalThis?.Number?.prototype,"toFixed","value"),R=O(globalThis?.NavigateEvent?.prototype,"destination","get"),U=O(globalThis?.NavigationDestination?.prototype,"url","get"),W=O(globalThis?.Event?.prototype,"preventDefault","value"),q=O(globalThis?.Event?.prototype,"stopPropagation","value"),G={isInnerInstance:Symbol("isInnerInstance"),unsafeOpenModeShadow:"unsafeOpenModeShadow"},J=e=>function(t,o,n){let a=e[t];return y(e,t)?typeof a!==o?n:a:n},Y="abcdefghijklmnopqrstuvwxyz",B="0123456789",H="!@#$%^&*()?.;:\"'[]{}+=-_/",K={letters:Y,digits:B,symbols:H,alphanumeric:Y+B,all:Y+L(Y)+B+H},{letters:Q,alphanumeric:V,all:X}=K,Z=(e,t)=>e[i(z(w()*t))],ee=e=>Z(Q,26)+P(j(b(C(r(e))),()=>Z(V,36)),"");function te(e,t,o=""){return e=P(j(g(e),([e,t])=>`${e}: ${t} !important`),"; "),function(){let n=x(document,t());return I(n,"style",e),k(n,o),n}}let oe=e=>()=>e(),ne=oe(te({"font-family":ee(20),"-webkit-user-modify":"unset","-webkit-user-select":"none","user-select":"none"},()=>ee(7))),ae=oe(te({top:"-10px",right:"-10px",position:"fixed","font-size":"1px"},()=>"span",X)),re=oe(te({display:"none"},()=>"iframe")),se=new u;function le(e,t){t=function(e={}){let{unsafeOpenModeShadow:t,isInnerInstance:o}=G,n=J(f(h(null),e)),a=h(null);return a.isInnerInstance=n(o,"boolean",!1),a.unsafeOpenModeShadow=n(t,"boolean",!1),a}(t),m(this,{text:{value:function(e){if("string"!=typeof e)throw new p(`LavaDomeCore: first argument must be a string, instead got ${T(e)}`);if(void 0===A(b(e),1))return k(a,e);_(o,n),j(b(e),e=>{let o=x(document,"span");t[G.isInnerInstance]=!0,new le(o,t).text(e),_(a,o)}),_(a,ae())}}});let o=function(e,t){let{unsafeOpenModeShadow:o,isInnerInstance:n}=t,a=$(se,e);if(!a){let t={mode:"closed"};o&&(t.mode="open",n||console.warn("LavaDome:",`Initiated with "${G.unsafeOpenModeShadow}" set to true.`,"This leaves LavaDome fully vulnerable, ONLY USE FOR TESTING!")),a=E(e,t),F(se,e,a)}return a}(e,t);M(o);let n=re();D(n,"load",()=>{if(S(n)!==document)throw M(o),new p("LavaDomeCore: The document to which LavaDome was originally introduced must be the same as the one this instance is inserted to")});let a=ne();_(o,a)}d?.addEventListener("navigate",e=>{if(N(U(R(e)),":~:"))throw W(e),q(e),new p("LavaDomeCore: in-app redirection to text-fragments links is blocked to ensure security")});let{all:ie}=K,ue=new u,pe=new u,ce=h(null),de=e=>{if("string"!=typeof e)throw Error(`LavaDomeReact: first argument must be a string, instead got ${T(e)}`);if(!y(ce,e)){let t=h(null);ce[e]=t,F(ue,t,e)}return ce[e]},me=({text:e,unsafeOpenModeShadow:t})=>{let r=(0,o.useRef)(null);return n().createElement("span",{ref:r,__source:{fileName:"/Users/weizman/Documents/lavamoat/lavadome/packages/react/src/lavadome.jsx",lineNumber:57,columnNumber:9},__self:void 0},n().createElement(fe,{host:r,token:e,unsafeOpenModeShadow:t,__source:{fileName:"/Users/weizman/Documents/lavamoat/lavadome/packages/react/src/lavadome.jsx",lineNumber:58,columnNumber:13},__self:void 0}))};function fe({host:e,token:t,unsafeOpenModeShadow:a}){let t1;let r=function(e){let t=$(ue,e);if(!y(ce,t))throw Error("LavaDomeReact: first argument must be a valid LavaDome token (replace \"text={'secret'}\" with \"text={toLavaDomeToken('secret')}\")");return t}(t),s=((t1=$(pe,t))||F(pe,t,t1=h(null)),t1);return(0,o.useEffect)(()=>{new le(e.current,{unsafeOpenModeShadow:a}).text(r)},[s]),n().createElement(n().Fragment,null)}for(var ge in t)exports[ge]=t[ge];t.__esModule&&Object.defineProperty(exports,"__esModule",{value:!0})})()},"./node_modules/@metamask/notification-services-controller/dist/NotificationServicesController/constants/notification-schema.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";var TRIGGER_TYPES,TRIGGER_TYPES_GROUPS;__webpack_require__.d(__webpack_exports__,{Zw:()=>TRIGGER_TYPES}),function(TRIGGER_TYPES){TRIGGER_TYPES.FEATURES_ANNOUNCEMENT="features_announcement",TRIGGER_TYPES.METAMASK_SWAP_COMPLETED="metamask_swap_completed",TRIGGER_TYPES.ERC20_SENT="erc20_sent",TRIGGER_TYPES.ERC20_RECEIVED="erc20_received",TRIGGER_TYPES.ETH_SENT="eth_sent",TRIGGER_TYPES.ETH_RECEIVED="eth_received",TRIGGER_TYPES.ROCKETPOOL_STAKE_COMPLETED="rocketpool_stake_completed",TRIGGER_TYPES.ROCKETPOOL_UNSTAKE_COMPLETED="rocketpool_unstake_completed",TRIGGER_TYPES.LIDO_STAKE_COMPLETED="lido_stake_completed",TRIGGER_TYPES.LIDO_WITHDRAWAL_REQUESTED="lido_withdrawal_requested",TRIGGER_TYPES.LIDO_WITHDRAWAL_COMPLETED="lido_withdrawal_completed",TRIGGER_TYPES.LIDO_STAKE_READY_TO_BE_WITHDRAWN="lido_stake_ready_to_be_withdrawn",TRIGGER_TYPES.ERC721_SENT="erc721_sent",TRIGGER_TYPES.ERC721_RECEIVED="erc721_received",TRIGGER_TYPES.ERC1155_SENT="erc1155_sent",TRIGGER_TYPES.ERC1155_RECEIVED="erc1155_received",TRIGGER_TYPES.AAVE_V3_HEALTH_FACTOR="aave_v3_health_factor",TRIGGER_TYPES.ENS_EXPIRATION="ens_expiration",TRIGGER_TYPES.LIDO_STAKING_REWARDS="lido_staking_rewards",TRIGGER_TYPES.ROCKETPOOL_STAKING_REWARDS="rocketpool_staking_rewards",TRIGGER_TYPES.NOTIONAL_LOAN_EXPIRATION="notional_loan_expiration",TRIGGER_TYPES.SPARK_FI_HEALTH_FACTOR="spark_fi_health_factor",TRIGGER_TYPES.SNAP="snap"}(TRIGGER_TYPES||(TRIGGER_TYPES={})),TRIGGER_TYPES.METAMASK_SWAP_COMPLETED,TRIGGER_TYPES.ERC20_SENT,TRIGGER_TYPES.ERC20_RECEIVED,TRIGGER_TYPES.ETH_SENT,TRIGGER_TYPES.ETH_RECEIVED,TRIGGER_TYPES.ROCKETPOOL_STAKE_COMPLETED,TRIGGER_TYPES.ROCKETPOOL_UNSTAKE_COMPLETED,TRIGGER_TYPES.LIDO_STAKE_COMPLETED,TRIGGER_TYPES.LIDO_WITHDRAWAL_REQUESTED,TRIGGER_TYPES.LIDO_WITHDRAWAL_COMPLETED,TRIGGER_TYPES.LIDO_STAKE_READY_TO_BE_WITHDRAWN,TRIGGER_TYPES.ERC721_SENT,TRIGGER_TYPES.ERC721_RECEIVED,TRIGGER_TYPES.ERC1155_SENT,TRIGGER_TYPES.ERC1155_RECEIVED,function(TRIGGER_TYPES_GROUPS){TRIGGER_TYPES_GROUPS.RECEIVED="received",TRIGGER_TYPES_GROUPS.SENT="sent",TRIGGER_TYPES_GROUPS.DEFI="defi"}(TRIGGER_TYPES_GROUPS||(TRIGGER_TYPES_GROUPS={}));let NOTIFICATION_CHAINS={ETHEREUM:"1",OPTIMISM:"10",BSC:"56",POLYGON:"137",ARBITRUM:"42161",AVALANCHE:"43114",LINEA:"59144"};NOTIFICATION_CHAINS.ETHEREUM,NOTIFICATION_CHAINS.OPTIMISM,NOTIFICATION_CHAINS.BSC,NOTIFICATION_CHAINS.POLYGON,NOTIFICATION_CHAINS.ARBITRUM,NOTIFICATION_CHAINS.AVALANCHE,NOTIFICATION_CHAINS.LINEA,NOTIFICATION_CHAINS.ETHEREUM,NOTIFICATION_CHAINS.OPTIMISM,NOTIFICATION_CHAINS.BSC,NOTIFICATION_CHAINS.POLYGON,NOTIFICATION_CHAINS.ARBITRUM,NOTIFICATION_CHAINS.AVALANCHE,NOTIFICATION_CHAINS.LINEA,TRIGGER_TYPES.METAMASK_SWAP_COMPLETED,NOTIFICATION_CHAINS.ETHEREUM,NOTIFICATION_CHAINS.OPTIMISM,NOTIFICATION_CHAINS.BSC,NOTIFICATION_CHAINS.POLYGON,NOTIFICATION_CHAINS.ARBITRUM,NOTIFICATION_CHAINS.AVALANCHE,TRIGGER_TYPES.ERC20_SENT,NOTIFICATION_CHAINS.ETHEREUM,NOTIFICATION_CHAINS.OPTIMISM,NOTIFICATION_CHAINS.BSC,NOTIFICATION_CHAINS.POLYGON,NOTIFICATION_CHAINS.ARBITRUM,NOTIFICATION_CHAINS.AVALANCHE,NOTIFICATION_CHAINS.LINEA,TRIGGER_TYPES.ERC20_RECEIVED,NOTIFICATION_CHAINS.ETHEREUM,NOTIFICATION_CHAINS.OPTIMISM,NOTIFICATION_CHAINS.BSC,NOTIFICATION_CHAINS.POLYGON,NOTIFICATION_CHAINS.ARBITRUM,NOTIFICATION_CHAINS.AVALANCHE,NOTIFICATION_CHAINS.LINEA,TRIGGER_TYPES.ERC721_SENT,NOTIFICATION_CHAINS.ETHEREUM,NOTIFICATION_CHAINS.POLYGON,TRIGGER_TYPES.ERC721_RECEIVED,NOTIFICATION_CHAINS.ETHEREUM,NOTIFICATION_CHAINS.POLYGON,TRIGGER_TYPES.ERC1155_SENT,NOTIFICATION_CHAINS.ETHEREUM,NOTIFICATION_CHAINS.POLYGON,TRIGGER_TYPES.ERC1155_RECEIVED,NOTIFICATION_CHAINS.ETHEREUM,NOTIFICATION_CHAINS.POLYGON,TRIGGER_TYPES.ETH_SENT,NOTIFICATION_CHAINS.ETHEREUM,NOTIFICATION_CHAINS.OPTIMISM,NOTIFICATION_CHAINS.BSC,NOTIFICATION_CHAINS.POLYGON,NOTIFICATION_CHAINS.ARBITRUM,NOTIFICATION_CHAINS.AVALANCHE,NOTIFICATION_CHAINS.LINEA,TRIGGER_TYPES.ETH_RECEIVED,NOTIFICATION_CHAINS.ETHEREUM,NOTIFICATION_CHAINS.OPTIMISM,NOTIFICATION_CHAINS.BSC,NOTIFICATION_CHAINS.POLYGON,NOTIFICATION_CHAINS.ARBITRUM,NOTIFICATION_CHAINS.AVALANCHE,NOTIFICATION_CHAINS.LINEA,TRIGGER_TYPES.ROCKETPOOL_STAKE_COMPLETED,NOTIFICATION_CHAINS.ETHEREUM,TRIGGER_TYPES.ROCKETPOOL_UNSTAKE_COMPLETED,NOTIFICATION_CHAINS.ETHEREUM,TRIGGER_TYPES.LIDO_STAKE_COMPLETED,NOTIFICATION_CHAINS.ETHEREUM,TRIGGER_TYPES.LIDO_WITHDRAWAL_REQUESTED,NOTIFICATION_CHAINS.ETHEREUM,TRIGGER_TYPES.LIDO_WITHDRAWAL_COMPLETED,NOTIFICATION_CHAINS.ETHEREUM},"./node_modules/@metamask/snaps-utils/dist/base64.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{W:()=>encodeBase64});var dist_bytes=__webpack_require__("./node_modules/@metamask/utils/dist/bytes.mjs"),assert=__webpack_require__("./node_modules/@metamask/utils/dist/assert.mjs"),esm=__webpack_require__("./node_modules/@scure/base/lib/esm/index.js"),rfdc=__webpack_require__("./node_modules/rfdc/index.js");let deepClone=(function $importDefault(module){return module?.__esModule?module.default:module})(__webpack_require__.n(rfdc)())({proto:!1,circles:!1});class VirtualFile{constructor(value){let options;"string"==typeof value||value instanceof Uint8Array?options={value}:options=value,this.value=options?.value??"",this.result=options?.result??void 0,this.data=options?.data??{},this.path=options?.path??"/"}get size(){return"string"==typeof this.value?this.value.length:this.value.byteLength}toString(encoding){return"string"==typeof this.value?((0,assert.vA)(void 0===encoding,"Tried to encode string."),this.value):this.value instanceof Uint8Array&&"hex"===encoding?(0,dist_bytes.My)(this.value):this.value instanceof Uint8Array&&"base64"===encoding?esm.K3.encode(this.value):new TextDecoder(encoding).decode(this.value)}clone(){let vfile=new VirtualFile;return"string"==typeof this.value?vfile.value=this.value:vfile.value=this.value.slice(0),vfile.result=deepClone(this.result),vfile.data=deepClone(this.data),vfile.path=this.path,vfile}}function getBytes(bytes){let unwrapped=bytes instanceof VirtualFile?bytes.value:bytes;return"string"==typeof unwrapped?(0,dist_bytes.Af)(unwrapped):unwrapped}async function encodeBase64(input){let bytes=getBytes(input);return"FileReader"in globalThis?await new Promise((resolve,reject)=>{let reader=Object.assign(new FileReader,{onload:()=>resolve(reader.result.replace("data:application/octet-stream;base64,","")),onerror:()=>reject(reader.error)});reader.readAsDataURL(new File([bytes],"",{type:"application/octet-stream"}))}):(0,dist_bytes.if)(bytes)}},"./node_modules/@metamask/transaction-controller/dist/constants.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{tx:()=>CHAIN_IDS});let CHAIN_IDS={MAINNET:"0x1",GOERLI:"0x5",BASE:"0x2105",BASE_TESTNET:"0x14a33",BSC:"0x38",BSC_TESTNET:"0x61",OPTIMISM:"0xa",OPTIMISM_TESTNET:"0x1a4",OPBNB:"0xcc",OPBNB_TESTNET:"0x15eb",OPTIMISM_SEPOLIA:"0xaa37dc",POLYGON:"0x89",POLYGON_TESTNET:"0x13881",AVALANCHE:"0xa86a",AVALANCHE_TESTNET:"0xa869",FANTOM:"0xfa",FANTOM_TESTNET:"0xfa2",SEPOLIA:"0xaa36a7",LINEA_GOERLI:"0xe704",LINEA_SEPOLIA:"0xe705",LINEA_MAINNET:"0xe708",MOONBEAM:"0x504",MOONBEAM_TESTNET:"0x507",MOONRIVER:"0x505",GNOSIS:"0x64",ARBITRUM:"0xa4b1",ZKSYNC_ERA:"0x144",ZORA:"0x76adf1",SCROLL:"0x82750",SCROLL_SEPOLIA:"0x8274f",MEGAETH_TESTNET:"0x18c6"}},"./node_modules/rfdc/index.js":(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var Buffer=__webpack_require__("./node_modules/buffer/index.js").Buffer;function copyBuffer(cur){return cur instanceof Buffer?Buffer.from(cur):new cur.constructor(cur.buffer.slice(),cur.byteOffset,cur.length)}function rfdc(opts){if((opts=opts||{}).circles)return rfdcCircles(opts);return opts.proto?cloneProto:clone;function cloneArray(a,fn){for(var keys=Object.keys(a),a2=Array(keys.length),i=0;i<keys.length;i++){var k=keys[i],cur=a[k];"object"!=typeof cur||null===cur?a2[k]=cur:cur instanceof Date?a2[k]=new Date(cur):ArrayBuffer.isView(cur)?a2[k]=copyBuffer(cur):a2[k]=fn(cur)}return a2}function clone(o){if("object"!=typeof o||null===o)return o;if(o instanceof Date)return new Date(o);if(Array.isArray(o))return cloneArray(o,clone);if(o instanceof Map)return new Map(cloneArray(Array.from(o),clone));if(o instanceof Set)return new Set(cloneArray(Array.from(o),clone));var o2={};for(var k in o)if(!1!==Object.hasOwnProperty.call(o,k)){var cur=o[k];"object"!=typeof cur||null===cur?o2[k]=cur:cur instanceof Date?o2[k]=new Date(cur):cur instanceof Map?o2[k]=new Map(cloneArray(Array.from(cur),clone)):cur instanceof Set?o2[k]=new Set(cloneArray(Array.from(cur),clone)):ArrayBuffer.isView(cur)?o2[k]=copyBuffer(cur):o2[k]=clone(cur)}return o2}function cloneProto(o){if("object"!=typeof o||null===o)return o;if(o instanceof Date)return new Date(o);if(Array.isArray(o))return cloneArray(o,cloneProto);if(o instanceof Map)return new Map(cloneArray(Array.from(o),cloneProto));if(o instanceof Set)return new Set(cloneArray(Array.from(o),cloneProto));var o2={};for(var k in o){var cur=o[k];"object"!=typeof cur||null===cur?o2[k]=cur:cur instanceof Date?o2[k]=new Date(cur):cur instanceof Map?o2[k]=new Map(cloneArray(Array.from(cur),cloneProto)):cur instanceof Set?o2[k]=new Set(cloneArray(Array.from(cur),cloneProto)):ArrayBuffer.isView(cur)?o2[k]=copyBuffer(cur):o2[k]=cloneProto(cur)}return o2}}function rfdcCircles(opts){var refs=[],refsNew=[];return opts.proto?cloneProto:clone;function cloneArray(a,fn){for(var keys=Object.keys(a),a2=Array(keys.length),i=0;i<keys.length;i++){var k=keys[i],cur=a[k];if("object"!=typeof cur||null===cur)a2[k]=cur;else if(cur instanceof Date)a2[k]=new Date(cur);else if(ArrayBuffer.isView(cur))a2[k]=copyBuffer(cur);else{var index=refs.indexOf(cur);-1!==index?a2[k]=refsNew[index]:a2[k]=fn(cur)}}return a2}function clone(o){if("object"!=typeof o||null===o)return o;if(o instanceof Date)return new Date(o);if(Array.isArray(o))return cloneArray(o,clone);if(o instanceof Map)return new Map(cloneArray(Array.from(o),clone));if(o instanceof Set)return new Set(cloneArray(Array.from(o),clone));var o2={};for(var k in refs.push(o),refsNew.push(o2),o)if(!1!==Object.hasOwnProperty.call(o,k)){var cur=o[k];if("object"!=typeof cur||null===cur)o2[k]=cur;else if(cur instanceof Date)o2[k]=new Date(cur);else if(cur instanceof Map)o2[k]=new Map(cloneArray(Array.from(cur),clone));else if(cur instanceof Set)o2[k]=new Set(cloneArray(Array.from(cur),clone));else if(ArrayBuffer.isView(cur))o2[k]=copyBuffer(cur);else{var i=refs.indexOf(cur);-1!==i?o2[k]=refsNew[i]:o2[k]=clone(cur)}}return refs.pop(),refsNew.pop(),o2}function cloneProto(o){if("object"!=typeof o||null===o)return o;if(o instanceof Date)return new Date(o);if(Array.isArray(o))return cloneArray(o,cloneProto);if(o instanceof Map)return new Map(cloneArray(Array.from(o),cloneProto));if(o instanceof Set)return new Set(cloneArray(Array.from(o),cloneProto));var o2={};for(var k in refs.push(o),refsNew.push(o2),o){var cur=o[k];if("object"!=typeof cur||null===cur)o2[k]=cur;else if(cur instanceof Date)o2[k]=new Date(cur);else if(cur instanceof Map)o2[k]=new Map(cloneArray(Array.from(cur),cloneProto));else if(cur instanceof Set)o2[k]=new Set(cloneArray(Array.from(cur),cloneProto));else if(ArrayBuffer.isView(cur))o2[k]=copyBuffer(cur);else{var i=refs.indexOf(cur);-1!==i?o2[k]=refsNew[i]:o2[k]=cloneProto(cur)}}return refs.pop(),refsNew.pop(),o2}}module.exports=rfdc}}]);