/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["../chunks/_rollupPluginBabelHelpers","../chunks/tslib.es6","../core/Accessor","../core/urlUtils","../core/accessorSupport/decorators/property","../core/arrayUtils","../core/has","../core/accessorSupport/ensureType","../core/accessorSupport/decorators/subclass"],(function(r,e,t,o,s,n,c,l,i){"use strict";let u=function(e){function t(...r){var t;return(t=e.call(this,...r)||this).requestOptions=null,t.url=null,t}r._inheritsLoose(t,e);var s=t.prototype;return s.normalizeCtorArgs=function(r,e){return"string"!=typeof r?r:{url:r,...e}},s._parseUrl=function(r){return r?o.urlToObject(r):null},s._encode=function(r,e,t){const o={};for(const s in r){if("declaredClass"===s)continue;const n=r[s];if(null!=n&&"function"!=typeof n)if(Array.isArray(n)){o[s]=[];for(let r=0;r<n.length;r++)o[s][r]=this._encode(n[r])}else if("object"==typeof n)if(n.toJSON){const r=n.toJSON(t&&t[s]);o[s]=e?r:JSON.stringify(r)}else o[s]=e?n:JSON.stringify(n);else o[s]=n}return o},r._createClass(t,[{key:"parsedUrl",get:function(){return this._parseUrl(this.url)}}]),t}(t);e.__decorate([s.property({readOnly:!0})],u.prototype,"parsedUrl",null),e.__decorate([s.property()],u.prototype,"requestOptions",void 0),e.__decorate([s.property({type:String})],u.prototype,"url",void 0),u=e.__decorate([i.subclass("esri.tasks.Task")],u);return u}));
