@function nestedArrayItemBindEventHandlers

bind event handlers to nested array item
195259
function nestedArrayItemBindEventHandlers ($item) {
    // set item from this if not set
    if (!$item || !$item.find) {
        $item = $(this)
    }
    $item.find('.nested-array-item-action-first').click(nestedArrayFirst)
    $item.find('.nested-array-item-action-up').click(nestedArrayUp)
    $item.find('.nested-array-item-action-down').click(nestedArrayDown)
    $item.find('.nested-array-item-action-last').click(nestedArrayLast)
    $item.find('.nested-array-item-action-remove').click(nestedArrayRemove)
    $item.find('.nested-array-item-action-add').click(nestedArrayAdd)
}
76879
function genWeexHandler (params, handlerCode) {
  var innerHandlerCode = handlerCode;
  var exps = params.filter(function (exp) { return simplePathRE.test(exp) && exp !== '$event'; });
  var bindings = exps.map(function (exp) { return ({ '@binding': exp }); });
  var args = exps.map(function (exp, i) {
    var key = "$_" + (i + 1);
    innerHandlerCode = innerHandlerCode.replace(exp, key);
    return key
  });
  args.push('$event');
  return '{\n' +
    "handler:function(" + (args.join(',')) + "){" + innerHandlerCode + "},\n" +
    "params:" + (JSON.stringify(bindings)) + "\n" +
    '}'
}
266658
function()
	{
		var model, attr, result, result2, modelPathArray, i, ret, modelArgs;
		var dataBindAttr = this.element.getAttribute(settings.DATA_BIND_ATTR);
		var modelName;

		this._modelBindersMap = new BinderMap();

		if(dataBindAttr == null) return;

		var parsedBindings = matchBindings(dataBindAttr);

		if(process.env.NODE_ENV !== 'production')
		{
			if(parsedBindings.error)
			{
				if(this.element && this.element.parentNode)
				{
					this.element.parentNode.scrollIntoView();
					this.element.parentNode.style.outline = '2px dashed red';
				}
				console.error('Error parsing binding expression: ');
				console.error(parsedBindings.error);
				console.log(this.element);
			}
		}

		if(parsedBindings.match && parsedBindings.match.bindings)
		{
			parsedBindings = parsedBindings.match.bindings;

			for(var i = 0, l = parsedBindings.length; i < l; i++)
			{
				var parsedBinding = parsedBindings[i];

				if(parsedBinding.binder === 'each')
				{
					if(process.env.NODE_ENV !== 'production')
					{
						if(this._collectionBinder)
						{
							if(this.element && this.element.parentNode)
							{
								this.element.parentNode.scrollIntoView();
								this.element.parentNode.style.outline = '2px dashed red';
							}
							console.error('You cannot have two :each binders on the same element');
							console.log(this.element);
						}
					}
					if(!this.options.isBoundView)
					{
						var animate = null;
						var keyProp = null;
						var alias = null;

						if(parsedBinding.operators)
						{
							for(var j = 0, k = parsedBinding.operators.length; j < k; j++)
							{
								var operator = parsedBinding.operators[j];
								if(operator.args.length >= 1 && operator.args[0].type === 'ident')
								{
									if(operator.name === 'animate') animate = operator.args[0].value;
									if(operator.name === 'key') keyProp = operator.args[0].value;
									if(operator.name === 'as') alias = operator.args[0].value;
								}
							}
						}

						this._collectionBinder = new CollectionBinder({
							view: this,
							keyPath: parsedBinding.keyPath,
							collectionArgs: parsedBinding.modelArgs,
							animate: animate,
							keyProp: keyProp
						});

						if(alias)
						{
							this._itemAlias = alias;
						}
						else this._itemAlias = settings.defaultItemAlias;
					}
				}
				else
				{
					if(!(parsedBinding.binder in View.binders)) break;

					var scope = this.scope;
					var isIdent = function(v){ return v != null && v.type === 'ident'; }
					var identToParser = function(v)
					{
						if(scope[v.value]) return { fn: scope[v.value], args: [] };
						else if(View.helpers[v.value]) return { fn: View.helpers[v.value], args: [] };
					}
					var argToValue = function(v)
					{
						return v.value;
					}
					var isNotNull = function(v)
					{
						return v != null;
					}

					var binderConfig = {
						view: this,
						element: this.element,
						params: parsedBinding.binderArgs.filter(isNotNull),
						keyPath: parsedBinding.keyPath,
						modelArgs: parsedBinding.modelArgs.filter(isNotNull),
						formatters: [],
						parsers: [],
						dispatch: null,
						// dispatchNamedParams: ret.dispatchNamedParams,
						eventNames: [],
						eventFilters: null,
						fill: false,
						nopreventdef: false,
						animate: null,
						indexed: false
					};


					for(var j = 0, k = parsedBinding.operators.length; j < k; j++)
					{
						var operator = parsedBinding.operators[j];
						switch(operator.name)
						{
							case 'format':
							case 'f':
								binderConfig.formatters = operator.args.filter(isIdent).map(identToParser);
								break;
							case 'parse':
							case 'p':
								binderConfig.parsers = operator.args.filter(isIdent).map(identToParser);
								break;
							case 'dispatch':
								if(operator.args.length > 0)
								{
									binderConfig.dispatch = operator.args;
								}
								break;
							case 'on':
								if(operator.args.length > 0)
								{
									binderConfig.eventNames = operator.args.filter(isIdent).map(argToValue);
								}
								break;
							case 'evf':
								binderConfig.eventFilters = operator.args.filter(isIdent).map(identToParser);
								break;
							case 'fill':
								binderConfig.fill = true;
								break;
							case 'nopreventdef':
								binderConfig.nopreventdef = true;
								break;
							case 'animate':
								binderConfig.animate = operator.args[0].value;
								break;
						}
					}

					for(var j = binderConfig.formatters.length - 1; j >= 0; j--)
					{
						if(binderConfig.formatters[j].fn.indexed === true) binderConfig.indexed = true;
					}

					var modelBinder = new View.binders[parsedBinding.binder](binderConfig);

					this._modelBindersMap.add(modelBinder);
				}
			}
		}

		// Check for invalid combination of :each and :if binders:
		if(process.env.NODE_ENV !== 'production')
		{
			var ifBinders = this._modelBindersMap.binders.filter(function(binder){ return binder instanceof View.binders.if || binder instanceof View.binders.ifnot; });

			if(this._collectionBinder && ifBinders.length > 0)
			{
				if(this.element && this.element.parentNode)
				{
					this.element.parentNode.scrollIntoView();
					this.element.parentNode.style.outline = '2px dashed red';
				}
				console.error('You cannot combine :each binder with :if binder on the same element');
				console.log(this.element);
			}

			if(ifBinders.length > 2)
			{
				if(this.element && this.element.parentNode)
				{
					this.element.parentNode.scrollIntoView();
					this.element.parentNode.style.outline = '2px dashed red';
				}
				console.error('You cannot combine multiple :if binders on the same element');
				console.log(this.element);
			}
		}

	}
