HELPERS // return source bbox
433583
function getSourceBBox(linkView, opt) {

        // expand by padding box
        if (opt && opt.paddingBox) return linkView.sourceBBox.clone().moveAndExpand(opt.paddingBox);

        return linkView.sourceBBox.clone();
    }
387283
function getBox(o) {
    return {
        xMin: o.position.x,
        xMax: o.position.x + o.width,
        yMin: o.position.y,
        yMax: o.position.y + o.height
    };
}
707932
function getHelper() {
    let helper;

    if (editor.isViewer()) {
      helper = vmh;
    } else if (editor.isWysiwygMode()) {
      helper = wmh;
    } else {
      helper = mmh;
    }

    return helper;
  }
1195620
def get_world_bbox(self):
        
        return BBox((-self.POP_WEB_MAX, -self.POP_WEB_MAX, self.POP_WEB_MAX, self.POP_WEB_MAX), crs=CRS.POP_WEB)
419368
private org.geomajas.geometry.Bbox toBbox(Bbox bounds) {
		return new org.geomajas.geometry.Bbox(bounds.getX(), bounds.getY(), bounds.getWidth(), bounds.getHeight());
	}
422733
function(){
		var rawSource = this.source,
			address = this.address;

		this.source = rawSource.replace(importRegEx, function(whole, part){
			if(isNode) {
				return "@import url(" + part + ")";
			}else{
				return "@import url(" + steal.joinURIs(address, part) + ")";
			}
		});

		if(!loader.isEnv('build')) {
			this.source = this.source + "/*# sourceURL=" + address + " */";
			this.source = this.source.replace(resourceRegEx, function(whole, part){
				return "url(" + steal.joinURIs(address, part) + ")";
			});

		}
		return this.source;
	}
1158448
function(s) {
    try {
        const re = new RegExp(s);
        return re.source;
    } catch (ex) {
        normalizeRegexSource.message = ex.toString();
    }
    return '';
}
442962
function(options, callback) {
        var that = this;
        var data = that._searchInBbox(options.bbox);
        callback(null, data);
    }
611732
def _comp_bbox(el, el2):
    
    # only compare if both elements have x/y coordinates
    if _comp_bbox_keys_required <= set(el.keys()) and \
            _comp_bbox_keys_required <= set(el2.keys()):
        if _box_in_box(el2, el):
            return 1
        if _box_in_box(el, el2):
            return -1
    return 0
1166952
function updateBBox(node) {
    var p1 = node.p;
    var p2 = node.next.p;
    node.minX = Math.min(p1[0], p2[0]);
    node.minY = Math.min(p1[1], p2[1]);
    node.maxX = Math.max(p1[0], p2[0]);
    node.maxY = Math.max(p1[1], p2[1]);
    return node;
}
31064
protected float getYSource(int y, float destTop, float srcTop,
			float heightRatio) {

		float dest = getYEncodedLocation(y, encoding);
		float source = getSource(dest, destTop, srcTop, heightRatio);

		return source;
	}
552378
def decode_bbox_target(box_predictions, anchors):
    
    orig_shape = tf.shape(anchors)
    box_pred_txtytwth = tf.reshape(box_predictions, (-1, 2, 2))
    box_pred_txty, box_pred_twth = tf.split(box_pred_txtytwth, 2, axis=1)
    # each is (...)x1x2
    anchors_x1y1x2y2 = tf.reshape(anchors, (-1, 2, 2))
    anchors_x1y1, anchors_x2y2 = tf.split(anchors_x1y1x2y2, 2, axis=1)

    waha = anchors_x2y2 - anchors_x1y1
    xaya = (anchors_x2y2 + anchors_x1y1) * 0.5

    clip = np.log(config.PREPROC.MAX_SIZE / 16.)
    wbhb = tf.exp(tf.minimum(box_pred_twth, clip)) * waha
    xbyb = box_pred_txty * waha + xaya
    x1y1 = xbyb - wbhb * 0.5
    x2y2 = xbyb + wbhb * 0.5    # (...)x1x2
    out = tf.concat([x1y1, x2y2], axis=-2)
    return tf.reshape(out, orig_shape)
998348
function(kbox, id, app, callback) {

  if (typeof callback === 'undefined' && typeof app === 'function') {
    callback = app;
    app = undefined;
  }

  // Get global config.
  var globalConfig = kbox.core.deps.lookup('globalConfig');

  // List of dirs that we care about.
  var dirs = [
    globalConfig.srcRoot,
    globalConfig.sysPluginRoot,
    globalConfig.userPluginRoot
  ];
  if (app) {
    dirs.push(app.config.appRoot);
  }

  // Each dir could have any of these sub dirs.
  var subDirs = [
    'node_modules',
    'plugins'
  ];

  // Helper function that lodash should be ashamed for not having. :P
  var flattenMap = function(elts, iterator) {
    return _(elts)
    .chain()
    .map(iterator)
    .flatten()
    .value();
  };

  // Map dirs to full list of paths.
  var paths = flattenMap(dirs, function(dir) {
    return _.map(subDirs, function(subDir) {
      return path.join(dir, subDir, id, 'index.js');
    });
  });

  // Filter paths by existance.
  return Promise.filter(paths, fs.existsSync)
  .all()
  // Grabs the last path so that we load things from SRC -> SYS -> USER
  .then(function(paths) {
    return _.last(paths);
  })
  // If a path exists try to require it.
  .then(function(path) {
    if (path) {
      return Promise.try(function() {
        return require(path);
      })
      .catch(function(err) {
        // Decorate the error.
        throw new KboxRequireError(path, err);
      });
    }
  })
  // Return.
  .nodeify(callback);

}
1264741
function envOrSource(env, source) {
    function getKey(keyName) {
        return env[keyName] || source[keyName];
    }
    return getKey;
}
824963
function(bbox) {
        var a = +bbox[0][0], b = +bbox[0][1], c = +bbox[1][0], d = +bbox[1][1];
        return [ Math.min(a, c), Math.min(b, d), Math.max(a, c), Math.max(b, d) ];
    }
1198613
function getSource(fn, altSource) {
    var result = altSource;
    if (isStringable(fn)) {
      result = String(fn);
    } else if (support.decompilation) {
      // escape the `{` for Firefox 1
      result = (/^[^{]+\{([\s\S]*)}\s*$/.exec(fn) || 0)[1];
    }
    return (result || '').replace(/^\s+|\s+$/g, '');
  }
384854
def bbox(self):
        """"""
        if not hasattr(self, '_bbox'):
            data = None
            for key in ('ARTBOARD_DATA1', 'ARTBOARD_DATA2', 'ARTBOARD_DATA3'):
                if key in self.tagged_blocks:
                    data = self.tagged_blocks.get_data(key)
            assert data is not None
            rect = data.get(b'artboardRect')
            self._bbox = (
                int(rect.get(b'Left')),
                int(rect.get(b'Top ')),
                int(rect.get(b'Rght')),
                int(rect.get(b'Btom')),
            )
        return self._bbox