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,YACTf,EACD,GAAAhB,EAAAC,GAAA,EAAC+B,EAAAA,CAAOA,CAAAA,CAACpT,MAAOqS,EAASgB,UAAS,YAChC,GAAAjC,EAAAC,GAAA,EAACC,EAAAA,CAAGA,CAAAA,UACF,GAAAF,EAAAC,GAAA,EAACiC,GAAAA,GAA0BA,CAAAA,CAACP,KAAM,cAK1C,GAAA3B,EAAAC,GAAA,EAACnB,EAAIA,CAAAA,QAIb","sources":["webpack://_N_E/?dd6d","webpack://_N_E/./node_modules/@ramp-network/ramp-instant-sdk/dist/ramp-instant-sdk.es5.js","webpack://_N_E/./components/pages/ramp/Ramp.tsx","webpack://_N_E/./pages/[moonChainKey]/ramp/index.tsx"],"sourcesContent":["\n (window.__NEXT_P = window.__NEXT_P || []).push([\n \"/[moonChainKey]/ramp\",\n function () {\n return require(\"private-next-pages/[moonChainKey]/ramp/index.tsx\");\n }\n ]);\n if(module.hot) {\n module.hot.dispose(function () {\n window.__NEXT_P.push([\"/[moonChainKey]/ramp\"])\n });\n }\n ","/* Version: 4.0.8 - March 13, 2025 08:52:51 */\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\n\r\nvar __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n return __assign.apply(this, arguments);\r\n};\r\n\r\nfunction __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nfunction __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nfunction __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nfunction __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\n\nfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\n// Older browsers don't support event options, feature detect it.\n\n// Adopted and modified solution from Bohdan Didukh (2017)\n// https://stackoverflow.com/questions/41594997/ios-10-safari-prevent-scrolling-behind-a-fixed-overlay-and-maintain-scroll-posi\n\nvar hasPassiveEvents = false;\nif (typeof window !== 'undefined') {\n var passiveTestOptions = {\n get passive() {\n hasPassiveEvents = true;\n return undefined;\n }\n };\n window.addEventListener('testPassive', null, passiveTestOptions);\n window.removeEventListener('testPassive', null, passiveTestOptions);\n}\n\nvar isIosDevice = typeof window !== 'undefined' && window.navigator && window.navigator.platform && (/iP(ad|hone|od)/.test(window.navigator.platform) || window.navigator.platform === 'MacIntel' && window.navigator.maxTouchPoints > 1);\n\n\nvar locks = [];\nvar documentListenerAdded = false;\nvar initialClientY = -1;\nvar previousBodyOverflowSetting = void 0;\nvar previousBodyPaddingRight = void 0;\n\n// returns true if `el` should be allowed to receive touchmove events.\nvar allowTouchMove = function allowTouchMove(el) {\n return locks.some(function (lock) {\n if (lock.options.allowTouchMove && lock.options.allowTouchMove(el)) {\n return true;\n }\n\n return false;\n });\n};\n\nvar preventDefault = function preventDefault(rawEvent) {\n var e = rawEvent || window.event;\n\n // For the case whereby consumers adds a touchmove event listener to document.\n // Recall that we do document.addEventListener('touchmove', preventDefault, { passive: false })\n // in disableBodyScroll - so if we provide this opportunity to allowTouchMove, then\n // the touchmove event on document will break.\n if (allowTouchMove(e.target)) {\n return true;\n }\n\n // Do not prevent if the event has more than one touch (usually meaning this is a multi touch gesture like pinch to zoom).\n if (e.touches.length > 1) return true;\n\n if (e.preventDefault) e.preventDefault();\n\n return false;\n};\n\nvar setOverflowHidden = function setOverflowHidden(options) {\n // If previousBodyPaddingRight is already set, don't set it again.\n if (previousBodyPaddingRight === undefined) {\n var _reserveScrollBarGap = !!options && options.reserveScrollBarGap === true;\n var scrollBarGap = window.innerWidth - document.documentElement.clientWidth;\n\n if (_reserveScrollBarGap && scrollBarGap > 0) {\n previousBodyPaddingRight = document.body.style.paddingRight;\n document.body.style.paddingRight = scrollBarGap + 'px';\n }\n }\n\n // If previousBodyOverflowSetting is already set, don't set it again.\n if (previousBodyOverflowSetting === undefined) {\n previousBodyOverflowSetting = document.body.style.overflow;\n document.body.style.overflow = 'hidden';\n }\n};\n\nvar restoreOverflowSetting = function restoreOverflowSetting() {\n if (previousBodyPaddingRight !== undefined) {\n document.body.style.paddingRight = previousBodyPaddingRight;\n\n // Restore previousBodyPaddingRight to undefined so setOverflowHidden knows it\n // can be set again.\n previousBodyPaddingRight = undefined;\n }\n\n if (previousBodyOverflowSetting !== undefined) {\n document.body.style.overflow = previousBodyOverflowSetting;\n\n // Restore previousBodyOverflowSetting to undefined\n // so setOverflowHidden knows it can be set again.\n previousBodyOverflowSetting = undefined;\n }\n};\n\n// https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollHeight#Problems_and_solutions\nvar isTargetElementTotallyScrolled = function isTargetElementTotallyScrolled(targetElement) {\n return targetElement ? targetElement.scrollHeight - targetElement.scrollTop <= targetElement.clientHeight : false;\n};\n\nvar handleScroll = function handleScroll(event, targetElement) {\n var clientY = event.targetTouches[0].clientY - initialClientY;\n\n if (allowTouchMove(event.target)) {\n return false;\n }\n\n if (targetElement && targetElement.scrollTop === 0 && clientY > 0) {\n // element is at the top of its scroll.\n return preventDefault(event);\n }\n\n if (isTargetElementTotallyScrolled(targetElement) && clientY < 0) {\n // element is at the bottom of its scroll.\n return preventDefault(event);\n }\n\n event.stopPropagation();\n return true;\n};\n\nvar disableBodyScroll = function disableBodyScroll(targetElement, options) {\n // targetElement must be provided\n if (!targetElement) {\n // eslint-disable-next-line no-console\n console.error('disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.');\n return;\n }\n\n // disableBodyScroll must not have been called on this targetElement before\n if (locks.some(function (lock) {\n return lock.targetElement === targetElement;\n })) {\n return;\n }\n\n var lock = {\n targetElement: targetElement,\n options: options || {}\n };\n\n locks = [].concat(_toConsumableArray(locks), [lock]);\n\n if (isIosDevice) {\n targetElement.ontouchstart = function (event) {\n if (event.targetTouches.length === 1) {\n // detect single touch.\n initialClientY = event.targetTouches[0].clientY;\n }\n };\n targetElement.ontouchmove = function (event) {\n if (event.targetTouches.length === 1) {\n // detect single touch.\n handleScroll(event, targetElement);\n }\n };\n\n if (!documentListenerAdded) {\n document.addEventListener('touchmove', preventDefault, hasPassiveEvents ? { passive: false } : undefined);\n documentListenerAdded = true;\n }\n } else {\n setOverflowHidden(options);\n }\n};\n\nvar clearAllBodyScrollLocks = function clearAllBodyScrollLocks() {\n if (isIosDevice) {\n // Clear all locks ontouchstart/ontouchmove handlers, and the references.\n locks.forEach(function (lock) {\n lock.targetElement.ontouchstart = null;\n lock.targetElement.ontouchmove = null;\n });\n\n if (documentListenerAdded) {\n document.removeEventListener('touchmove', preventDefault, hasPassiveEvents ? { passive: false } : undefined);\n documentListenerAdded = false;\n }\n\n // Reset initial clientY.\n initialClientY = -1;\n } else {\n restoreOverflowSetting();\n }\n\n locks = [];\n};\n\nvar baseWidgetUrl = 'https://app.ramp.network/';\r\nvar SEND_CRYPTO_SUPPORTED_VERSION = 1;\r\n// It will be evaluated by rollup-plugin-version-injector\r\nvar SDK_VERSION = '4.0.8';\n\nvar PaymentMethodName;\r\n(function (PaymentMethodName) {\r\n PaymentMethodName[\"MANUAL_BANK_TRANSFER\"] = \"MANUAL_BANK_TRANSFER\";\r\n PaymentMethodName[\"AUTO_BANK_TRANSFER\"] = \"AUTO_BANK_TRANSFER\";\r\n PaymentMethodName[\"CARD_PAYMENT\"] = \"CARD_PAYMENT\";\r\n PaymentMethodName[\"APPLE_PAY\"] = \"APPLE_PAY\";\r\n})(PaymentMethodName || (PaymentMethodName = {}));\r\nvar PaymentMethodType;\r\n(function (PaymentMethodType) {\r\n PaymentMethodType[\"SEPA\"] = \"SEPA\";\r\n PaymentMethodType[\"CARD\"] = \"CARD\";\r\n PaymentMethodType[\"APPLEPAY\"] = \"APPLEPAY\";\r\n PaymentMethodType[\"GOOGLEPAY\"] = \"GOOGLEPAY\";\r\n PaymentMethodType[\"PISP\"] = \"PISP\";\r\n PaymentMethodType[\"SOFORT\"] = \"SOFORT\";\r\n PaymentMethodType[\"PIX\"] = \"PIX\";\r\n})(PaymentMethodType || (PaymentMethodType = {}));\r\nvar PurchaseStatus;\r\n(function (PurchaseStatus) {\r\n PurchaseStatus[\"INITIALIZED\"] = \"INITIALIZED\";\r\n PurchaseStatus[\"PAYMENT_STARTED\"] = \"PAYMENT_STARTED\";\r\n PurchaseStatus[\"PAYMENT_IN_PROGRESS\"] = \"PAYMENT_IN_PROGRESS\";\r\n PurchaseStatus[\"PAYMENT_FAILED\"] = \"PAYMENT_FAILED\";\r\n PurchaseStatus[\"PAYMENT_EXECUTED\"] = \"PAYMENT_EXECUTED\";\r\n PurchaseStatus[\"FIAT_RECEIVED\"] = \"FIAT_RECEIVED\";\r\n PurchaseStatus[\"FIAT_SENT\"] = \"FIAT_SENT\";\r\n PurchaseStatus[\"EXPIRED\"] = \"EXPIRED\";\r\n PurchaseStatus[\"CANCELLED\"] = \"CANCELLED\";\r\n PurchaseStatus[\"RELEASING\"] = \"RELEASING\";\r\n PurchaseStatus[\"RELEASED\"] = \"RELEASED\";\r\n})(PurchaseStatus || (PurchaseStatus = {}));\r\nvar EventSeverity;\r\n(function (EventSeverity) {\r\n EventSeverity[\"VERBOSE\"] = \"VERBOSE\";\r\n EventSeverity[\"DEBUG\"] = \"DEBUG\";\r\n EventSeverity[\"INFO\"] = \"INFO\";\r\n EventSeverity[\"WARNING\"] = \"WARNING\";\r\n EventSeverity[\"ERROR\"] = \"ERROR\";\r\n EventSeverity[\"CRITICAL\"] = \"CRITICAL\";\r\n})(EventSeverity || (EventSeverity = {}));\r\nvar WidgetEventTypes;\r\n(function (WidgetEventTypes) {\r\n WidgetEventTypes[\"WIDGET_CLOSE\"] = \"WIDGET_CLOSE\";\r\n WidgetEventTypes[\"WIDGET_CONFIG_DONE\"] = \"WIDGET_CONFIG_DONE\";\r\n WidgetEventTypes[\"WIDGET_CONFIG_FAILED\"] = \"WIDGET_CONFIG_FAILED\";\r\n WidgetEventTypes[\"PURCHASE_CREATED\"] = \"PURCHASE_CREATED\";\r\n WidgetEventTypes[\"OFFRAMP_SALE_CREATED\"] = \"OFFRAMP_SALE_CREATED\";\r\n})(WidgetEventTypes || (WidgetEventTypes = {}));\r\nvar InternalEventTypes;\r\n(function (InternalEventTypes) {\r\n InternalEventTypes[\"WIDGET_CLOSE_REQUEST\"] = \"WIDGET_CLOSE_REQUEST\";\r\n InternalEventTypes[\"WIDGET_CLOSE_REQUEST_CANCELLED\"] = \"WIDGET_CLOSE_REQUEST_CANCELLED\";\r\n InternalEventTypes[\"WIDGET_CLOSE_REQUEST_CONFIRMED\"] = \"WIDGET_CLOSE_REQUEST_CONFIRMED\";\r\n InternalEventTypes[\"REQUEST_CRYPTO_ACCOUNT\"] = \"REQUEST_CRYPTO_ACCOUNT\";\r\n InternalEventTypes[\"SEND_CRYPTO\"] = \"SEND_CRYPTO\";\r\n})(InternalEventTypes || (InternalEventTypes = {}));\r\nvar InternalSdkEventTypes;\r\n(function (InternalSdkEventTypes) {\r\n InternalSdkEventTypes[\"REQUEST_CRYPTO_ACCOUNT_RESULT\"] = \"REQUEST_CRYPTO_ACCOUNT_RESULT\";\r\n InternalSdkEventTypes[\"SEND_CRYPTO_RESULT\"] = \"SEND_CRYPTO_RESULT\";\r\n})(InternalSdkEventTypes || (InternalSdkEventTypes = {}));\n\nfunction getRandomIntString() {\r\n try {\r\n return String(crypto.getRandomValues(new Uint32Array(1))[0]);\r\n }\r\n catch (_a) {\r\n // if `crypto` is not supported, fall back to Math.random\r\n // tslint:disable-next-line:no-magic-numbers\r\n return String(Math.floor(Math.random() * 10000000));\r\n }\r\n}\r\nvar widgetDesktopWidth = 895;\r\nvar widgetDesktopHeight = 590;\r\nvar minWidgetMobileWidth = 320;\r\nvar minWidgetMobileHeight = 667;\r\nfunction normalizeConfigAndLogErrorsOnInvalidFields(config) {\r\n var errors = [];\r\n var configCopy = __assign({}, config);\r\n if (![\r\n 'desktop',\r\n 'mobile',\r\n 'hosted-desktop',\r\n 'hosted-mobile',\r\n 'hosted-auto',\r\n 'auto',\r\n 'embedded-desktop',\r\n 'embedded-mobile',\r\n ].includes(config.variant)) {\r\n configCopy.variant = 'desktop';\r\n errors.push({\r\n fieldName: 'variant',\r\n description: 'Invalid value for `variant` config field ',\r\n exampleValue: \"'desktop'\",\r\n severity: EventSeverity.WARNING,\r\n });\r\n }\r\n if (config.variant === 'embedded-desktop' || config.variant === 'embedded-mobile') {\r\n validateContainerNode(config.containerNode, config.variant);\r\n }\r\n if (!['embedded-desktop', 'embedded-mobile'].includes(configCopy.variant)) {\r\n delete configCopy.containerNode;\r\n }\r\n if (typeof config.useSendCryptoCallback !== 'undefined') {\r\n delete config.useSendCryptoCallback;\r\n }\r\n logErrors(errors);\r\n return configCopy;\r\n}\r\nfunction logErrors(errors) {\r\n if (!errors.length) {\r\n return;\r\n }\r\n // tslint:disable:no-console\r\n console.group('Config errors');\r\n errors.forEach(function (error) {\r\n console.group(error.fieldName);\r\n console.log(error.description);\r\n console.log(\"Example expected value: \".concat(error.exampleValue));\r\n console.log(\"Severity: \".concat(error.severity));\r\n console.groupEnd();\r\n });\r\n console.groupEnd();\r\n // tslint:enable:no-console\r\n}\r\nfunction initEventListenersDict() {\r\n var widgetEventTypes = Array.from(Object.values(WidgetEventTypes));\r\n var internalEventTypes = Array.from(Object.values(InternalEventTypes));\r\n return __spreadArray(__spreadArray([], widgetEventTypes, true), internalEventTypes, true).reduce(function (listenersDict, eventType) {\r\n listenersDict[eventType] = [];\r\n return listenersDict;\r\n }, {});\r\n}\r\nfunction determineWidgetVariant(config) {\r\n var _a;\r\n var mediaQuery = '(min-width: 920px) and (min-height: 630px)';\r\n var variant = (_a = config.variant) === null || _a === void 0 ? void 0 : _a.toLocaleLowerCase();\r\n if (variant === 'mobile' ||\r\n variant === 'desktop' ||\r\n variant === 'hosted-mobile' ||\r\n variant === 'hosted-desktop' ||\r\n variant === 'embedded-desktop' ||\r\n variant === 'embedded-mobile') {\r\n return variant;\r\n }\r\n var isDesktop = window.matchMedia(mediaQuery).matches;\r\n if (variant === 'hosted-auto') {\r\n return isDesktop ? 'hosted-desktop' : 'hosted-mobile';\r\n }\r\n return isDesktop ? 'desktop' : 'mobile';\r\n}\r\nfunction isHtmlElement(element) {\r\n return typeof element.blur === 'function';\r\n}\r\nfunction validateContainerNode(containerNode, variant) {\r\n if (!document.body) {\r\n throw new Error(\"Couldn't find
element.\");\r\n }\r\n if (!(containerNode instanceof HTMLElement)) {\r\n throw new Error('Container node has to be a proper HTML element.');\r\n }\r\n if (!document.body.contains(containerNode)) {\r\n throw new Error('Container node must be attached to the document.');\r\n }\r\n var _a = containerNode.getBoundingClientRect(), width = _a.width, height = _a.height;\r\n if (variant === 'embedded-desktop') {\r\n if (width + 1 < widgetDesktopWidth) {\r\n throw new Error(\"Container node must be at least \".concat(widgetDesktopWidth, \"px wide.\"));\r\n }\r\n if (height + 1 < widgetDesktopHeight) {\r\n throw new Error(\"Container node must be at least \".concat(widgetDesktopHeight, \"px tall.\"));\r\n }\r\n }\r\n else if (variant === 'embedded-mobile') {\r\n if (width + 1 < minWidgetMobileWidth) {\r\n throw new Error(\"Container node must be at least \".concat(minWidgetMobileWidth, \"px wide.\"));\r\n }\r\n if (height + 1 < minWidgetMobileHeight) {\r\n throw new Error(\"Container node must be at least \".concat(minWidgetMobileHeight, \"px tall.\"));\r\n }\r\n }\r\n}\n\nfunction getBaseUrl(config) {\r\n return new URL(config.url || baseWidgetUrl);\r\n}\r\nfunction initWidgetIframeUrl(config) {\r\n var baseUrl = getBaseUrl(config);\r\n var hostUrl = window.location.origin;\r\n config.containerNode; config.url; var configWithoutIframeUrl = __rest(config, [\"containerNode\", \"url\"]);\r\n var preparedConfig = __assign(__assign({}, configWithoutIframeUrl), { hostUrl: hostUrl });\r\n Object.entries(preparedConfig).forEach(function (_a) {\r\n var key = _a[0], value = _a[1];\r\n if (value) {\r\n baseUrl.searchParams.append(key, Array.isArray(value) ? value.join(',') : value.toString());\r\n }\r\n });\r\n return baseUrl.toString();\r\n}\r\nfunction hideWebsiteBelow(parent, containerWidth) {\r\n var backgroundWebsiteHider = document.createElement('div');\r\n backgroundWebsiteHider.classList.add('background-hider');\r\n if (containerWidth) {\r\n backgroundWebsiteHider.style.maxWidth = \"\".concat(containerWidth, \"px\");\r\n }\r\n parent.appendChild(backgroundWebsiteHider);\r\n}\r\nfunction initDOMNodeWithOverlay(url, dispatch, config) {\r\n var body = document.querySelector('body');\r\n var shadowHost = document.createElement('div');\r\n shadowHost.style.width = '100%';\r\n shadowHost.style.height = '100%';\r\n var shadow = shadowHost.attachShadow({ mode: 'open' });\r\n shadow.appendChild(getStylesForShadowDom(config.variant));\r\n var iframe = prepareIframeNode(url, config.variant);\r\n var overlay = prepareOverlayNode(iframe, dispatch);\r\n overlay.appendChild(iframe);\r\n shadow.appendChild(overlay);\r\n return {\r\n body: body,\r\n iframe: iframe,\r\n overlay: overlay,\r\n shadow: shadow,\r\n shadowHost: shadowHost,\r\n };\r\n}\r\nfunction initDOMNodeWithoutOverlay(url, _dispatch, config) {\r\n var body = document.querySelector('body');\r\n var shadowHost = document.createElement('div');\r\n shadowHost.style.width = '100%';\r\n shadowHost.style.height = '100%';\r\n var shadow = shadowHost.attachShadow({ mode: 'open' });\r\n var container = document.createElement('div');\r\n container.classList.add('embedded-container');\r\n shadow.appendChild(container);\r\n var loader = document.createElement('div');\r\n loader.classList.add('loader-container');\r\n // tslint:disable:max-line-length\r\n loader.innerHTML = \"\\n \";\r\n // tslint:enable:max-line-length\r\n container.appendChild(loader);\r\n shadow.appendChild(getStylesForShadowDom(config.variant));\r\n var iframe = prepareIframeNode(url, config.variant, config.containerNode);\r\n container.appendChild(iframe);\r\n return {\r\n body: body,\r\n iframe: iframe,\r\n overlay: null,\r\n shadow: shadow,\r\n shadowHost: shadowHost,\r\n };\r\n}\r\nfunction importFonts() {\r\n if (document.querySelector('[data-ramp-font]')) {\r\n return;\r\n }\r\n var font = document.createElement('link');\r\n font.setAttribute('href', 'https://fonts.googleapis.com/css?family=Poppins:200,400,500,600,700&display=swap&subset=latin-ext');\r\n font.setAttribute('rel', 'stylesheet');\r\n font.setAttribute('data-ramp-font', '');\r\n document.head.appendChild(font);\r\n}\r\nfunction prepareIframeNode(url, variant, containerNode) {\r\n var iframe = document.createElement('iframe');\r\n iframe.setAttribute('src', url);\r\n iframe.setAttribute('credentialless', 'credentialless');\r\n if (containerNode) {\r\n iframe.setAttribute('width', variant === 'desktop' || variant === 'embedded-desktop'\r\n ? widgetDesktopWidth.toString()\r\n : containerNode.getBoundingClientRect().width.toString());\r\n iframe.setAttribute('height', variant === 'desktop' || variant === 'embedded-desktop'\r\n ? widgetDesktopHeight.toString()\r\n : containerNode.getBoundingClientRect().height.toString());\r\n }\r\n else {\r\n iframe.setAttribute('width', variant === 'desktop' || variant === 'embedded-desktop'\r\n ? widgetDesktopWidth.toString()\r\n : window.innerWidth.toString());\r\n iframe.setAttribute('height', variant === 'desktop' || variant === 'embedded-desktop'\r\n ? widgetDesktopHeight.toString()\r\n : window.innerHeight.toString());\r\n }\r\n iframe.setAttribute('allow', 'payment; microphone; camera; clipboard-read; clipboard-write');\r\n iframe.classList.add('iframe');\r\n return iframe;\r\n}\r\nfunction prepareOverlayNode(iframe, dispatch) {\r\n var overlay = document.createElement('div');\r\n overlay.classList.add('overlay');\r\n var loader = document.createElement('div');\r\n loader.classList.add('loader-container');\r\n // tslint:disable:max-line-length\r\n loader.innerHTML = \"\\n \";\r\n // tslint:enable:max-line-length\r\n overlay.appendChild(loader);\r\n overlay.addEventListener('click', function (event) {\r\n if (event.target !== iframe && !overlay.querySelectorAll('.close-modal').length) {\r\n dispatch({\r\n type: InternalEventTypes.WIDGET_CLOSE_REQUEST,\r\n payload: null,\r\n internal: true,\r\n });\r\n }\r\n });\r\n return overlay;\r\n}\r\nfunction areUrlsEqual(url0, url1) {\r\n return new URL(url0).toString() === new URL(url1).toString();\r\n}\r\nfunction isCloseModalAlreadyOpen(containerNode) {\r\n return containerNode.querySelectorAll('.close-modal').length !== 0;\r\n}\r\nfunction prepareCloseModalNode(dispatch) {\r\n var container = document.createElement('div');\r\n container.classList.add('close-modal');\r\n var textEl = document.createElement('div');\r\n textEl.classList.add('close-modal__text');\r\n textEl.textContent = 'Are you sure you want to exit Ramp Network and abandon the transaction?';\r\n var buttonContainer = document.createElement('div');\r\n buttonContainer.classList.add('close-modal__button-container');\r\n var cancelButton = document.createElement('button');\r\n cancelButton.setAttribute('type', 'button');\r\n cancelButton.classList.add('close-modal__button');\r\n cancelButton.classList.add('close-modal__button--cancel');\r\n cancelButton.textContent = 'Cancel';\r\n cancelButton.addEventListener('click', function (event) {\r\n event.stopPropagation();\r\n dispatch({\r\n type: InternalEventTypes.WIDGET_CLOSE_REQUEST_CANCELLED,\r\n payload: null,\r\n internal: true,\r\n });\r\n });\r\n var exitButton = document.createElement('button');\r\n exitButton.setAttribute('type', 'button');\r\n exitButton.classList.add('close-modal__button');\r\n exitButton.classList.add('close-modal__button--exit');\r\n exitButton.textContent = 'Exit';\r\n exitButton.addEventListener('click', function (event) {\r\n event.stopPropagation();\r\n dispatch({\r\n type: InternalEventTypes.WIDGET_CLOSE_REQUEST_CONFIRMED,\r\n payload: null,\r\n internal: true,\r\n });\r\n });\r\n buttonContainer.appendChild(cancelButton);\r\n buttonContainer.appendChild(exitButton);\r\n container.appendChild(textEl);\r\n container.appendChild(buttonContainer);\r\n return container;\r\n}\r\nfunction getStylesForShadowDom(variant) {\r\n var styles = document.createElement('style');\r\n var isMobile = variant === 'mobile' ||\r\n variant === 'hosted-mobile' ||\r\n variant === 'embedded-mobile' ||\r\n variant === 'webview-mobile';\r\n var isEmbedded = variant === 'embedded-mobile' || variant === 'embedded-desktop';\r\n styles.textContent = \"\\n\\n .background-hider {\\n content: '';\\n height: 30vh;\\n width: 100vw;\\n position: fixed;\\n bottom: 0;\\n transform: translateY(50%);\\n background-color: #f5f8fb;\\n z-index: 999;\\n }\\n\\n .overlay {\\n position: fixed;\\n z-index: 1000;\\n width: 100vw;\\n height: \".concat(isMobile ? '100%;' : '100vh;', \"\\n top: 0;\\n left: 0;\\n overflow: hidden;\\n background-color: rgba(166, 174, 185, 0.7);\\n display: flex;\\n flex-flow: row nowrap;\\n justify-content: center;\\n \").concat(isMobile ? 'align-items: flex-start;' : 'align-items: center;', \"\\n }\\n\\n .embedded-container {\\n z-index: 1000;\\n position: relative;\\n width: 100%;\\n height: 100%;\\n display: flex;\\n flex-flow: row nowrap;\\n justify-content: center;\\n \").concat(isMobile ? 'align-items: flex-start;' : 'align-items: center;', \"\\n min-width: \").concat(isMobile ? minWidgetMobileWidth : widgetDesktopWidth, \"px;\\n min-height: \").concat(isMobile ? minWidgetMobileHeight : widgetDesktopHeight, \"px;\\n }\\n\\n .loader-container {\\n align-self: center;\\n }\\n\\n .loader {\\n transform-origin: center;\\n animation: logoAnimation 4s linear infinite;\\n width: 100px;\\n height: auto;\\n align-self: center;\\n }\\n\\n .loader path:nth-child(3) {\\n transform-origin: center;\\n position: relative;\\n }\\n\\n .loader path:nth-child(1) {\\n transform-origin: center;\\n position: relative;\\n animation: box1Animation 4s linear infinite;\\n transform: scale(0.4) translateX(6px);\\n }\\n\\n .loader path:nth-child(2) {\\n transform-origin: center;\\n position: relative;\\n animation: box4Animation 4s linear infinite;\\n transform: scale(0.4) translateX(-6px);\\n }\\n\\n @keyframes logoAnimation {\\n 10% {\\n transform: rotate(180deg);\\n }\\n 30%{\\n transform: rotate(360deg);\\n }\\n 70% {\\n transform: rotate(360deg);\\n }\\n 90% {\\n transform: rotate(520deg);\\n }\\n 100% {\\n transform: rotate(720deg);\\n }\\n }\\n\\n @keyframes box1Animation {\\n 0%, 10% {\\n transform: scale(0.4) translateX(6px);\\n }\\n 30%, 70% {\\n transform: scale(1) translateX(0);\\n }\\n 90% {\\n transform: scale(0.4) translateX(6px);\\n }\\n }\\n\\n\\n @keyframes box4Animation {\\n 0%, 10% {\\n transform: scale(0.4) translateX(-6px);\\n }\\n 30%, 70% {\\n transform: scale(1) translateX(0);\\n }\\n 90% {\\n transform: scale(0.4) translateX(-6px);\\n }\\n }\\n\\n .iframe {\\n border: none;\\n user-select: none;\\n visibility: hidden;\\n position: absolute;\\n color-scheme: only light;\\n }\\n\\n .iframe.visible {\\n visibility: visible;\\n \").concat(!isEmbedded && isMobile\r\n ? \"\\n width: 100vw;\\n height: 100%;\\n \"\r\n : '', \"\\n }\\n\\n .close-modal {\\n font-family: 'Poppins', sans-serif;\\n width: 678px;\\n height: 276px;\\n position: absolute;\\n left: 50%;\\n top: 50%;\\n transform: translate(-50%, -50%);\\n z-index: 9999;\\n box-shadow: 0px 54px 200px rgba(36, 37, 57, 0.2);\\n display: flex;\\n flex-flow: column nowrap;\\n justify-content: flex-start;\\n align-items: center;\\n padding: 35px;\\n border-radius: 8px;\\n background: #fff;\\n\\n box-sizing: border-box;\\n }\\n\\n .close-modal * {\\n box-sizing: border-box;\\n }\\n\\n .close-modal__text {\\n margin: 40px auto 30px;\\n font-weight: 600;\\n font-size: 24px;\\n line-height: 36px;\\n text-align: center;\\n\\n color: #242539;\\n }\\n\\n .close-modal__button-container {\\n width: 318px;\\n display: flex;\\n flex-flow: row nowrap;\\n justify-content: space-between;\\n align-items: center;\\n }\\n\\n .close-modal__button {\\n background: #fff;\\n border: 2px solid #EDEEF3;\\n border-radius: 74px;\\n width: 152px;\\n height: 56px;\\n cursor: pointer;\\n font-weight: 600;\\n font-size: 14px;\\n line-height: 21px;\\n color: #2B2D56;\\n text-transform: uppercase;\\n }\\n\\n .close-modal__button--exit {\\n background: #DD3E56;\\n box-shadow: 0px 8px 34px rgba(221, 62, 86, 0.4);\\n color: #fff;\\n border-color: transparent;\\n }\\n \");\r\n return styles;\r\n}\n\nvar RampInstantSDK = /** @class */ (function () {\r\n function RampInstantSDK(config) {\r\n this._listeners = initEventListenersDict();\r\n this._isVisible = false;\r\n this._onSendCryptoCallback = undefined;\r\n importFonts();\r\n this.unsubscribe = this.unsubscribe.bind(this);\r\n this.on = this.on.bind(this);\r\n this.show = this.show.bind(this);\r\n this._handleEscapeClick = this._handleEscapeClick.bind(this);\r\n this._dispatchEvent = this._dispatchEvent.bind(this);\r\n this._subscribeToWidgetEvents = this._subscribeToWidgetEvents.bind(this);\r\n this._on = this._on.bind(this);\r\n this._registerSdkEventHandlers = this._registerSdkEventHandlers.bind(this);\r\n this._subscribeToWidgetEvents = this._subscribeToWidgetEvents.bind(this);\r\n this._onSendCrypto = this._onSendCrypto.bind(this);\r\n this._rawNormalizedConfig = normalizeConfigAndLogErrorsOnInvalidFields(__assign({ variant: 'desktop' }, config));\r\n this._config = __assign(__assign({}, this._rawNormalizedConfig), this._getHostConfigSdkParams(this._rawNormalizedConfig, config.useSendCryptoCallback));\r\n }\r\n RampInstantSDK.prototype.show = function () {\r\n if (this._isVisible) {\r\n throw new Error('Widget is already visible - you can only call this once per instance');\r\n }\r\n if (document.activeElement && isHtmlElement(document.activeElement)) {\r\n document.activeElement.blur();\r\n }\r\n this._registerSdkEventHandlers();\r\n window.addEventListener('message', this._subscribeToWidgetEvents);\r\n if (this._isConfiguredAsHosted()) {\r\n this._showUsingHostedMode();\r\n }\r\n else if (this._isConfiguredAsEmbedded()) {\r\n this._showUsingEmbeddedMode();\r\n }\r\n else if (this._isConfiguredWithOverlay()) {\r\n this._showUsingOverlayMode();\r\n }\r\n window.addEventListener('keydown', this._handleEscapeClick, true);\r\n return this;\r\n };\r\n RampInstantSDK.prototype.on = function (type, callback) {\r\n this._on(type, callback, false);\r\n return this;\r\n };\r\n RampInstantSDK.prototype.unsubscribe = function (type, callback) {\r\n var _this = this;\r\n if (type === '*') {\r\n var allTypes = Object.entries(this._listeners);\r\n allTypes.forEach(function (_a) {\r\n var key = _a[0], eventHandlers = _a[1];\r\n var filteredHandlers = eventHandlers.filter(function (l) { return l.callback !== callback; });\r\n _this._listeners[key] = filteredHandlers;\r\n });\r\n }\r\n else {\r\n this._listeners[type] = this._listeners[type].filter(function (l) { return l.callback !== callback; });\r\n }\r\n return this;\r\n };\r\n RampInstantSDK.prototype._on = function (type, callback, internal) {\r\n if (type !== '*' && !this._listeners[type]) {\r\n // tslint:disable-next-line:no-console\r\n console.warn(\"Unknown / unsupported event name - '\".concat(type, \"'. This listener will have no effect.\"));\r\n }\r\n if (type === '*') {\r\n var allTypes = Object.values(this._listeners);\r\n allTypes.forEach(function (eventHandlers) { return eventHandlers.push({ callback: callback, internal: internal }); });\r\n }\r\n else {\r\n this._listeners[type].push({ callback: callback, internal: internal });\r\n }\r\n };\r\n RampInstantSDK.prototype.close = function () {\r\n this._dispatchEvent({\r\n type: WidgetEventTypes.WIDGET_CLOSE,\r\n payload: null,\r\n widgetInstanceId: this._config.widgetInstanceId,\r\n });\r\n return this;\r\n };\r\n RampInstantSDK.prototype.onSendCrypto = function (callback) {\r\n this._onSendCryptoCallback = callback;\r\n return this;\r\n };\r\n RampInstantSDK.prototype.onRequestCryptoAccount = function (callback) {\r\n var _this = this;\r\n var onRequestCryptoAccount = function (event) { return __awaiter(_this, void 0, void 0, function () {\r\n var result, e_1, errorMessage;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n _a.trys.push([0, 2, , 3]);\r\n return [4 /*yield*/, callback(event.payload.type, event.payload.assetSymbol)];\r\n case 1:\r\n result = _a.sent();\r\n if (!result.address) {\r\n throw new Error('Missing address in the callback result');\r\n }\r\n return [3 /*break*/, 3];\r\n case 2:\r\n e_1 = _a.sent();\r\n errorMessage = void 0;\r\n if (typeof e_1 === 'string') {\r\n errorMessage = e_1;\r\n }\r\n else if (e_1 instanceof Error) {\r\n errorMessage = e_1.message;\r\n }\r\n this._sendEventToWidget({\r\n type: InternalSdkEventTypes.REQUEST_CRYPTO_ACCOUNT_RESULT,\r\n payload: {\r\n error: errorMessage,\r\n },\r\n });\r\n return [2 /*return*/];\r\n case 3:\r\n this._sendEventToWidget({\r\n type: InternalSdkEventTypes.REQUEST_CRYPTO_ACCOUNT_RESULT,\r\n payload: {\r\n address: result.address,\r\n type: result.type,\r\n name: result.name,\r\n assetSymbol: result.assetSymbol,\r\n },\r\n });\r\n return [2 /*return*/];\r\n }\r\n });\r\n }); };\r\n this._on(InternalEventTypes.REQUEST_CRYPTO_ACCOUNT, onRequestCryptoAccount, true);\r\n return this;\r\n };\r\n RampInstantSDK.prototype._subscribeToWidgetEvents = function (event) {\r\n if (!event.data) {\r\n return;\r\n }\r\n if (!areUrlsEqual(event.origin, getBaseUrl(this._config).origin)) {\r\n return;\r\n }\r\n var eventData = event.data;\r\n if (!eventData.widgetInstanceId ||\r\n eventData.widgetInstanceId !== this._config.widgetInstanceId) {\r\n return;\r\n }\r\n this._dispatchEvent(eventData);\r\n };\r\n RampInstantSDK.prototype._registerSdkEventHandlers = function () {\r\n var _this = this;\r\n this._on(WidgetEventTypes.WIDGET_CLOSE, function (_event) {\r\n var _a, _b;\r\n if (_this._isConfiguredAsHosted()) {\r\n try {\r\n (_a = _this.widgetWindow) === null || _a === void 0 ? void 0 : _a.close();\r\n }\r\n catch (e) {\r\n throw new Error('Could not close the widget window');\r\n }\r\n }\r\n else {\r\n (_b = _this.domNodes) === null || _b === void 0 ? void 0 : _b.shadowHost.remove();\r\n clearAllBodyScrollLocks();\r\n }\r\n _this._teardownEventSubscriptions();\r\n }, true);\r\n var onConfigEvent = function () {\r\n var _a, _b;\r\n if (_this._isConfiguredAsHosted()) {\r\n return;\r\n }\r\n (_a = _this.domNodes) === null || _a === void 0 ? void 0 : _a.iframe.classList.add('visible');\r\n var loader = (_b = _this.domNodes) === null || _b === void 0 ? void 0 : _b.shadow.querySelector('.loader-container');\r\n if (loader) {\r\n loader.remove();\r\n }\r\n };\r\n if (this._config.useSendCryptoCallbackVersion) {\r\n this.on(InternalEventTypes.SEND_CRYPTO, this._onSendCrypto);\r\n }\r\n this._on(WidgetEventTypes.WIDGET_CONFIG_DONE, onConfigEvent, true);\r\n this._on(WidgetEventTypes.WIDGET_CONFIG_FAILED, onConfigEvent, true);\r\n this._on(InternalEventTypes.WIDGET_CLOSE_REQUEST, function (_event) {\r\n if (_this._isConfiguredAsHosted() || _this._isConfiguredAsEmbedded()) {\r\n return;\r\n }\r\n if (_this._config.variant === 'mobile' || isCloseModalAlreadyOpen(_this.domNodes.overlay)) {\r\n return;\r\n }\r\n _this.domNodes.overlay.appendChild(prepareCloseModalNode(_this._dispatchEvent));\r\n }, true);\r\n this._on(InternalEventTypes.WIDGET_CLOSE_REQUEST_CONFIRMED, function (_event) {\r\n _this._dispatchEvent({\r\n type: WidgetEventTypes.WIDGET_CLOSE,\r\n payload: null,\r\n widgetInstanceId: _this._config.widgetInstanceId,\r\n });\r\n }, true);\r\n this._on(InternalEventTypes.WIDGET_CLOSE_REQUEST_CANCELLED, function (_event) {\r\n if (_this._isConfiguredAsHosted() || _this._isConfiguredAsEmbedded()) {\r\n return;\r\n }\r\n var modal = _this.domNodes.overlay.querySelector('.close-modal');\r\n if (modal) {\r\n modal.remove();\r\n }\r\n }, true);\r\n };\r\n RampInstantSDK.prototype._sendEventToWidget = function (event) {\r\n var _a, _b, _c;\r\n if (!this._isVisible) {\r\n throw new Error(\"Widget is not visible couldn't send the event\");\r\n }\r\n try {\r\n (_c = ((_a = this.widgetWindow) !== null && _a !== void 0 ? _a : (_b = this.domNodes) === null || _b === void 0 ? void 0 : _b.iframe.contentWindow)) === null || _c === void 0 ? void 0 : _c.postMessage(event, getBaseUrl(this._config).origin);\r\n // tslint:disable-next-line:no-empty\r\n }\r\n catch (_d) { }\r\n };\r\n RampInstantSDK.prototype._dispatchEvent = function (event) {\r\n var type = event.type;\r\n this._listeners[type].forEach(function (handler) { return handler.callback(event); });\r\n };\r\n RampInstantSDK.prototype._handleEscapeClick = function (event) {\r\n var escKeyCode = 27;\r\n if (event.key === 'Escape' || event.key === 'Esc' || event.keyCode === escKeyCode) {\r\n this._dispatchEvent({\r\n type: InternalEventTypes.WIDGET_CLOSE_REQUEST,\r\n payload: null,\r\n internal: true,\r\n });\r\n }\r\n };\r\n RampInstantSDK.prototype._onSendCrypto = function (event) {\r\n var _a;\r\n return __awaiter(this, void 0, void 0, function () {\r\n var result, e_2, errorMessage;\r\n return __generator(this, function (_b) {\r\n switch (_b.label) {\r\n case 0:\r\n if (event.eventVersion !== SEND_CRYPTO_SUPPORTED_VERSION) {\r\n // tslint:disable-next-line:no-console\r\n console.warn(\"unsupported event version - '\".concat(event, \"'. This listener will have no effect.\"));\r\n return [2 /*return*/];\r\n }\r\n _b.label = 1;\r\n case 1:\r\n _b.trys.push([1, 3, , 4]);\r\n return [4 /*yield*/, ((_a = this._onSendCryptoCallback) === null || _a === void 0 ? void 0 : _a.call(this, event.payload.assetInfo, event.payload.amount, event.payload.address))];\r\n case 2:\r\n result = _b.sent();\r\n if (!(result === null || result === void 0 ? void 0 : result.txHash)) {\r\n throw new Error('Missing txHash in the callback result');\r\n }\r\n return [3 /*break*/, 4];\r\n case 3:\r\n e_2 = _b.sent();\r\n errorMessage = void 0;\r\n if (typeof e_2 === 'string') {\r\n errorMessage = e_2;\r\n }\r\n else if (e_2 instanceof Error) {\r\n errorMessage = e_2.message;\r\n }\r\n this._sendEventToWidget({\r\n eventVersion: SEND_CRYPTO_SUPPORTED_VERSION,\r\n type: InternalSdkEventTypes.SEND_CRYPTO_RESULT,\r\n payload: {\r\n error: errorMessage,\r\n },\r\n });\r\n return [2 /*return*/];\r\n case 4:\r\n this._sendEventToWidget({\r\n eventVersion: SEND_CRYPTO_SUPPORTED_VERSION,\r\n type: InternalSdkEventTypes.SEND_CRYPTO_RESULT,\r\n payload: {\r\n txHash: result.txHash,\r\n },\r\n });\r\n return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n // Event subscriptions aren't cleared so that host can receive a PAYMENT_SUCCESSFUL event\r\n // even after the widget has been closed\r\n RampInstantSDK.prototype._teardownEventSubscriptions = function () {\r\n window.removeEventListener('keydown', this._handleEscapeClick, true);\r\n window.removeEventListener('message', this._subscribeToWidgetEvents);\r\n };\r\n RampInstantSDK.prototype._showUsingEmbeddedMode = function () {\r\n var _a, _b;\r\n var widgetUrl = initWidgetIframeUrl(this._config);\r\n this.domNodes = initDOMNodeWithoutOverlay(widgetUrl, this._dispatchEvent, this._config);\r\n if (!((_a = this.domNodes) === null || _a === void 0 ? void 0 : _a.body)) {\r\n throw new Error(\"Couldn't find element.\");\r\n }\r\n (_b = this._config.containerNode) === null || _b === void 0 ? void 0 : _b.appendChild(this.domNodes.shadowHost);\r\n this._isVisible = true;\r\n };\r\n RampInstantSDK.prototype._showUsingOverlayMode = function () {\r\n var _a;\r\n var widgetUrl = initWidgetIframeUrl(this._config);\r\n this.domNodes = initDOMNodeWithOverlay(widgetUrl, this._dispatchEvent, this._config);\r\n if (!((_a = this.domNodes) === null || _a === void 0 ? void 0 : _a.body)) {\r\n throw new Error(\"Couldn't find element.\");\r\n }\r\n this.domNodes.body.appendChild(this.domNodes.shadowHost);\r\n this._isVisible = true;\r\n disableBodyScroll(this.domNodes.iframe);\r\n var widgetMode = determineWidgetVariant(this._config);\r\n if (widgetMode !== 'desktop' && widgetMode !== 'embedded-desktop') {\r\n hideWebsiteBelow(this.domNodes.shadow);\r\n }\r\n };\r\n RampInstantSDK.prototype._showUsingHostedMode = function () {\r\n var _a;\r\n var widgetUrl = initWidgetIframeUrl(this._config);\r\n this.widgetWindow = (_a = window.open(widgetUrl)) !== null && _a !== void 0 ? _a : undefined;\r\n };\r\n RampInstantSDK.prototype._isConfiguredWithOverlay = function () {\r\n return ['desktop', 'mobile'].includes(this._config.variant);\r\n };\r\n RampInstantSDK.prototype._isConfiguredAsHosted = function () {\r\n return ['hosted-desktop', 'hosted-mobile'].includes(this._config.variant);\r\n };\r\n RampInstantSDK.prototype._isConfiguredAsEmbedded = function () {\r\n return ['embedded-desktop', 'embedded-mobile'].includes(this._rawNormalizedConfig.variant);\r\n };\r\n RampInstantSDK.prototype._getHostConfigSdkParams = function (config, useSendCryptoCallback) {\r\n var widgetVariant = determineWidgetVariant(config);\r\n return __assign({ sdkType: 'WEB', sdkVersion: SDK_VERSION, variant: widgetVariant, widgetInstanceId: getRandomIntString() }, (useSendCryptoCallback\r\n ? { useSendCryptoCallbackVersion: SEND_CRYPTO_SUPPORTED_VERSION }\r\n : {}));\r\n };\r\n return RampInstantSDK;\r\n}());\n\nexport { WidgetEventTypes as RampInstantEventTypes, RampInstantSDK };\n//# sourceMappingURL=ramp-instant-sdk.es5.js.map\n","'use client';\n\nimport { Box } from '@mantine/core';\nimport { RampInstantSDK } from '@ramp-network/ramp-instant-sdk';\nimport { env } from 'env.mjs';\nimport { useAddress } from 'hooks/useAddress';\nimport { useIsMounted } from 'hooks/useIsMounted';\nimport { useIsMobile } from 'hooks/useMedia';\nimport { useEffect, useRef } from 'react';\n\nexport const Ramp = (): JSX.Element => {\n const containerRef = useRef