839149
function(handlers) {
				var h;
						
				if (Basic.typeOf(handlers) !== 'array') {
					handlers = [handlers];
				}

				for (var i = 0; i < handlers.length; i++) {
					h = 'on' + handlers[i];
					
					if (Basic.typeOf(this[h]) === 'function') {
						this.addEventListener(handlers[i], this[h]);
					} else if (Basic.typeOf(this[h]) === 'undefined') {
						this[h] = null; // object must have defined event properties, even if it doesn't make use of them
					}
				}
			}
194195
protected function bindEvents(): void
    {
        $userConfig = $this->app['config'][static::$abstract];

        $handler = new EventHandler($this->app->events, $userConfig);

        $handler->subscribe();

        $handler->subscribeQueueEvents($this->app->queue);

        if (isset($userConfig['send_default_pii']) && $userConfig['send_default_pii'] !== false) {
            $handler->subscribeAuthEvents();
        }
    }
792273
private static function _execute($array, callable $callback, callable $handler, $data = null, $bind = false)
    {
        $resultValue = array();
        foreach ($array as $key => $item) {
            if (is_object($item)) {
                $item = clone $item;
                if ($callback instanceof \Closure and $bind) {
                    $callback = \Closure::bind($callback, $item);
                }
            }
            $result = call_user_func_array($callback, array($key, &$item, $data));
            if (call_user_func_array($handler, array(&$resultValue, $key, $item, $result)) === false) {
                break;
            }
        }
        return $resultValue;
    }
