function $AdfXMLRequest$$() {
  this.Init();
}
$goog$exportSymbol$$("AdfXMLRequest", $AdfXMLRequest$$);
$AdfObject$$.$createSubclass$($AdfXMLRequest$$);
$AdfXMLRequest$$.$UNINITIALIZED$ = 0;
$goog$exportSymbol$$("AdfXMLRequest.UNINITIALIZED", $AdfXMLRequest$$.$UNINITIALIZED$);
$AdfXMLRequest$$.LOADING = 1;
$goog$exportSymbol$$("AdfXMLRequest.LOADING", $AdfXMLRequest$$.LOADING);
$AdfXMLRequest$$.LOADED = 2;
$goog$exportSymbol$$("AdfXMLRequest.LOADED", $AdfXMLRequest$$.LOADED);
$AdfXMLRequest$$.$INTERACTIVE$ = 3;
$goog$exportSymbol$$("AdfXMLRequest.INTERACTIVE", $AdfXMLRequest$$.$INTERACTIVE$);
$AdfXMLRequest$$.$COMPLETED$ = 4;
$goog$exportSymbol$$("AdfXMLRequest.COMPLETED", $AdfXMLRequest$$.$COMPLETED$);
$AdfXMLRequest$$.$_CHECKPOINT$ = $AdfCheckpoint$$.$getCheckpoint$("send", "postback");
$AdfXMLRequest$$.$_CHECKPOINT$.setDescription("A measurement of how long is spend processing an XMLHttpRequest");
$AdfXMLRequest$$.$_startCheckpoint$ = function $$AdfXMLRequest$$$$_startCheckpoint$$() {
  void 0 == $AdfXMLRequest$$.$_checkpointId$ && ($AdfXMLRequest$$.$_checkpointId$ = $AdfXMLRequest$$.$_CHECKPOINT$.start());
};
$AdfXMLRequest$$.$_stopCheckpoint$ = function $$AdfXMLRequest$$$$_stopCheckpoint$$() {
  void 0 != $AdfXMLRequest$$.$_checkpointId$ && ($AdfXMLRequest$$.$_CHECKPOINT$.stop($AdfXMLRequest$$.$_checkpointId$), $AdfXMLRequest$$.$_checkpointId$ = void 0);
};
$AdfXMLRequest$$.prototype.Init = function $$AdfXMLRequest$$$$Init$() {
  $AdfXMLRequest$$.$superclass$.Init.call(this);
  this.$isSynchronous$ = !1;
  this.$callback$ = null;
  this.$_state$ = $AdfXMLRequest$$.$UNINITIALIZED$;
  this.headers = {};
  this.$xmlhttp$ = $AdfAgent$$.$AGENT$.$createXMLHttpRequest$();
  if (!this.$xmlhttp$) {
    var $xmlhttpWarningMessage$$ = $AdfPage$$.$PAGE$.$getLookAndFeel$().$getTranslatedString$("af_document.XMLHTTP_UNSUPPORTED");
    alert($xmlhttpWarningMessage$$);
  }
};
$AdfObject$$.$exportPrototypeSymbol$("AdfXMLRequest.prototype.Init", {Init:$AdfXMLRequest$$.prototype.Init});
$AdfXMLRequest$$.prototype.toString = function $$AdfXMLRequest$$$$toString$() {
  return $AdfXMLRequest$$.$superclass$.toString.call(this) + " completionState:" + this.$getCompletionState$();
};
$AdfObject$$.$exportPrototypeSymbol$("AdfXMLRequest.prototype.toString", {toString:$AdfXMLRequest$$.prototype.toString});
$AdfXMLRequest$$.prototype.$setSynchronous$ = function $$AdfXMLRequest$$$$$setSynchronous$$($isSynch$$) {
  this.$isSynchronous$ = $isSynch$$;
};
$AdfObject$$.$exportPrototypeSymbol$("AdfXMLRequest.prototype.setSynchronous", {$setSynchronous$:$AdfXMLRequest$$.prototype.$setSynchronous$});
$AdfXMLRequest$$.prototype.$setCallback$ = function $$AdfXMLRequest$$$$$setCallback$$($_callback$$) {
  this.$callback$ = $_callback$$;
};
$AdfObject$$.$exportPrototypeSymbol$("AdfXMLRequest.prototype.setCallback", {$setCallback$:$AdfXMLRequest$$.prototype.$setCallback$});
$AdfXMLRequest$$.prototype.addEventListener = function $$AdfXMLRequest$$$$addEventListener$($event$$97$$, $listener$$95$$) {
  this.$xmlhttp$.upload && this.$xmlhttp$.upload.addEventListener($event$$97$$, $listener$$95$$, !1);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfXMLRequest.prototype.addEventListener", {addEventListener:$AdfXMLRequest$$.prototype.addEventListener});
$AdfXMLRequest$$.prototype.$getCompletionState$ = function $$AdfXMLRequest$$$$$getCompletionState$$() {
  return this.$_state$;
};
$AdfObject$$.$exportPrototypeSymbol$("AdfXMLRequest.prototype.getCompletionState", {$getCompletionState$:$AdfXMLRequest$$.prototype.$getCompletionState$});
$AdfXMLRequest$$.prototype.$getStatus$ = function $$AdfXMLRequest$$$$$getStatus$$() {
  return this.$xmlhttp$.status;
};
$AdfObject$$.$exportPrototypeSymbol$("AdfXMLRequest.prototype.getStatus", {$getStatus$:$AdfXMLRequest$$.prototype.$getStatus$});
$AdfXMLRequest$$.prototype.$getResponseXML$ = function $$AdfXMLRequest$$$$$getResponseXML$$() {
  return this.$xmlhttp$.responseXML;
};
$AdfObject$$.$exportPrototypeSymbol$("AdfXMLRequest.prototype.getResponseXML", {$getResponseXML$:$AdfXMLRequest$$.prototype.$getResponseXML$});
$AdfXMLRequest$$.prototype.$getResponseText$ = function $$AdfXMLRequest$$$$$getResponseText$$() {
  return this.$xmlhttp$.responseText;
};
$AdfObject$$.$exportPrototypeSymbol$("AdfXMLRequest.prototype.getResponseText", {$getResponseText$:$AdfXMLRequest$$.prototype.$getResponseText$});
$AdfXMLRequest$$.prototype.send = function $$AdfXMLRequest$$$$send$($url$$36$$, $content$$6$$, $ommitAdfRichMessage$$) {
  var $xmlhttp$$1$$ = this.$xmlhttp$;
  if (!this.$isSynchronous$ && this.$callback$) {
    var $cb$$2$$ = function anonymous$$11() {
      arguments.callee.$obj$.$__onReadyStateChange$();
    };
    $cb$$2$$.obj = this;
    $xmlhttp$$1$$.onreadystatechange = $cb$$2$$;
  }
  $AdfXMLRequest$$.$_startCheckpoint$();
  $xmlhttp$$1$$.open(null !== $content$$6$$ && void 0 !== $content$$6$$ ? "POST" : "GET", $url$$36$$, !this.$isSynchronous$);
  for (var $name$$87$$ in this.headers) {
    $xmlhttp$$1$$.setRequestHeader($name$$87$$, this.headers[$name$$87$$]);
  }
  $ommitAdfRichMessage$$ || $xmlhttp$$1$$.setRequestHeader("Adf-Rich-Message", "true");
  $xmlhttp$$1$$.send($content$$6$$);
  this.$isSynchronous$ && this.__onReadyStateChange();
};
$AdfObject$$.$exportPrototypeSymbol$("AdfXMLRequest.prototype.send", {send:$AdfXMLRequest$$.prototype.send});
$AdfXMLRequest$$.prototype.abort = function $$AdfXMLRequest$$$$abort$() {
  var $xmlhttp$$2$$ = this.$xmlhttp$;
  $xmlhttp$$2$$ && $xmlhttp$$2$$.abort();
};
$AdfObject$$.$exportPrototypeSymbol$("AdfXMLRequest.prototype.abort", {abort:$AdfXMLRequest$$.prototype.abort});
$AdfXMLRequest$$.prototype.getResponseHeader = function $$AdfXMLRequest$$$$getResponseHeader$($name$$88$$) {
  return this.$xmlhttp$.getResponseHeader($name$$88$$);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfXMLRequest.prototype.getResponseHeader", {getResponseHeader:$AdfXMLRequest$$.prototype.getResponseHeader});
$AdfXMLRequest$$.prototype.getAllResponseHeaders = function $$AdfXMLRequest$$$$getAllResponseHeaders$() {
  return this.$xmlhttp$.getAllResponseHeaders();
};
$AdfObject$$.$exportPrototypeSymbol$("AdfXMLRequest.prototype.getAllResponseHeaders", {getAllResponseHeaders:$AdfXMLRequest$$.prototype.getAllResponseHeaders});
$AdfXMLRequest$$.prototype.setRequestHeader = function $$AdfXMLRequest$$$$setRequestHeader$($name$$89$$, $value$$157$$) {
  this.headers[$name$$89$$] = $value$$157$$;
};
$AdfObject$$.$exportPrototypeSymbol$("AdfXMLRequest.prototype.setRequestHeader", {setRequestHeader:$AdfXMLRequest$$.prototype.setRequestHeader});
$AdfXMLRequest$$.prototype.__onReadyStateChange = function $$AdfXMLRequest$$$$__onReadyStateChange$() {
  this.$_state$ = this.$xmlhttp$.readyState;
  this.$_state$ == $AdfXMLRequest$$.$COMPLETED$ && ($AdfXMLRequest$$.$_stopCheckpoint$(), $AdfPage$$.$PAGE$.$isUserActivityMonitoringOn$() && this.$xmlhttp$.responseXML && $AdfUserActivityInfo$$.$setResponseReceivedTime$());
  this.$callback$ && this.$callback$(this);
};
$AdfXMLRequest$$.prototype.$cleanup$ = function $$AdfXMLRequest$$$$$cleanup$$() {
  this.$callback$ = null;
  delete this.headers;
  delete this.$xmlhttp$;
};
$AdfObject$$.$exportPrototypeSymbol$("AdfXMLRequest.prototype.cleanup", {$cleanup$:$AdfXMLRequest$$.prototype.$cleanup$});
