dataURLToObjectURL = dataurl => {
  if (
    typeof Uint8Array === 'undefined' ||
    typeof Blob === 'undefined' ||
    typeof URL === 'undefined' ||
    !URL.createObjectURL
  ) {
    return ''
  }
  const arr = dataurl.split(',')
  const mime = arr[0].match(/:(.*?);/)[1]
  const bstr = atob(arr[1])
  /*
  const [prefix, suffix] = dataurl.split(','),
    {groups: {mime}} = prefix.match(/:(?<mime>.*?);/),
    bstr = atob(suffix);
  */
  let n = bstr.length
  const u8arr = new Uint8Array(n)
  while (n--) {
    u8arr[n] = bstr.charCodeAt(n)
  }
  const blob = new Blob([u8arr], { type: mime })
  return URL.createObjectURL(blob)
}
Convert dataURL to object URL.
@function module:utilities.dataURLToObjectURL
@param {string} dataurl
@returns {string} object URL or empty string