1253698
function prepareItem(def, idx) {
      // updateData is called in response to UI events; it tells
      // the dataProvider to update the data to match the UI.
      //
      // updateData must be inside prepareItem() since it uses idx;
      // d3's listener method cannot guarantee the index passed to
      // updateData will be correct:
      function updateData(data) {
        // data.selectedGen++;
        // model.provider.updateField(data.name, { active: data.selected });
        model.provider.toggleFieldSelection(data.name);
      }

      // get existing sub elements
      const ttab = d3.select(this);
      let trow1 = ttab.select(`tr.${style.jsLegendRow}`);
      let trow2 = ttab.select(`tr.${style.jsTr2}`);
      let tdsl = trow2.select(`td.${style.jsSparkline}`);
      let legendCell = trow1.select(`.${style.jsLegend}`);
      let fieldCell = trow1.select(`.${style.jsFieldName}`);
      let iconCell = trow1.select(`.${style.jsLegendIcons}`);
      let iconCellViz = iconCell.select(`.${style.jsLegendIconsViz}`);
      let svgGr = tdsl.select('svg').select(`.${style.jsGHist}`);
      // let svgOverlay = svgGr.select(`.${style.jsOverlay}`);

      // if they are not created yet then create them
      if (trow1.empty()) {
        trow1 = ttab
          .append('tr')
          .classed(style.legendRow, true)
          .on(
            'click',
            multiClicker([
              function singleClick(d, i) {
                // single click handler
                // const overCoords = d3.mouse(model.listContainer);
                updateData(d);
              },
              // double click handler
              toggleSingleModeEvt,
            ])
          );
        trow2 = ttab.append('tr').classed(style.jsTr2, true);
        tdsl = trow2
          .append('td')
          .classed(style.sparkline, true)
          .attr('colspan', '3');
        legendCell = trow1.append('td').classed(style.legend, true);

        fieldCell = trow1.append('td').classed(style.fieldName, true);
        iconCell = trow1.append('td').classed(style.legendIcons, true);
        iconCellViz = iconCell
          .append('span')
          .classed(style.legendIconsViz, true);
        scoreHelper.createScoreIcons(iconCellViz);
        iconCellViz
          .append('i')
          .classed(style.expandIcon, true)
          .on('click', toggleSingleModeEvt);

        // Create SVG, and main group created inside the margins for use by axes, title, etc.
        svgGr = tdsl
          .append('svg')
          .classed(style.sparklineSvg, true)
          .append('g')
          .classed(style.jsGHist, true)
          .attr(
            'transform',
            `translate( ${model.histMargin.left}, ${model.histMargin.top} )`
          );
        // nested groups inside main group
        svgGr.append('g').classed(style.axis, true);
        svgGr.append('g').classed(style.jsGRect, true);
        // scoring interface
        scoreHelper.createGroups(svgGr);
        svgGr
          .append('rect')
          .classed(style.overlay, true)
          .style('cursor', 'default');
      }
      const dataActive = def.active;
      // Apply legend
      if (model.provider.isA('LegendProvider')) {
        const { color, shape } = model.provider.getLegend(def.name);
        legendCell.html(`<svg class='${
          style.legendSvg
        }' width='${legendSize}' height='${legendSize}' viewBox='${
          shape.viewBox
        }'
                  fill='${color}' stroke='black'><use xlink:href='#${
          shape.id
        }'/></svg>`);
      } else {
        legendCell.html('<i></i>').select('i');
      }
      trow1
        .classed(
          !dataActive ? style.selectedLegendRow : style.unselectedLegendRow,
          false
        )
        .classed(
          dataActive ? style.selectedLegendRow : style.unselectedLegendRow,
          true
        );
      // selection outline
      ttab
        .classed(style.hiddenBox, false)
        .classed(!dataActive ? style.selectedBox : style.unselectedBox, false)
        .classed(dataActive ? style.selectedBox : style.unselectedBox, true);

      // Change interaction icons based on state.
      // scoreHelper has save icon and score icon.
      const numIcons =
        (model.singleModeSticky ? 0 : 1) + scoreHelper.numScoreIcons(def);
      iconCell.style('width', `${numIcons * iconSize + 2}px`);
      scoreHelper.updateScoreIcons(iconCellViz, def);
      iconCellViz
        .select(`.${style.jsExpandIcon}`)
        .attr(
          'class',
          model.singleModeName === null ? style.expandIcon : style.shrinkIcon
        )
        .style('display', model.singleModeSticky ? 'none' : null);
      // + 2 accounts for internal padding.
      const allIconsWidth =
        Math.ceil(iconCellViz.node().getBoundingClientRect().width) + 2;
      // reset to the actual width used.
      iconCell.style('width', `${allIconsWidth}px`);
      // Apply field name
      fieldCell
        .style(
          'width',
          `${model.boxWidth - (10 + legendSize + 6 + allIconsWidth)}px`
        )
        .text(def.name);

      // adjust some settings based on current size
      tdsl
        .select('svg')
        .attr('width', publicAPI.svgWidth())
        .attr('height', publicAPI.svgHeight());

      // get the histogram data and rebuild the histogram based on the results
      const hobj = def.hobj;
      if (hobj) {
        const cmax = 1.0 * d3.max(hobj.counts);
        const hsize = hobj.counts.length;
        const hdata = svgGr
          .select(`.${style.jsGRect}`)
          .selectAll(`.${style.jsHistRect}`)
          .data(hobj.counts);

        hdata.enter().append('rect');
        // changes apply to both enter and update data join:
        hdata
          .attr(
            'class',
            (d, i) => (i % 2 === 0 ? style.histRectEven : style.histRectOdd)
          )
          .attr('pname', def.name)
          .attr('y', (d) => model.histHeight * (1.0 - d / cmax))
          .attr('x', (d, i) => (model.histWidth / hsize) * i)
          .attr('height', (d) => model.histHeight * (d / cmax))
          .attr('width', Math.ceil(model.histWidth / hsize));

        hdata.exit().remove();

        const svgOverlay = svgGr.select(`.${style.jsOverlay}`);
        svgOverlay
          .attr('x', -model.histMargin.left)
          .attr('y', -model.histMargin.top)
          .attr('width', publicAPI.svgWidth())
          .attr('height', publicAPI.svgHeight()); // allow clicks inside x-axis.

        if (!scoreHelper.editingScore(def)) {
          if (model.provider.isA('HistogramBinHoverProvider')) {
            svgOverlay
              .on('mousemove.hs', (d, i) => {
                const mCoords = publicAPI.getMouseCoords(tdsl);
                const binNum = Math.floor(
                  (mCoords[0] / model.histWidth) * hsize
                );
                const state = {};
                state[def.name] = [binNum];
                model.provider.setHoverState({ state });
              })
              .on('mouseout.hs', (d, i) => {
                const state = {};
                state[def.name] = [-1];
                model.provider.setHoverState({ state });
              });
          }
          svgOverlay.on('click.hs', (d) => {
            const overCoords = publicAPI.getMouseCoords(tdsl);
            if (overCoords[1] <= model.histHeight) {
              updateData(d);
            }
          });
        } else {
          // disable when score editing is happening - it's distracting.
          // Note we still respond to hovers over other components.
          svgOverlay.on('.hs', null);
        }

        // Show an x-axis with just min/max displayed.
        // Attach scale, axis objects to this box's
        // data (the 'def' object) to allow persistence when scrolled.
        if (typeof def.xScale === 'undefined') {
          def.xScale = d3.scale.linear();
        }
        const [minRange, maxRange] = scoreHelper.getHistRange(def);
        def.xScale
          .rangeRound([0, model.histWidth])
          .domain([minRange, maxRange]);

        if (typeof def.xAxis === 'undefined') {
          const formatter = d3.format('.3s');
          def.xAxis = d3.svg
            .axis()
            .tickFormat(formatter)
            .orient('bottom');
        }
        def.xAxis.scale(def.xScale);
        let numTicks = 2;
        if (model.histWidth >= model.moreTicksSize) {
          numTicks = 5;
          // using .ticks() results in skipping min/max values,
          // if they aren't 'nice'. Make exactly 5 ticks.
          const myTicks = d3
            .range(numTicks)
            .map(
              (d) => minRange + (d / (numTicks - 1)) * (maxRange - minRange)
            );
          def.xAxis.tickValues(myTicks);
        } else {
          def.xAxis.tickValues(def.xScale.domain());
        }
        // nested group for the x-axis min/max display.
        const gAxis = svgGr.select(`.${style.jsAxis}`);
        gAxis
          .attr('transform', `translate(0, ${model.histHeight})`)
          .call(def.xAxis);
        const tickLabels = gAxis
          .selectAll('text')
          .classed(style.axisText, true);
        numTicks = tickLabels.size();
        tickLabels.style(
          'text-anchor',
          (d, i) => (i === 0 ? 'start' : i === numTicks - 1 ? 'end' : 'middle')
        );
        gAxis.selectAll('line').classed(style.axisLine, true);
        gAxis.selectAll('path').classed(style.axisPath, true);

        scoreHelper.prepareItem(def, idx, svgGr, tdsl);
      }
    }
