(function (global) {
  global.ARQ = global.ARQ || {};
  ARQ.config = {
    apiUrl: function (action, query) {
      var u = '../index.php?action=' + encodeURIComponent(action);
      if (query && typeof query === 'object') {
        Object.keys(query).forEach(function (k) {
          u += '&' + encodeURIComponent(k) + '=' + encodeURIComponent(String(query[k]));
        });
      }
      return u;
    },
    version: '1.0.0',
  };
})(typeof window !== 'undefined' ? window : this);
