function clientToLocal(el, e, out, calculate) {
    out = out || {};

    // According to the W3C Working Draft, offsetX and offsetY should be relative
    // to the padding edge of the target element. The only browser using this convention
    // is IE. Webkit uses the border edge, Opera uses the content edge, and FireFox does
    // not support the properties.
    // (see http://www.jacklmoore.com/notes/mouse-position/)
    // In zr painter.dom, padding edge equals to border edge.

    if (calculate || !env$1.canvasSupported) {
        calculateZrXY(el, e, out);
    }
    // Caution: In FireFox, layerX/layerY Mouse position relative to the closest positioned
    // ancestor element, so we should make sure el is positioned (e.g., not position:static).
    // BTW1, Webkit don't return the same results as FF in non-simple cases (like add
    // zoom-factor, overflow / opacity layers, transforms ...)
    // BTW2, (ev.offsetY || ev.pageY - $(ev.target).offset().top) is not correct in preserve-3d.
    // <https://bugs.jquery.com/ticket/8523#comment:14>
    // BTW3, In ff, offsetX/offsetY is always 0.
    else if (env$1.browser.firefox && e.layerX != null && e.layerX !== e.offsetX) {
        out.zrX = e.layerX;
        out.zrY = e.layerY;
    }
    // For IE6+, chrome, safari, opera. (When will ff support offsetX?)
    else if (e.offsetX != null) {
        out.zrX = e.offsetX;
        out.zrY = e.offsetY;
    }
    // For some other device, e.g., IOS safari.
    else {
        calculateZrXY(el, e, out);
    }

    return out;
}
Get the `zrX` and `zrY`, which are relative to the top-left of
the input `el`.
CSS transform (2D & 3D) is supported.

The strategy to fetch the coords:
+ If `calculate` is not set as `true`, users of this method should
ensure that `el` is the same or the same size & location as `e.target`.
Otherwise the result coords are probably not expected. Because we
firstly try to get coords from e.offsetX/e.offsetY.
+ If `calculate` is set as `true`, the input `el` can be any element
and we force to calculate the coords based on `el`.
+ The input `el` should be positionable (not position:static).

The force `calculate` can be used in case like:
When mousemove event triggered on ec tooltip, `e.target` is not `el`(zr painter.dom).

@param {HTMLElement} el DOM element.
@param {Event} e Mouse event or touch event.
@param {Object} out Get `out.zrX` and `out.zrY` as the result.
@param {boolean} [calculate=false] Whether to force calculate
       the coordinates but not use ones provided by browser.