671057
function buildBindsMap(bindsArray)
{
  var bindsMap = {};
  var isArrayBinding = bindsArray.length >0 && Util.isArray(bindsArray[0]);
  var singleArray = isArrayBinding ? bindsArray[0] : bindsArray;

  for (var index = 0, length = singleArray.length; index < length; index++)
  {
    var value = singleArray[index];

    // pick the appropriate logical data type based on the bind value
    var type;
    if (Util.isBoolean(value))
    {
      type = 'BOOLEAN';
    }
    else if (Util.isObject(value) || Util.isArray(value))
    {
      type = 'VARIANT';
    }
    else if (Util.isNumber(value))
    {
      type = 'REAL';
    }
    else 
    {
      type = 'TEXT';
    }

    // convert non-null values to a string if necessary; we don't convert null
    // because the client might want to run something like
    //   sql text = update t set name = :1 where id = 1;, binds = [null]
    // and converting null to a string would result in us executing
    //   sql text = update t set name = 'null' where id = 1;
    // instead of
    //   sql text = update t set name = null where id = 1;
    if (!isArrayBinding)
    {
      if (value !== null && !Util.isString(value))
      {
        value = JSON.stringify(value);
      }
    }
    else
    {
      value = [];
      for (var rowIndex = 0; rowIndex < bindsArray.length; rowIndex++)
      {
        var value0 = bindsArray[rowIndex][index];
        if (value0 !== null && !Util.isString(value0))
        {
          value0 = JSON.stringify(value0);
        }
        value.push(value0);
      }
    }

    // add an entry for the bind variable to the map
    bindsMap[index + 1] =
    {
      type  : type,
      value : value
    };
  }

  return bindsMap;
}
1022778
function bindAutoBindMethods(component) {
    var pairs = component.__reactAutoBindPairs;
    for (var i = 0; i < pairs.length; i += 2) {
      var autoBindKey = pairs[i];
      var method = pairs[i + 1];
      component[autoBindKey] = bindAutoBindMethod(component, method);
    }
  }
