/*eslint no-constant-condition: ['off']
426192
async function waitForOperationSucceeded(config, result) {
    let count = 0;
    while (true) {
        let opResult = await new Operations().getOperationDetails({
            subscriptionKey: config.subscriptionKey,
            operationId: result.operationId
        });

        if (opResult.error)
            throw new Error(JSON.stringify(opResult.error, null, 4));

        result = await opResult.json();
        process.stderr.write(`'\r${result.operationState}`);
        count++;
        for (let x = 0; x < count; x++)
            process.stderr.write(`.`);
        process.stderr.write('              ');

        if (result.operationState === 'Failed')
            throw new Error(JSON.stringify(result, null, 4));

        if (result.operationState === 'Succeeded')
            break;
        await Delay(1000);
    }
    process.stderr.write('done\n');
    return result;
}
755092
function _on (event, method, context) {
  /* eslint-disable no-invalid-this */
  var bindings
  validateMethod(method, context)
  if (this.__events__.hasOwnProperty(event)) {
    bindings = this.__events__[event]
  } else {
    // Auto-initialize bindings list
    bindings = this.__events__[event] = []
  }
  // Add binding
  bindings.push({
    method: method,
    context: context || null
  })
  if (DEBUG) {
    count++
    console.info('_on()', event, method.name, context, this)
    console.info(COUNT_MSG, count)
  }
  return this
  /* eslint-enable no-invalid-this */
}
1153325
function(events,fct) {
            
            var that=this;
                              
            function offFct() {
                that.off(events,fct);
                that.off(events,offFct);
            }
            
            this.on(events,fct);
            this.on(events,offFct);
            
            return this;
        }
427673
function _fixValue(v) {
    switch (typeof v) {
      case 'number':      // typeof NaN is 'number'
      case 'boolean':
      case 'undefined':
        break
      default:
        // date value returns 'new Date(NaN)' for null dates, ok
        v = v instanceof RegExp ? '' + v :
            v instanceof Date ? '(new Date(' + (+v) + '))' : // eslint-disable-line no-extra-parens
            v == null ? v : JSON.stringify(v)
        break
    }
    return v
  }
840410
function allOffFor(o) {
            var eH = this[_eventHandlers];
            var _iteratorNormalCompletion = true;
            var _didIteratorError = false;
            var _iteratorError = undefined;

            try {
                for (var _iterator = eH[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
                    var _step$value = _slicedToArray(_step.value, 2);

                    var evt = _step$value[0];
                    var objMap = _step$value[1];

                    if (objMap !== undefined) {
                        objMap["delete"](o);
                    }
                }
            } catch (err) {
                _didIteratorError = true;
                _iteratorError = err;
            } finally {
                try {
                    if (!_iteratorNormalCompletion && _iterator["return"]) {
                        _iterator["return"]();
                    }
                } finally {
                    if (_didIteratorError) {
                        throw _iteratorError;
                    }
                }
            }

            return this;
        }
1023990
function log(color, args) {
  if (!globalOptions.verbose) {
    return;
  }

  args = Array.prototype.slice.call(args);
  args.unshift(color);
  args.push(COLOR_RESET);

  console.log.apply(console, args); // eslint-disable-line
}
319954
function off(dom, eventType, callback) {
  if (document.addEventListener) {
    dom.removeEventListener(eventType, callback);
  } else {
    dom.detachEvent('on' + eventType, callback);
  }
}
1148788
function isEnabled() {
  const key = '@key@';
  const value = '1';
  const re = new RegExp(`(?:^|; )${key}=${value}(?:;|$)`);

  document.cookie = `${key}=${value}`;

  const enabled = re.test(document.cookie);

  if (enabled) {
    // eslint-disable-next-line
    remove(key);
  }

  return enabled;
}
517904
function unbind(el, type, fn, capt) {
	el.removeEventListener(type.slice(2), fn, capt);
}
925981
function looseEqual (a, b) {
	  /* eslint-disable eqeqeq */
	  return a == b || (
	    isObject(a) && isObject(b)
	      ? JSON.stringify(a) === JSON.stringify(b)
	      : false
	  )
	  /* eslint-enable eqeqeq */
	}
782345
function CInt(base, offset, isSet) {
  this.base = base || 0;
  this.offset = offset || 0;
  this.isSet = isSet || false;
}
793523
function disableHandler(e) {
    const element = e.detail.element;

    that.remove(element);
    clearToolOptionsByElement(element);
  }
582060
function(val, ctx, partials, inverted) {
      if (isArray(val) && val.length === 0) {
        return false;
      }

      var func;
      if (typeof val == 'function') {
        val = this.ms(val, ctx, partials);
        if (typeof val == 'function') {
          func = val;
        }
      }

      var pass = !!val;

      if (!inverted && pass && ctx) {
        if (func) {
          ctx.push(func);
        } else {
          ctx.push((typeof val == 'object') ? val : ctx[ctx.length - 1]);
        }
      }

      return pass;
    }
1350525
function sanitizeParameters (definition) {
    let scalar;
    try {
        // eslint-disable-next-line no-use-before-define
        const vector = Vector.from(definition);
        scalar = vector.getDelta();
    }
    catch (e) {
        scalar = definition.getDelta ? definition.getDelta() : definition;
    }
    return scalar;
}
1274300
function sanitize (val) {
  if (typeof val !== 'string') {
    return '';
  }
  val = val.replace(/&/g,'&amp;');
  val = val.replace(/"/g,'&quot;');
  val = val.replace(/'/g,'&#039;');
  val = val.replace(/</g,'&lt;');
  val = val.replace(/>/g,'&gt;');
  val = val.replace(/\n/g,'<br />');
  return val ;
}
436625
function() {
    var value = process.env[this._getConfig().coverageEnvVar] || false;

    if (value.toLowerCase) {
      value = value.toLowerCase();
    }

    return ['true', true].indexOf(value) !== -1;
  }
352796
function (el, ev, callback) {

        can.bind.call(el, ev, callback);

        return function () {
            can.unbind.call(el, ev, callback);
        };
    }