@function getProxy

@param {object} select
@param {string} property

@returns {function|object|undefined}

@throws {Error}
171536
function getProxy (select, property) {

    debug('property', property)

    // if property is then return a function that executes query calls
    // callbacks with result
    if (property === 'then') {
        // close where context
        closeWhereContext(select)
        // close order context
        closeOrderContext(select)
        // return function that will execute and return query
        return function (resolve, reject) {
            // debug query
            debug('then', select.query)
            // execute query
            return select.model.query(select.query).then(resolve).catch(err => {
                // call reject callback if set
                if (typeof reject === 'function') {
                    reject(err)
                }
                // otherwise return rejection
                else {
                    return Promise.reject(err)
                }
            })
        }
    }

    // if property is query then return function that executes query
    if (property === 'query') {
        // close where context
        closeWhereContext(select)
        // close order context
        closeOrderContext(select)
        // return function that will execute and return query
        return function (args) {
            // if args is set then merge args into query
            if (args) {
                _.merge(select.query, args)
            }
            // debug query
            debug('query', select.query)
            // execute query
            return select.model.query(select.query)
        }
    }

    // if property is views return function that gets names of views
    // then executes query
    if (property === 'view') {
        // close where context
        closeWhereContext(select)
        // close order context
        closeOrderContext(select)
        // return function that will execute and return query
        return function () {
            // names of views to apply
            var views
            // if first arg is array then use for views
            if (Array.isArray(arguments[0])) {
                views = arguments[0]
            }
            // otherwise copy arguments
            else {
                // create new array
                views = []
                // get number of arguments
                var length = arguments.length
                // copy view arguments
                for (var i=0; i < arguments.length; i++) {
                    views[i] = arguments[i]
                }
            }
            // add views to query
            select.query.view = views
            // debug query
            debug('query', select.query)
            // execute query
            return select.model.query(select.query)
        }
    }

    // add property to history
    select.history.push(property)

    /*
     * there are two primary selection contexts: where and by
     *
     * select by is more limited and only allows specifying a single column
     * to do a select where equals query on
     *
     * where context allows specifying multiple columns to match separated
     * by and with the full range of matching operators available.
     *
     * query modifiers can only be specified before any cotext is set - e.g.
     * one, all, current, allRevisions must be specified before by or where.
     *
     */

    // handle context specific logic
    if (!select.context) {
        // switch to by context
        if (property === 'by') {
            // set context
            select.context = 'by'
            // column name must follow by
            select.expectColumn = true
        }
        // switch to where context
        else if (property === 'where') {
            // set context
            select.context = 'where'
            // column name must follow where
            select.expectColumn = true
        }
        // switch to order context
        else if (property === 'order') {
            // set context
            select.context = 'order'
        }
        // set all flag on query
        else if (property === 'all') {
            select.query.all = true
        }
        // set allRevisions flag on query
        else if (property === 'allRevisions') {
            select.query.allRevisions = true
        }
        // set current flag on query
        else if (property === 'current') {
            select.query.current = true
        }
        // set limit: 1 on query
        else if (property === 'one') {
            select.query.limit = 1
        }
        // set required flag on query
        else if (property === 'required') {
            select.query.required = true
        }
        // set isCurrent flag on query
        else if (property === 'isCurrent') {
            select.query.isCurrent = true
        }
        // set resolve flag on query
        else if (property === 'resolve') {
            select.query.resolve = true
        }
        // set allow flag on query
        else if (property === 'allow') {
            select.query.allow = true
        }
        // set plain flag
        else if (property === 'plain') {
            select.query.plain = true
        }
        // invalid property
        else {
            throwInvalidProperty(property, select)
        }
    }
    else if (select.context === 'by') {
        // column is only allowed property after by
        var column = getColumn(property, select)
        // return function that will take select value and do query
        return function (val) {
            // if value is an array then always select all
            if (Array.isArray(val) && !select.query.one) {
                select.query.all = true
            }
            // otherwise if there is a single value and all is not specified
            // then limit query to a single (not-array) result
            else if (!select.query.all) {
                select.query.limit = 1
            }
            // set where clause for query
            select.query.where = {}
            select.query.where[column] = val
            // debug query
            debug('query', select.query)
            // execute query
            return select.model.query(select.query)
        }
    }
    else if (select.context === 'where') {
        // column must be first property in where clause
        if (select.expectColumn) {
            // property is an action isProperty
            if (property === 'isDeleted') {
                // isProperty takes place of column
                select.expectColumn = false
                // return function that captures value
                return function (value) {
                    // set isProperty as column for where query
                    select.contextData.column = property
                    select.contextData.operator = value
                    // add where clause to query
                    closeWhereContext(select)
                    // return proxy
                    return select.proxy
                }
            }
            else {
                // set column in context data
                select.contextData.column = getColumn(property, select)
            }
        }
        // otherwise look for operator
        else {
            // is is a noop
            if (property === 'is') {

            }
            // apply negation to where clause
            else if (property === 'not') {
                select.contextData.not = true
            }
            // property is valid match operator
            else if (matchOperators[property]) {
                select.contextData.operator = property
                // return function that captures value and then closes where
                return function (val) {
                    // capture value
                    select.contextData.value = val
                    // add where clause to query
                    closeWhereContext(select)
                    // return proxy
                    return select.proxy
                }
            }
            // property is null
            else if (property === 'null') {
                // set IS NULL operator
                select.contextData.operator = null
                // add where clause to query
                closeWhereContext(select)
            }
            // if doing and close current clause and start another
            else if (property === 'and') {
                // add where clause to query
                closeWhereContext(select)
                // next property should be column for new where clause
                select.expectColumn = true
            }
            // switch to order context
            else if (property === 'order') {
                // add where clause to query
                closeWhereContext(select)
                // set context
                select.context = 'order'
            }
            // switch to limit context - capture limit
            else if (property === 'limit') {
                // add where clause to query
                closeWhereContext(select)
                // set context
                select.context = 'limit'
                // return function that sets limit
                return function (val) {
                    // do not allow limit 1 after select.all
                    if (val === 1 && select.query.all) {
                        throwError('limit(1) not allowed with select.all', select)
                    }
                    // set limit
                    select.query.limit = val
                    // return proxy
                    return select.proxy
                }
            }
            else {
                throwInvalidProperty(property, select)
            }
        }
    }
    else if (select.context === 'order') {
        // by is a noop
        if (property === 'by') {
        }
        // switch to limit context - capture limit
        else if (property === 'limit') {
            // add context to query
            closeOrderContext(select)
            // set context
            select.context = 'limit'
            // return function that sets limit
            return function (val) {
                // do not allow limit 1 after select.all
                if (val === 1 && select.query.all) {
                    throwError('limit(1) not allowed with select.all', select)
                }
                // set limit
                select.query.limit = val
                // return proxy
                return select.proxy
            }
        }
        // direction asc|desc
        else if (property === 'asc' || property === 'desc') {
            // add direction to order context
            select.contextData.direction = property
            // add context to query
            closeOrderContext(select)
        }
        // if not keyword then expect column name
        else {
            // get column name
            var columnName = select.model.columnName(property)
            // throw error on invalid column name
            if (!columnName) {
                throwInvalidColumnName(columnName, select)
            }
            // if list of columns does not exist in context data create
            if (!select.contextData.columns) {
                select.contextData.columns = []
            }
            // add column to list of columns for order
            select.contextData.columns.push(columnName)
        }
    }
    else if (select.context === 'limit') {
        // capture offset
        if (property === 'offset') {
            // return function that sets offset
            return function (val) {
                // set offset
                select.query.offset = val
                // return proxy
                return select.proxy
            }
        }
        else {
            throwInvalidProperty(property, select)
        }
    }
    else {
        throwInvalidProperty(property, select)
    }

    // return proxy again for most cases
    return select.proxy
}
184556
function select(invoked, local) {
  var embark;
  if (local) {
    embark = local;
  } else {
    embark = invoked;
  }
  return embark;
}
608467
function _pick(obj, properties) {
  return properties.reduce((newObj, prop, i) => {
    if (typeof prop === 'function') {
      return newObj;
    }

    let newProp = prop;
    let match = prop.match(/^(.+?)\sas\s(.+?)$/i);

    if (match) {
      prop = match[1];
      newProp = match[2];
    }

    let value = obj[prop];
    if (typeof properties[i + 1] === 'function') {
      value = properties[i + 1](value, newObj);
    }
    if (typeof value !== 'undefined') {
      newObj[newProp] = value;
    }

    return newObj;
  }, {});
}
1317467
function (obj) {
    return {
        getOwnPropertyDescriptor: function (name) {
            var desc = Object.getOwnPropertyDescriptor(obj, name);
            // a trapping proxy's properties must always be configurable
            if (desc !== undefined) {
                desc.configurable = true;
            }
            return desc;
        },
        getPropertyDescriptor: function (name) {
            var desc = Object.getPropertyDescriptor(obj, name); // not in ES5
            // a trapping proxy's properties must always be configurable
            if (desc !== undefined) {
                desc.configurable = true;
            }
            return desc;
        },
        getOwnPropertyNames: function () {
            return Object.getOwnPropertyNames(obj);
        },
        getPropertyNames: function () {
            return Object.getPropertyNames(obj);                // not in ES5
        },
        defineProperty: function (name, desc) {
            Object.defineProperty(obj, name, desc);
        },
        delete: function (name) {
            return delete obj[name];
        },
        fix: function () {
            if (Object.isFrozen(obj)) {
                var result = {};
                Object.getOwnPropertyNames(obj).forEach(function (name) {
                    result[name] = Object.getOwnPropertyDescriptor(obj, name);
                });
                return result;
            }
            // As long as obj is not frozen, the proxy won't allow itself to be fixed
            return undefined; // will cause a TypeError to be thrown
        },

        has: function (name) {
            return name in obj;
        },
        hasOwn: function (name) {
            return ({}).hasOwnProperty.call(obj, name);
        },
        get: function (receiver, name) {
            return obj[name];
        },
        set: function (receiver, name, val) {
            obj[name] = val;
            return true;
        }, // bad behavior when set fails in non-strict mode
        enumerate: function () {
            var result = [];
            for (var name in obj) {
                result.push(name);
            }
            return result;
        },
        keys: function () {
            return Object.keys(obj);
        }

    };
}
530314
function getRequire(context, options, tag, type, resource) {
    const loaders = normalizeLoaders(options.map[type]);
    const selectLoader = require.resolve('./loader.js');
    const request = {
        tag,
        type,
        options
    };
    const url = loaderUtils.stringifyRequest(context, `!${loaders}!${selectLoader}?${JSON.stringify(request)}!${resource}`)
    const prefix = tag === 'script' ? 'module.exports = ' : 'const $style = ';
    return `${prefix}require(${url});\r\n`;
}
97227
function (object, property) {
        return utils.getProp(object, Array.prototype.slice.call(arguments, 1).join("."));
    }