579826
function parseBindings(bindings) {
        var config = {};

        switch (typeof bindings.value) {
            case 'string':
            case 'function':
                config.title = bindings.value;
                break
            case 'object':
                config = Object.assign({}, bindings.value);
        }

        // Parse args (eg: v-d-tooltip:my-container)
        if (bindings.arg) {
            config.container = "#" + (bindings.arg); // #my-container
        }

        // Parse modifiers. eg: v-d-tooltip.my-modifier
        Object.keys(bindings.modifiers).forEach(function (mod) {
            // Parse if the title allows HTML
            if (/^html$/.test(mod)) {
                config.html = true;

            // Parse animation
            } else if (/^nofade$/.test(mod)) {
                config.animation = false;

            // Parse placement
            } else if (/^(auto|top(left|right)?|bottom(left|right)?|left(top|bottom)?|right(top|bottom)?)$/.test(mod)) {
                config.placement = mod;

            // Parse boundary
            } else if (/^(window|viewport)$/.test(mod)) {
                config.boundary = mod;

            // Parse delay
            } else if (/^d\d+$/.test(mod)) {
                var delay = parseInt(mod.slice(1), 10) || 0;
                if (delay) {
                    config.delay = delay;
                }

            // Parse offset
            }  else if (/^o-?\d+$/.test(mod)) {
                var offset = parseInt(mod.slice(1), 10) || 0;
                if (offset) {
                    config.offset = offset;
                }
            }
        });

        // Parse selected triggers.
        var selectedTriggers = {};
        var triggers = typeof config.trigger === 'string' ? config.trigger.trim().split(/\s+/) : [];

        triggers.forEach(function (trigger) {
            if (validTriggers[trigger]) {
                selectedTriggers[trigger] = true;
            }
        });

        // Parse trigger modifiers. eg: v-d-tooltip.click
        Object.keys(validTriggers).forEach(function (trigger) {
            if (bindings.modifiers[trigger]) {
                selectedTriggers[trigger] = true;
            }
        });

        config.trigger = Object.keys(selectedTriggers).join(' ');

        // Convert `blur` to `focus`
        if (config.trigger === 'blur') {
            config.trigger = 'focus';
        }

        // If there's no trigger assigned, just delete the key.
        if (!config.trigger) {
            delete config.trigger;
        }

        return config
    }
