text: // All material copyright ESRI, All Rights Reserved, unless otherwise specified.
  // See https://js.arcgis.com/4.9/esri/copyright.txt for details.
  //>>built
  define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/tsSupport/paramHelper ../core/tsSupport/assignHelper ../geometry ../core/accessorSupport/decorators ./Task ./operations/query ./operations/queryAttachments ./operations/queryRelatedRecords ./support/AttachmentQuery ./support/FeatureSet ./support/Query ./support/RelationshipQuery".split(" "),function(v,w,n,d,e,f,p,c,q,h,k,r,t,l,g,u){return function(m){function b(a){a=m.call(this,a)||this;a.gdbVersion=
  null;a.source=null;return a}n(b,m);b.prototype.execute=function(a,b){return this.executeJSON(a,b).then(function(a){return l.fromJSON(a)})};b.prototype.executeJSON=function(a,b){return h.executeQuery(this.parsedUrl,this._normalizeQuery(a),f({},this.requestOptions,b)).then(function(a){return a.data})};b.prototype.executeForCount=function(a,b){return h.executeQueryForCount(this.parsedUrl,this._normalizeQuery(a),f({},this.requestOptions,b)).then(function(a){return a.data.count})};b.prototype.executeForExtent=
  function(a,b){return h.executeQueryForExtent(this.parsedUrl,this._normalizeQuery(a),f({},this.requestOptions,b)).then(function(a){return{count:a.data.count,extent:p.Extent.fromJSON(a.data.extent)}})};b.prototype.executeForIds=function(a,b){return h.executeQueryForIds(this.parsedUrl,this._normalizeQuery(a),f({},this.requestOptions,b)).then(function(a){return a.data.objectIds})};b.prototype.executeRelationshipQuery=function(a,b){if(this.gdbVersion||this.source)a=a.clone().set({gdbVersion:this.gdbVersion||
  a.gdbVersion,source:this.source||a.source});return r.executeRelationshipQuery(this.parsedUrl,a,f({},this.requestOptions,b)).then(function(a){var b=a.data,c={};Object.keys(b).forEach(function(a){return c[a]=l.fromJSON(b[a])});return c})};b.prototype.executeAttachmentQuery=function(a,b){var c=this,d=b&&b.query&&b.query.token;return k.executeAttachmentQuery(this.parsedUrl,a,f({},this.requestOptions,b)).then(function(a){return k.processAttachmentQueryResult(a.data.attachmentGroups,c.parsedUrl.path,d)})};
  b.prototype._normalizeQuery=function(a){return this.gdbVersion||this.source?a.clone().set({gdbVersion:this.gdbVersion||a.gdbVersion,source:this.source||a.source}):a};d([c.property()],b.prototype,"gdbVersion",void 0);d([c.property()],b.prototype,"source",void 0);d([e(0,c.cast(g))],b.prototype,"execute",null);d([e(0,c.cast(g))],b.prototype,"executeJSON",null);d([e(0,c.cast(g))],b.prototype,"executeForCount",null);d([e(0,c.cast(g))],b.prototype,"executeForExtent",null);d([e(0,c.cast(g))],b.prototype,
  "executeForIds",null);d([e(0,c.cast(u))],b.prototype,"executeRelationshipQuery",null);d([e(0,c.cast(t))],b.prototype,"executeAttachmentQuery",null);return b=d([c.subclass("esri.tasks.QueryTask")],b)}(c.declared(q))});