1028499
function getNearest($select, value) {
        var delta = {};
        angular.forEach($select.children('option'), function(opt, i){
          var optValue = angular.element(opt).attr('value');

          if(optValue === '') return;
          var distance = Math.abs(optValue - value); 
          if(typeof delta.distance === 'undefined' || distance < delta.distance) {
            delta = {value: optValue, distance: distance};
          } 
        }); 
        return delta.value;
      }
1147147
function(x){
                var pqify = (proxyquireifyName != null) && cache[proxyquireifyName];
                // Only try to use the proxyquireify version if it has been `require`d
                if (pqify && pqify.exports._proxy) {
                    return pqify.exports._proxy(req, x);
                } else {
                    return req(x);
                }
            }
722863
function eventProxy(e) {
    return this._listeners[e.type]((options.event && options.event(e)) || e);
  }
1003610
function (config, cb) {
                if (config) {
                    return cb(null, config);
                }

                return _.isFunction(run.options.systemProxy) ? run.options.systemProxy(url, cb) : cb(null, undefined);
            }
476478
function getProperty(style, name)
{
    if(style[name] !== void 0)
    {
        return [name, style[name]];
    }
    if(name in propertyNames)
    {
        return [propertyNames[name], style[propertyNames[name]]];
    }
    name = name.substr(0, 1).toUpperCase() + name.substr(1);
    var prefixes = ['webkit', 'moz', 'ms', 'o'], fullName;
    for(var i = 0, end = prefixes.length; i < end; i++)
    {
        fullName = prefixes[i] + name;
        if(style[fullName] !== void 0)
        {
            propertyNames[name] = fullName;
            return [fullName, style[fullName]];
        }
    }
    return [name, void 0];        
}
318065
function getHighlightingProxy(item, match, document) {
  if (typeof Proxy === 'undefined') {
    return item;
  }
  return new Proxy({}, {
    get: function(rcvr, name) {
      var value = item[name];
      if (name !== 'name') {
        return value;
      }

      var startMatch = value.indexOf(match);
      if (startMatch === -1) {
        return value;
      }

      var before = value.substr(0, startMatch);
      var after = value.substr(startMatch + match.length);
      var parent = document.createElement('span');
      parent.appendChild(document.createTextNode(before));
      var highlight = document.createElement('span');
      highlight.classList.add('gcli-menu-typed');
      highlight.appendChild(document.createTextNode(match));
      highlight.dir = bidiUtils.getTextDirection(match);
      parent.appendChild(highlight);
      parent.appendChild(document.createTextNode(after));
      return parent;
    }
  });
}
607947
function proxy (stream, key) {
  if (key in stream) {
    debug('not proxying prop "%s" because it already exists on target stream', key);
    return;
  }

  function get () {
    return stream.res[key];
  }
  function set (v) {
    return stream.res[key] = v;
  }
  Object.defineProperty(stream, key, {
    configurable: true,
    enumerable: true,
    get: get,
    set: set
  });
}
354366
function select (object, fields) {
  return arrayify(fields).reduce(function (prev, curr) {
    prev[curr] = object[curr]
    return prev
  }, {})
}
1113706
function _getSelected(select) {
    const arr = [];

    _slice.call(select.options).map((el) => {
        if (el.selected) {
            arr.push(el.value);
        }
    });

    return arr;
}
507947
function createProxy$1(parent, base) {
      var proxy = shallowCopy(base);
      each(base, function (i) {
          Object.defineProperty(proxy, "" + i, createPropertyProxy("" + i));
      });
      var state = createState$1(parent, proxy, base);
      createHiddenProperty(proxy, PROXY_STATE, state);
      states.push(state);
      return proxy;
  }
875900
public String getProperty(String strKey, Map<String, Object> properties)
    {
        String strProperty = super.getProperty(strKey, properties);
        if (strProperty == null)
            if (!m_proxyTask.isShared())
                strProperty = m_proxyTask.getProperty(strKey);
        return strProperty;
    }