600654
function (bind, callback) {
                var jsonChangeCallback = null;
                // register as listener for the bindings defined for this control:
                if (bind) {
                    jsonChangeCallback = {
                        fn : callback || this._notifyDataChange,
                        scope : this,
                        args : {
                            tplCtxt : this.tplCtxt,
                            animate : bind.animate
                        }
                    };

                    // addListener throws errors
                    try {
                        // normalize recursive
                        bind.recursive = bind.recursive !== false;
                        this.__json.addListener(bind.inside, bind.to, jsonChangeCallback, true, bind.recursive);
                        // save for disposal
                        this._bindings.push({
                            inside : bind.inside,
                            callback : jsonChangeCallback,
                            to : bind.to,
                            recursive : bind.recursive
                        });
                    } catch (e) {
                        this.$logError(this.SECTION_BINDING_ERROR, [bind.inside, bind.to, this.id,
                                this.tplCtxt.tplClasspath]);
                        jsonChangeCallback = null;
                    }
                    return jsonChangeCallback;
                }
            }
234686
public static boolean isArrayBind(Map<String, ParameterBindingDTO> bindValues)
  {
    if (bindValues == null || bindValues.size() == 0)
    {
      return false;
    }
    ParameterBindingDTO bindSample = bindValues.values().iterator().next();
    return bindSample.getValue() instanceof List;
  }
