) => {
        window.parent.postMessage(msg.data.data, '*')
      })

      const sendMessage = (method, params, delay = 0) => {
        setTimeout(() => {
          window.parent.postMessage(
            {
              id: 'id',
              method,
              params,
              env: { sdkVersion: 'sdkVersion' },
            },
            '*',
          )
        }, delay)
      }

      window.onload = function () {
        const path = window.location.pathname
        switch (path.split('/')[1]