function isValidUrl(str) {
  const reg = /^((https|http|ftp|rtsp|mms)?:\/\/)(([A-Za-z0-9]+-[A-Za-z0-9]+|[A-Za-z0-9]+)\.)+([A-Za-z]{2,6})(:\d+)?(\/.*)?(\?.*)?(#.*)?$/;
  return reg.test(str);
}

function openNewWindow(url) {
  window.open(url);
}

const $ = go.GraphObject.make;

let editable = false;

const diagramWrapperDom = document.getElementById('myDiagramDiv');
const editButton = document.getElementById('editbtn');
const tipsDom = document.getElementById('tips');