123717
function(target, type, properties) {
			if(_.type(target) === 'string' || _.type(target) === 'array') {
				var elements = _.type(target) === 'string'? $$(target) : target;
				
				elements.forEach(function(element) {
					_.event.fire(element, type, properties);
				});
			}
			else if (document.createEvent) {
				var evt = document.createEvent("HTMLEvents");
		
				evt.initEvent(type, true, true );
				evt.custom = true;
		
				if(properties) {
					_.attach(evt, properties);
				}
		
				target.dispatchEvent(evt);
			}
		}
661081
function bindAll(self: Object, fnNames: Array<string>) {
  fnNames.forEach(name => {
    /* eslint-disable no-param-reassign */
    self[name] = self[name].bind(self);
    /* eslint-enable no-param-reassign */
  });
}
731612
function displayAllAnnos(treeItems) {
    var items = [], selector, newHTML, i;
    // two passes; first assign offsets and add to array with the same selector
    for (i in treeItems.map) {
      var anno = treeItems.map[i];
      console.log(anno);
      if (anno.selector === 'body') {
        anno.selector = '#SBEnclosure';
      }
      if (anno.instance && (!selector || selector === anno.selector)) {
        if (!newHTML) {
          selector = anno.selector;
          newHTML = $(selector, doc).html();
        }
        anno.offset = findInstanceOffset(anno, newHTML);
        items.push(anno);
      }
    }
    console.log(items.length, 'eligible in', selector, 'out of', i);
    // second pass, sort and display annotations, later first.
    var latest = 1, item;
    while (latest > -1) {
      latest = -1;
      for (i = 0; i < items.length; i++) {
        item = items[i];
        if (item && item.offset > latest) {
          latest = i;
        }
      }

      if (latest > -1) {
        newHTML = insertAnno(items[latest], newHTML);
        delete items[latest];
      }
    }
    try {
      $(selector, doc).html(newHTML);
    } catch (e) {
      console.log('failed for', selector, newHTML.length);
      console.log(e);
    }
  }
32911
public void binds(Object... array)
	{
		if(name2Index==null){
			throw new RuntimeException("html标签没有定义绑定变量,但标签实现中试图绑定"+Arrays.asList(array));
		}
		
		Iterator<Integer> it = name2Index.values().iterator();
		for (int i = 0; i < array.length; i++)
		{
			int index = it.next();
			ctx.vars[index] = array[i];
		}
	}
429043
function (events) {
        "use strict";
    
        var loaded = {};
        this.loaded = loaded;
    
        var items = {};
        var keys = [];
        Object.defineProperty(this, 'items', {
            'get': function () {
                return items;
            }
        });
        Object.defineProperty(this, 'keys', {
            'get': function () {
                return keys;
            }
        });
        Object.defineProperty(this, 'length', {
            'get': function () {
                return keys.length;
            }
        });
    
        // List of modules that are multilanguage
        var multilanguage = new Map();
        Object.defineProperty(this, 'multilanguage', {
            'get': function () {
                return multilanguage;
            }
        });
    
        this.get = function (moduleID, extendedID) {
    
            var done = function () {
    
                events.trigger(moduleID + ':done');
                events.trigger('done', moduleID);
    
                loaded[moduleID] = true;
    
            };
    
            var extended;
            if (extendedID) {
                extended = items[extendedID];
                if (!extended) {
                    extended = new Module(moduleID, events);
                    items[extendedID] = extended;
                    keys.push(extendedID);
                }
            }
    
            var module = items[moduleID];
            if (!module) {
                module = new Module(moduleID, events);
                items[moduleID] = module;
                keys.push(moduleID);
            }
    
    
            if (extended) return [module, extended];
            else return [module, done];
    
        };
    
    }