B=null!=t&&x.x>=t.x&&x.x<=t.x+t.width;t=C||null==u&&A;x=y||null==u&&B;if(0!=q||!(t&&x||y&&C)){if(null!=u&&!C&&!y&&(A||B)){l=A?!1:!0;break}if(x||t){l=t;1==q&&(l=0==p.length%2?t:x);break}}t=g;u=f[n];null!=u&&(t=null);x=p[p.length-1];y&&C&&(p=p.slice(1))}l&&(null!=f[0]&&f[0].y!=d.y||null==f[0]&&null!=b&&(d.y<b.y||d.y>b.y+b.height))?c.push(new mxPoint(m.x,d.y)):!l&&(null!=f[0]&&f[0].x!=d.x||null==f[0]&&null!=b&&(d.x<b.x||d.x>b.x+b.width))&&c.push(new mxPoint(d.x,m.y));l?m.y=d.y:m.x=d.x;for(q=0;q<p.length;q++)l=