@aurigma/ng-design-atoms-api-client 2.69.1 → 2.70.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,5 +12,5 @@
12
12
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
13
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
14
  PERFORMANCE OF THIS SOFTWARE.
15
- ***************************************************************************** */var a=function(e,r){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])})(e,r)};function p(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function t(){this.constructor=e}a(e,r),e.prototype=null===r?Object.create(r):(t.prototype=r.prototype,new t)}function s(e,r,t,n){return new(t||(t=Promise))((function(o,a){function p(e){try{i(n.next(e))}catch(e){a(e)}}function s(e){try{i(n.throw(e))}catch(e){a(e)}}function i(e){var r;e.done?o(e.value):(r=e.value,r instanceof t?r:new t((function(e){e(r)}))).then(p,s)}i((n=n.apply(e,r||[])).next())}))}function i(e,r){var t,n,o,a,p={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(t)throw new TypeError("Generator is already executing.");for(;p;)try{if(t=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return p.label++,{value:a[1],done:!1};case 5:p.label++,n=a[1],a=[0];continue;case 7:a=p.ops.pop(),p.trys.pop();continue;default:if(!(o=p.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){p=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){p.label=a[1];break}if(6===a[0]&&p.label<o[1]){p.label=o[1],o=a;break}if(o&&p.label<o[2]){p.label=o[2],p.ops.push(a);break}o[2]&&p.ops.pop(),p.trys.pop();continue}a=r.call(e,p)}catch(e){a=[6,e],n=0}finally{t=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}Object.create;function u(e){var r="function"==typeof Symbol&&Symbol.iterator,t=r&&e[r],n=0;if(t)return t.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}Object.create;var c=new r.InjectionToken("API_BASE_URL"),l=function(){function e(){this.apiUrl="http://localhost:54220",this.apiKey="ApiKey",this.authorizationToken=null}return e.prototype.getAuthorizationToken=function(){return s(this,void 0,void 0,(function(){return i(this,(function(e){return[2,this.authorizationToken]}))}))},e.prototype.setAuthorizationToken=function(e){this.authorizationToken=e},e}(),f=function(){function e(e){this.configuration=e}return e.prototype.transformOptions=function(e){return s(this,void 0,void 0,(function(){var r;return i(this,(function(t){switch(t.label){case 0:return[4,this.configuration.getAuthorizationToken()];case 1:return r=t.sent(),e.headers=null!=r?e.headers.append("authorization","Bearer "+r):e.headers.append("X-API-Key",this.configuration.apiKey),[2,e]}}))}))},e.prototype.getBaseUrl=function(e){return this.configuration.apiUrl.endsWith("/")?this.configuration.apiUrl.slice(0,-1):this.configuration.apiUrl},e.prototype.transformResult=function(e,r,t){return t(r)},e}(),d=function(e){function r(r,t,n){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=t,o.baseUrl=null!=n?n:o.getBaseUrl(""),o}return p(r,e),r.prototype.headInfo=function(){var e=this,r=this.baseUrl+"/api/atoms/v1/info";r=r.replace(/[?&]$/,"");var a={observe:"response",responseType:"blob",headers:new o.HttpHeaders({})};return n.from(this.transformOptions(a)).pipe(t.mergeMap((function(t){return e.http.request("head",r,t)}))).pipe(t.mergeMap((function(t){return e.transformResult(r,t,(function(r){return e.processHeadInfo(r)}))}))).pipe(t.catchError((function(t){if(!(t instanceof o.HttpResponseBase))return n.throwError(t);try{return e.transformResult(r,t,(function(r){return e.processHeadInfo(r)}))}catch(e){return n.throwError(e)}})))},r.prototype.processHeadInfo=function(e){var r,a,p=e.status,s=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,i={};if(e.headers)try{for(var c=u(e.headers.keys()),l=c.next();!l.done;l=c.next()){var f=l.value;i[f]=e.headers.get(f)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(a=c.return)&&a.call(c)}finally{if(r)throw r.error}}return 200===p?B(s).pipe(t.mergeMap((function(e){return n.of(null)}))):200!==p&&204!==p?B(s).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",p,e,i)}))):n.of(null)},r.prototype.getInfo=function(){var e=this,r=this.baseUrl+"/api/atoms/v1/info";r=r.replace(/[?&]$/,"");var a={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return n.from(this.transformOptions(a)).pipe(t.mergeMap((function(t){return e.http.request("get",r,t)}))).pipe(t.mergeMap((function(t){return e.transformResult(r,t,(function(r){return e.processGetInfo(r)}))}))).pipe(t.catchError((function(t){if(!(t instanceof o.HttpResponseBase))return n.throwError(t);try{return e.transformResult(r,t,(function(r){return e.processGetInfo(r)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetInfo=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r}(f);d.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new d(r.ɵɵinject(l),r.ɵɵinject(o.HttpClient),r.ɵɵinject(c,8))},token:d,providedIn:"root"}),d.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],d.ctorParameters=function(){return[{type:l,decorators:[{type:r.Inject,args:[l]}]},{type:o.HttpClient,decorators:[{type:r.Inject,args:[o.HttpClient]}]},{type:String,decorators:[{type:r.Optional},{type:r.Inject,args:[c]}]}]};var m=function(e){function r(r,t,n){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=t,o.baseUrl=null!=n?n:o.getBaseUrl(""),o}return p(r,e),r.prototype.cssFonts=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/tenants/{tenantId}/api/ccviewer/cssfonts";if(null==e)throw new Error("The parameter 'tenantId' must be defined.");p=(p=p.replace("{tenantId}",encodeURIComponent(""+e))).replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"text/css"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processCssFonts(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processCssFonts(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processCssFonts=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.fonts=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/tenants/{tenantId}/api/ccviewer/fonts/{psName}";if(null==e)throw new Error("The parameter 'tenantId' must be defined.");if(p=p.replace("{tenantId}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'psName' must be defined.");p=(p=p.replace("{psName}",encodeURIComponent(""+r))).replace(/[?&]$/,"");var s={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/octet-stream"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("get",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processFonts(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processFonts(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processFonts=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}if(200===s||206===s){var m=e.headers?e.headers.get("content-disposition"):void 0,h=m?/filename="?([^"]*?)"?(;|$)/g.exec(m):void 0,v=h&&h.length>1?h[1]:void 0;return n.of({fileName:v,data:i,status:s,headers:c})}return 404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getColorPreview=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/tenants/{tenantId}/api/ccviewer/GetColorPreview";if(null==e)throw new Error("The parameter 'tenantId' must be defined.");p=(p=p.replace("{tenantId}",encodeURIComponent(""+e))).replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processGetColorPreview(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processGetColorPreview(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetColorPreview=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):400===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Bad Request",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getColorPreviews=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/tenants/{tenantId}/api/ccviewer/GetColorPreviews";if(null==e)throw new Error("The parameter 'tenantId' must be defined.");p=(p=p.replace("{tenantId}",encodeURIComponent(""+e))).replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processGetColorPreviews(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processGetColorPreviews(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetColorPreviews=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):400===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Bad Request",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getCssFont=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/tenants/{tenantId}/api/ccviewer/GetCssFont?";if(null==e)throw new Error("The parameter 'tenantId' must be defined.");p=p.replace("{tenantId}",encodeURIComponent(""+e)),null!=r&&(p+="fontKey="+encodeURIComponent(""+r)+"&"),p=p.replace(/[?&]$/,"");var s={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/octet-stream"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("get",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processGetCssFont(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processGetCssFont(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetCssFont=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}if(200===s||206===s){var m=e.headers?e.headers.get("content-disposition"):void 0,h=m?/filename="?([^"]*?)"?(;|$)/g.exec(m):void 0,v=h&&h.length>1?h[1]:void 0;return n.of({fileName:v,data:i,status:s,headers:c})}return 404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getFallbackFonts=function(e){var r=this,a=this.baseUrl+"/api/atoms/v1/tenants/{tenantId}/api/ccviewer/GetFallbackFonts";if(null==e)throw new Error("The parameter 'tenantId' must be defined.");a=(a=a.replace("{tenantId}",encodeURIComponent(""+e))).replace(/[?&]$/,"");var p={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return n.from(this.transformOptions(p)).pipe(t.mergeMap((function(e){return r.http.request("get",a,e)}))).pipe(t.mergeMap((function(e){return r.transformResult(a,e,(function(e){return r.processGetFallbackFonts(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return r.transformResult(a,e,(function(e){return r.processGetFallbackFonts(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetFallbackFonts=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getImageSize=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/tenants/{tenantId}/api/ccviewer/GetImageSize";if(null==e)throw new Error("The parameter 'tenantId' must be defined.");p=(p=p.replace("{tenantId}",encodeURIComponent(""+e))).replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processGetImageSize(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processGetImageSize(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetImageSize=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getShapeBounds=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/tenants/{tenantId}/api/ccviewer/GetShapeBounds";if(null==e)throw new Error("The parameter 'tenantId' must be defined.");p=(p=p.replace("{tenantId}",encodeURIComponent(""+e))).replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processGetShapeBounds(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processGetShapeBounds(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetShapeBounds=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getWatermarkItems=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/tenants/{tenantId}/api/ccviewer/GetWatermarkItems";if(null==e)throw new Error("The parameter 'tenantId' must be defined.");p=(p=p.replace("{tenantId}",encodeURIComponent(""+e))).replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processGetWatermarkItems(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processGetWatermarkItems(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetWatermarkItems=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.img=function(e,r,a,p,s,i,u,c,l,f,d,m,h,v,g,y,b,R,w){var I=this,M=this.baseUrl+"/api/atoms/v1/tenants/{tenantId}/api/ccviewer/img?";if(null==e)throw new Error("The parameter 'tenantId' must be defined.");M=M.replace("{tenantId}",encodeURIComponent(""+e)),null!=r&&(M+="f="+encodeURIComponent(""+r)+"&"),null!=a&&(M+="w="+encodeURIComponent(""+a)+"&"),null!=p&&(M+="h="+encodeURIComponent(""+p)+"&"),null!=s&&(M+="cmyk="+encodeURIComponent(""+s)+"&"),null!=i&&(M+="rgb="+encodeURIComponent(""+i)+"&"),null!=u&&(M+="grayscale="+encodeURIComponent(""+u)+"&"),null!=c&&(M+="target="+encodeURIComponent(""+c)+"&"),null!=l&&(M+="sq="+encodeURIComponent(""+l)+"&"),null!=f&&(M+="effect="+encodeURIComponent(""+f)+"&"),null!=d&&(M+="kp="+encodeURIComponent(""+d)+"&"),null!=m&&(M+="color="+encodeURIComponent(""+m)+"&"),null!=h&&(M+="obm="+encodeURIComponent(""+h)+"&"),null!=v&&(M+="oo="+encodeURIComponent(""+v)+"&"),null!=g&&(M+="alphaMask="+encodeURIComponent(""+g)+"&"),null!=y&&(M+="page="+encodeURIComponent(""+y)+"&"),null!=b&&(M+="colorizeColor="+encodeURIComponent(""+b)+"&"),null!=R&&(M+="rw="+encodeURIComponent(""+R)+"&"),null!=w&&(M+="rh="+encodeURIComponent(""+w)+"&"),M=M.replace(/[?&]$/,"");var U={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/octet-stream"})};return n.from(this.transformOptions(U)).pipe(t.mergeMap((function(e){return I.http.request("get",M,e)}))).pipe(t.mergeMap((function(e){return I.transformResult(M,e,(function(e){return I.processImg(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return I.transformResult(M,e,(function(e){return I.processImg(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processImg=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}if(200===s||206===s){var m=e.headers?e.headers.get("content-disposition"):void 0,h=m?/filename="?([^"]*?)"?(;|$)/g.exec(m):void 0,v=h&&h.length>1?h[1]:void 0;return n.of({fileName:v,data:i,status:s,headers:c})}return 304===s?B(i).pipe(t.mergeMap((function(e){return A("Not Modified",s,e,c)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getLicense=function(e){var r=this,a=this.baseUrl+"/api/atoms/v1/tenants/{tenantId}/api/ccviewer/license";if(null==e)throw new Error("The parameter 'tenantId' must be defined.");a=(a=a.replace("{tenantId}",encodeURIComponent(""+e))).replace(/[?&]$/,"");var p={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return n.from(this.transformOptions(p)).pipe(t.mergeMap((function(e){return r.http.request("get",a,e)}))).pipe(t.mergeMap((function(e){return r.transformResult(a,e,(function(e){return r.processGetLicense(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return r.transformResult(a,e,(function(e){return r.processGetLicense(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetLicense=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.pth=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/tenants/{tenantId}/api/ccviewer/pth?";if(null==e)throw new Error("The parameter 'tenantId' must be defined.");p=p.replace("{tenantId}",encodeURIComponent(""+e)),null!=r&&(p+="f="+encodeURIComponent(""+r)+"&"),p=p.replace(/[?&]$/,"");var s={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/octet-stream"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("get",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processPth(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processPth(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processPth=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}if(200===s||206===s){var m=e.headers?e.headers.get("content-disposition"):void 0,h=m?/filename="?([^"]*?)"?(;|$)/g.exec(m):void 0,v=h&&h.length>1?h[1]:void 0;return n.of({fileName:v,data:i,status:s,headers:c})}return 304===s?B(i).pipe(t.mergeMap((function(e){return A("Not Modified",s,e,c)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.resource=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/tenants/{tenantId}/api/ccviewer/resource?";if(null==e)throw new Error("The parameter 'tenantId' must be defined.");p=p.replace("{tenantId}",encodeURIComponent(""+e)),null!=r&&(p+="image="+encodeURIComponent(""+r)+"&"),p=p.replace(/[?&]$/,"");var s={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/octet-stream"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("get",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processResource(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processResource(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processResource=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}if(200===s||206===s){var m=e.headers?e.headers.get("content-disposition"):void 0,h=m?/filename="?([^"]*?)"?(;|$)/g.exec(m):void 0,v=h&&h.length>1?h[1]:void 0;return n.of({fileName:v,data:i,status:s,headers:c})}return 404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.svg=function(e,r,a,p,s,i,u,c,l,f,d,m,h,v,g,y,b,R,w){var I=this,M=this.baseUrl+"/api/atoms/v1/tenants/{tenantId}/api/ccviewer/svg?";if(null==e)throw new Error("The parameter 'tenantId' must be defined.");M=M.replace("{tenantId}",encodeURIComponent(""+e)),null!=r&&(M+="f="+encodeURIComponent(""+r)+"&"),null!=a&&(M+="w="+encodeURIComponent(""+a)+"&"),null!=p&&(M+="h="+encodeURIComponent(""+p)+"&"),null!=s&&(M+="cmyk="+encodeURIComponent(""+s)+"&"),null!=i&&(M+="rgb="+encodeURIComponent(""+i)+"&"),null!=u&&(M+="grayscale="+encodeURIComponent(""+u)+"&"),null!=c&&(M+="target="+encodeURIComponent(""+c)+"&"),null!=l&&(M+="sq="+encodeURIComponent(""+l)+"&"),null!=f&&(M+="effect="+encodeURIComponent(""+f)+"&"),null!=d&&(M+="kp="+encodeURIComponent(""+d)+"&"),null!=m&&(M+="color="+encodeURIComponent(""+m)+"&"),null!=h&&(M+="obm="+encodeURIComponent(""+h)+"&"),null!=v&&(M+="oo="+encodeURIComponent(""+v)+"&"),null!=g&&(M+="alphaMask="+encodeURIComponent(""+g)+"&"),null!=y&&(M+="page="+encodeURIComponent(""+y)+"&"),null!=b&&(M+="colorizeColor="+encodeURIComponent(""+b)+"&"),null!=R&&(M+="rw="+encodeURIComponent(""+R)+"&"),null!=w&&(M+="rh="+encodeURIComponent(""+w)+"&"),M=M.replace(/[?&]$/,"");var U={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/octet-stream"})};return n.from(this.transformOptions(U)).pipe(t.mergeMap((function(e){return I.http.request("get",M,e)}))).pipe(t.mergeMap((function(e){return I.transformResult(M,e,(function(e){return I.processSvg(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return I.transformResult(M,e,(function(e){return I.processSvg(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processSvg=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}if(200===s||206===s){var m=e.headers?e.headers.get("content-disposition"):void 0,h=m?/filename="?([^"]*?)"?(;|$)/g.exec(m):void 0,v=h&&h.length>1?h[1]:void 0;return n.of({fileName:v,data:i,status:s,headers:c})}return 304===s?B(i).pipe(t.mergeMap((function(e){return A("Not Modified",s,e,c)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.txt=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/tenants/{tenantId}/api/ccviewer/txt?";if(null==e)throw new Error("The parameter 'tenantId' must be defined.");p=p.replace("{tenantId}",encodeURIComponent(""+e)),null!=r&&(p+="f="+encodeURIComponent(""+r)+"&"),p=p.replace(/[?&]$/,"");var s={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/octet-stream"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("get",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processTxt(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processTxt(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processTxt=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}if(200===s||206===s){var m=e.headers?e.headers.get("content-disposition"):void 0,h=m?/filename="?([^"]*?)"?(;|$)/g.exec(m):void 0,v=h&&h.length>1?h[1]:void 0;return n.of({fileName:v,data:i,status:s,headers:c})}return 304===s?B(i).pipe(t.mergeMap((function(e){return A("Not Modified",s,e,c)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.updateArchedTextItemHandler=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/tenants/{tenantId}/api/ccviewer/UpdateArchedTextItemHandler";if(null==e)throw new Error("The parameter 'tenantId' must be defined.");p=(p=p.replace("{tenantId}",encodeURIComponent(""+e))).replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processUpdateArchedTextItemHandler(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processUpdateArchedTextItemHandler(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processUpdateArchedTextItemHandler=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.updateAutoScaledTextItemHandler=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/tenants/{tenantId}/api/ccviewer/UpdateAutoScaledTextItemHandler";if(null==e)throw new Error("The parameter 'tenantId' must be defined.");p=(p=p.replace("{tenantId}",encodeURIComponent(""+e))).replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processUpdateAutoScaledTextItemHandler(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processUpdateAutoScaledTextItemHandler(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processUpdateAutoScaledTextItemHandler=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.updateBarcodeItemHandler=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/tenants/{tenantId}/api/ccviewer/UpdateBarcodeItemHandler";if(null==e)throw new Error("The parameter 'tenantId' must be defined.");p=(p=p.replace("{tenantId}",encodeURIComponent(""+e))).replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processUpdateBarcodeItemHandler(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processUpdateBarcodeItemHandler(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processUpdateBarcodeItemHandler=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.updateBoundedTextItemHandler=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/tenants/{tenantId}/api/ccviewer/UpdateBoundedTextItemHandler";if(null==e)throw new Error("The parameter 'tenantId' must be defined.");p=(p=p.replace("{tenantId}",encodeURIComponent(""+e))).replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processUpdateBoundedTextItemHandler(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processUpdateBoundedTextItemHandler(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processUpdateBoundedTextItemHandler=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.updateByColorData=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/tenants/{tenantId}/api/ccviewer/UpdateByColorData";if(null==e)throw new Error("The parameter 'tenantId' must be defined.");p=(p=p.replace("{tenantId}",encodeURIComponent(""+e))).replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processUpdateByColorData(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processUpdateByColorData(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processUpdateByColorData=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.updateByMultiCallRequest=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/tenants/{tenantId}/api/ccviewer/UpdateByMultiCallRequest";if(null==e)throw new Error("The parameter 'tenantId' must be defined.");p=(p=p.replace("{tenantId}",encodeURIComponent(""+e))).replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processUpdateByMultiCallRequest(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processUpdateByMultiCallRequest(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processUpdateByMultiCallRequest=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.updateCurvedTextItemHandler=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/tenants/{tenantId}/api/ccviewer/UpdateCurvedTextItemHandler";if(null==e)throw new Error("The parameter 'tenantId' must be defined.");p=(p=p.replace("{tenantId}",encodeURIComponent(""+e))).replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processUpdateCurvedTextItemHandler(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processUpdateCurvedTextItemHandler(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processUpdateCurvedTextItemHandler=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.updateImageItemHandler=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/tenants/{tenantId}/api/ccviewer/UpdateImageItemHandler";if(null==e)throw new Error("The parameter 'tenantId' must be defined.");p=(p=p.replace("{tenantId}",encodeURIComponent(""+e))).replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processUpdateImageItemHandler(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processUpdateImageItemHandler(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processUpdateImageItemHandler=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.updatePathBoundedTextItemHandler=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/tenants/{tenantId}/api/ccviewer/UpdatePathBoundedTextItemHandler";if(null==e)throw new Error("The parameter 'tenantId' must be defined.");p=(p=p.replace("{tenantId}",encodeURIComponent(""+e))).replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processUpdatePathBoundedTextItemHandler(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processUpdatePathBoundedTextItemHandler(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processUpdatePathBoundedTextItemHandler=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.updatePlainTextItemHandler=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/tenants/{tenantId}/api/ccviewer/UpdatePlainTextItemHandler";if(null==e)throw new Error("The parameter 'tenantId' must be defined.");p=(p=p.replace("{tenantId}",encodeURIComponent(""+e))).replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processUpdatePlainTextItemHandler(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processUpdatePlainTextItemHandler(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processUpdatePlainTextItemHandler=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.updateShapeItemHandler=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/tenants/{tenantId}/api/ccviewer/UpdateShapeItemHandler";if(null==e)throw new Error("The parameter 'tenantId' must be defined.");p=(p=p.replace("{tenantId}",encodeURIComponent(""+e))).replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processUpdateShapeItemHandler(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processUpdateShapeItemHandler(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processUpdateShapeItemHandler=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r}(f);m.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new m(r.ɵɵinject(l),r.ɵɵinject(o.HttpClient),r.ɵɵinject(c,8))},token:m,providedIn:"root"}),m.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],m.ctorParameters=function(){return[{type:l,decorators:[{type:r.Inject,args:[l]}]},{type:o.HttpClient,decorators:[{type:r.Inject,args:[o.HttpClient]}]},{type:String,decorators:[{type:r.Optional},{type:r.Inject,args:[c]}]}]};var h=function(e){function r(r,t,n){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=t,o.baseUrl=null!=n?n:o.getBaseUrl(""),o}return p(r,e),r.prototype.renderImagePreview=function(e,r,a){var p=this,s=this.baseUrl+"/api/atoms/v1/images/render-preview?";if(null!=e&&(s+="attachment="+encodeURIComponent(""+e)+"&"),null===r)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==r&&(s+="tenantId="+encodeURIComponent(""+r)+"&"),s=s.replace(/[?&]$/,"");var i={body:JSON.stringify(a),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/octet-stream"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("post",s,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processRenderImagePreview(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processRenderImagePreview(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processRenderImagePreview=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}if(200===s||206===s){var m=e.headers?e.headers.get("content-disposition"):void 0,h=m?/filename="?([^"]*?)"?(;|$)/g.exec(m):void 0,v=h&&h.length>1?h[1]:void 0;return n.of({fileName:v,data:i,status:s,headers:c})}return 404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.renderImagePreviewFromFile=function(e,r,a,p,s,i,u,c,l){var f=this,d=this.baseUrl+"/api/atoms/v1/images/render-preview/from-file?";if(null!=e&&(d+="attachment="+encodeURIComponent(""+e)+"&"),null===r)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==r&&(d+="tenantId="+encodeURIComponent(""+r)+"&"),d=d.replace(/[?&]$/,"");var m=new FormData;null!=a&&m.append("sourceFile",a.data,a.fileName?a.fileName:"sourceFile"),null!=p&&m.append("mockupOwnerId",p.toString()),null!=s&&m.append("mockupId",s.toString()),null!=i&&m.append("width",i.toString()),null!=u&&m.append("height",u.toString()),null!=c&&m.append("fileFormat",c.toString()),null!=l&&m.append("fitMode",l.toString());var h={body:m,observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/octet-stream"})};return n.from(this.transformOptions(h)).pipe(t.mergeMap((function(e){return f.http.request("post",d,e)}))).pipe(t.mergeMap((function(e){return f.transformResult(d,e,(function(e){return f.processRenderImagePreviewFromFile(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return f.transformResult(d,e,(function(e){return f.processRenderImagePreviewFromFile(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processRenderImagePreviewFromFile=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}if(200===s||206===s){var m=e.headers?e.headers.get("content-disposition"):void 0,h=m?/filename="?([^"]*?)"?(;|$)/g.exec(m):void 0,v=h&&h.length>1?h[1]:void 0;return n.of({fileName:v,data:i,status:s,headers:c})}return 404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.renderImagePreviewFromFileToResource=function(e,r,a,p,s,i,u,c,l,f,d,m,h,v,g){var y=this,b=this.baseUrl+"/api/atoms/v1/images/render-preview/from-file/to-resource?";if(null===e)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==e&&(b+="tenantId="+encodeURIComponent(""+e)+"&"),b=b.replace(/[?&]$/,"");var R=new FormData;null!=r&&R.append("resourceOwnerId",r.toString()),null!=a&&R.append("resourceNamespace",a.toString()),null!=p&&R.append("resourceName",p.toString()),null!=s&&R.append("resourceSourceId",s.toString()),null!=i&&R.append("resourceType",i.toString()),null!=u&&R.append("anonymousAccess",u.toString()),null!=c&&R.append("overwriteExistingResource",c.toString()),null!=l&&R.append("sourceFile",l.data,l.fileName?l.fileName:"sourceFile"),null!=f&&R.append("mockupOwnerId",f.toString()),null!=d&&R.append("mockupId",d.toString()),null!=m&&R.append("width",m.toString()),null!=h&&R.append("height",h.toString()),null!=v&&R.append("fileFormat",v.toString()),null!=g&&R.append("fitMode",g.toString());var w={body:R,observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return n.from(this.transformOptions(w)).pipe(t.mergeMap((function(e){return y.http.request("post",b,e)}))).pipe(t.mergeMap((function(e){return y.transformResult(b,e,(function(e){return y.processRenderImagePreviewFromFileToResource(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return y.transformResult(b,e,(function(e){return y.processRenderImagePreviewFromFileToResource(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processRenderImagePreviewFromFileToResource=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.renderImagePreviewFromUrl=function(e,r,a){var p=this,s=this.baseUrl+"/api/atoms/v1/images/render-preview/from-url?";if(null!=e&&(s+="attachment="+encodeURIComponent(""+e)+"&"),null===r)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==r&&(s+="tenantId="+encodeURIComponent(""+r)+"&"),s=s.replace(/[?&]$/,"");var i={body:JSON.stringify(a),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/octet-stream"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("post",s,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processRenderImagePreviewFromUrl(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processRenderImagePreviewFromUrl(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processRenderImagePreviewFromUrl=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}if(200===s||206===s){var m=e.headers?e.headers.get("content-disposition"):void 0,h=m?/filename="?([^"]*?)"?(;|$)/g.exec(m):void 0,v=h&&h.length>1?h[1]:void 0;return n.of({fileName:v,data:i,status:s,headers:c})}return 404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.renderImagePreviewFromUrlToResource=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/images/render-preview/from-url/to-resource?";if(null===e)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processRenderImagePreviewFromUrlToResource(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processRenderImagePreviewFromUrlToResource(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processRenderImagePreviewFromUrlToResource=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.renderImagePreviewToResource=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/images/render-preview/to-resource?";if(null===e)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processRenderImagePreviewToResource(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processRenderImagePreviewToResource(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processRenderImagePreviewToResource=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r}(f);h.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new h(r.ɵɵinject(l),r.ɵɵinject(o.HttpClient),r.ɵɵinject(c,8))},token:h,providedIn:"root"}),h.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],h.ctorParameters=function(){return[{type:l,decorators:[{type:r.Inject,args:[l]}]},{type:o.HttpClient,decorators:[{type:r.Inject,args:[o.HttpClient]}]},{type:String,decorators:[{type:r.Optional},{type:r.Inject,args:[c]}]}]};var v=function(e){function r(r,t,n){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=t,o.baseUrl=null!=n?n:o.getBaseUrl(""),o}return p(r,e),r.prototype.getAttributes=function(e,r,a){var p=this,s=this.baseUrl+"/api/atoms/v1/mockups-3d/{id}/attributes?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(s=s.replace("{id}",encodeURIComponent(""+e)),null!=r&&(s+="ownerId="+encodeURIComponent(""+r)+"&"),null===a)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==a&&(s+="tenantId="+encodeURIComponent(""+a)+"&"),s=s.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("get",s,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processGetAttributes(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processGetAttributes(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetAttributes=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getContentAsProtobuf=function(e,r,a){var p=this,s=this.baseUrl+"/api/atoms/v1/mockups-3d/{id}/content/as-protobuf?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(s=s.replace("{id}",encodeURIComponent(""+e)),null!=r&&(s+="ownerId="+encodeURIComponent(""+r)+"&"),null===a)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==a&&(s+="tenantId="+encodeURIComponent(""+a)+"&"),s=s.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/octet-stream"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("get",s,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processGetContentAsProtobuf(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processGetContentAsProtobuf(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetContentAsProtobuf=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}if(200===s||206===s){var m=e.headers?e.headers.get("content-disposition"):void 0,h=m?/filename="?([^"]*?)"?(;|$)/g.exec(m):void 0,v=h&&h.length>1?h[1]:void 0;return n.of({fileName:v,data:i,status:s,headers:c})}return 404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getGeometryFile=function(e,r,a){var p=this,s=this.baseUrl+"/api/atoms/v1/mockups-3d/{id}/geometry/file?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(s=s.replace("{id}",encodeURIComponent(""+e)),null!=r&&(s+="ownerId="+encodeURIComponent(""+r)+"&"),null===a)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==a&&(s+="tenantId="+encodeURIComponent(""+a)+"&"),s=s.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/octet-stream"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("get",s,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processGetGeometryFile(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processGetGeometryFile(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetGeometryFile=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}if(200===s||206===s){var m=e.headers?e.headers.get("content-disposition"):void 0,h=m?/filename="?([^"]*?)"?(;|$)/g.exec(m):void 0,v=h&&h.length>1?h[1]:void 0;return n.of({fileName:v,data:i,status:s,headers:c})}return 404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r}(f);v.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new v(r.ɵɵinject(l),r.ɵɵinject(o.HttpClient),r.ɵɵinject(c,8))},token:v,providedIn:"root"}),v.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],v.ctorParameters=function(){return[{type:l,decorators:[{type:r.Inject,args:[l]}]},{type:o.HttpClient,decorators:[{type:r.Inject,args:[o.HttpClient]}]},{type:String,decorators:[{type:r.Optional},{type:r.Inject,args:[c]}]}]};var g=function(e){function r(r,t,n){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=t,o.baseUrl=null!=n?n:o.getBaseUrl(""),o}return p(r,e),r.prototype.findPaletteColor=function(e,r,a){var p=this,s=this.baseUrl+"/api/atoms/v1/palettes/find-color?";if(null!=e&&(s+="paletteUID="+encodeURIComponent(""+e)+"&"),null===r)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==r&&(s+="tenantId="+encodeURIComponent(""+r)+"&"),s=s.replace(/[?&]$/,"");var i={body:JSON.stringify(a),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("post",s,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processFindPaletteColor(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processFindPaletteColor(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processFindPaletteColor=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):400===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Bad Request",s,e,c,r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getPaletteModel=function(e,r,a){var p=this,s=this.baseUrl+"/api/atoms/v1/palettes/model?";if(null!=e&&(s+="id="+encodeURIComponent(""+e)+"&"),null!=r&&(s+="uid="+encodeURIComponent(""+r)+"&"),null===a)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==a&&(s+="tenantId="+encodeURIComponent(""+a)+"&"),s=s.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("get",s,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processGetPaletteModel(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processGetPaletteModel(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetPaletteModel=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):400===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Bad Request",s,e,c,r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r}(f);g.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new g(r.ɵɵinject(l),r.ɵɵinject(o.HttpClient),r.ɵɵinject(c,8))},token:g,providedIn:"root"}),g.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],g.ctorParameters=function(){return[{type:l,decorators:[{type:r.Inject,args:[l]}]},{type:o.HttpClient,decorators:[{type:r.Inject,args:[o.HttpClient]}]},{type:String,decorators:[{type:r.Optional},{type:r.Inject,args:[c]}]}]};var y=function(e){function r(r,t,n){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=t,o.baseUrl=null!=n?n:o.getBaseUrl(""),o}return p(r,e),r.prototype.patchDesignProduct=function(e,r,a,p,s,i,u,c,l){var f=this,d=this.baseUrl+"/api/atoms/v1/designs/{id}/print-product?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(d=d.replace("{id}",encodeURIComponent(""+e)),null!=r&&(d+="privateStorageOwner="+encodeURIComponent(""+r)+"&"),null===a)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==a&&(d+="tenantId="+encodeURIComponent(""+a)+"&"),d=d.replace(/[?&]$/,"");var m=new FormData;null!=p&&m.append("patchType",p.toString()),null!=s&&m.append("replaceImageItemFileInfo.itemName",s.toString()),null!=i&&m.append("replaceImageItemFileInfo.sourceFile",i.data,i.fileName?i.fileName:"replaceImageItemFileInfo.sourceFile"),null!=u&&m.append("replacePlaceholderItemContentInfo.placeholderItemName",u.toString()),null!=c&&m.append("replacePlaceholderItemContentInfo.newContentType",c.toString()),null!=l&&m.append("replacePlaceholderItemContentInfo.sourceFile",l.data,l.fileName?l.fileName:"replacePlaceholderItemContentInfo.sourceFile");var h={body:m,observe:"response",responseType:"blob",headers:new o.HttpHeaders({})};return n.from(this.transformOptions(h)).pipe(t.mergeMap((function(e){return f.http.request("patch",d,e)}))).pipe(t.mergeMap((function(e){return f.transformResult(d,e,(function(e){return f.processPatchDesignProduct(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return f.transformResult(d,e,(function(e){return f.processPatchDesignProduct(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processPatchDesignProduct=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 204===s?B(i).pipe(t.mergeMap((function(e){return n.of(null)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getDesignSurfaceContainers=function(e,r,a,p){var s=this,i=this.baseUrl+"/api/atoms/v1/designs/{id}/print-product/containers?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(i=i.replace("{id}",encodeURIComponent(""+e)),null!=r&&(i+="surfaceId="+encodeURIComponent(""+r)+"&"),null!=a&&(i+="privateStorageOwner="+encodeURIComponent(""+a)+"&"),null===p)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==p&&(i+="tenantId="+encodeURIComponent(""+p)+"&"),i=i.replace(/[?&]$/,"");var u={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return n.from(this.transformOptions(u)).pipe(t.mergeMap((function(e){return s.http.request("get",i,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(i,e,(function(e){return s.processGetDesignSurfaceContainers(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(i,e,(function(e){return s.processGetDesignSurfaceContainers(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetDesignSurfaceContainers=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.deleteDesignSurfaceContainer=function(e,r,a,p){var s=this,i=this.baseUrl+"/api/atoms/v1/designs/{id}/print-product/containers/{containerId}?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(i=i.replace("{id}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'containerId' must be defined.");if(i=i.replace("{containerId}",encodeURIComponent(""+r)),null!=a&&(i+="privateStorageOwner="+encodeURIComponent(""+a)+"&"),null===p)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==p&&(i+="tenantId="+encodeURIComponent(""+p)+"&"),i=i.replace(/[?&]$/,"");var u={observe:"response",responseType:"blob",headers:new o.HttpHeaders({})};return n.from(this.transformOptions(u)).pipe(t.mergeMap((function(e){return s.http.request("delete",i,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(i,e,(function(e){return s.processDeleteDesignSurfaceContainer(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(i,e,(function(e){return s.processDeleteDesignSurfaceContainer(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processDeleteDesignSurfaceContainer=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 204===s?B(i).pipe(t.mergeMap((function(e){return n.of(null)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getDesignSurfaceContainerModel=function(e,r,a,p){var s=this,i=this.baseUrl+"/api/atoms/v1/designs/{id}/print-product/containers/{containerId}/model?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(i=i.replace("{id}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'containerId' must be defined.");if(i=i.replace("{containerId}",encodeURIComponent(""+r)),null!=a&&(i+="privateStorageOwner="+encodeURIComponent(""+a)+"&"),null===p)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==p&&(i+="tenantId="+encodeURIComponent(""+p)+"&"),i=i.replace(/[?&]$/,"");var u={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return n.from(this.transformOptions(u)).pipe(t.mergeMap((function(e){return s.http.request("get",i,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(i,e,(function(e){return s.processGetDesignSurfaceContainerModel(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(i,e,(function(e){return s.processGetDesignSurfaceContainerModel(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetDesignSurfaceContainerModel=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.updateDesignSurfaceContainerModel=function(e,r,a,p,s){var i=this,u=this.baseUrl+"/api/atoms/v1/designs/{id}/print-product/containers/{containerId}/model?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(u=u.replace("{id}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'containerId' must be defined.");if(u=u.replace("{containerId}",encodeURIComponent(""+r)),null!=a&&(u+="privateStorageOwner="+encodeURIComponent(""+a)+"&"),null===p)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==p&&(u+="tenantId="+encodeURIComponent(""+p)+"&"),u=u.replace(/[?&]$/,"");var c={body:JSON.stringify(s),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(c)).pipe(t.mergeMap((function(e){return i.http.request("put",u,e)}))).pipe(t.mergeMap((function(e){return i.transformResult(u,e,(function(e){return i.processUpdateDesignSurfaceContainerModel(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return i.transformResult(u,e,(function(e){return i.processUpdateDesignSurfaceContainerModel(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processUpdateDesignSurfaceContainerModel=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):400===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Bad Request",s,e,c,r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.addDesignSurfaceContainerModel=function(e,r,a,p,s,i,u,c){var l=this,f=this.baseUrl+"/api/atoms/v1/designs/{id}/print-product/containers/model?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(f=f.replace("{id}",encodeURIComponent(""+e)),null!=r&&(f+="surfaceId="+encodeURIComponent(""+r)+"&"),null!=a&&(f+="index="+encodeURIComponent(""+a)+"&"),null===p)throw new Error("The parameter 'top' cannot be null.");if(void 0!==p&&(f+="top="+encodeURIComponent(""+p)+"&"),null===s)throw new Error("The parameter 'left' cannot be null.");if(void 0!==s&&(f+="left="+encodeURIComponent(""+s)+"&"),null!=i&&(f+="privateStorageOwner="+encodeURIComponent(""+i)+"&"),null===u)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==u&&(f+="tenantId="+encodeURIComponent(""+u)+"&"),f=f.replace(/[?&]$/,"");var d={body:JSON.stringify(c),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(d)).pipe(t.mergeMap((function(e){return l.http.request("post",f,e)}))).pipe(t.mergeMap((function(e){return l.transformResult(f,e,(function(e){return l.processAddDesignSurfaceContainerModel(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return l.transformResult(f,e,(function(e){return l.processAddDesignSurfaceContainerModel(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processAddDesignSurfaceContainerModel=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):400===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Bad Request",s,e,c,r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getDesignSurfaceItems=function(e,r,a,p,s,i){var u=this,c=this.baseUrl+"/api/atoms/v1/designs/{id}/print-product/items?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(c=c.replace("{id}",encodeURIComponent(""+e)),null!=r&&(c+="surfaceId="+encodeURIComponent(""+r)+"&"),null!=a&&(c+="containerId="+encodeURIComponent(""+a)+"&"),null!=p&&(c+="parentItemId="+encodeURIComponent(""+p)+"&"),null!=s&&(c+="privateStorageOwner="+encodeURIComponent(""+s)+"&"),null===i)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==i&&(c+="tenantId="+encodeURIComponent(""+i)+"&"),c=c.replace(/[?&]$/,"");var l={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return n.from(this.transformOptions(l)).pipe(t.mergeMap((function(e){return u.http.request("get",c,e)}))).pipe(t.mergeMap((function(e){return u.transformResult(c,e,(function(e){return u.processGetDesignSurfaceItems(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return u.transformResult(c,e,(function(e){return u.processGetDesignSurfaceItems(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetDesignSurfaceItems=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.deleteDesignSurfaceItem=function(e,r,a,p){var s=this,i=this.baseUrl+"/api/atoms/v1/designs/{id}/print-product/items/{itemId}?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(i=i.replace("{id}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'itemId' must be defined.");if(i=i.replace("{itemId}",encodeURIComponent(""+r)),null!=a&&(i+="privateStorageOwner="+encodeURIComponent(""+a)+"&"),null===p)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==p&&(i+="tenantId="+encodeURIComponent(""+p)+"&"),i=i.replace(/[?&]$/,"");var u={observe:"response",responseType:"blob",headers:new o.HttpHeaders({})};return n.from(this.transformOptions(u)).pipe(t.mergeMap((function(e){return s.http.request("delete",i,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(i,e,(function(e){return s.processDeleteDesignSurfaceItem(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(i,e,(function(e){return s.processDeleteDesignSurfaceItem(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processDeleteDesignSurfaceItem=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 204===s?B(i).pipe(t.mergeMap((function(e){return n.of(null)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getDesignSurfaceItemModel=function(e,r,a,p){var s=this,i=this.baseUrl+"/api/atoms/v1/designs/{id}/print-product/items/{itemId}/model?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(i=i.replace("{id}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'itemId' must be defined.");if(i=i.replace("{itemId}",encodeURIComponent(""+r)),null!=a&&(i+="privateStorageOwner="+encodeURIComponent(""+a)+"&"),null===p)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==p&&(i+="tenantId="+encodeURIComponent(""+p)+"&"),i=i.replace(/[?&]$/,"");var u={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return n.from(this.transformOptions(u)).pipe(t.mergeMap((function(e){return s.http.request("get",i,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(i,e,(function(e){return s.processGetDesignSurfaceItemModel(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(i,e,(function(e){return s.processGetDesignSurfaceItemModel(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetDesignSurfaceItemModel=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.updateDesignSurfaceItemModel=function(e,r,a,p,s){var i=this,u=this.baseUrl+"/api/atoms/v1/designs/{id}/print-product/items/{itemId}/model?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(u=u.replace("{id}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'itemId' must be defined.");if(u=u.replace("{itemId}",encodeURIComponent(""+r)),null!=a&&(u+="privateStorageOwner="+encodeURIComponent(""+a)+"&"),null===p)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==p&&(u+="tenantId="+encodeURIComponent(""+p)+"&"),u=u.replace(/[?&]$/,"");var c={body:JSON.stringify(s),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(c)).pipe(t.mergeMap((function(e){return i.http.request("put",u,e)}))).pipe(t.mergeMap((function(e){return i.transformResult(u,e,(function(e){return i.processUpdateDesignSurfaceItemModel(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return i.transformResult(u,e,(function(e){return i.processUpdateDesignSurfaceItemModel(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processUpdateDesignSurfaceItemModel=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):400===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Bad Request",s,e,c,r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.addDesignSurfaceItemModel=function(e,r,a,p,s,i,u,c){var l=this,f=this.baseUrl+"/api/atoms/v1/designs/{id}/print-product/items/model?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(f=f.replace("{id}",encodeURIComponent(""+e)),null!=r&&(f+="containerId="+encodeURIComponent(""+r)+"&"),null!=a&&(f+="index="+encodeURIComponent(""+a)+"&"),null===p)throw new Error("The parameter 'top' cannot be null.");if(void 0!==p&&(f+="top="+encodeURIComponent(""+p)+"&"),null===s)throw new Error("The parameter 'left' cannot be null.");if(void 0!==s&&(f+="left="+encodeURIComponent(""+s)+"&"),null!=i&&(f+="privateStorageOwner="+encodeURIComponent(""+i)+"&"),null===u)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==u&&(f+="tenantId="+encodeURIComponent(""+u)+"&"),f=f.replace(/[?&]$/,"");var d={body:JSON.stringify(c),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(d)).pipe(t.mergeMap((function(e){return l.http.request("post",f,e)}))).pipe(t.mergeMap((function(e){return l.transformResult(f,e,(function(e){return l.processAddDesignSurfaceItemModel(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return l.transformResult(f,e,(function(e){return l.processAddDesignSurfaceItemModel(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processAddDesignSurfaceItemModel=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):400===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Bad Request",s,e,c,r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getDesignProductModel=function(e,r,a){var p=this,s=this.baseUrl+"/api/atoms/v1/designs/{id}/print-product/model?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(s=s.replace("{id}",encodeURIComponent(""+e)),null!=r&&(s+="privateStorageOwner="+encodeURIComponent(""+r)+"&"),null===a)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==a&&(s+="tenantId="+encodeURIComponent(""+a)+"&"),s=s.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("get",s,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processGetDesignProductModel(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processGetDesignProductModel(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetDesignProductModel=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.updateDesignProductModel=function(e,r,a,p){var s=this,i=this.baseUrl+"/api/atoms/v1/designs/{id}/print-product/model?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(i=i.replace("{id}",encodeURIComponent(""+e)),null!=r&&(i+="privateStorageOwner="+encodeURIComponent(""+r)+"&"),null===a)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==a&&(i+="tenantId="+encodeURIComponent(""+a)+"&"),i=i.replace(/[?&]$/,"");var u={body:JSON.stringify(p),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json"})};return n.from(this.transformOptions(u)).pipe(t.mergeMap((function(e){return s.http.request("put",i,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(i,e,(function(e){return s.processUpdateDesignProductModel(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(i,e,(function(e){return s.processUpdateDesignProductModel(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processUpdateDesignProductModel=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 204===s?B(i).pipe(t.mergeMap((function(e){return n.of(null)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getDesignPrintAreas=function(e,r,a,p){var s=this,i=this.baseUrl+"/api/atoms/v1/designs/{id}/print-product/print-areas?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(i=i.replace("{id}",encodeURIComponent(""+e)),null!=r&&(i+="surfaceId="+encodeURIComponent(""+r)+"&"),null!=a&&(i+="privateStorageOwner="+encodeURIComponent(""+a)+"&"),null===p)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==p&&(i+="tenantId="+encodeURIComponent(""+p)+"&"),i=i.replace(/[?&]$/,"");var u={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return n.from(this.transformOptions(u)).pipe(t.mergeMap((function(e){return s.http.request("get",i,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(i,e,(function(e){return s.processGetDesignPrintAreas(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(i,e,(function(e){return s.processGetDesignPrintAreas(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetDesignPrintAreas=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.addDesignPrintArea=function(e,r,a,p){var s=this,i=this.baseUrl+"/api/atoms/v1/designs/{id}/print-product/print-areas?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(i=i.replace("{id}",encodeURIComponent(""+e)),null!=r&&(i+="privateStorageOwner="+encodeURIComponent(""+r)+"&"),null===a)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==a&&(i+="tenantId="+encodeURIComponent(""+a)+"&"),i=i.replace(/[?&]$/,"");var u={body:JSON.stringify(p),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(u)).pipe(t.mergeMap((function(e){return s.http.request("post",i,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(i,e,(function(e){return s.processAddDesignPrintArea(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(i,e,(function(e){return s.processAddDesignPrintArea(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processAddDesignPrintArea=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):400===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Bad Request",s,e,c,r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.updateDesignPrintArea=function(e,r,a,p,s){var i=this,u=this.baseUrl+"/api/atoms/v1/designs/{id}/print-product/print-areas/{printAreaId}?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(u=u.replace("{id}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'printAreaId' must be defined.");if(u=u.replace("{printAreaId}",encodeURIComponent(""+r)),null!=a&&(u+="privateStorageOwner="+encodeURIComponent(""+a)+"&"),null===p)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==p&&(u+="tenantId="+encodeURIComponent(""+p)+"&"),u=u.replace(/[?&]$/,"");var c={body:JSON.stringify(s),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(c)).pipe(t.mergeMap((function(e){return i.http.request("put",u,e)}))).pipe(t.mergeMap((function(e){return i.transformResult(u,e,(function(e){return i.processUpdateDesignPrintArea(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return i.transformResult(u,e,(function(e){return i.processUpdateDesignPrintArea(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processUpdateDesignPrintArea=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):400===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Bad Request",s,e,c,r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.deleteDesignPrintArea=function(e,r,a,p){var s=this,i=this.baseUrl+"/api/atoms/v1/designs/{id}/print-product/print-areas/{printAreaId}?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(i=i.replace("{id}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'printAreaId' must be defined.");if(i=i.replace("{printAreaId}",encodeURIComponent(""+r)),null!=a&&(i+="privateStorageOwner="+encodeURIComponent(""+a)+"&"),null===p)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==p&&(i+="tenantId="+encodeURIComponent(""+p)+"&"),i=i.replace(/[?&]$/,"");var u={observe:"response",responseType:"blob",headers:new o.HttpHeaders({})};return n.from(this.transformOptions(u)).pipe(t.mergeMap((function(e){return s.http.request("delete",i,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(i,e,(function(e){return s.processDeleteDesignPrintArea(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(i,e,(function(e){return s.processDeleteDesignPrintArea(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processDeleteDesignPrintArea=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 204===s?B(i).pipe(t.mergeMap((function(e){return n.of(null)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getDesignPrintAreaModel=function(e,r,a,p){var s=this,i=this.baseUrl+"/api/atoms/v1/designs/{id}/print-product/print-areas/{printAreaId}/model?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(i=i.replace("{id}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'printAreaId' must be defined.");if(i=i.replace("{printAreaId}",encodeURIComponent(""+r)),null!=a&&(i+="privateStorageOwner="+encodeURIComponent(""+a)+"&"),null===p)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==p&&(i+="tenantId="+encodeURIComponent(""+p)+"&"),i=i.replace(/[?&]$/,"");var u={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return n.from(this.transformOptions(u)).pipe(t.mergeMap((function(e){return s.http.request("get",i,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(i,e,(function(e){return s.processGetDesignPrintAreaModel(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(i,e,(function(e){return s.processGetDesignPrintAreaModel(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetDesignPrintAreaModel=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.updateDesignPrintAreaModel=function(e,r,a,p,s){var i=this,u=this.baseUrl+"/api/atoms/v1/designs/{id}/print-product/print-areas/{printAreaId}/model?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(u=u.replace("{id}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'printAreaId' must be defined.");if(u=u.replace("{printAreaId}",encodeURIComponent(""+r)),null!=a&&(u+="privateStorageOwner="+encodeURIComponent(""+a)+"&"),null===p)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==p&&(u+="tenantId="+encodeURIComponent(""+p)+"&"),u=u.replace(/[?&]$/,"");var c={body:JSON.stringify(s),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(c)).pipe(t.mergeMap((function(e){return i.http.request("put",u,e)}))).pipe(t.mergeMap((function(e){return i.transformResult(u,e,(function(e){return i.processUpdateDesignPrintAreaModel(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return i.transformResult(u,e,(function(e){return i.processUpdateDesignPrintAreaModel(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processUpdateDesignPrintAreaModel=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):400===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Bad Request",s,e,c,r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.addDesignPrintAreaModel=function(e,r,a,p,s){var i=this,u=this.baseUrl+"/api/atoms/v1/designs/{id}/print-product/print-areas/model?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(u=u.replace("{id}",encodeURIComponent(""+e)),null!=r&&(u+="surfaceId="+encodeURIComponent(""+r)+"&"),null!=a&&(u+="privateStorageOwner="+encodeURIComponent(""+a)+"&"),null===p)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==p&&(u+="tenantId="+encodeURIComponent(""+p)+"&"),u=u.replace(/[?&]$/,"");var c={body:JSON.stringify(s),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(c)).pipe(t.mergeMap((function(e){return i.http.request("post",u,e)}))).pipe(t.mergeMap((function(e){return i.transformResult(u,e,(function(e){return i.processAddDesignPrintAreaModel(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return i.transformResult(u,e,(function(e){return i.processAddDesignPrintAreaModel(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processAddDesignPrintAreaModel=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):400===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Bad Request",s,e,c,r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getDesignSurfaces=function(e,r,a){var p=this,s=this.baseUrl+"/api/atoms/v1/designs/{id}/print-product/surfaces?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(s=s.replace("{id}",encodeURIComponent(""+e)),null!=r&&(s+="privateStorageOwner="+encodeURIComponent(""+r)+"&"),null===a)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==a&&(s+="tenantId="+encodeURIComponent(""+a)+"&"),s=s.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("get",s,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processGetDesignSurfaces(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processGetDesignSurfaces(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetDesignSurfaces=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.deleteDesignSurface=function(e,r,a,p){var s=this,i=this.baseUrl+"/api/atoms/v1/designs/{id}/print-product/surfaces/{surfaceId}?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(i=i.replace("{id}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'surfaceId' must be defined.");if(i=i.replace("{surfaceId}",encodeURIComponent(""+r)),null!=a&&(i+="privateStorageOwner="+encodeURIComponent(""+a)+"&"),null===p)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==p&&(i+="tenantId="+encodeURIComponent(""+p)+"&"),i=i.replace(/[?&]$/,"");var u={observe:"response",responseType:"blob",headers:new o.HttpHeaders({})};return n.from(this.transformOptions(u)).pipe(t.mergeMap((function(e){return s.http.request("delete",i,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(i,e,(function(e){return s.processDeleteDesignSurface(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(i,e,(function(e){return s.processDeleteDesignSurface(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processDeleteDesignSurface=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 204===s?B(i).pipe(t.mergeMap((function(e){return n.of(null)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getDesignSurfaceDownMockup=function(e,r,a,p){var s=this,i=this.baseUrl+"/api/atoms/v1/designs/{id}/print-product/surfaces/{surfaceId}/mockup-down?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(i=i.replace("{id}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'surfaceId' must be defined.");if(i=i.replace("{surfaceId}",encodeURIComponent(""+r)),null!=a&&(i+="privateStorageOwner="+encodeURIComponent(""+a)+"&"),null===p)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==p&&(i+="tenantId="+encodeURIComponent(""+p)+"&"),i=i.replace(/[?&]$/,"");var u={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return n.from(this.transformOptions(u)).pipe(t.mergeMap((function(e){return s.http.request("get",i,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(i,e,(function(e){return s.processGetDesignSurfaceDownMockup(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(i,e,(function(e){return s.processGetDesignSurfaceDownMockup(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetDesignSurfaceDownMockup=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):400===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Bad Request",s,e,c,r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.updateDesignSurfaceDownMockup=function(e,r,a,p,s,i,u){var c=this,l=this.baseUrl+"/api/atoms/v1/designs/{id}/print-product/surfaces/{surfaceId}/mockup-down?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(l=l.replace("{id}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'surfaceId' must be defined.");if(l=l.replace("{surfaceId}",encodeURIComponent(""+r)),null!=a&&(l+="privateStorageOwner="+encodeURIComponent(""+a)+"&"),null===p)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==p&&(l+="tenantId="+encodeURIComponent(""+p)+"&"),l=l.replace(/[?&]$/,"");var f=new FormData;if(null==s)throw new Error("The parameter 'position_top' cannot be null.");if(f.append("position.top",s.toString()),null==i)throw new Error("The parameter 'position_left' cannot be null.");f.append("position.left",i.toString()),null!=u&&f.append("sourceFile",u.data,u.fileName?u.fileName:"sourceFile");var d={body:f,observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return n.from(this.transformOptions(d)).pipe(t.mergeMap((function(e){return c.http.request("patch",l,e)}))).pipe(t.mergeMap((function(e){return c.transformResult(l,e,(function(e){return c.processUpdateDesignSurfaceDownMockup(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return c.transformResult(l,e,(function(e){return c.processUpdateDesignSurfaceDownMockup(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processUpdateDesignSurfaceDownMockup=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):400===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Bad Request",s,e,c,r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getDesignSurfaceDownMockupContent=function(e,r,a,p){var s=this,i=this.baseUrl+"/api/atoms/v1/designs/{id}/print-product/surfaces/{surfaceId}/mockup-down/file?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(i=i.replace("{id}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'surfaceId' must be defined.");if(i=i.replace("{surfaceId}",encodeURIComponent(""+r)),null!=a&&(i+="privateStorageOwner="+encodeURIComponent(""+a)+"&"),null===p)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==p&&(i+="tenantId="+encodeURIComponent(""+p)+"&"),i=i.replace(/[?&]$/,"");var u={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/octet-stream"})};return n.from(this.transformOptions(u)).pipe(t.mergeMap((function(e){return s.http.request("get",i,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(i,e,(function(e){return s.processGetDesignSurfaceDownMockupContent(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(i,e,(function(e){return s.processGetDesignSurfaceDownMockupContent(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetDesignSurfaceDownMockupContent=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}if(200===s||206===s){var m=e.headers?e.headers.get("content-disposition"):void 0,h=m?/filename="?([^"]*?)"?(;|$)/g.exec(m):void 0,v=h&&h.length>1?h[1]:void 0;return n.of({fileName:v,data:i,status:s,headers:c})}return 400===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Bad Request",s,e,c,r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getDesignSurfaceUpMockup=function(e,r,a,p){var s=this,i=this.baseUrl+"/api/atoms/v1/designs/{id}/print-product/surfaces/{surfaceId}/mockup-up?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(i=i.replace("{id}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'surfaceId' must be defined.");if(i=i.replace("{surfaceId}",encodeURIComponent(""+r)),null!=a&&(i+="privateStorageOwner="+encodeURIComponent(""+a)+"&"),null===p)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==p&&(i+="tenantId="+encodeURIComponent(""+p)+"&"),i=i.replace(/[?&]$/,"");var u={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return n.from(this.transformOptions(u)).pipe(t.mergeMap((function(e){return s.http.request("get",i,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(i,e,(function(e){return s.processGetDesignSurfaceUpMockup(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(i,e,(function(e){return s.processGetDesignSurfaceUpMockup(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetDesignSurfaceUpMockup=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):400===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Bad Request",s,e,c,r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.updateDesignSurfaceUpMockup=function(e,r,a,p,s,i,u){var c=this,l=this.baseUrl+"/api/atoms/v1/designs/{id}/print-product/surfaces/{surfaceId}/mockup-up?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(l=l.replace("{id}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'surfaceId' must be defined.");if(l=l.replace("{surfaceId}",encodeURIComponent(""+r)),null!=a&&(l+="privateStorageOwner="+encodeURIComponent(""+a)+"&"),null===p)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==p&&(l+="tenantId="+encodeURIComponent(""+p)+"&"),l=l.replace(/[?&]$/,"");var f=new FormData;if(null==s)throw new Error("The parameter 'position_top' cannot be null.");if(f.append("position.top",s.toString()),null==i)throw new Error("The parameter 'position_left' cannot be null.");f.append("position.left",i.toString()),null!=u&&f.append("sourceFile",u.data,u.fileName?u.fileName:"sourceFile");var d={body:f,observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return n.from(this.transformOptions(d)).pipe(t.mergeMap((function(e){return c.http.request("patch",l,e)}))).pipe(t.mergeMap((function(e){return c.transformResult(l,e,(function(e){return c.processUpdateDesignSurfaceUpMockup(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return c.transformResult(l,e,(function(e){return c.processUpdateDesignSurfaceUpMockup(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processUpdateDesignSurfaceUpMockup=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):400===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Bad Request",s,e,c,r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getDesignSurfaceUpMockupContent=function(e,r,a,p){var s=this,i=this.baseUrl+"/api/atoms/v1/designs/{id}/print-product/surfaces/{surfaceId}/mockup-up/file?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(i=i.replace("{id}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'surfaceId' must be defined.");if(i=i.replace("{surfaceId}",encodeURIComponent(""+r)),null!=a&&(i+="privateStorageOwner="+encodeURIComponent(""+a)+"&"),null===p)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==p&&(i+="tenantId="+encodeURIComponent(""+p)+"&"),i=i.replace(/[?&]$/,"");var u={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/octet-stream"})};return n.from(this.transformOptions(u)).pipe(t.mergeMap((function(e){return s.http.request("get",i,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(i,e,(function(e){return s.processGetDesignSurfaceUpMockupContent(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(i,e,(function(e){return s.processGetDesignSurfaceUpMockupContent(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetDesignSurfaceUpMockupContent=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}if(200===s||206===s){var m=e.headers?e.headers.get("content-disposition"):void 0,h=m?/filename="?([^"]*?)"?(;|$)/g.exec(m):void 0,v=h&&h.length>1?h[1]:void 0;return n.of({fileName:v,data:i,status:s,headers:c})}return 400===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Bad Request",s,e,c,r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getDesignSurfaceModel=function(e,r,a,p){var s=this,i=this.baseUrl+"/api/atoms/v1/designs/{id}/print-product/surfaces/{surfaceId}/model?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(i=i.replace("{id}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'surfaceId' must be defined.");if(i=i.replace("{surfaceId}",encodeURIComponent(""+r)),null!=a&&(i+="privateStorageOwner="+encodeURIComponent(""+a)+"&"),null===p)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==p&&(i+="tenantId="+encodeURIComponent(""+p)+"&"),i=i.replace(/[?&]$/,"");var u={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return n.from(this.transformOptions(u)).pipe(t.mergeMap((function(e){return s.http.request("get",i,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(i,e,(function(e){return s.processGetDesignSurfaceModel(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(i,e,(function(e){return s.processGetDesignSurfaceModel(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetDesignSurfaceModel=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.replaceDesignSurfaceModel=function(e,r,a,p,s){var i=this,u=this.baseUrl+"/api/atoms/v1/designs/{id}/print-product/surfaces/{surfaceId}/model?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(u=u.replace("{id}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'surfaceId' must be defined.");if(u=u.replace("{surfaceId}",encodeURIComponent(""+r)),null!=a&&(u+="privateStorageOwner="+encodeURIComponent(""+a)+"&"),null===p)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==p&&(u+="tenantId="+encodeURIComponent(""+p)+"&"),u=u.replace(/[?&]$/,"");var c={body:JSON.stringify(s),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(c)).pipe(t.mergeMap((function(e){return i.http.request("put",u,e)}))).pipe(t.mergeMap((function(e){return i.transformResult(u,e,(function(e){return i.processReplaceDesignSurfaceModel(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return i.transformResult(u,e,(function(e){return i.processReplaceDesignSurfaceModel(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processReplaceDesignSurfaceModel=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):400===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Bad Request",s,e,c,r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.addDesignSurfaceModel=function(e,r,a,p,s){var i=this,u=this.baseUrl+"/api/atoms/v1/designs/{id}/print-product/surfaces/model?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(u=u.replace("{id}",encodeURIComponent(""+e)),null!=r&&(u+="index="+encodeURIComponent(""+r)+"&"),null!=a&&(u+="privateStorageOwner="+encodeURIComponent(""+a)+"&"),null===p)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==p&&(u+="tenantId="+encodeURIComponent(""+p)+"&"),u=u.replace(/[?&]$/,"");var c={body:JSON.stringify(s),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(c)).pipe(t.mergeMap((function(e){return i.http.request("post",u,e)}))).pipe(t.mergeMap((function(e){return i.transformResult(u,e,(function(e){return i.processAddDesignSurfaceModel(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return i.transformResult(u,e,(function(e){return i.processAddDesignSurfaceModel(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processAddDesignSurfaceModel=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):400===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Bad Request",s,e,c,r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r}(f);y.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new y(r.ɵɵinject(l),r.ɵɵinject(o.HttpClient),r.ɵɵinject(c,8))},token:y,providedIn:"root"}),y.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],y.ctorParameters=function(){return[{type:l,decorators:[{type:r.Inject,args:[l]}]},{type:o.HttpClient,decorators:[{type:r.Inject,args:[o.HttpClient]}]},{type:String,decorators:[{type:r.Optional},{type:r.Inject,args:[c]}]}]};var b=function(e){function r(r,t,n){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=t,o.baseUrl=null!=n?n:o.getBaseUrl(""),o}return p(r,e),r.prototype.applyItemEffects=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/designs/print-product/items/apply-effects?";if(null===e)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processApplyItemEffects(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processApplyItemEffects(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processApplyItemEffects=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.extractItemImage=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/designs/print-product/items/extract-image?";if(null===e)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/octet-stream"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processExtractItemImage(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processExtractItemImage(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processExtractItemImage=function(e){var r,a,p=e.status,s=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,i={};if(e.headers)try{for(var c=u(e.headers.keys()),l=c.next();!l.done;l=c.next()){var f=l.value;i[f]=e.headers.get(f)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(a=c.return)&&a.call(c)}finally{if(r)throw r.error}}if(200===p||206===p){var d=e.headers?e.headers.get("content-disposition"):void 0,m=d?/filename="?([^"]*?)"?(;|$)/g.exec(d):void 0,h=m&&m.length>1?m[1]:void 0;return n.of({fileName:h,data:s,status:p,headers:i})}return 401===p?B(s).pipe(t.mergeMap((function(e){return A("Unauthorized",p,e,i)}))):403===p?B(s).pipe(t.mergeMap((function(e){return A("Forbidden",p,e,i)}))):200!==p&&204!==p?B(s).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",p,e,i)}))):n.of(null)},r.prototype.flattenItems=function(e,r,a){var p=this,s=this.baseUrl+"/api/atoms/v1/designs/print-product/items/flatten?";if(null!=e&&(s+="paletteUID="+encodeURIComponent(""+e)+"&"),null===r)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==r&&(s+="tenantId="+encodeURIComponent(""+r)+"&"),s=s.replace(/[?&]$/,"");var i={body:JSON.stringify(a),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("post",s,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processFlattenItems(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processFlattenItems(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processFlattenItems=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.createItemFromFile=function(e,r,a,p,s){var i=this,u=this.baseUrl+"/api/atoms/v1/designs/print-product/items/from-file?";if(null!=e&&(u+="itemType="+encodeURIComponent(""+e)+"&"),null===r)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==r&&(u+="tenantId="+encodeURIComponent(""+r)+"&"),u=u.replace(/[?&]$/,"");var c=new FormData;null!=a&&c.append("sourceFile",a.data,a.fileName?a.fileName:"sourceFile"),null!=p&&c.append("paletteUID",p.toString()),null!=s&&c.append("preserveOriginalFile",s.toString());var l={body:c,observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return n.from(this.transformOptions(l)).pipe(t.mergeMap((function(e){return i.http.request("post",u,e)}))).pipe(t.mergeMap((function(e){return i.transformResult(u,e,(function(e){return i.processCreateItemFromFile(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return i.transformResult(u,e,(function(e){return i.processCreateItemFromFile(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processCreateItemFromFile=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.batchCreateItemsFromFile=function(e,r,a,p,s){var i=this,u=this.baseUrl+"/api/atoms/v1/designs/print-product/items/from-file/batch-create?";if(null!=e&&(u+="itemType="+encodeURIComponent(""+e)+"&"),null===r)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==r&&(u+="tenantId="+encodeURIComponent(""+r)+"&"),u=u.replace(/[?&]$/,"");var c=new FormData;null!=a&&a.forEach((function(e){return c.append("sourceFiles",e.data,e.fileName?e.fileName:"sourceFiles")})),null!=p&&c.append("paletteUID",p.toString()),null!=s&&c.append("preserveOriginalFile",s.toString());var l={body:c,observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return n.from(this.transformOptions(l)).pipe(t.mergeMap((function(e){return i.http.request("post",u,e)}))).pipe(t.mergeMap((function(e){return i.transformResult(u,e,(function(e){return i.processBatchCreateItemsFromFile(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return i.transformResult(u,e,(function(e){return i.processBatchCreateItemsFromFile(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processBatchCreateItemsFromFile=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.createItemFromStorage=function(e,r,a){var p=this,s=this.baseUrl+"/api/atoms/v1/designs/print-product/items/from-storage?";if(null!=e&&(s+="itemType="+encodeURIComponent(""+e)+"&"),null===r)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==r&&(s+="tenantId="+encodeURIComponent(""+r)+"&"),s=s.replace(/[?&]$/,"");var i={body:JSON.stringify(a),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("post",s,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processCreateItemFromStorage(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processCreateItemFromStorage(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processCreateItemFromStorage=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.batchCreateItemsFromStorage=function(e,r,a){var p=this,s=this.baseUrl+"/api/atoms/v1/designs/print-product/items/from-storage/batch-create?";if(null!=e&&(s+="itemType="+encodeURIComponent(""+e)+"&"),null===r)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==r&&(s+="tenantId="+encodeURIComponent(""+r)+"&"),s=s.replace(/[?&]$/,"");var i={body:JSON.stringify(a),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("post",s,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processBatchCreateItemsFromStorage(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processBatchCreateItemsFromStorage(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processBatchCreateItemsFromStorage=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.createItemFromUrl=function(e,r,a){var p=this,s=this.baseUrl+"/api/atoms/v1/designs/print-product/items/from-url?";if(null!=e&&(s+="itemType="+encodeURIComponent(""+e)+"&"),null===r)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==r&&(s+="tenantId="+encodeURIComponent(""+r)+"&"),s=s.replace(/[?&]$/,"");var i={body:JSON.stringify(a),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("post",s,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processCreateItemFromUrl(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processCreateItemFromUrl(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processCreateItemFromUrl=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.batchCreateItemsFromUrl=function(e,r,a){var p=this,s=this.baseUrl+"/api/atoms/v1/designs/print-product/items/from-url/batch-create?";if(null!=e&&(s+="itemType="+encodeURIComponent(""+e)+"&"),null===r)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==r&&(s+="tenantId="+encodeURIComponent(""+r)+"&"),s=s.replace(/[?&]$/,"");var i={body:JSON.stringify(a),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("post",s,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processBatchCreateItemsFromUrl(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processBatchCreateItemsFromUrl(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processBatchCreateItemsFromUrl=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r}(f);b.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new b(r.ɵɵinject(l),r.ɵɵinject(o.HttpClient),r.ɵɵinject(c,8))},token:b,providedIn:"root"}),b.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],b.ctorParameters=function(){return[{type:l,decorators:[{type:r.Inject,args:[l]}]},{type:o.HttpClient,decorators:[{type:r.Inject,args:[o.HttpClient]}]},{type:String,decorators:[{type:r.Optional},{type:r.Inject,args:[c]}]}]};var R=function(e){function r(r,t,n){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=t,o.baseUrl=null!=n?n:o.getBaseUrl(""),o}return p(r,e),r.prototype.createDesign=function(e,r,a){var p=this,s=this.baseUrl+"/api/atoms/v1/designs?";if(null!=e&&(s+="privateStorageOwner="+encodeURIComponent(""+e)+"&"),null===r)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==r&&(s+="tenantId="+encodeURIComponent(""+r)+"&"),s=s.replace(/[?&]$/,"");var i={body:JSON.stringify(a),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("post",s,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processCreateDesign(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processCreateDesign(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processCreateDesign=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 201===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.applyItemsData=function(e,r,a,p){var s=this,i=this.baseUrl+"/api/atoms/v1/designs/{id}/apply-items-data?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(i=i.replace("{id}",encodeURIComponent(""+e)),null!=r&&(i+="privateStorageOwner="+encodeURIComponent(""+r)+"&"),null===a)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==a&&(i+="tenantId="+encodeURIComponent(""+a)+"&"),i=i.replace(/[?&]$/,"");var u={body:JSON.stringify(p),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json"})};return n.from(this.transformOptions(u)).pipe(t.mergeMap((function(e){return s.http.request("post",i,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(i,e,(function(e){return s.processApplyItemsData(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(i,e,(function(e){return s.processApplyItemsData(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processApplyItemsData=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){return n.of(null)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.extractBackground=function(e,r,a,p){var s=this,i=this.baseUrl+"/api/atoms/v1/designs/{id}/background?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(i=i.replace("{id}",encodeURIComponent(""+e)),null!=r&&(i+="surfaceIndex="+encodeURIComponent(""+r)+"&"),null!=a&&(i+="privateStorageOwner="+encodeURIComponent(""+a)+"&"),null===p)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==p&&(i+="tenantId="+encodeURIComponent(""+p)+"&"),i=i.replace(/[?&]$/,"");var u={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/octet-stream"})};return n.from(this.transformOptions(u)).pipe(t.mergeMap((function(e){return s.http.request("get",i,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(i,e,(function(e){return s.processExtractBackground(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(i,e,(function(e){return s.processExtractBackground(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processExtractBackground=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}if(200===s||206===s){var m=e.headers?e.headers.get("content-disposition"):void 0,h=m?/filename="?([^"]*?)"?(;|$)/g.exec(m):void 0,v=h&&h.length>1?h[1]:void 0;return n.of({fileName:v,data:i,status:s,headers:c})}return 404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.setEditorMockups=function(e,r,a,p){var s=this,i=this.baseUrl+"/api/atoms/v1/designs/{id}/editor-mockups?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(i=i.replace("{id}",encodeURIComponent(""+e)),null!=r&&(i+="privateStorageOwner="+encodeURIComponent(""+r)+"&"),null===a)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==a&&(i+="tenantId="+encodeURIComponent(""+a)+"&"),i=i.replace(/[?&]$/,"");var u={body:JSON.stringify(p),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json"})};return n.from(this.transformOptions(u)).pipe(t.mergeMap((function(e){return s.http.request("put",i,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(i,e,(function(e){return s.processSetEditorMockups(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(i,e,(function(e){return s.processSetEditorMockups(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processSetEditorMockups=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 204===s?B(i).pipe(t.mergeMap((function(e){return n.of(null)}))):400===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Bad Request",s,e,c,r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getDesignParameters=function(e,r,a){var p=this,s=this.baseUrl+"/api/atoms/v1/designs/{id}/parameters?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(s=s.replace("{id}",encodeURIComponent(""+e)),null!=r&&(s+="privateStorageOwner="+encodeURIComponent(""+r)+"&"),null===a)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==a&&(s+="tenantId="+encodeURIComponent(""+a)+"&"),s=s.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("get",s,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processGetDesignParameters(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processGetDesignParameters(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetDesignParameters=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.loadDataSchema=function(e,r,a){var p=this,s=this.baseUrl+"/api/atoms/v1/designs/{id}/schema?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(s=s.replace("{id}",encodeURIComponent(""+e)),null!=r&&(s+="privateStorageOwner="+encodeURIComponent(""+r)+"&"),null===a)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==a&&(s+="tenantId="+encodeURIComponent(""+a)+"&"),s=s.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/octet-stream"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("get",s,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processLoadDataSchema(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processLoadDataSchema(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processLoadDataSchema=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}if(200===s||206===s){var m=e.headers?e.headers.get("content-disposition"):void 0,h=m?/filename="?([^"]*?)"?(;|$)/g.exec(m):void 0,v=h&&h.length>1?h[1]:void 0;return n.of({fileName:v,data:i,status:s,headers:c})}return 404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.loadToggleSet=function(e,r,a){var p=this,s=this.baseUrl+"/api/atoms/v1/designs/{id}/toggle-set?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(s=s.replace("{id}",encodeURIComponent(""+e)),null!=r&&(s+="privateStorageOwner="+encodeURIComponent(""+r)+"&"),null===a)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==a&&(s+="tenantId="+encodeURIComponent(""+a)+"&"),s=s.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/octet-stream"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("get",s,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processLoadToggleSet(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processLoadToggleSet(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processLoadToggleSet=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}if(200===s||206===s){var m=e.headers?e.headers.get("content-disposition"):void 0,h=m?/filename="?([^"]*?)"?(;|$)/g.exec(m):void 0,v=h&&h.length>1?h[1]:void 0;return n.of({fileName:v,data:i,status:s,headers:c})}return 404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getVariables=function(e,r,a){var p=this,s=this.baseUrl+"/api/atoms/v1/designs/{id}/variables?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(s=s.replace("{id}",encodeURIComponent(""+e)),null!=r&&(s+="privateStorageOwner="+encodeURIComponent(""+r)+"&"),null===a)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==a&&(s+="tenantId="+encodeURIComponent(""+a)+"&"),s=s.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("get",s,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processGetVariables(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processGetVariables(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetVariables=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.setVariables=function(e,r,a,p){var s=this,i=this.baseUrl+"/api/atoms/v1/designs/{id}/variables?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(i=i.replace("{id}",encodeURIComponent(""+e)),null!=r&&(i+="privateStorageOwner="+encodeURIComponent(""+r)+"&"),null===a)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==a&&(i+="tenantId="+encodeURIComponent(""+a)+"&"),i=i.replace(/[?&]$/,"");var u={body:JSON.stringify(p),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json"})};return n.from(this.transformOptions(u)).pipe(t.mergeMap((function(e){return s.http.request("put",i,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(i,e,(function(e){return s.processSetVariables(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(i,e,(function(e){return s.processSetVariables(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processSetVariables=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){return n.of(null)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.loadVdpData=function(e,r,a){var p=this,s=this.baseUrl+"/api/atoms/v1/designs/{id}/vdp-data?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(s=s.replace("{id}",encodeURIComponent(""+e)),null!=r&&(s+="privateStorageOwner="+encodeURIComponent(""+r)+"&"),null===a)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==a&&(s+="tenantId="+encodeURIComponent(""+a)+"&"),s=s.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("get",s,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processLoadVdpData(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processLoadVdpData(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processLoadVdpData=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.saveVdpData=function(e,r,a,p){var s=this,i=this.baseUrl+"/api/atoms/v1/designs/{id}/vdp-data?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(i=i.replace("{id}",encodeURIComponent(""+e)),null!=r&&(i+="privateStorageOwner="+encodeURIComponent(""+r)+"&"),null===a)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==a&&(i+="tenantId="+encodeURIComponent(""+a)+"&"),i=i.replace(/[?&]$/,"");var u={body:JSON.stringify(p),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json"})};return n.from(this.transformOptions(u)).pipe(t.mergeMap((function(e){return s.http.request("put",i,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(i,e,(function(e){return s.processSaveVdpData(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(i,e,(function(e){return s.processSaveVdpData(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processSaveVdpData=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){return n.of(null)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.deleteVdpData=function(e,r,a){var p=this,s=this.baseUrl+"/api/atoms/v1/designs/{id}/vdp-data?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(s=s.replace("{id}",encodeURIComponent(""+e)),null!=r&&(s+="privateStorageOwner="+encodeURIComponent(""+r)+"&"),null===a)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==a&&(s+="tenantId="+encodeURIComponent(""+a)+"&"),s=s.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("delete",s,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processDeleteVdpData(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processDeleteVdpData(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processDeleteVdpData=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){return n.of(null)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.convertColors=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/designs/print-product/convert-colors?";if(null===e)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processConvertColors(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processConvertColors(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processConvertColors=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.loadProductFromResource=function(e,r,a){var p=this,s=this.baseUrl+"/api/atoms/v1/designs/print-product/from-resource/model?";if(null!=e&&(s+="id="+encodeURIComponent(""+e)+"&"),null!=r&&(s+="privateStorageOwner="+encodeURIComponent(""+r)+"&"),null===a)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==a&&(s+="tenantId="+encodeURIComponent(""+a)+"&"),s=s.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("get",s,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processLoadProductFromResource(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processLoadProductFromResource(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processLoadProductFromResource=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.renderProduct=function(e,r,a){var p=this,s=this.baseUrl+"/api/atoms/v1/designs/print-product/render-proof?";if(null!=e&&(s+="attachment="+encodeURIComponent(""+e)+"&"),null===r)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==r&&(s+="tenantId="+encodeURIComponent(""+r)+"&"),s=s.replace(/[?&]$/,"");var i={body:JSON.stringify(a),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/octet-stream"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("post",s,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processRenderProduct(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processRenderProduct(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processRenderProduct=function(e){var r,a,p=e.status,s=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,i={};if(e.headers)try{for(var c=u(e.headers.keys()),l=c.next();!l.done;l=c.next()){var f=l.value;i[f]=e.headers.get(f)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(a=c.return)&&a.call(c)}finally{if(r)throw r.error}}if(200===p||206===p){var d=e.headers?e.headers.get("content-disposition"):void 0,m=d?/filename="?([^"]*?)"?(;|$)/g.exec(d):void 0,h=m&&m.length>1?m[1]:void 0;return n.of({fileName:h,data:s,status:p,headers:i})}return 401===p?B(s).pipe(t.mergeMap((function(e){return A("Unauthorized",p,e,i)}))):403===p?B(s).pipe(t.mergeMap((function(e){return A("Forbidden",p,e,i)}))):200!==p&&204!==p?B(s).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",p,e,i)}))):n.of(null)},r.prototype.renderDesignPreview=function(e,r,a){var p=this,s=this.baseUrl+"/api/atoms/v1/designs/render-preview?";if(null!=e&&(s+="attachment="+encodeURIComponent(""+e)+"&"),null===r)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==r&&(s+="tenantId="+encodeURIComponent(""+r)+"&"),s=s.replace(/[?&]$/,"");var i={body:JSON.stringify(a),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/octet-stream"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("post",s,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processRenderDesignPreview(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processRenderDesignPreview(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processRenderDesignPreview=function(e){var r,a,p=e.status,s=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,i={};if(e.headers)try{for(var c=u(e.headers.keys()),l=c.next();!l.done;l=c.next()){var f=l.value;i[f]=e.headers.get(f)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(a=c.return)&&a.call(c)}finally{if(r)throw r.error}}if(200===p||206===p){var d=e.headers?e.headers.get("content-disposition"):void 0,m=d?/filename="?([^"]*?)"?(;|$)/g.exec(d):void 0,h=m&&m.length>1?m[1]:void 0;return n.of({fileName:h,data:s,status:p,headers:i})}return 401===p?B(s).pipe(t.mergeMap((function(e){return A("Unauthorized",p,e,i)}))):403===p?B(s).pipe(t.mergeMap((function(e){return A("Forbidden",p,e,i)}))):200!==p&&204!==p?B(s).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",p,e,i)}))):n.of(null)},r.prototype.renderDesignPreviewToResource=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/designs/render-preview/to-resource?";if(null===e)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processRenderDesignPreviewToResource(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processRenderDesignPreviewToResource(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processRenderDesignPreviewToResource=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.renderDesignProof=function(e,r,a){var p=this,s=this.baseUrl+"/api/atoms/v1/designs/render-proof?";if(null!=e&&(s+="attachment="+encodeURIComponent(""+e)+"&"),null===r)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==r&&(s+="tenantId="+encodeURIComponent(""+r)+"&"),s=s.replace(/[?&]$/,"");var i={body:JSON.stringify(a),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/octet-stream"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("post",s,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processRenderDesignProof(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processRenderDesignProof(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processRenderDesignProof=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}if(200===s||206===s){var m=e.headers?e.headers.get("content-disposition"):void 0,h=m?/filename="?([^"]*?)"?(;|$)/g.exec(m):void 0,v=h&&h.length>1?h[1]:void 0;return n.of({fileName:v,data:i,status:s,headers:c})}return 404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.renderDesignProofToResource=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/designs/render-proof/to-resource?";if(null===e)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processRenderDesignProofToResource(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processRenderDesignProofToResource(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processRenderDesignProofToResource=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.loadProduct=function(e,r,a){var p=this,s=this.baseUrl+"/api/atoms/v1/designs/{id}/model?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(s=s.replace("{id}",encodeURIComponent(""+e)),null!=r&&(s+="privateStorageOwner="+encodeURIComponent(""+r)+"&"),null===a)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==a&&(s+="tenantId="+encodeURIComponent(""+a)+"&"),s=s.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("get",s,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processLoadProduct(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processLoadProduct(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processLoadProduct=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.saveProduct=function(e,r,a,p){var s=this,i=this.baseUrl+"/api/atoms/v1/designs/{id}/model?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(i=i.replace("{id}",encodeURIComponent(""+e)),null!=r&&(i+="privateStorageOwner="+encodeURIComponent(""+r)+"&"),null===a)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==a&&(i+="tenantId="+encodeURIComponent(""+a)+"&"),i=i.replace(/[?&]$/,"");var u={body:JSON.stringify(p),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json"})};return n.from(this.transformOptions(u)).pipe(t.mergeMap((function(e){return s.http.request("put",i,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(i,e,(function(e){return s.processSaveProduct(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(i,e,(function(e){return s.processSaveProduct(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processSaveProduct=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){return n.of(null)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.patchProduct=function(e,r,a,p,s,i,u,c,l){var f=this,d=this.baseUrl+"/api/atoms/v1/designs/{id}/model?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(d=d.replace("{id}",encodeURIComponent(""+e)),null!=r&&(d+="privateStorageOwner="+encodeURIComponent(""+r)+"&"),null===a)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==a&&(d+="tenantId="+encodeURIComponent(""+a)+"&"),d=d.replace(/[?&]$/,"");var m=new FormData;null!=p&&m.append("patchType",p.toString()),null!=s&&m.append("replaceImageItemFileInfo.itemName",s.toString()),null!=i&&m.append("replaceImageItemFileInfo.sourceFile",i.data,i.fileName?i.fileName:"replaceImageItemFileInfo.sourceFile"),null!=u&&m.append("replacePlaceholderItemContentInfo.placeholderItemName",u.toString()),null!=c&&m.append("replacePlaceholderItemContentInfo.newContentType",c.toString()),null!=l&&m.append("replacePlaceholderItemContentInfo.sourceFile",l.data,l.fileName?l.fileName:"replacePlaceholderItemContentInfo.sourceFile");var h={body:m,observe:"response",responseType:"blob",headers:new o.HttpHeaders({})};return n.from(this.transformOptions(h)).pipe(t.mergeMap((function(e){return f.http.request("patch",d,e)}))).pipe(t.mergeMap((function(e){return f.transformResult(d,e,(function(e){return f.processPatchProduct(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return f.transformResult(d,e,(function(e){return f.processPatchProduct(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processPatchProduct=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){return n.of(null)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.createItem=function(e,r,a,p,s,i,u){var c=this,l=this.baseUrl+"/api/atoms/v1/designs/model/items?";if(null!=e&&(l+="itemType="+encodeURIComponent(""+e)+"&"),null===r)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==r&&(l+="tenantId="+encodeURIComponent(""+r)+"&"),l=l.replace(/[?&]$/,"");var f=new FormData;null!=a&&f.append("sourceType",a.toString()),null!=p&&f.append("sourceId",p.toString()),null!=s&&f.append("sourceOwnerId",s.toString()),null!=i&&f.append("url",i.toString()),null!=u&&f.append("sourceFile",u.data,u.fileName?u.fileName:"sourceFile");var d={body:f,observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return n.from(this.transformOptions(d)).pipe(t.mergeMap((function(e){return c.http.request("post",l,e)}))).pipe(t.mergeMap((function(e){return c.transformResult(l,e,(function(e){return c.processCreateItem(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return c.transformResult(l,e,(function(e){return c.processCreateItem(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processCreateItem=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.extractItemImage=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/designs/model/items/extract-image?";if(null===e)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/octet-stream"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processExtractItemImage(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processExtractItemImage(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processExtractItemImage=function(e){var r,a,p=e.status,s=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,i={};if(e.headers)try{for(var c=u(e.headers.keys()),l=c.next();!l.done;l=c.next()){var f=l.value;i[f]=e.headers.get(f)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(a=c.return)&&a.call(c)}finally{if(r)throw r.error}}if(200===p||206===p){var d=e.headers?e.headers.get("content-disposition"):void 0,m=d?/filename="?([^"]*?)"?(;|$)/g.exec(d):void 0,h=m&&m.length>1?m[1]:void 0;return n.of({fileName:h,data:s,status:p,headers:i})}return 401===p?B(s).pipe(t.mergeMap((function(e){return A("Unauthorized",p,e,i)}))):403===p?B(s).pipe(t.mergeMap((function(e){return A("Forbidden",p,e,i)}))):200!==p&&204!==p?B(s).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",p,e,i)}))):n.of(null)},r.prototype.flattenItems=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/designs/model/items/flatten?";if(null===e)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processFlattenItems(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processFlattenItems(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processFlattenItems=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.createPrivateDesignFromDesign=function(e,r,a,p){var s=this,i=this.baseUrl+"/api/atoms/v1/private-designs/from-design?";if(null!=e&&(i+="designId="+encodeURIComponent(""+e)+"&"),null!=r&&(i+="privateDesignId="+encodeURIComponent(""+r)+"&"),null!=a&&(i+="privateStorageOwner="+encodeURIComponent(""+a)+"&"),null===p)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==p&&(i+="tenantId="+encodeURIComponent(""+p)+"&"),i=i.replace(/[?&]$/,"");var u={observe:"response",responseType:"blob",headers:new o.HttpHeaders({})};return n.from(this.transformOptions(u)).pipe(t.mergeMap((function(e){return s.http.request("post",i,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(i,e,(function(e){return s.processCreatePrivateDesignFromDesign(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(i,e,(function(e){return s.processCreatePrivateDesignFromDesign(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processCreatePrivateDesignFromDesign=function(e){var r,a,p=e.status,s=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,i={};if(e.headers)try{for(var c=u(e.headers.keys()),l=c.next();!l.done;l=c.next()){var f=l.value;i[f]=e.headers.get(f)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(a=c.return)&&a.call(c)}finally{if(r)throw r.error}}return 201===p?B(s).pipe(t.mergeMap((function(e){return n.of(null)}))):401===p?B(s).pipe(t.mergeMap((function(e){return A("Unauthorized",p,e,i)}))):403===p?B(s).pipe(t.mergeMap((function(e){return A("Forbidden",p,e,i)}))):200!==p&&204!==p?B(s).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",p,e,i)}))):n.of(null)},r.prototype.createPrivateDesignFromResource=function(e,r,a,p){var s=this,i=this.baseUrl+"/api/atoms/v1/private-designs/from-resource?";if(null!=e&&(i+="resourceId="+encodeURIComponent(""+e)+"&"),null!=r&&(i+="privateDesignId="+encodeURIComponent(""+r)+"&"),null!=a&&(i+="privateStorageOwner="+encodeURIComponent(""+a)+"&"),null===p)throw new Error("The parameter 'tenantIdQuery' cannot be null.");void 0!==p&&(i+="tenantId="+encodeURIComponent(""+p)+"&"),i=i.replace(/[?&]$/,"");var u={observe:"response",responseType:"blob",headers:new o.HttpHeaders({})};return n.from(this.transformOptions(u)).pipe(t.mergeMap((function(e){return s.http.request("post",i,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(i,e,(function(e){return s.processCreatePrivateDesignFromResource(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(i,e,(function(e){return s.processCreatePrivateDesignFromResource(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processCreatePrivateDesignFromResource=function(e){var r,a,p=e.status,s=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,i={};if(e.headers)try{for(var c=u(e.headers.keys()),l=c.next();!l.done;l=c.next()){var f=l.value;i[f]=e.headers.get(f)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(a=c.return)&&a.call(c)}finally{if(r)throw r.error}}return 201===p?B(s).pipe(t.mergeMap((function(e){return n.of(null)}))):401===p?B(s).pipe(t.mergeMap((function(e){return A("Unauthorized",p,e,i)}))):403===p?B(s).pipe(t.mergeMap((function(e){return A("Forbidden",p,e,i)}))):200!==p&&204!==p?B(s).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",p,e,i)}))):n.of(null)},r}(f);R.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new R(r.ɵɵinject(l),r.ɵɵinject(o.HttpClient),r.ɵɵinject(c,8))},token:R,providedIn:"root"}),R.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],R.ctorParameters=function(){return[{type:l,decorators:[{type:r.Inject,args:[l]}]},{type:o.HttpClient,decorators:[{type:r.Inject,args:[o.HttpClient]}]},{type:String,decorators:[{type:r.Optional},{type:r.Inject,args:[c]}]}]};var w,I,M,U,C,H,E,S,T,x,O,j,P=function(e){function r(r,t,n){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=t,o.baseUrl=null!=n?n:o.getBaseUrl(""),o}return p(r,e),r.prototype.cssFonts=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/ccviewer/cssfonts?";if(null===e)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"text/css"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processCssFonts(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processCssFonts(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processCssFonts=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.fonts=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/ccviewer/fonts/{psName}?";if(null==e)throw new Error("The parameter 'psName' must be defined.");if(p=p.replace("{psName}",encodeURIComponent(""+e)),null===r)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==r&&(p+="tenantId="+encodeURIComponent(""+r)+"&"),p=p.replace(/[?&]$/,"");var s={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/octet-stream"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("get",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processFonts(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processFonts(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processFonts=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}if(200===s||206===s){var m=e.headers?e.headers.get("content-disposition"):void 0,h=m?/filename="?([^"]*?)"?(;|$)/g.exec(m):void 0,v=h&&h.length>1?h[1]:void 0;return n.of({fileName:v,data:i,status:s,headers:c})}return 404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getColorPreview=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/ccviewer/GetColorPreview?";if(null===e)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processGetColorPreview(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processGetColorPreview(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetColorPreview=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):400===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Bad Request",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getColorPreviews=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/ccviewer/GetColorPreviews?";if(null===e)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processGetColorPreviews(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processGetColorPreviews(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetColorPreviews=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):400===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Bad Request",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getCssFont=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/ccviewer/GetCssFont?";if(null!=e&&(p+="fontKey="+encodeURIComponent(""+e)+"&"),null===r)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==r&&(p+="tenantId="+encodeURIComponent(""+r)+"&"),p=p.replace(/[?&]$/,"");var s={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/octet-stream"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("get",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processGetCssFont(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processGetCssFont(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetCssFont=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}if(200===s||206===s){var m=e.headers?e.headers.get("content-disposition"):void 0,h=m?/filename="?([^"]*?)"?(;|$)/g.exec(m):void 0,v=h&&h.length>1?h[1]:void 0;return n.of({fileName:v,data:i,status:s,headers:c})}return 404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getFallbackFonts=function(e){var r=this,a=this.baseUrl+"/api/atoms/v1/ccviewer/GetFallbackFonts?";if(null===e)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==e&&(a+="tenantId="+encodeURIComponent(""+e)+"&"),a=a.replace(/[?&]$/,"");var p={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return n.from(this.transformOptions(p)).pipe(t.mergeMap((function(e){return r.http.request("get",a,e)}))).pipe(t.mergeMap((function(e){return r.transformResult(a,e,(function(e){return r.processGetFallbackFonts(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return r.transformResult(a,e,(function(e){return r.processGetFallbackFonts(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetFallbackFonts=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getImageSize=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/ccviewer/GetImageSize?";if(null===e)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processGetImageSize(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processGetImageSize(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetImageSize=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getShapeBounds=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/ccviewer/GetShapeBounds?";if(null===e)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processGetShapeBounds(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processGetShapeBounds(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetShapeBounds=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getWatermarkItems=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/ccviewer/GetWatermarkItems?";if(null===e)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processGetWatermarkItems(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processGetWatermarkItems(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetWatermarkItems=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.img=function(e,r,a,p,s,i,u,c,l,f,d,m,h,v,g,y,b,R,w){var I=this,M=this.baseUrl+"/api/atoms/v1/ccviewer/img?";if(null!=e&&(M+="f="+encodeURIComponent(""+e)+"&"),null!=r&&(M+="w="+encodeURIComponent(""+r)+"&"),null!=a&&(M+="h="+encodeURIComponent(""+a)+"&"),null!=p&&(M+="cmyk="+encodeURIComponent(""+p)+"&"),null!=s&&(M+="rgb="+encodeURIComponent(""+s)+"&"),null!=i&&(M+="grayscale="+encodeURIComponent(""+i)+"&"),null!=u&&(M+="target="+encodeURIComponent(""+u)+"&"),null!=c&&(M+="sq="+encodeURIComponent(""+c)+"&"),null!=l&&(M+="effect="+encodeURIComponent(""+l)+"&"),null!=f&&(M+="kp="+encodeURIComponent(""+f)+"&"),null!=d&&(M+="color="+encodeURIComponent(""+d)+"&"),null!=m&&(M+="obm="+encodeURIComponent(""+m)+"&"),null!=h&&(M+="oo="+encodeURIComponent(""+h)+"&"),null!=v&&(M+="alphaMask="+encodeURIComponent(""+v)+"&"),null!=g&&(M+="page="+encodeURIComponent(""+g)+"&"),null!=y&&(M+="colorizeColor="+encodeURIComponent(""+y)+"&"),null!=b&&(M+="rw="+encodeURIComponent(""+b)+"&"),null!=R&&(M+="rh="+encodeURIComponent(""+R)+"&"),null===w)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==w&&(M+="tenantId="+encodeURIComponent(""+w)+"&"),M=M.replace(/[?&]$/,"");var U={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/octet-stream"})};return n.from(this.transformOptions(U)).pipe(t.mergeMap((function(e){return I.http.request("get",M,e)}))).pipe(t.mergeMap((function(e){return I.transformResult(M,e,(function(e){return I.processImg(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return I.transformResult(M,e,(function(e){return I.processImg(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processImg=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}if(200===s||206===s){var m=e.headers?e.headers.get("content-disposition"):void 0,h=m?/filename="?([^"]*?)"?(;|$)/g.exec(m):void 0,v=h&&h.length>1?h[1]:void 0;return n.of({fileName:v,data:i,status:s,headers:c})}return 304===s?B(i).pipe(t.mergeMap((function(e){return A("Not Modified",s,e,c)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getLicense=function(e){var r=this,a=this.baseUrl+"/api/atoms/v1/ccviewer/license?";if(null===e)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==e&&(a+="tenantId="+encodeURIComponent(""+e)+"&"),a=a.replace(/[?&]$/,"");var p={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return n.from(this.transformOptions(p)).pipe(t.mergeMap((function(e){return r.http.request("get",a,e)}))).pipe(t.mergeMap((function(e){return r.transformResult(a,e,(function(e){return r.processGetLicense(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return r.transformResult(a,e,(function(e){return r.processGetLicense(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetLicense=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.pth=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/ccviewer/pth?";if(null!=e&&(p+="f="+encodeURIComponent(""+e)+"&"),null===r)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==r&&(p+="tenantId="+encodeURIComponent(""+r)+"&"),p=p.replace(/[?&]$/,"");var s={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/octet-stream"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("get",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processPth(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processPth(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processPth=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}if(200===s||206===s){var m=e.headers?e.headers.get("content-disposition"):void 0,h=m?/filename="?([^"]*?)"?(;|$)/g.exec(m):void 0,v=h&&h.length>1?h[1]:void 0;return n.of({fileName:v,data:i,status:s,headers:c})}return 304===s?B(i).pipe(t.mergeMap((function(e){return A("Not Modified",s,e,c)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.resource=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/ccviewer/resource?";if(null!=e&&(p+="image="+encodeURIComponent(""+e)+"&"),null===r)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==r&&(p+="tenantId="+encodeURIComponent(""+r)+"&"),p=p.replace(/[?&]$/,"");var s={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/octet-stream"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("get",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processResource(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processResource(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processResource=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}if(200===s||206===s){var m=e.headers?e.headers.get("content-disposition"):void 0,h=m?/filename="?([^"]*?)"?(;|$)/g.exec(m):void 0,v=h&&h.length>1?h[1]:void 0;return n.of({fileName:v,data:i,status:s,headers:c})}return 404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.svg=function(e,r,a,p,s,i,u,c,l,f,d,m,h,v,g,y,b,R,w){var I=this,M=this.baseUrl+"/api/atoms/v1/ccviewer/svg?";if(null!=e&&(M+="f="+encodeURIComponent(""+e)+"&"),null!=r&&(M+="w="+encodeURIComponent(""+r)+"&"),null!=a&&(M+="h="+encodeURIComponent(""+a)+"&"),null!=p&&(M+="cmyk="+encodeURIComponent(""+p)+"&"),null!=s&&(M+="rgb="+encodeURIComponent(""+s)+"&"),null!=i&&(M+="grayscale="+encodeURIComponent(""+i)+"&"),null!=u&&(M+="target="+encodeURIComponent(""+u)+"&"),null!=c&&(M+="sq="+encodeURIComponent(""+c)+"&"),null!=l&&(M+="effect="+encodeURIComponent(""+l)+"&"),null!=f&&(M+="kp="+encodeURIComponent(""+f)+"&"),null!=d&&(M+="color="+encodeURIComponent(""+d)+"&"),null!=m&&(M+="obm="+encodeURIComponent(""+m)+"&"),null!=h&&(M+="oo="+encodeURIComponent(""+h)+"&"),null!=v&&(M+="alphaMask="+encodeURIComponent(""+v)+"&"),null!=g&&(M+="page="+encodeURIComponent(""+g)+"&"),null!=y&&(M+="colorizeColor="+encodeURIComponent(""+y)+"&"),null!=b&&(M+="rw="+encodeURIComponent(""+b)+"&"),null!=R&&(M+="rh="+encodeURIComponent(""+R)+"&"),null===w)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==w&&(M+="tenantId="+encodeURIComponent(""+w)+"&"),M=M.replace(/[?&]$/,"");var U={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/octet-stream"})};return n.from(this.transformOptions(U)).pipe(t.mergeMap((function(e){return I.http.request("get",M,e)}))).pipe(t.mergeMap((function(e){return I.transformResult(M,e,(function(e){return I.processSvg(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return I.transformResult(M,e,(function(e){return I.processSvg(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processSvg=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}if(200===s||206===s){var m=e.headers?e.headers.get("content-disposition"):void 0,h=m?/filename="?([^"]*?)"?(;|$)/g.exec(m):void 0,v=h&&h.length>1?h[1]:void 0;return n.of({fileName:v,data:i,status:s,headers:c})}return 304===s?B(i).pipe(t.mergeMap((function(e){return A("Not Modified",s,e,c)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.txt=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/ccviewer/txt?";if(null!=e&&(p+="f="+encodeURIComponent(""+e)+"&"),null===r)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==r&&(p+="tenantId="+encodeURIComponent(""+r)+"&"),p=p.replace(/[?&]$/,"");var s={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/octet-stream"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("get",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processTxt(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processTxt(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processTxt=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}if(200===s||206===s){var m=e.headers?e.headers.get("content-disposition"):void 0,h=m?/filename="?([^"]*?)"?(;|$)/g.exec(m):void 0,v=h&&h.length>1?h[1]:void 0;return n.of({fileName:v,data:i,status:s,headers:c})}return 304===s?B(i).pipe(t.mergeMap((function(e){return A("Not Modified",s,e,c)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.updateArchedTextItemHandler=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/ccviewer/UpdateArchedTextItemHandler?";if(null===e)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processUpdateArchedTextItemHandler(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processUpdateArchedTextItemHandler(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processUpdateArchedTextItemHandler=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.updateAutoScaledTextItemHandler=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/ccviewer/UpdateAutoScaledTextItemHandler?";if(null===e)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processUpdateAutoScaledTextItemHandler(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processUpdateAutoScaledTextItemHandler(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processUpdateAutoScaledTextItemHandler=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.updateBarcodeItemHandler=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/ccviewer/UpdateBarcodeItemHandler?";if(null===e)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processUpdateBarcodeItemHandler(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processUpdateBarcodeItemHandler(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processUpdateBarcodeItemHandler=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.updateBoundedTextItemHandler=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/ccviewer/UpdateBoundedTextItemHandler?";if(null===e)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processUpdateBoundedTextItemHandler(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processUpdateBoundedTextItemHandler(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processUpdateBoundedTextItemHandler=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.updateByColorData=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/ccviewer/UpdateByColorData?";if(null===e)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processUpdateByColorData(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processUpdateByColorData(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processUpdateByColorData=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.updateByMultiCallRequest=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/ccviewer/UpdateByMultiCallRequest?";if(null===e)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processUpdateByMultiCallRequest(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processUpdateByMultiCallRequest(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processUpdateByMultiCallRequest=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.updateCurvedTextItemHandler=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/ccviewer/UpdateCurvedTextItemHandler?";if(null===e)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processUpdateCurvedTextItemHandler(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processUpdateCurvedTextItemHandler(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processUpdateCurvedTextItemHandler=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.updateImageItemHandler=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/ccviewer/UpdateImageItemHandler?";if(null===e)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processUpdateImageItemHandler(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processUpdateImageItemHandler(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processUpdateImageItemHandler=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.updatePathBoundedTextItemHandler=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/ccviewer/UpdatePathBoundedTextItemHandler?";if(null===e)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processUpdatePathBoundedTextItemHandler(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processUpdatePathBoundedTextItemHandler(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processUpdatePathBoundedTextItemHandler=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.updatePlainTextItemHandler=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/ccviewer/UpdatePlainTextItemHandler?";if(null===e)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processUpdatePlainTextItemHandler(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processUpdatePlainTextItemHandler(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processUpdatePlainTextItemHandler=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.updateShapeItemHandler=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/ccviewer/UpdateShapeItemHandler?";if(null===e)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processUpdateShapeItemHandler(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processUpdateShapeItemHandler(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processUpdateShapeItemHandler=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r}(f);P.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new P(r.ɵɵinject(l),r.ɵɵinject(o.HttpClient),r.ɵɵinject(c,8))},token:P,providedIn:"root"}),P.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],P.ctorParameters=function(){return[{type:l,decorators:[{type:r.Inject,args:[l]}]},{type:o.HttpClient,decorators:[{type:r.Inject,args:[o.HttpClient]}]},{type:String,decorators:[{type:r.Optional},{type:r.Inject,args:[c]}]}]},(w=e.ConflictType||(e.ConflictType={})).NameConflict="NameConflict",w.FolderOverwriteConflict="FolderOverwriteConflict",w.IdConflict="IdConflict",w.GeneralConflict="GeneralConflict",(I=e.DesignElementType||(e.DesignElementType={})).Product="Product",I.Design="Design",I.Surface="Surface",I.Container="Container",I.PrintArea="PrintArea",I.Item="Item",(M=e.ImagePreviewFitMode||(e.ImagePreviewFitMode={})).Fit="Fit",M.Shrink="Shrink",M.Resize="Resize",M.Fill="Fill",(U=e.ImagePreviewFormat||(e.ImagePreviewFormat={})).Jpeg="Jpeg",U.Png="Png",(C=e.ItemSourceType||(e.ItemSourceType={})).File="File",C.ImageStorage="ImageStorage",C.PrivateImageStorage="PrivateImageStorage",C.Url="Url",(H=e.ItemType||(e.ItemType={})).Image="Image",H.Shape="Shape",H.Clipart="Clipart",H.Group="Group",(e.PlaceholderItemContentType||(e.PlaceholderItemContentType={})).Image="Image",(E=e.ProductPatchType||(e.ProductPatchType={})).Undefined="Undefined",E.ReplaceImageItemFile="ReplaceImageItemFile",E.ReplacePlaceholderItemContent="ReplacePlaceholderItemContent",(S=e.ProductPreviewFormat||(e.ProductPreviewFormat={})).Jpeg="Jpeg",S.Png="Png",(T=e.ProductProofFormat||(e.ProductProofFormat={})).Jpeg="Jpeg",T.Png="Png",T.Tiff="Tiff",T.Pdf="Pdf",(x=e.ProductProofInterpolationMode||(e.ProductProofInterpolationMode={})).High="High",x.Medium="Medium",x.Low="Low",x.NearestNeighbour="NearestNeighbour",x.Linear="Linear",x.Cubic="Cubic",x.Supersampling="Supersampling",x.Lanczos="Lanczos",x.Anisotropic4="Anisotropic4",x.Anisotropic9="Anisotropic9",x.Lanczos3="Lanczos3",(O=e.TextAlignment||(e.TextAlignment={})).Left="Left",O.Center="Center",O.Right="Right",O.All="All",O.LastLeft="LastLeft",O.LastRight="LastRight",O.LastCenter="LastCenter",(j=e.TextVerticalAlignment||(e.TextVerticalAlignment={})).Top="Top",j.Center="Center",j.Bottom="Bottom";var N=function(e){function r(r,t,n,o,a){var p=e.call(this)||this;return p.isApiException=!0,p.message=r,p.status=t,p.response=n,p.headers=o,p.result=a,p}return p(r,e),r.isApiException=function(e){return!0===e.isApiException},r}(Error);function A(e,r,t,o,a){return null!=a?n.throwError(a):n.throwError(new N(e,r,t,o,null))}function B(e){return new n.Observable((function(r){if(e){var t=new FileReader;t.onload=function(e){r.next(e.target.result),r.complete()},t.readAsText(e)}else r.next(""),r.complete()}))}function F(e,r,t){void 0===t&&(t="ApiKey");var n=new l;return n.apiKey=t,n.apiUrl=r,n.setAuthorizationToken(e),n}var J=function(){function e(){}return e.forRoot=function(r,t,n){return void 0===n&&(n="ApiKey"),{ngModule:e,providers:[{provide:c,useValue:t},{provide:l,useFactory:F.bind(this,r,t,n)}]}},e}();J.decorators=[{type:r.NgModule,args:[{declarations:[],imports:[],exports:[]}]}],e.API_BASE_URL=c,e.ApiClientBase=f,e.ApiClientConfiguration=l,e.ApiException=N,e.BuildInfoApiClient=d,e.CreateApiClientConfiguration=F,e.DesignAtomsApiModule=J,e.DesignAtomsCompatibilityApiClient=m,e.DesignAtomsImagesApiClient=h,e.DesignAtomsMockups3dApiClient=v,e.DesignAtomsPalettesApiClient=g,e.DesignAtomsPrintProductApiClient=y,e.DesignAtomsPrintProductItemsApiClient=b,e.DesignAtomsServiceApiClient=R,e.DesignAtomsViewerApiClient=P,Object.defineProperty(e,"__esModule",{value:!0})}));
15
+ ***************************************************************************** */var a=function(e,r){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])})(e,r)};function p(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function t(){this.constructor=e}a(e,r),e.prototype=null===r?Object.create(r):(t.prototype=r.prototype,new t)}function s(e,r,t,n){return new(t||(t=Promise))((function(o,a){function p(e){try{i(n.next(e))}catch(e){a(e)}}function s(e){try{i(n.throw(e))}catch(e){a(e)}}function i(e){var r;e.done?o(e.value):(r=e.value,r instanceof t?r:new t((function(e){e(r)}))).then(p,s)}i((n=n.apply(e,r||[])).next())}))}function i(e,r){var t,n,o,a,p={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(t)throw new TypeError("Generator is already executing.");for(;p;)try{if(t=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return p.label++,{value:a[1],done:!1};case 5:p.label++,n=a[1],a=[0];continue;case 7:a=p.ops.pop(),p.trys.pop();continue;default:if(!(o=p.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){p=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){p.label=a[1];break}if(6===a[0]&&p.label<o[1]){p.label=o[1],o=a;break}if(o&&p.label<o[2]){p.label=o[2],p.ops.push(a);break}o[2]&&p.ops.pop(),p.trys.pop();continue}a=r.call(e,p)}catch(e){a=[6,e],n=0}finally{t=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}Object.create;function u(e){var r="function"==typeof Symbol&&Symbol.iterator,t=r&&e[r],n=0;if(t)return t.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}Object.create;var c=new r.InjectionToken("API_BASE_URL"),l=function(){function e(){this.apiUrl="http://localhost:54220",this.apiKey="ApiKey",this.authorizationToken=null}return e.prototype.getAuthorizationToken=function(){return s(this,void 0,void 0,(function(){return i(this,(function(e){return[2,this.authorizationToken]}))}))},e.prototype.setAuthorizationToken=function(e){this.authorizationToken=e},e}(),f=function(){function e(e){this.configuration=e}return e.prototype.transformOptions=function(e){return s(this,void 0,void 0,(function(){var r;return i(this,(function(t){switch(t.label){case 0:return[4,this.configuration.getAuthorizationToken()];case 1:return r=t.sent(),e.headers=null!=r?e.headers.append("authorization","Bearer "+r):e.headers.append("X-API-Key",this.configuration.apiKey),[2,e]}}))}))},e.prototype.getBaseUrl=function(e){return this.configuration.apiUrl.endsWith("/")?this.configuration.apiUrl.slice(0,-1):this.configuration.apiUrl},e.prototype.transformResult=function(e,r,t){return t(r)},e}(),d=function(e){function r(r,t,n){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=t,o.baseUrl=null!=n?n:o.getBaseUrl(""),o}return p(r,e),r.prototype.headInfo=function(){var e=this,r=this.baseUrl+"/api/atoms/v1/info";r=r.replace(/[?&]$/,"");var a={observe:"response",responseType:"blob",headers:new o.HttpHeaders({})};return n.from(this.transformOptions(a)).pipe(t.mergeMap((function(t){return e.http.request("head",r,t)}))).pipe(t.mergeMap((function(t){return e.transformResult(r,t,(function(r){return e.processHeadInfo(r)}))}))).pipe(t.catchError((function(t){if(!(t instanceof o.HttpResponseBase))return n.throwError(t);try{return e.transformResult(r,t,(function(r){return e.processHeadInfo(r)}))}catch(e){return n.throwError(e)}})))},r.prototype.processHeadInfo=function(e){var r,a,p=e.status,s=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,i={};if(e.headers)try{for(var c=u(e.headers.keys()),l=c.next();!l.done;l=c.next()){var f=l.value;i[f]=e.headers.get(f)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(a=c.return)&&a.call(c)}finally{if(r)throw r.error}}return 200===p?B(s).pipe(t.mergeMap((function(e){return n.of(null)}))):200!==p&&204!==p?B(s).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",p,e,i)}))):n.of(null)},r.prototype.getInfo=function(){var e=this,r=this.baseUrl+"/api/atoms/v1/info";r=r.replace(/[?&]$/,"");var a={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return n.from(this.transformOptions(a)).pipe(t.mergeMap((function(t){return e.http.request("get",r,t)}))).pipe(t.mergeMap((function(t){return e.transformResult(r,t,(function(r){return e.processGetInfo(r)}))}))).pipe(t.catchError((function(t){if(!(t instanceof o.HttpResponseBase))return n.throwError(t);try{return e.transformResult(r,t,(function(r){return e.processGetInfo(r)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetInfo=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r}(f);d.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new d(r.ɵɵinject(l),r.ɵɵinject(o.HttpClient),r.ɵɵinject(c,8))},token:d,providedIn:"root"}),d.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],d.ctorParameters=function(){return[{type:l,decorators:[{type:r.Inject,args:[l]}]},{type:o.HttpClient,decorators:[{type:r.Inject,args:[o.HttpClient]}]},{type:String,decorators:[{type:r.Optional},{type:r.Inject,args:[c]}]}]};var m=function(e){function r(r,t,n){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=t,o.baseUrl=null!=n?n:o.getBaseUrl(""),o}return p(r,e),r.prototype.cssFonts=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/tenants/{tenantId}/api/ccviewer/cssfonts";if(null==e)throw new Error("The parameter 'tenantId' must be defined.");p=(p=p.replace("{tenantId}",encodeURIComponent(""+e))).replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"text/css"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processCssFonts(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processCssFonts(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processCssFonts=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.fonts=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/tenants/{tenantId}/api/ccviewer/fonts/{psName}";if(null==e)throw new Error("The parameter 'tenantId' must be defined.");if(p=p.replace("{tenantId}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'psName' must be defined.");p=(p=p.replace("{psName}",encodeURIComponent(""+r))).replace(/[?&]$/,"");var s={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/octet-stream"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("get",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processFonts(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processFonts(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processFonts=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}if(200===s||206===s){var m=e.headers?e.headers.get("content-disposition"):void 0,h=m?/filename="?([^"]*?)"?(;|$)/g.exec(m):void 0,v=h&&h.length>1?h[1]:void 0;return n.of({fileName:v,data:i,status:s,headers:c})}return 404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getColorPreview=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/tenants/{tenantId}/api/ccviewer/GetColorPreview";if(null==e)throw new Error("The parameter 'tenantId' must be defined.");p=(p=p.replace("{tenantId}",encodeURIComponent(""+e))).replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processGetColorPreview(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processGetColorPreview(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetColorPreview=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):400===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Bad Request",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getColorPreviews=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/tenants/{tenantId}/api/ccviewer/GetColorPreviews";if(null==e)throw new Error("The parameter 'tenantId' must be defined.");p=(p=p.replace("{tenantId}",encodeURIComponent(""+e))).replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processGetColorPreviews(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processGetColorPreviews(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetColorPreviews=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):400===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Bad Request",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getCssFont=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/tenants/{tenantId}/api/ccviewer/GetCssFont?";if(null==e)throw new Error("The parameter 'tenantId' must be defined.");p=p.replace("{tenantId}",encodeURIComponent(""+e)),null!=r&&(p+="fontKey="+encodeURIComponent(""+r)+"&"),p=p.replace(/[?&]$/,"");var s={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/octet-stream"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("get",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processGetCssFont(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processGetCssFont(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetCssFont=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}if(200===s||206===s){var m=e.headers?e.headers.get("content-disposition"):void 0,h=m?/filename="?([^"]*?)"?(;|$)/g.exec(m):void 0,v=h&&h.length>1?h[1]:void 0;return n.of({fileName:v,data:i,status:s,headers:c})}return 404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getFallbackFonts=function(e){var r=this,a=this.baseUrl+"/api/atoms/v1/tenants/{tenantId}/api/ccviewer/GetFallbackFonts";if(null==e)throw new Error("The parameter 'tenantId' must be defined.");a=(a=a.replace("{tenantId}",encodeURIComponent(""+e))).replace(/[?&]$/,"");var p={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return n.from(this.transformOptions(p)).pipe(t.mergeMap((function(e){return r.http.request("get",a,e)}))).pipe(t.mergeMap((function(e){return r.transformResult(a,e,(function(e){return r.processGetFallbackFonts(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return r.transformResult(a,e,(function(e){return r.processGetFallbackFonts(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetFallbackFonts=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getImageSize=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/tenants/{tenantId}/api/ccviewer/GetImageSize";if(null==e)throw new Error("The parameter 'tenantId' must be defined.");p=(p=p.replace("{tenantId}",encodeURIComponent(""+e))).replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processGetImageSize(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processGetImageSize(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetImageSize=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getShapeBounds=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/tenants/{tenantId}/api/ccviewer/GetShapeBounds";if(null==e)throw new Error("The parameter 'tenantId' must be defined.");p=(p=p.replace("{tenantId}",encodeURIComponent(""+e))).replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processGetShapeBounds(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processGetShapeBounds(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetShapeBounds=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getWatermarkItems=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/tenants/{tenantId}/api/ccviewer/GetWatermarkItems";if(null==e)throw new Error("The parameter 'tenantId' must be defined.");p=(p=p.replace("{tenantId}",encodeURIComponent(""+e))).replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processGetWatermarkItems(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processGetWatermarkItems(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetWatermarkItems=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.img=function(e,r,a,p,s,i,u,c,l,f,d,m,h,v,g,y,b,R,w){var I=this,M=this.baseUrl+"/api/atoms/v1/tenants/{tenantId}/api/ccviewer/img?";if(null==e)throw new Error("The parameter 'tenantId' must be defined.");M=M.replace("{tenantId}",encodeURIComponent(""+e)),null!=r&&(M+="f="+encodeURIComponent(""+r)+"&"),null!=a&&(M+="w="+encodeURIComponent(""+a)+"&"),null!=p&&(M+="h="+encodeURIComponent(""+p)+"&"),null!=s&&(M+="cmyk="+encodeURIComponent(""+s)+"&"),null!=i&&(M+="rgb="+encodeURIComponent(""+i)+"&"),null!=u&&(M+="grayscale="+encodeURIComponent(""+u)+"&"),null!=c&&(M+="target="+encodeURIComponent(""+c)+"&"),null!=l&&(M+="sq="+encodeURIComponent(""+l)+"&"),null!=f&&(M+="effect="+encodeURIComponent(""+f)+"&"),null!=d&&(M+="kp="+encodeURIComponent(""+d)+"&"),null!=m&&(M+="color="+encodeURIComponent(""+m)+"&"),null!=h&&(M+="obm="+encodeURIComponent(""+h)+"&"),null!=v&&(M+="oo="+encodeURIComponent(""+v)+"&"),null!=g&&(M+="alphaMask="+encodeURIComponent(""+g)+"&"),null!=y&&(M+="page="+encodeURIComponent(""+y)+"&"),null!=b&&(M+="colorizeColor="+encodeURIComponent(""+b)+"&"),null!=R&&(M+="rw="+encodeURIComponent(""+R)+"&"),null!=w&&(M+="rh="+encodeURIComponent(""+w)+"&"),M=M.replace(/[?&]$/,"");var U={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/octet-stream"})};return n.from(this.transformOptions(U)).pipe(t.mergeMap((function(e){return I.http.request("get",M,e)}))).pipe(t.mergeMap((function(e){return I.transformResult(M,e,(function(e){return I.processImg(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return I.transformResult(M,e,(function(e){return I.processImg(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processImg=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}if(200===s||206===s){var m=e.headers?e.headers.get("content-disposition"):void 0,h=m?/filename="?([^"]*?)"?(;|$)/g.exec(m):void 0,v=h&&h.length>1?h[1]:void 0;return n.of({fileName:v,data:i,status:s,headers:c})}return 304===s?B(i).pipe(t.mergeMap((function(e){return A("Not Modified",s,e,c)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getLicense=function(e){var r=this,a=this.baseUrl+"/api/atoms/v1/tenants/{tenantId}/api/ccviewer/license";if(null==e)throw new Error("The parameter 'tenantId' must be defined.");a=(a=a.replace("{tenantId}",encodeURIComponent(""+e))).replace(/[?&]$/,"");var p={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return n.from(this.transformOptions(p)).pipe(t.mergeMap((function(e){return r.http.request("get",a,e)}))).pipe(t.mergeMap((function(e){return r.transformResult(a,e,(function(e){return r.processGetLicense(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return r.transformResult(a,e,(function(e){return r.processGetLicense(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetLicense=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.pth=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/tenants/{tenantId}/api/ccviewer/pth?";if(null==e)throw new Error("The parameter 'tenantId' must be defined.");p=p.replace("{tenantId}",encodeURIComponent(""+e)),null!=r&&(p+="f="+encodeURIComponent(""+r)+"&"),p=p.replace(/[?&]$/,"");var s={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/octet-stream"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("get",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processPth(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processPth(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processPth=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}if(200===s||206===s){var m=e.headers?e.headers.get("content-disposition"):void 0,h=m?/filename="?([^"]*?)"?(;|$)/g.exec(m):void 0,v=h&&h.length>1?h[1]:void 0;return n.of({fileName:v,data:i,status:s,headers:c})}return 304===s?B(i).pipe(t.mergeMap((function(e){return A("Not Modified",s,e,c)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.resource=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/tenants/{tenantId}/api/ccviewer/resource?";if(null==e)throw new Error("The parameter 'tenantId' must be defined.");p=p.replace("{tenantId}",encodeURIComponent(""+e)),null!=r&&(p+="image="+encodeURIComponent(""+r)+"&"),p=p.replace(/[?&]$/,"");var s={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/octet-stream"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("get",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processResource(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processResource(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processResource=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}if(200===s||206===s){var m=e.headers?e.headers.get("content-disposition"):void 0,h=m?/filename="?([^"]*?)"?(;|$)/g.exec(m):void 0,v=h&&h.length>1?h[1]:void 0;return n.of({fileName:v,data:i,status:s,headers:c})}return 404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.svg=function(e,r,a,p,s,i,u,c,l,f,d,m,h,v,g,y,b,R,w){var I=this,M=this.baseUrl+"/api/atoms/v1/tenants/{tenantId}/api/ccviewer/svg?";if(null==e)throw new Error("The parameter 'tenantId' must be defined.");M=M.replace("{tenantId}",encodeURIComponent(""+e)),null!=r&&(M+="f="+encodeURIComponent(""+r)+"&"),null!=a&&(M+="w="+encodeURIComponent(""+a)+"&"),null!=p&&(M+="h="+encodeURIComponent(""+p)+"&"),null!=s&&(M+="cmyk="+encodeURIComponent(""+s)+"&"),null!=i&&(M+="rgb="+encodeURIComponent(""+i)+"&"),null!=u&&(M+="grayscale="+encodeURIComponent(""+u)+"&"),null!=c&&(M+="target="+encodeURIComponent(""+c)+"&"),null!=l&&(M+="sq="+encodeURIComponent(""+l)+"&"),null!=f&&(M+="effect="+encodeURIComponent(""+f)+"&"),null!=d&&(M+="kp="+encodeURIComponent(""+d)+"&"),null!=m&&(M+="color="+encodeURIComponent(""+m)+"&"),null!=h&&(M+="obm="+encodeURIComponent(""+h)+"&"),null!=v&&(M+="oo="+encodeURIComponent(""+v)+"&"),null!=g&&(M+="alphaMask="+encodeURIComponent(""+g)+"&"),null!=y&&(M+="page="+encodeURIComponent(""+y)+"&"),null!=b&&(M+="colorizeColor="+encodeURIComponent(""+b)+"&"),null!=R&&(M+="rw="+encodeURIComponent(""+R)+"&"),null!=w&&(M+="rh="+encodeURIComponent(""+w)+"&"),M=M.replace(/[?&]$/,"");var U={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/octet-stream"})};return n.from(this.transformOptions(U)).pipe(t.mergeMap((function(e){return I.http.request("get",M,e)}))).pipe(t.mergeMap((function(e){return I.transformResult(M,e,(function(e){return I.processSvg(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return I.transformResult(M,e,(function(e){return I.processSvg(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processSvg=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}if(200===s||206===s){var m=e.headers?e.headers.get("content-disposition"):void 0,h=m?/filename="?([^"]*?)"?(;|$)/g.exec(m):void 0,v=h&&h.length>1?h[1]:void 0;return n.of({fileName:v,data:i,status:s,headers:c})}return 304===s?B(i).pipe(t.mergeMap((function(e){return A("Not Modified",s,e,c)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.txt=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/tenants/{tenantId}/api/ccviewer/txt?";if(null==e)throw new Error("The parameter 'tenantId' must be defined.");p=p.replace("{tenantId}",encodeURIComponent(""+e)),null!=r&&(p+="f="+encodeURIComponent(""+r)+"&"),p=p.replace(/[?&]$/,"");var s={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/octet-stream"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("get",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processTxt(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processTxt(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processTxt=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}if(200===s||206===s){var m=e.headers?e.headers.get("content-disposition"):void 0,h=m?/filename="?([^"]*?)"?(;|$)/g.exec(m):void 0,v=h&&h.length>1?h[1]:void 0;return n.of({fileName:v,data:i,status:s,headers:c})}return 304===s?B(i).pipe(t.mergeMap((function(e){return A("Not Modified",s,e,c)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.updateArchedTextItemHandler=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/tenants/{tenantId}/api/ccviewer/UpdateArchedTextItemHandler";if(null==e)throw new Error("The parameter 'tenantId' must be defined.");p=(p=p.replace("{tenantId}",encodeURIComponent(""+e))).replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processUpdateArchedTextItemHandler(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processUpdateArchedTextItemHandler(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processUpdateArchedTextItemHandler=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.updateAutoScaledTextItemHandler=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/tenants/{tenantId}/api/ccviewer/UpdateAutoScaledTextItemHandler";if(null==e)throw new Error("The parameter 'tenantId' must be defined.");p=(p=p.replace("{tenantId}",encodeURIComponent(""+e))).replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processUpdateAutoScaledTextItemHandler(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processUpdateAutoScaledTextItemHandler(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processUpdateAutoScaledTextItemHandler=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.updateBarcodeItemHandler=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/tenants/{tenantId}/api/ccviewer/UpdateBarcodeItemHandler";if(null==e)throw new Error("The parameter 'tenantId' must be defined.");p=(p=p.replace("{tenantId}",encodeURIComponent(""+e))).replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processUpdateBarcodeItemHandler(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processUpdateBarcodeItemHandler(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processUpdateBarcodeItemHandler=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.updateBoundedTextItemHandler=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/tenants/{tenantId}/api/ccviewer/UpdateBoundedTextItemHandler";if(null==e)throw new Error("The parameter 'tenantId' must be defined.");p=(p=p.replace("{tenantId}",encodeURIComponent(""+e))).replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processUpdateBoundedTextItemHandler(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processUpdateBoundedTextItemHandler(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processUpdateBoundedTextItemHandler=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.updateByColorData=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/tenants/{tenantId}/api/ccviewer/UpdateByColorData";if(null==e)throw new Error("The parameter 'tenantId' must be defined.");p=(p=p.replace("{tenantId}",encodeURIComponent(""+e))).replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processUpdateByColorData(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processUpdateByColorData(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processUpdateByColorData=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.updateByMultiCallRequest=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/tenants/{tenantId}/api/ccviewer/UpdateByMultiCallRequest";if(null==e)throw new Error("The parameter 'tenantId' must be defined.");p=(p=p.replace("{tenantId}",encodeURIComponent(""+e))).replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processUpdateByMultiCallRequest(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processUpdateByMultiCallRequest(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processUpdateByMultiCallRequest=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.updateCurvedTextItemHandler=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/tenants/{tenantId}/api/ccviewer/UpdateCurvedTextItemHandler";if(null==e)throw new Error("The parameter 'tenantId' must be defined.");p=(p=p.replace("{tenantId}",encodeURIComponent(""+e))).replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processUpdateCurvedTextItemHandler(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processUpdateCurvedTextItemHandler(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processUpdateCurvedTextItemHandler=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.updateImageItemHandler=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/tenants/{tenantId}/api/ccviewer/UpdateImageItemHandler";if(null==e)throw new Error("The parameter 'tenantId' must be defined.");p=(p=p.replace("{tenantId}",encodeURIComponent(""+e))).replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processUpdateImageItemHandler(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processUpdateImageItemHandler(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processUpdateImageItemHandler=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.updatePathBoundedTextItemHandler=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/tenants/{tenantId}/api/ccviewer/UpdatePathBoundedTextItemHandler";if(null==e)throw new Error("The parameter 'tenantId' must be defined.");p=(p=p.replace("{tenantId}",encodeURIComponent(""+e))).replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processUpdatePathBoundedTextItemHandler(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processUpdatePathBoundedTextItemHandler(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processUpdatePathBoundedTextItemHandler=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.updatePlainTextItemHandler=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/tenants/{tenantId}/api/ccviewer/UpdatePlainTextItemHandler";if(null==e)throw new Error("The parameter 'tenantId' must be defined.");p=(p=p.replace("{tenantId}",encodeURIComponent(""+e))).replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processUpdatePlainTextItemHandler(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processUpdatePlainTextItemHandler(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processUpdatePlainTextItemHandler=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.updateShapeItemHandler=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/tenants/{tenantId}/api/ccviewer/UpdateShapeItemHandler";if(null==e)throw new Error("The parameter 'tenantId' must be defined.");p=(p=p.replace("{tenantId}",encodeURIComponent(""+e))).replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processUpdateShapeItemHandler(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processUpdateShapeItemHandler(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processUpdateShapeItemHandler=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r}(f);m.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new m(r.ɵɵinject(l),r.ɵɵinject(o.HttpClient),r.ɵɵinject(c,8))},token:m,providedIn:"root"}),m.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],m.ctorParameters=function(){return[{type:l,decorators:[{type:r.Inject,args:[l]}]},{type:o.HttpClient,decorators:[{type:r.Inject,args:[o.HttpClient]}]},{type:String,decorators:[{type:r.Optional},{type:r.Inject,args:[c]}]}]};var h=function(e){function r(r,t,n){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=t,o.baseUrl=null!=n?n:o.getBaseUrl(""),o}return p(r,e),r.prototype.renderImagePreview=function(e,r,a){var p=this,s=this.baseUrl+"/api/atoms/v1/images/render-preview?";if(null!=e&&(s+="attachment="+encodeURIComponent(""+e)+"&"),null===r)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==r&&(s+="tenantId="+encodeURIComponent(""+r)+"&"),s=s.replace(/[?&]$/,"");var i={body:JSON.stringify(a),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/octet-stream"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("post",s,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processRenderImagePreview(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processRenderImagePreview(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processRenderImagePreview=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}if(200===s||206===s){var m=e.headers?e.headers.get("content-disposition"):void 0,h=m?/filename="?([^"]*?)"?(;|$)/g.exec(m):void 0,v=h&&h.length>1?h[1]:void 0;return n.of({fileName:v,data:i,status:s,headers:c})}return 404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.renderImagePreviewFromFile=function(e,r,a,p,s,i,u,c,l){var f=this,d=this.baseUrl+"/api/atoms/v1/images/render-preview/from-file?";if(null!=e&&(d+="attachment="+encodeURIComponent(""+e)+"&"),null===r)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==r&&(d+="tenantId="+encodeURIComponent(""+r)+"&"),d=d.replace(/[?&]$/,"");var m=new FormData;null!=a&&m.append("sourceFile",a.data,a.fileName?a.fileName:"sourceFile"),null!=p&&m.append("mockupOwnerId",p.toString()),null!=s&&m.append("mockupId",s.toString()),null!=i&&m.append("width",i.toString()),null!=u&&m.append("height",u.toString()),null!=c&&m.append("fileFormat",c.toString()),null!=l&&m.append("fitMode",l.toString());var h={body:m,observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/octet-stream"})};return n.from(this.transformOptions(h)).pipe(t.mergeMap((function(e){return f.http.request("post",d,e)}))).pipe(t.mergeMap((function(e){return f.transformResult(d,e,(function(e){return f.processRenderImagePreviewFromFile(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return f.transformResult(d,e,(function(e){return f.processRenderImagePreviewFromFile(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processRenderImagePreviewFromFile=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}if(200===s||206===s){var m=e.headers?e.headers.get("content-disposition"):void 0,h=m?/filename="?([^"]*?)"?(;|$)/g.exec(m):void 0,v=h&&h.length>1?h[1]:void 0;return n.of({fileName:v,data:i,status:s,headers:c})}return 404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.renderImagePreviewFromFileToResource=function(e,r,a,p,s,i,u,c,l,f,d,m,h,v,g){var y=this,b=this.baseUrl+"/api/atoms/v1/images/render-preview/from-file/to-resource?";if(null===e)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==e&&(b+="tenantId="+encodeURIComponent(""+e)+"&"),b=b.replace(/[?&]$/,"");var R=new FormData;null!=r&&R.append("resourceOwnerId",r.toString()),null!=a&&R.append("resourceNamespace",a.toString()),null!=p&&R.append("resourceName",p.toString()),null!=s&&R.append("resourceSourceId",s.toString()),null!=i&&R.append("resourceType",i.toString()),null!=u&&R.append("anonymousAccess",u.toString()),null!=c&&R.append("overwriteExistingResource",c.toString()),null!=l&&R.append("sourceFile",l.data,l.fileName?l.fileName:"sourceFile"),null!=f&&R.append("mockupOwnerId",f.toString()),null!=d&&R.append("mockupId",d.toString()),null!=m&&R.append("width",m.toString()),null!=h&&R.append("height",h.toString()),null!=v&&R.append("fileFormat",v.toString()),null!=g&&R.append("fitMode",g.toString());var w={body:R,observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return n.from(this.transformOptions(w)).pipe(t.mergeMap((function(e){return y.http.request("post",b,e)}))).pipe(t.mergeMap((function(e){return y.transformResult(b,e,(function(e){return y.processRenderImagePreviewFromFileToResource(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return y.transformResult(b,e,(function(e){return y.processRenderImagePreviewFromFileToResource(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processRenderImagePreviewFromFileToResource=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.renderImagePreviewFromUrl=function(e,r,a){var p=this,s=this.baseUrl+"/api/atoms/v1/images/render-preview/from-url?";if(null!=e&&(s+="attachment="+encodeURIComponent(""+e)+"&"),null===r)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==r&&(s+="tenantId="+encodeURIComponent(""+r)+"&"),s=s.replace(/[?&]$/,"");var i={body:JSON.stringify(a),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/octet-stream"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("post",s,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processRenderImagePreviewFromUrl(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processRenderImagePreviewFromUrl(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processRenderImagePreviewFromUrl=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}if(200===s||206===s){var m=e.headers?e.headers.get("content-disposition"):void 0,h=m?/filename="?([^"]*?)"?(;|$)/g.exec(m):void 0,v=h&&h.length>1?h[1]:void 0;return n.of({fileName:v,data:i,status:s,headers:c})}return 404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.renderImagePreviewFromUrlToResource=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/images/render-preview/from-url/to-resource?";if(null===e)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processRenderImagePreviewFromUrlToResource(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processRenderImagePreviewFromUrlToResource(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processRenderImagePreviewFromUrlToResource=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.renderImagePreviewToResource=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/images/render-preview/to-resource?";if(null===e)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processRenderImagePreviewToResource(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processRenderImagePreviewToResource(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processRenderImagePreviewToResource=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r}(f);h.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new h(r.ɵɵinject(l),r.ɵɵinject(o.HttpClient),r.ɵɵinject(c,8))},token:h,providedIn:"root"}),h.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],h.ctorParameters=function(){return[{type:l,decorators:[{type:r.Inject,args:[l]}]},{type:o.HttpClient,decorators:[{type:r.Inject,args:[o.HttpClient]}]},{type:String,decorators:[{type:r.Optional},{type:r.Inject,args:[c]}]}]};var v=function(e){function r(r,t,n){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=t,o.baseUrl=null!=n?n:o.getBaseUrl(""),o}return p(r,e),r.prototype.getAttributes=function(e,r,a){var p=this,s=this.baseUrl+"/api/atoms/v1/mockups-3d/{id}/attributes?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(s=s.replace("{id}",encodeURIComponent(""+e)),null!=r&&(s+="ownerId="+encodeURIComponent(""+r)+"&"),null===a)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==a&&(s+="tenantId="+encodeURIComponent(""+a)+"&"),s=s.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("get",s,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processGetAttributes(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processGetAttributes(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetAttributes=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getContentAsProtobuf=function(e,r,a){var p=this,s=this.baseUrl+"/api/atoms/v1/mockups-3d/{id}/content/as-protobuf?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(s=s.replace("{id}",encodeURIComponent(""+e)),null!=r&&(s+="ownerId="+encodeURIComponent(""+r)+"&"),null===a)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==a&&(s+="tenantId="+encodeURIComponent(""+a)+"&"),s=s.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/octet-stream"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("get",s,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processGetContentAsProtobuf(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processGetContentAsProtobuf(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetContentAsProtobuf=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}if(200===s||206===s){var m=e.headers?e.headers.get("content-disposition"):void 0,h=m?/filename="?([^"]*?)"?(;|$)/g.exec(m):void 0,v=h&&h.length>1?h[1]:void 0;return n.of({fileName:v,data:i,status:s,headers:c})}return 404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getGeometryFile=function(e,r,a){var p=this,s=this.baseUrl+"/api/atoms/v1/mockups-3d/{id}/geometry/file?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(s=s.replace("{id}",encodeURIComponent(""+e)),null!=r&&(s+="ownerId="+encodeURIComponent(""+r)+"&"),null===a)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==a&&(s+="tenantId="+encodeURIComponent(""+a)+"&"),s=s.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/octet-stream"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("get",s,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processGetGeometryFile(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processGetGeometryFile(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetGeometryFile=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}if(200===s||206===s){var m=e.headers?e.headers.get("content-disposition"):void 0,h=m?/filename="?([^"]*?)"?(;|$)/g.exec(m):void 0,v=h&&h.length>1?h[1]:void 0;return n.of({fileName:v,data:i,status:s,headers:c})}return 404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r}(f);v.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new v(r.ɵɵinject(l),r.ɵɵinject(o.HttpClient),r.ɵɵinject(c,8))},token:v,providedIn:"root"}),v.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],v.ctorParameters=function(){return[{type:l,decorators:[{type:r.Inject,args:[l]}]},{type:o.HttpClient,decorators:[{type:r.Inject,args:[o.HttpClient]}]},{type:String,decorators:[{type:r.Optional},{type:r.Inject,args:[c]}]}]};var g=function(e){function r(r,t,n){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=t,o.baseUrl=null!=n?n:o.getBaseUrl(""),o}return p(r,e),r.prototype.findPaletteColor=function(e,r,a){var p=this,s=this.baseUrl+"/api/atoms/v1/palettes/find-color?";if(null!=e&&(s+="paletteUID="+encodeURIComponent(""+e)+"&"),null===r)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==r&&(s+="tenantId="+encodeURIComponent(""+r)+"&"),s=s.replace(/[?&]$/,"");var i={body:JSON.stringify(a),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("post",s,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processFindPaletteColor(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processFindPaletteColor(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processFindPaletteColor=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):400===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Bad Request",s,e,c,r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getPaletteModel=function(e,r,a){var p=this,s=this.baseUrl+"/api/atoms/v1/palettes/model?";if(null!=e&&(s+="id="+encodeURIComponent(""+e)+"&"),null!=r&&(s+="uid="+encodeURIComponent(""+r)+"&"),null===a)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==a&&(s+="tenantId="+encodeURIComponent(""+a)+"&"),s=s.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("get",s,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processGetPaletteModel(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processGetPaletteModel(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetPaletteModel=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):400===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Bad Request",s,e,c,r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r}(f);g.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new g(r.ɵɵinject(l),r.ɵɵinject(o.HttpClient),r.ɵɵinject(c,8))},token:g,providedIn:"root"}),g.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],g.ctorParameters=function(){return[{type:l,decorators:[{type:r.Inject,args:[l]}]},{type:o.HttpClient,decorators:[{type:r.Inject,args:[o.HttpClient]}]},{type:String,decorators:[{type:r.Optional},{type:r.Inject,args:[c]}]}]};var y=function(e){function r(r,t,n){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=t,o.baseUrl=null!=n?n:o.getBaseUrl(""),o}return p(r,e),r.prototype.patchDesignProduct=function(e,r,a,p,s,i,u,c,l){var f=this,d=this.baseUrl+"/api/atoms/v1/designs/{id}/print-product?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(d=d.replace("{id}",encodeURIComponent(""+e)),null!=r&&(d+="privateStorageOwner="+encodeURIComponent(""+r)+"&"),null===a)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==a&&(d+="tenantId="+encodeURIComponent(""+a)+"&"),d=d.replace(/[?&]$/,"");var m=new FormData;null!=p&&m.append("patchType",p.toString()),null!=s&&m.append("replaceImageItemFileInfo.itemName",s.toString()),null!=i&&m.append("replaceImageItemFileInfo.sourceFile",i.data,i.fileName?i.fileName:"replaceImageItemFileInfo.sourceFile"),null!=u&&m.append("replacePlaceholderItemContentInfo.placeholderItemName",u.toString()),null!=c&&m.append("replacePlaceholderItemContentInfo.newContentType",c.toString()),null!=l&&m.append("replacePlaceholderItemContentInfo.sourceFile",l.data,l.fileName?l.fileName:"replacePlaceholderItemContentInfo.sourceFile");var h={body:m,observe:"response",responseType:"blob",headers:new o.HttpHeaders({})};return n.from(this.transformOptions(h)).pipe(t.mergeMap((function(e){return f.http.request("patch",d,e)}))).pipe(t.mergeMap((function(e){return f.transformResult(d,e,(function(e){return f.processPatchDesignProduct(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return f.transformResult(d,e,(function(e){return f.processPatchDesignProduct(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processPatchDesignProduct=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 204===s?B(i).pipe(t.mergeMap((function(e){return n.of(null)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getDesignSurfaceContainers=function(e,r,a,p){var s=this,i=this.baseUrl+"/api/atoms/v1/designs/{id}/print-product/containers?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(i=i.replace("{id}",encodeURIComponent(""+e)),null!=r&&(i+="surfaceId="+encodeURIComponent(""+r)+"&"),null!=a&&(i+="privateStorageOwner="+encodeURIComponent(""+a)+"&"),null===p)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==p&&(i+="tenantId="+encodeURIComponent(""+p)+"&"),i=i.replace(/[?&]$/,"");var u={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return n.from(this.transformOptions(u)).pipe(t.mergeMap((function(e){return s.http.request("get",i,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(i,e,(function(e){return s.processGetDesignSurfaceContainers(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(i,e,(function(e){return s.processGetDesignSurfaceContainers(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetDesignSurfaceContainers=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.deleteDesignSurfaceContainer=function(e,r,a,p){var s=this,i=this.baseUrl+"/api/atoms/v1/designs/{id}/print-product/containers/{containerId}?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(i=i.replace("{id}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'containerId' must be defined.");if(i=i.replace("{containerId}",encodeURIComponent(""+r)),null!=a&&(i+="privateStorageOwner="+encodeURIComponent(""+a)+"&"),null===p)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==p&&(i+="tenantId="+encodeURIComponent(""+p)+"&"),i=i.replace(/[?&]$/,"");var u={observe:"response",responseType:"blob",headers:new o.HttpHeaders({})};return n.from(this.transformOptions(u)).pipe(t.mergeMap((function(e){return s.http.request("delete",i,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(i,e,(function(e){return s.processDeleteDesignSurfaceContainer(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(i,e,(function(e){return s.processDeleteDesignSurfaceContainer(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processDeleteDesignSurfaceContainer=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 204===s?B(i).pipe(t.mergeMap((function(e){return n.of(null)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getDesignSurfaceContainerModel=function(e,r,a,p){var s=this,i=this.baseUrl+"/api/atoms/v1/designs/{id}/print-product/containers/{containerId}/model?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(i=i.replace("{id}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'containerId' must be defined.");if(i=i.replace("{containerId}",encodeURIComponent(""+r)),null!=a&&(i+="privateStorageOwner="+encodeURIComponent(""+a)+"&"),null===p)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==p&&(i+="tenantId="+encodeURIComponent(""+p)+"&"),i=i.replace(/[?&]$/,"");var u={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return n.from(this.transformOptions(u)).pipe(t.mergeMap((function(e){return s.http.request("get",i,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(i,e,(function(e){return s.processGetDesignSurfaceContainerModel(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(i,e,(function(e){return s.processGetDesignSurfaceContainerModel(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetDesignSurfaceContainerModel=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.updateDesignSurfaceContainerModel=function(e,r,a,p,s){var i=this,u=this.baseUrl+"/api/atoms/v1/designs/{id}/print-product/containers/{containerId}/model?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(u=u.replace("{id}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'containerId' must be defined.");if(u=u.replace("{containerId}",encodeURIComponent(""+r)),null!=a&&(u+="privateStorageOwner="+encodeURIComponent(""+a)+"&"),null===p)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==p&&(u+="tenantId="+encodeURIComponent(""+p)+"&"),u=u.replace(/[?&]$/,"");var c={body:JSON.stringify(s),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(c)).pipe(t.mergeMap((function(e){return i.http.request("put",u,e)}))).pipe(t.mergeMap((function(e){return i.transformResult(u,e,(function(e){return i.processUpdateDesignSurfaceContainerModel(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return i.transformResult(u,e,(function(e){return i.processUpdateDesignSurfaceContainerModel(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processUpdateDesignSurfaceContainerModel=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):400===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Bad Request",s,e,c,r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.addDesignSurfaceContainerModel=function(e,r,a,p,s,i,u,c){var l=this,f=this.baseUrl+"/api/atoms/v1/designs/{id}/print-product/containers/model?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(f=f.replace("{id}",encodeURIComponent(""+e)),null!=r&&(f+="surfaceId="+encodeURIComponent(""+r)+"&"),null!=a&&(f+="index="+encodeURIComponent(""+a)+"&"),null===p)throw new Error("The parameter 'top' cannot be null.");if(void 0!==p&&(f+="top="+encodeURIComponent(""+p)+"&"),null===s)throw new Error("The parameter 'left' cannot be null.");if(void 0!==s&&(f+="left="+encodeURIComponent(""+s)+"&"),null!=i&&(f+="privateStorageOwner="+encodeURIComponent(""+i)+"&"),null===u)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==u&&(f+="tenantId="+encodeURIComponent(""+u)+"&"),f=f.replace(/[?&]$/,"");var d={body:JSON.stringify(c),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(d)).pipe(t.mergeMap((function(e){return l.http.request("post",f,e)}))).pipe(t.mergeMap((function(e){return l.transformResult(f,e,(function(e){return l.processAddDesignSurfaceContainerModel(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return l.transformResult(f,e,(function(e){return l.processAddDesignSurfaceContainerModel(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processAddDesignSurfaceContainerModel=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):400===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Bad Request",s,e,c,r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getDesignSurfaceItems=function(e,r,a,p,s,i){var u=this,c=this.baseUrl+"/api/atoms/v1/designs/{id}/print-product/items?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(c=c.replace("{id}",encodeURIComponent(""+e)),null!=r&&(c+="surfaceId="+encodeURIComponent(""+r)+"&"),null!=a&&(c+="containerId="+encodeURIComponent(""+a)+"&"),null!=p&&(c+="parentItemId="+encodeURIComponent(""+p)+"&"),null!=s&&(c+="privateStorageOwner="+encodeURIComponent(""+s)+"&"),null===i)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==i&&(c+="tenantId="+encodeURIComponent(""+i)+"&"),c=c.replace(/[?&]$/,"");var l={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return n.from(this.transformOptions(l)).pipe(t.mergeMap((function(e){return u.http.request("get",c,e)}))).pipe(t.mergeMap((function(e){return u.transformResult(c,e,(function(e){return u.processGetDesignSurfaceItems(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return u.transformResult(c,e,(function(e){return u.processGetDesignSurfaceItems(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetDesignSurfaceItems=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.deleteDesignSurfaceItem=function(e,r,a,p){var s=this,i=this.baseUrl+"/api/atoms/v1/designs/{id}/print-product/items/{itemId}?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(i=i.replace("{id}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'itemId' must be defined.");if(i=i.replace("{itemId}",encodeURIComponent(""+r)),null!=a&&(i+="privateStorageOwner="+encodeURIComponent(""+a)+"&"),null===p)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==p&&(i+="tenantId="+encodeURIComponent(""+p)+"&"),i=i.replace(/[?&]$/,"");var u={observe:"response",responseType:"blob",headers:new o.HttpHeaders({})};return n.from(this.transformOptions(u)).pipe(t.mergeMap((function(e){return s.http.request("delete",i,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(i,e,(function(e){return s.processDeleteDesignSurfaceItem(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(i,e,(function(e){return s.processDeleteDesignSurfaceItem(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processDeleteDesignSurfaceItem=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 204===s?B(i).pipe(t.mergeMap((function(e){return n.of(null)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getDesignSurfaceItemModel=function(e,r,a,p){var s=this,i=this.baseUrl+"/api/atoms/v1/designs/{id}/print-product/items/{itemId}/model?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(i=i.replace("{id}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'itemId' must be defined.");if(i=i.replace("{itemId}",encodeURIComponent(""+r)),null!=a&&(i+="privateStorageOwner="+encodeURIComponent(""+a)+"&"),null===p)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==p&&(i+="tenantId="+encodeURIComponent(""+p)+"&"),i=i.replace(/[?&]$/,"");var u={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return n.from(this.transformOptions(u)).pipe(t.mergeMap((function(e){return s.http.request("get",i,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(i,e,(function(e){return s.processGetDesignSurfaceItemModel(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(i,e,(function(e){return s.processGetDesignSurfaceItemModel(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetDesignSurfaceItemModel=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.updateDesignSurfaceItemModel=function(e,r,a,p,s){var i=this,u=this.baseUrl+"/api/atoms/v1/designs/{id}/print-product/items/{itemId}/model?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(u=u.replace("{id}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'itemId' must be defined.");if(u=u.replace("{itemId}",encodeURIComponent(""+r)),null!=a&&(u+="privateStorageOwner="+encodeURIComponent(""+a)+"&"),null===p)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==p&&(u+="tenantId="+encodeURIComponent(""+p)+"&"),u=u.replace(/[?&]$/,"");var c={body:JSON.stringify(s),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(c)).pipe(t.mergeMap((function(e){return i.http.request("put",u,e)}))).pipe(t.mergeMap((function(e){return i.transformResult(u,e,(function(e){return i.processUpdateDesignSurfaceItemModel(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return i.transformResult(u,e,(function(e){return i.processUpdateDesignSurfaceItemModel(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processUpdateDesignSurfaceItemModel=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):400===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Bad Request",s,e,c,r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.addDesignSurfaceItemModel=function(e,r,a,p,s,i,u,c){var l=this,f=this.baseUrl+"/api/atoms/v1/designs/{id}/print-product/items/model?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(f=f.replace("{id}",encodeURIComponent(""+e)),null!=r&&(f+="containerId="+encodeURIComponent(""+r)+"&"),null!=a&&(f+="index="+encodeURIComponent(""+a)+"&"),null===p)throw new Error("The parameter 'top' cannot be null.");if(void 0!==p&&(f+="top="+encodeURIComponent(""+p)+"&"),null===s)throw new Error("The parameter 'left' cannot be null.");if(void 0!==s&&(f+="left="+encodeURIComponent(""+s)+"&"),null!=i&&(f+="privateStorageOwner="+encodeURIComponent(""+i)+"&"),null===u)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==u&&(f+="tenantId="+encodeURIComponent(""+u)+"&"),f=f.replace(/[?&]$/,"");var d={body:JSON.stringify(c),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(d)).pipe(t.mergeMap((function(e){return l.http.request("post",f,e)}))).pipe(t.mergeMap((function(e){return l.transformResult(f,e,(function(e){return l.processAddDesignSurfaceItemModel(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return l.transformResult(f,e,(function(e){return l.processAddDesignSurfaceItemModel(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processAddDesignSurfaceItemModel=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):400===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Bad Request",s,e,c,r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getDesignProductModel=function(e,r,a){var p=this,s=this.baseUrl+"/api/atoms/v1/designs/{id}/print-product/model?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(s=s.replace("{id}",encodeURIComponent(""+e)),null!=r&&(s+="privateStorageOwner="+encodeURIComponent(""+r)+"&"),null===a)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==a&&(s+="tenantId="+encodeURIComponent(""+a)+"&"),s=s.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("get",s,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processGetDesignProductModel(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processGetDesignProductModel(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetDesignProductModel=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.updateDesignProductModel=function(e,r,a,p){var s=this,i=this.baseUrl+"/api/atoms/v1/designs/{id}/print-product/model?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(i=i.replace("{id}",encodeURIComponent(""+e)),null!=r&&(i+="privateStorageOwner="+encodeURIComponent(""+r)+"&"),null===a)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==a&&(i+="tenantId="+encodeURIComponent(""+a)+"&"),i=i.replace(/[?&]$/,"");var u={body:JSON.stringify(p),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json"})};return n.from(this.transformOptions(u)).pipe(t.mergeMap((function(e){return s.http.request("put",i,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(i,e,(function(e){return s.processUpdateDesignProductModel(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(i,e,(function(e){return s.processUpdateDesignProductModel(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processUpdateDesignProductModel=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 204===s?B(i).pipe(t.mergeMap((function(e){return n.of(null)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getDesignPrintAreas=function(e,r,a,p){var s=this,i=this.baseUrl+"/api/atoms/v1/designs/{id}/print-product/print-areas?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(i=i.replace("{id}",encodeURIComponent(""+e)),null!=r&&(i+="surfaceId="+encodeURIComponent(""+r)+"&"),null!=a&&(i+="privateStorageOwner="+encodeURIComponent(""+a)+"&"),null===p)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==p&&(i+="tenantId="+encodeURIComponent(""+p)+"&"),i=i.replace(/[?&]$/,"");var u={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return n.from(this.transformOptions(u)).pipe(t.mergeMap((function(e){return s.http.request("get",i,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(i,e,(function(e){return s.processGetDesignPrintAreas(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(i,e,(function(e){return s.processGetDesignPrintAreas(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetDesignPrintAreas=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.addDesignPrintArea=function(e,r,a,p){var s=this,i=this.baseUrl+"/api/atoms/v1/designs/{id}/print-product/print-areas?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(i=i.replace("{id}",encodeURIComponent(""+e)),null!=r&&(i+="privateStorageOwner="+encodeURIComponent(""+r)+"&"),null===a)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==a&&(i+="tenantId="+encodeURIComponent(""+a)+"&"),i=i.replace(/[?&]$/,"");var u={body:JSON.stringify(p),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(u)).pipe(t.mergeMap((function(e){return s.http.request("post",i,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(i,e,(function(e){return s.processAddDesignPrintArea(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(i,e,(function(e){return s.processAddDesignPrintArea(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processAddDesignPrintArea=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):400===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Bad Request",s,e,c,r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.updateDesignPrintArea=function(e,r,a,p,s){var i=this,u=this.baseUrl+"/api/atoms/v1/designs/{id}/print-product/print-areas/{printAreaId}?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(u=u.replace("{id}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'printAreaId' must be defined.");if(u=u.replace("{printAreaId}",encodeURIComponent(""+r)),null!=a&&(u+="privateStorageOwner="+encodeURIComponent(""+a)+"&"),null===p)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==p&&(u+="tenantId="+encodeURIComponent(""+p)+"&"),u=u.replace(/[?&]$/,"");var c={body:JSON.stringify(s),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(c)).pipe(t.mergeMap((function(e){return i.http.request("put",u,e)}))).pipe(t.mergeMap((function(e){return i.transformResult(u,e,(function(e){return i.processUpdateDesignPrintArea(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return i.transformResult(u,e,(function(e){return i.processUpdateDesignPrintArea(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processUpdateDesignPrintArea=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):400===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Bad Request",s,e,c,r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.deleteDesignPrintArea=function(e,r,a,p){var s=this,i=this.baseUrl+"/api/atoms/v1/designs/{id}/print-product/print-areas/{printAreaId}?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(i=i.replace("{id}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'printAreaId' must be defined.");if(i=i.replace("{printAreaId}",encodeURIComponent(""+r)),null!=a&&(i+="privateStorageOwner="+encodeURIComponent(""+a)+"&"),null===p)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==p&&(i+="tenantId="+encodeURIComponent(""+p)+"&"),i=i.replace(/[?&]$/,"");var u={observe:"response",responseType:"blob",headers:new o.HttpHeaders({})};return n.from(this.transformOptions(u)).pipe(t.mergeMap((function(e){return s.http.request("delete",i,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(i,e,(function(e){return s.processDeleteDesignPrintArea(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(i,e,(function(e){return s.processDeleteDesignPrintArea(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processDeleteDesignPrintArea=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 204===s?B(i).pipe(t.mergeMap((function(e){return n.of(null)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getDesignPrintAreaModel=function(e,r,a,p){var s=this,i=this.baseUrl+"/api/atoms/v1/designs/{id}/print-product/print-areas/{printAreaId}/model?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(i=i.replace("{id}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'printAreaId' must be defined.");if(i=i.replace("{printAreaId}",encodeURIComponent(""+r)),null!=a&&(i+="privateStorageOwner="+encodeURIComponent(""+a)+"&"),null===p)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==p&&(i+="tenantId="+encodeURIComponent(""+p)+"&"),i=i.replace(/[?&]$/,"");var u={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return n.from(this.transformOptions(u)).pipe(t.mergeMap((function(e){return s.http.request("get",i,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(i,e,(function(e){return s.processGetDesignPrintAreaModel(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(i,e,(function(e){return s.processGetDesignPrintAreaModel(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetDesignPrintAreaModel=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.updateDesignPrintAreaModel=function(e,r,a,p,s){var i=this,u=this.baseUrl+"/api/atoms/v1/designs/{id}/print-product/print-areas/{printAreaId}/model?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(u=u.replace("{id}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'printAreaId' must be defined.");if(u=u.replace("{printAreaId}",encodeURIComponent(""+r)),null!=a&&(u+="privateStorageOwner="+encodeURIComponent(""+a)+"&"),null===p)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==p&&(u+="tenantId="+encodeURIComponent(""+p)+"&"),u=u.replace(/[?&]$/,"");var c={body:JSON.stringify(s),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(c)).pipe(t.mergeMap((function(e){return i.http.request("put",u,e)}))).pipe(t.mergeMap((function(e){return i.transformResult(u,e,(function(e){return i.processUpdateDesignPrintAreaModel(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return i.transformResult(u,e,(function(e){return i.processUpdateDesignPrintAreaModel(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processUpdateDesignPrintAreaModel=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):400===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Bad Request",s,e,c,r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.addDesignPrintAreaModel=function(e,r,a,p,s){var i=this,u=this.baseUrl+"/api/atoms/v1/designs/{id}/print-product/print-areas/model?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(u=u.replace("{id}",encodeURIComponent(""+e)),null!=r&&(u+="surfaceId="+encodeURIComponent(""+r)+"&"),null!=a&&(u+="privateStorageOwner="+encodeURIComponent(""+a)+"&"),null===p)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==p&&(u+="tenantId="+encodeURIComponent(""+p)+"&"),u=u.replace(/[?&]$/,"");var c={body:JSON.stringify(s),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(c)).pipe(t.mergeMap((function(e){return i.http.request("post",u,e)}))).pipe(t.mergeMap((function(e){return i.transformResult(u,e,(function(e){return i.processAddDesignPrintAreaModel(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return i.transformResult(u,e,(function(e){return i.processAddDesignPrintAreaModel(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processAddDesignPrintAreaModel=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):400===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Bad Request",s,e,c,r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getDesignSurfaces=function(e,r,a){var p=this,s=this.baseUrl+"/api/atoms/v1/designs/{id}/print-product/surfaces?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(s=s.replace("{id}",encodeURIComponent(""+e)),null!=r&&(s+="privateStorageOwner="+encodeURIComponent(""+r)+"&"),null===a)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==a&&(s+="tenantId="+encodeURIComponent(""+a)+"&"),s=s.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("get",s,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processGetDesignSurfaces(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processGetDesignSurfaces(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetDesignSurfaces=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.deleteDesignSurface=function(e,r,a,p){var s=this,i=this.baseUrl+"/api/atoms/v1/designs/{id}/print-product/surfaces/{surfaceId}?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(i=i.replace("{id}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'surfaceId' must be defined.");if(i=i.replace("{surfaceId}",encodeURIComponent(""+r)),null!=a&&(i+="privateStorageOwner="+encodeURIComponent(""+a)+"&"),null===p)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==p&&(i+="tenantId="+encodeURIComponent(""+p)+"&"),i=i.replace(/[?&]$/,"");var u={observe:"response",responseType:"blob",headers:new o.HttpHeaders({})};return n.from(this.transformOptions(u)).pipe(t.mergeMap((function(e){return s.http.request("delete",i,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(i,e,(function(e){return s.processDeleteDesignSurface(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(i,e,(function(e){return s.processDeleteDesignSurface(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processDeleteDesignSurface=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 204===s?B(i).pipe(t.mergeMap((function(e){return n.of(null)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getDesignSurfaceDownMockup=function(e,r,a,p){var s=this,i=this.baseUrl+"/api/atoms/v1/designs/{id}/print-product/surfaces/{surfaceId}/mockup-down?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(i=i.replace("{id}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'surfaceId' must be defined.");if(i=i.replace("{surfaceId}",encodeURIComponent(""+r)),null!=a&&(i+="privateStorageOwner="+encodeURIComponent(""+a)+"&"),null===p)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==p&&(i+="tenantId="+encodeURIComponent(""+p)+"&"),i=i.replace(/[?&]$/,"");var u={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return n.from(this.transformOptions(u)).pipe(t.mergeMap((function(e){return s.http.request("get",i,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(i,e,(function(e){return s.processGetDesignSurfaceDownMockup(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(i,e,(function(e){return s.processGetDesignSurfaceDownMockup(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetDesignSurfaceDownMockup=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):400===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Bad Request",s,e,c,r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.updateDesignSurfaceDownMockup=function(e,r,a,p,s,i,u){var c=this,l=this.baseUrl+"/api/atoms/v1/designs/{id}/print-product/surfaces/{surfaceId}/mockup-down?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(l=l.replace("{id}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'surfaceId' must be defined.");if(l=l.replace("{surfaceId}",encodeURIComponent(""+r)),null!=a&&(l+="privateStorageOwner="+encodeURIComponent(""+a)+"&"),null===p)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==p&&(l+="tenantId="+encodeURIComponent(""+p)+"&"),l=l.replace(/[?&]$/,"");var f=new FormData;if(null==s)throw new Error("The parameter 'position_top' cannot be null.");if(f.append("position.top",s.toString()),null==i)throw new Error("The parameter 'position_left' cannot be null.");f.append("position.left",i.toString()),null!=u&&f.append("sourceFile",u.data,u.fileName?u.fileName:"sourceFile");var d={body:f,observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return n.from(this.transformOptions(d)).pipe(t.mergeMap((function(e){return c.http.request("patch",l,e)}))).pipe(t.mergeMap((function(e){return c.transformResult(l,e,(function(e){return c.processUpdateDesignSurfaceDownMockup(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return c.transformResult(l,e,(function(e){return c.processUpdateDesignSurfaceDownMockup(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processUpdateDesignSurfaceDownMockup=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):400===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Bad Request",s,e,c,r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getDesignSurfaceDownMockupContent=function(e,r,a,p){var s=this,i=this.baseUrl+"/api/atoms/v1/designs/{id}/print-product/surfaces/{surfaceId}/mockup-down/file?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(i=i.replace("{id}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'surfaceId' must be defined.");if(i=i.replace("{surfaceId}",encodeURIComponent(""+r)),null!=a&&(i+="privateStorageOwner="+encodeURIComponent(""+a)+"&"),null===p)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==p&&(i+="tenantId="+encodeURIComponent(""+p)+"&"),i=i.replace(/[?&]$/,"");var u={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/octet-stream"})};return n.from(this.transformOptions(u)).pipe(t.mergeMap((function(e){return s.http.request("get",i,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(i,e,(function(e){return s.processGetDesignSurfaceDownMockupContent(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(i,e,(function(e){return s.processGetDesignSurfaceDownMockupContent(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetDesignSurfaceDownMockupContent=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}if(200===s||206===s){var m=e.headers?e.headers.get("content-disposition"):void 0,h=m?/filename="?([^"]*?)"?(;|$)/g.exec(m):void 0,v=h&&h.length>1?h[1]:void 0;return n.of({fileName:v,data:i,status:s,headers:c})}return 400===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Bad Request",s,e,c,r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getDesignSurfaceUpMockup=function(e,r,a,p){var s=this,i=this.baseUrl+"/api/atoms/v1/designs/{id}/print-product/surfaces/{surfaceId}/mockup-up?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(i=i.replace("{id}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'surfaceId' must be defined.");if(i=i.replace("{surfaceId}",encodeURIComponent(""+r)),null!=a&&(i+="privateStorageOwner="+encodeURIComponent(""+a)+"&"),null===p)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==p&&(i+="tenantId="+encodeURIComponent(""+p)+"&"),i=i.replace(/[?&]$/,"");var u={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return n.from(this.transformOptions(u)).pipe(t.mergeMap((function(e){return s.http.request("get",i,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(i,e,(function(e){return s.processGetDesignSurfaceUpMockup(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(i,e,(function(e){return s.processGetDesignSurfaceUpMockup(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetDesignSurfaceUpMockup=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):400===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Bad Request",s,e,c,r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.updateDesignSurfaceUpMockup=function(e,r,a,p,s,i,u){var c=this,l=this.baseUrl+"/api/atoms/v1/designs/{id}/print-product/surfaces/{surfaceId}/mockup-up?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(l=l.replace("{id}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'surfaceId' must be defined.");if(l=l.replace("{surfaceId}",encodeURIComponent(""+r)),null!=a&&(l+="privateStorageOwner="+encodeURIComponent(""+a)+"&"),null===p)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==p&&(l+="tenantId="+encodeURIComponent(""+p)+"&"),l=l.replace(/[?&]$/,"");var f=new FormData;if(null==s)throw new Error("The parameter 'position_top' cannot be null.");if(f.append("position.top",s.toString()),null==i)throw new Error("The parameter 'position_left' cannot be null.");f.append("position.left",i.toString()),null!=u&&f.append("sourceFile",u.data,u.fileName?u.fileName:"sourceFile");var d={body:f,observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return n.from(this.transformOptions(d)).pipe(t.mergeMap((function(e){return c.http.request("patch",l,e)}))).pipe(t.mergeMap((function(e){return c.transformResult(l,e,(function(e){return c.processUpdateDesignSurfaceUpMockup(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return c.transformResult(l,e,(function(e){return c.processUpdateDesignSurfaceUpMockup(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processUpdateDesignSurfaceUpMockup=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):400===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Bad Request",s,e,c,r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getDesignSurfaceUpMockupContent=function(e,r,a,p){var s=this,i=this.baseUrl+"/api/atoms/v1/designs/{id}/print-product/surfaces/{surfaceId}/mockup-up/file?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(i=i.replace("{id}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'surfaceId' must be defined.");if(i=i.replace("{surfaceId}",encodeURIComponent(""+r)),null!=a&&(i+="privateStorageOwner="+encodeURIComponent(""+a)+"&"),null===p)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==p&&(i+="tenantId="+encodeURIComponent(""+p)+"&"),i=i.replace(/[?&]$/,"");var u={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/octet-stream"})};return n.from(this.transformOptions(u)).pipe(t.mergeMap((function(e){return s.http.request("get",i,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(i,e,(function(e){return s.processGetDesignSurfaceUpMockupContent(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(i,e,(function(e){return s.processGetDesignSurfaceUpMockupContent(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetDesignSurfaceUpMockupContent=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}if(200===s||206===s){var m=e.headers?e.headers.get("content-disposition"):void 0,h=m?/filename="?([^"]*?)"?(;|$)/g.exec(m):void 0,v=h&&h.length>1?h[1]:void 0;return n.of({fileName:v,data:i,status:s,headers:c})}return 400===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Bad Request",s,e,c,r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getDesignSurfaceModel=function(e,r,a,p){var s=this,i=this.baseUrl+"/api/atoms/v1/designs/{id}/print-product/surfaces/{surfaceId}/model?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(i=i.replace("{id}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'surfaceId' must be defined.");if(i=i.replace("{surfaceId}",encodeURIComponent(""+r)),null!=a&&(i+="privateStorageOwner="+encodeURIComponent(""+a)+"&"),null===p)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==p&&(i+="tenantId="+encodeURIComponent(""+p)+"&"),i=i.replace(/[?&]$/,"");var u={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return n.from(this.transformOptions(u)).pipe(t.mergeMap((function(e){return s.http.request("get",i,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(i,e,(function(e){return s.processGetDesignSurfaceModel(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(i,e,(function(e){return s.processGetDesignSurfaceModel(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetDesignSurfaceModel=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.replaceDesignSurfaceModel=function(e,r,a,p,s){var i=this,u=this.baseUrl+"/api/atoms/v1/designs/{id}/print-product/surfaces/{surfaceId}/model?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(u=u.replace("{id}",encodeURIComponent(""+e)),null==r)throw new Error("The parameter 'surfaceId' must be defined.");if(u=u.replace("{surfaceId}",encodeURIComponent(""+r)),null!=a&&(u+="privateStorageOwner="+encodeURIComponent(""+a)+"&"),null===p)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==p&&(u+="tenantId="+encodeURIComponent(""+p)+"&"),u=u.replace(/[?&]$/,"");var c={body:JSON.stringify(s),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(c)).pipe(t.mergeMap((function(e){return i.http.request("put",u,e)}))).pipe(t.mergeMap((function(e){return i.transformResult(u,e,(function(e){return i.processReplaceDesignSurfaceModel(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return i.transformResult(u,e,(function(e){return i.processReplaceDesignSurfaceModel(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processReplaceDesignSurfaceModel=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):400===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Bad Request",s,e,c,r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.addDesignSurfaceModel=function(e,r,a,p,s){var i=this,u=this.baseUrl+"/api/atoms/v1/designs/{id}/print-product/surfaces/model?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(u=u.replace("{id}",encodeURIComponent(""+e)),null!=r&&(u+="index="+encodeURIComponent(""+r)+"&"),null!=a&&(u+="privateStorageOwner="+encodeURIComponent(""+a)+"&"),null===p)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==p&&(u+="tenantId="+encodeURIComponent(""+p)+"&"),u=u.replace(/[?&]$/,"");var c={body:JSON.stringify(s),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(c)).pipe(t.mergeMap((function(e){return i.http.request("post",u,e)}))).pipe(t.mergeMap((function(e){return i.transformResult(u,e,(function(e){return i.processAddDesignSurfaceModel(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return i.transformResult(u,e,(function(e){return i.processAddDesignSurfaceModel(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processAddDesignSurfaceModel=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):400===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Bad Request",s,e,c,r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r}(f);y.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new y(r.ɵɵinject(l),r.ɵɵinject(o.HttpClient),r.ɵɵinject(c,8))},token:y,providedIn:"root"}),y.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],y.ctorParameters=function(){return[{type:l,decorators:[{type:r.Inject,args:[l]}]},{type:o.HttpClient,decorators:[{type:r.Inject,args:[o.HttpClient]}]},{type:String,decorators:[{type:r.Optional},{type:r.Inject,args:[c]}]}]};var b=function(e){function r(r,t,n){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=t,o.baseUrl=null!=n?n:o.getBaseUrl(""),o}return p(r,e),r.prototype.applyItemEffects=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/designs/print-product/items/apply-effects?";if(null===e)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processApplyItemEffects(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processApplyItemEffects(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processApplyItemEffects=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.extractItemImage=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/designs/print-product/items/extract-image?";if(null===e)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/octet-stream"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processExtractItemImage(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processExtractItemImage(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processExtractItemImage=function(e){var r,a,p=e.status,s=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,i={};if(e.headers)try{for(var c=u(e.headers.keys()),l=c.next();!l.done;l=c.next()){var f=l.value;i[f]=e.headers.get(f)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(a=c.return)&&a.call(c)}finally{if(r)throw r.error}}if(200===p||206===p){var d=e.headers?e.headers.get("content-disposition"):void 0,m=d?/filename="?([^"]*?)"?(;|$)/g.exec(d):void 0,h=m&&m.length>1?m[1]:void 0;return n.of({fileName:h,data:s,status:p,headers:i})}return 401===p?B(s).pipe(t.mergeMap((function(e){return A("Unauthorized",p,e,i)}))):403===p?B(s).pipe(t.mergeMap((function(e){return A("Forbidden",p,e,i)}))):200!==p&&204!==p?B(s).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",p,e,i)}))):n.of(null)},r.prototype.flattenItems=function(e,r,a){var p=this,s=this.baseUrl+"/api/atoms/v1/designs/print-product/items/flatten?";if(null!=e&&(s+="paletteUID="+encodeURIComponent(""+e)+"&"),null===r)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==r&&(s+="tenantId="+encodeURIComponent(""+r)+"&"),s=s.replace(/[?&]$/,"");var i={body:JSON.stringify(a),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("post",s,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processFlattenItems(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processFlattenItems(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processFlattenItems=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.createItemFromFile=function(e,r,a,p,s){var i=this,u=this.baseUrl+"/api/atoms/v1/designs/print-product/items/from-file?";if(null!=e&&(u+="itemType="+encodeURIComponent(""+e)+"&"),null===r)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==r&&(u+="tenantId="+encodeURIComponent(""+r)+"&"),u=u.replace(/[?&]$/,"");var c=new FormData;null!=a&&c.append("sourceFile",a.data,a.fileName?a.fileName:"sourceFile"),null!=p&&c.append("paletteUID",p.toString()),null!=s&&c.append("preserveOriginalFile",s.toString());var l={body:c,observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return n.from(this.transformOptions(l)).pipe(t.mergeMap((function(e){return i.http.request("post",u,e)}))).pipe(t.mergeMap((function(e){return i.transformResult(u,e,(function(e){return i.processCreateItemFromFile(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return i.transformResult(u,e,(function(e){return i.processCreateItemFromFile(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processCreateItemFromFile=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.batchCreateItemsFromFile=function(e,r,a,p,s){var i=this,u=this.baseUrl+"/api/atoms/v1/designs/print-product/items/from-file/batch-create?";if(null!=e&&(u+="itemType="+encodeURIComponent(""+e)+"&"),null===r)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==r&&(u+="tenantId="+encodeURIComponent(""+r)+"&"),u=u.replace(/[?&]$/,"");var c=new FormData;null!=a&&a.forEach((function(e){return c.append("sourceFiles",e.data,e.fileName?e.fileName:"sourceFiles")})),null!=p&&c.append("paletteUID",p.toString()),null!=s&&c.append("preserveOriginalFile",s.toString());var l={body:c,observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return n.from(this.transformOptions(l)).pipe(t.mergeMap((function(e){return i.http.request("post",u,e)}))).pipe(t.mergeMap((function(e){return i.transformResult(u,e,(function(e){return i.processBatchCreateItemsFromFile(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return i.transformResult(u,e,(function(e){return i.processBatchCreateItemsFromFile(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processBatchCreateItemsFromFile=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.createItemFromStorage=function(e,r,a){var p=this,s=this.baseUrl+"/api/atoms/v1/designs/print-product/items/from-storage?";if(null!=e&&(s+="itemType="+encodeURIComponent(""+e)+"&"),null===r)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==r&&(s+="tenantId="+encodeURIComponent(""+r)+"&"),s=s.replace(/[?&]$/,"");var i={body:JSON.stringify(a),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("post",s,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processCreateItemFromStorage(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processCreateItemFromStorage(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processCreateItemFromStorage=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.batchCreateItemsFromStorage=function(e,r,a){var p=this,s=this.baseUrl+"/api/atoms/v1/designs/print-product/items/from-storage/batch-create?";if(null!=e&&(s+="itemType="+encodeURIComponent(""+e)+"&"),null===r)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==r&&(s+="tenantId="+encodeURIComponent(""+r)+"&"),s=s.replace(/[?&]$/,"");var i={body:JSON.stringify(a),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("post",s,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processBatchCreateItemsFromStorage(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processBatchCreateItemsFromStorage(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processBatchCreateItemsFromStorage=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.createItemFromUrl=function(e,r,a){var p=this,s=this.baseUrl+"/api/atoms/v1/designs/print-product/items/from-url?";if(null!=e&&(s+="itemType="+encodeURIComponent(""+e)+"&"),null===r)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==r&&(s+="tenantId="+encodeURIComponent(""+r)+"&"),s=s.replace(/[?&]$/,"");var i={body:JSON.stringify(a),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("post",s,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processCreateItemFromUrl(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processCreateItemFromUrl(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processCreateItemFromUrl=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.batchCreateItemsFromUrl=function(e,r,a){var p=this,s=this.baseUrl+"/api/atoms/v1/designs/print-product/items/from-url/batch-create?";if(null!=e&&(s+="itemType="+encodeURIComponent(""+e)+"&"),null===r)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==r&&(s+="tenantId="+encodeURIComponent(""+r)+"&"),s=s.replace(/[?&]$/,"");var i={body:JSON.stringify(a),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("post",s,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processBatchCreateItemsFromUrl(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processBatchCreateItemsFromUrl(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processBatchCreateItemsFromUrl=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r}(f);b.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new b(r.ɵɵinject(l),r.ɵɵinject(o.HttpClient),r.ɵɵinject(c,8))},token:b,providedIn:"root"}),b.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],b.ctorParameters=function(){return[{type:l,decorators:[{type:r.Inject,args:[l]}]},{type:o.HttpClient,decorators:[{type:r.Inject,args:[o.HttpClient]}]},{type:String,decorators:[{type:r.Optional},{type:r.Inject,args:[c]}]}]};var R=function(e){function r(r,t,n){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=t,o.baseUrl=null!=n?n:o.getBaseUrl(""),o}return p(r,e),r.prototype.createDesign=function(e,r,a){var p=this,s=this.baseUrl+"/api/atoms/v1/designs?";if(null!=e&&(s+="privateStorageOwner="+encodeURIComponent(""+e)+"&"),null===r)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==r&&(s+="tenantId="+encodeURIComponent(""+r)+"&"),s=s.replace(/[?&]$/,"");var i={body:JSON.stringify(a),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("post",s,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processCreateDesign(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processCreateDesign(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processCreateDesign=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 201===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.applyItemsData=function(e,r,a,p){var s=this,i=this.baseUrl+"/api/atoms/v1/designs/{id}/apply-items-data?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(i=i.replace("{id}",encodeURIComponent(""+e)),null!=r&&(i+="privateStorageOwner="+encodeURIComponent(""+r)+"&"),null===a)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==a&&(i+="tenantId="+encodeURIComponent(""+a)+"&"),i=i.replace(/[?&]$/,"");var u={body:JSON.stringify(p),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json"})};return n.from(this.transformOptions(u)).pipe(t.mergeMap((function(e){return s.http.request("post",i,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(i,e,(function(e){return s.processApplyItemsData(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(i,e,(function(e){return s.processApplyItemsData(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processApplyItemsData=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){return n.of(null)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.extractBackground=function(e,r,a,p){var s=this,i=this.baseUrl+"/api/atoms/v1/designs/{id}/background?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(i=i.replace("{id}",encodeURIComponent(""+e)),null!=r&&(i+="surfaceIndex="+encodeURIComponent(""+r)+"&"),null!=a&&(i+="privateStorageOwner="+encodeURIComponent(""+a)+"&"),null===p)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==p&&(i+="tenantId="+encodeURIComponent(""+p)+"&"),i=i.replace(/[?&]$/,"");var u={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/octet-stream"})};return n.from(this.transformOptions(u)).pipe(t.mergeMap((function(e){return s.http.request("get",i,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(i,e,(function(e){return s.processExtractBackground(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(i,e,(function(e){return s.processExtractBackground(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processExtractBackground=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}if(200===s||206===s){var m=e.headers?e.headers.get("content-disposition"):void 0,h=m?/filename="?([^"]*?)"?(;|$)/g.exec(m):void 0,v=h&&h.length>1?h[1]:void 0;return n.of({fileName:v,data:i,status:s,headers:c})}return 404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.setEditorMockups=function(e,r,a,p){var s=this,i=this.baseUrl+"/api/atoms/v1/designs/{id}/editor-mockups?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(i=i.replace("{id}",encodeURIComponent(""+e)),null!=r&&(i+="privateStorageOwner="+encodeURIComponent(""+r)+"&"),null===a)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==a&&(i+="tenantId="+encodeURIComponent(""+a)+"&"),i=i.replace(/[?&]$/,"");var u={body:JSON.stringify(p),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json"})};return n.from(this.transformOptions(u)).pipe(t.mergeMap((function(e){return s.http.request("put",i,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(i,e,(function(e){return s.processSetEditorMockups(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(i,e,(function(e){return s.processSetEditorMockups(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processSetEditorMockups=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 204===s?B(i).pipe(t.mergeMap((function(e){return n.of(null)}))):400===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Bad Request",s,e,c,r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getDesignParameters=function(e,r,a){var p=this,s=this.baseUrl+"/api/atoms/v1/designs/{id}/parameters?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(s=s.replace("{id}",encodeURIComponent(""+e)),null!=r&&(s+="privateStorageOwner="+encodeURIComponent(""+r)+"&"),null===a)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==a&&(s+="tenantId="+encodeURIComponent(""+a)+"&"),s=s.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("get",s,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processGetDesignParameters(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processGetDesignParameters(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetDesignParameters=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.loadDataSchema=function(e,r,a){var p=this,s=this.baseUrl+"/api/atoms/v1/designs/{id}/schema?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(s=s.replace("{id}",encodeURIComponent(""+e)),null!=r&&(s+="privateStorageOwner="+encodeURIComponent(""+r)+"&"),null===a)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==a&&(s+="tenantId="+encodeURIComponent(""+a)+"&"),s=s.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/octet-stream"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("get",s,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processLoadDataSchema(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processLoadDataSchema(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processLoadDataSchema=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}if(200===s||206===s){var m=e.headers?e.headers.get("content-disposition"):void 0,h=m?/filename="?([^"]*?)"?(;|$)/g.exec(m):void 0,v=h&&h.length>1?h[1]:void 0;return n.of({fileName:v,data:i,status:s,headers:c})}return 404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.loadToggleSet=function(e,r,a){var p=this,s=this.baseUrl+"/api/atoms/v1/designs/{id}/toggle-set?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(s=s.replace("{id}",encodeURIComponent(""+e)),null!=r&&(s+="privateStorageOwner="+encodeURIComponent(""+r)+"&"),null===a)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==a&&(s+="tenantId="+encodeURIComponent(""+a)+"&"),s=s.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/octet-stream"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("get",s,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processLoadToggleSet(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processLoadToggleSet(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processLoadToggleSet=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}if(200===s||206===s){var m=e.headers?e.headers.get("content-disposition"):void 0,h=m?/filename="?([^"]*?)"?(;|$)/g.exec(m):void 0,v=h&&h.length>1?h[1]:void 0;return n.of({fileName:v,data:i,status:s,headers:c})}return 404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getVariables=function(e,r,a){var p=this,s=this.baseUrl+"/api/atoms/v1/designs/{id}/variables?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(s=s.replace("{id}",encodeURIComponent(""+e)),null!=r&&(s+="privateStorageOwner="+encodeURIComponent(""+r)+"&"),null===a)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==a&&(s+="tenantId="+encodeURIComponent(""+a)+"&"),s=s.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("get",s,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processGetVariables(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processGetVariables(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetVariables=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.setVariables=function(e,r,a,p){var s=this,i=this.baseUrl+"/api/atoms/v1/designs/{id}/variables?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(i=i.replace("{id}",encodeURIComponent(""+e)),null!=r&&(i+="privateStorageOwner="+encodeURIComponent(""+r)+"&"),null===a)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==a&&(i+="tenantId="+encodeURIComponent(""+a)+"&"),i=i.replace(/[?&]$/,"");var u={body:JSON.stringify(p),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json"})};return n.from(this.transformOptions(u)).pipe(t.mergeMap((function(e){return s.http.request("put",i,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(i,e,(function(e){return s.processSetVariables(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(i,e,(function(e){return s.processSetVariables(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processSetVariables=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){return n.of(null)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.loadVdpData=function(e,r,a){var p=this,s=this.baseUrl+"/api/atoms/v1/designs/{id}/vdp-data?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(s=s.replace("{id}",encodeURIComponent(""+e)),null!=r&&(s+="privateStorageOwner="+encodeURIComponent(""+r)+"&"),null===a)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==a&&(s+="tenantId="+encodeURIComponent(""+a)+"&"),s=s.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("get",s,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processLoadVdpData(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processLoadVdpData(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processLoadVdpData=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.saveVdpData=function(e,r,a,p){var s=this,i=this.baseUrl+"/api/atoms/v1/designs/{id}/vdp-data?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(i=i.replace("{id}",encodeURIComponent(""+e)),null!=r&&(i+="privateStorageOwner="+encodeURIComponent(""+r)+"&"),null===a)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==a&&(i+="tenantId="+encodeURIComponent(""+a)+"&"),i=i.replace(/[?&]$/,"");var u={body:JSON.stringify(p),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json"})};return n.from(this.transformOptions(u)).pipe(t.mergeMap((function(e){return s.http.request("put",i,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(i,e,(function(e){return s.processSaveVdpData(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(i,e,(function(e){return s.processSaveVdpData(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processSaveVdpData=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){return n.of(null)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.deleteVdpData=function(e,r,a){var p=this,s=this.baseUrl+"/api/atoms/v1/designs/{id}/vdp-data?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(s=s.replace("{id}",encodeURIComponent(""+e)),null!=r&&(s+="privateStorageOwner="+encodeURIComponent(""+r)+"&"),null===a)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==a&&(s+="tenantId="+encodeURIComponent(""+a)+"&"),s=s.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("delete",s,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processDeleteVdpData(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processDeleteVdpData(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processDeleteVdpData=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){return n.of(null)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.convertColors=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/designs/print-product/convert-colors?";if(null===e)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processConvertColors(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processConvertColors(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processConvertColors=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.loadProductFromResource=function(e,r,a){var p=this,s=this.baseUrl+"/api/atoms/v1/designs/print-product/from-resource/model?";if(null!=e&&(s+="id="+encodeURIComponent(""+e)+"&"),null!=r&&(s+="privateStorageOwner="+encodeURIComponent(""+r)+"&"),null===a)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==a&&(s+="tenantId="+encodeURIComponent(""+a)+"&"),s=s.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("get",s,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processLoadProductFromResource(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processLoadProductFromResource(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processLoadProductFromResource=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.renderProduct=function(e,r,a){var p=this,s=this.baseUrl+"/api/atoms/v1/designs/print-product/render-proof?";if(null!=e&&(s+="attachment="+encodeURIComponent(""+e)+"&"),null===r)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==r&&(s+="tenantId="+encodeURIComponent(""+r)+"&"),s=s.replace(/[?&]$/,"");var i={body:JSON.stringify(a),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/octet-stream"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("post",s,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processRenderProduct(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processRenderProduct(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processRenderProduct=function(e){var r,a,p=e.status,s=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,i={};if(e.headers)try{for(var c=u(e.headers.keys()),l=c.next();!l.done;l=c.next()){var f=l.value;i[f]=e.headers.get(f)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(a=c.return)&&a.call(c)}finally{if(r)throw r.error}}if(200===p||206===p){var d=e.headers?e.headers.get("content-disposition"):void 0,m=d?/filename="?([^"]*?)"?(;|$)/g.exec(d):void 0,h=m&&m.length>1?m[1]:void 0;return n.of({fileName:h,data:s,status:p,headers:i})}return 401===p?B(s).pipe(t.mergeMap((function(e){return A("Unauthorized",p,e,i)}))):403===p?B(s).pipe(t.mergeMap((function(e){return A("Forbidden",p,e,i)}))):200!==p&&204!==p?B(s).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",p,e,i)}))):n.of(null)},r.prototype.renderDesignPreview=function(e,r,a){var p=this,s=this.baseUrl+"/api/atoms/v1/designs/render-preview?";if(null!=e&&(s+="attachment="+encodeURIComponent(""+e)+"&"),null===r)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==r&&(s+="tenantId="+encodeURIComponent(""+r)+"&"),s=s.replace(/[?&]$/,"");var i={body:JSON.stringify(a),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/octet-stream"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("post",s,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processRenderDesignPreview(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processRenderDesignPreview(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processRenderDesignPreview=function(e){var r,a,p=e.status,s=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,i={};if(e.headers)try{for(var c=u(e.headers.keys()),l=c.next();!l.done;l=c.next()){var f=l.value;i[f]=e.headers.get(f)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(a=c.return)&&a.call(c)}finally{if(r)throw r.error}}if(200===p||206===p){var d=e.headers?e.headers.get("content-disposition"):void 0,m=d?/filename="?([^"]*?)"?(;|$)/g.exec(d):void 0,h=m&&m.length>1?m[1]:void 0;return n.of({fileName:h,data:s,status:p,headers:i})}return 401===p?B(s).pipe(t.mergeMap((function(e){return A("Unauthorized",p,e,i)}))):403===p?B(s).pipe(t.mergeMap((function(e){return A("Forbidden",p,e,i)}))):200!==p&&204!==p?B(s).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",p,e,i)}))):n.of(null)},r.prototype.renderDesignPreviewToResource=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/designs/render-preview/to-resource?";if(null===e)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processRenderDesignPreviewToResource(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processRenderDesignPreviewToResource(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processRenderDesignPreviewToResource=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.renderDesignProof=function(e,r,a){var p=this,s=this.baseUrl+"/api/atoms/v1/designs/render-proof?";if(null!=e&&(s+="attachment="+encodeURIComponent(""+e)+"&"),null===r)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==r&&(s+="tenantId="+encodeURIComponent(""+r)+"&"),s=s.replace(/[?&]$/,"");var i={body:JSON.stringify(a),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/octet-stream"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("post",s,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processRenderDesignProof(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processRenderDesignProof(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processRenderDesignProof=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}if(200===s||206===s){var m=e.headers?e.headers.get("content-disposition"):void 0,h=m?/filename="?([^"]*?)"?(;|$)/g.exec(m):void 0,v=h&&h.length>1?h[1]:void 0;return n.of({fileName:v,data:i,status:s,headers:c})}return 404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.renderDesignProofToResource=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/designs/render-proof/to-resource?";if(null===e)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processRenderDesignProofToResource(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processRenderDesignProofToResource(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processRenderDesignProofToResource=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):409===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Conflict",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.loadProduct=function(e,r,a){var p=this,s=this.baseUrl+"/api/atoms/v1/designs/{id}/model?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(s=s.replace("{id}",encodeURIComponent(""+e)),null!=r&&(s+="privateStorageOwner="+encodeURIComponent(""+r)+"&"),null===a)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==a&&(s+="tenantId="+encodeURIComponent(""+a)+"&"),s=s.replace(/[?&]$/,"");var i={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return n.from(this.transformOptions(i)).pipe(t.mergeMap((function(e){return p.http.request("get",s,e)}))).pipe(t.mergeMap((function(e){return p.transformResult(s,e,(function(e){return p.processLoadProduct(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return p.transformResult(s,e,(function(e){return p.processLoadProduct(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processLoadProduct=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.saveProduct=function(e,r,a,p){var s=this,i=this.baseUrl+"/api/atoms/v1/designs/{id}/model?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(i=i.replace("{id}",encodeURIComponent(""+e)),null!=r&&(i+="privateStorageOwner="+encodeURIComponent(""+r)+"&"),null===a)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==a&&(i+="tenantId="+encodeURIComponent(""+a)+"&"),i=i.replace(/[?&]$/,"");var u={body:JSON.stringify(p),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json"})};return n.from(this.transformOptions(u)).pipe(t.mergeMap((function(e){return s.http.request("put",i,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(i,e,(function(e){return s.processSaveProduct(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(i,e,(function(e){return s.processSaveProduct(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processSaveProduct=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){return n.of(null)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.patchProduct=function(e,r,a,p,s,i,u,c,l){var f=this,d=this.baseUrl+"/api/atoms/v1/designs/{id}/model?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(d=d.replace("{id}",encodeURIComponent(""+e)),null!=r&&(d+="privateStorageOwner="+encodeURIComponent(""+r)+"&"),null===a)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==a&&(d+="tenantId="+encodeURIComponent(""+a)+"&"),d=d.replace(/[?&]$/,"");var m=new FormData;null!=p&&m.append("patchType",p.toString()),null!=s&&m.append("replaceImageItemFileInfo.itemName",s.toString()),null!=i&&m.append("replaceImageItemFileInfo.sourceFile",i.data,i.fileName?i.fileName:"replaceImageItemFileInfo.sourceFile"),null!=u&&m.append("replacePlaceholderItemContentInfo.placeholderItemName",u.toString()),null!=c&&m.append("replacePlaceholderItemContentInfo.newContentType",c.toString()),null!=l&&m.append("replacePlaceholderItemContentInfo.sourceFile",l.data,l.fileName?l.fileName:"replacePlaceholderItemContentInfo.sourceFile");var h={body:m,observe:"response",responseType:"blob",headers:new o.HttpHeaders({})};return n.from(this.transformOptions(h)).pipe(t.mergeMap((function(e){return f.http.request("patch",d,e)}))).pipe(t.mergeMap((function(e){return f.transformResult(d,e,(function(e){return f.processPatchProduct(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return f.transformResult(d,e,(function(e){return f.processPatchProduct(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processPatchProduct=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){return n.of(null)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.createItem=function(e,r,a,p,s,i,u){var c=this,l=this.baseUrl+"/api/atoms/v1/designs/model/items?";if(null!=e&&(l+="itemType="+encodeURIComponent(""+e)+"&"),null===r)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==r&&(l+="tenantId="+encodeURIComponent(""+r)+"&"),l=l.replace(/[?&]$/,"");var f=new FormData;null!=a&&f.append("sourceType",a.toString()),null!=p&&f.append("sourceId",p.toString()),null!=s&&f.append("sourceOwnerId",s.toString()),null!=i&&f.append("url",i.toString()),null!=u&&f.append("sourceFile",u.data,u.fileName?u.fileName:"sourceFile");var d={body:f,observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return n.from(this.transformOptions(d)).pipe(t.mergeMap((function(e){return c.http.request("post",l,e)}))).pipe(t.mergeMap((function(e){return c.transformResult(l,e,(function(e){return c.processCreateItem(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return c.transformResult(l,e,(function(e){return c.processCreateItem(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processCreateItem=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.extractItemImage=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/designs/model/items/extract-image?";if(null===e)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/octet-stream"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processExtractItemImage(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processExtractItemImage(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processExtractItemImage=function(e){var r,a,p=e.status,s=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,i={};if(e.headers)try{for(var c=u(e.headers.keys()),l=c.next();!l.done;l=c.next()){var f=l.value;i[f]=e.headers.get(f)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(a=c.return)&&a.call(c)}finally{if(r)throw r.error}}if(200===p||206===p){var d=e.headers?e.headers.get("content-disposition"):void 0,m=d?/filename="?([^"]*?)"?(;|$)/g.exec(d):void 0,h=m&&m.length>1?m[1]:void 0;return n.of({fileName:h,data:s,status:p,headers:i})}return 401===p?B(s).pipe(t.mergeMap((function(e){return A("Unauthorized",p,e,i)}))):403===p?B(s).pipe(t.mergeMap((function(e){return A("Forbidden",p,e,i)}))):200!==p&&204!==p?B(s).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",p,e,i)}))):n.of(null)},r.prototype.flattenItems=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/designs/model/items/flatten?";if(null===e)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processFlattenItems(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processFlattenItems(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processFlattenItems=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):403===s?B(i).pipe(t.mergeMap((function(e){return A("Forbidden",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.createPrivateDesignFromDesign=function(e,r,a,p){var s=this,i=this.baseUrl+"/api/atoms/v1/private-designs/from-design?";if(null!=e&&(i+="designId="+encodeURIComponent(""+e)+"&"),null!=r&&(i+="privateDesignId="+encodeURIComponent(""+r)+"&"),null!=a&&(i+="privateStorageOwner="+encodeURIComponent(""+a)+"&"),null===p)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==p&&(i+="tenantId="+encodeURIComponent(""+p)+"&"),i=i.replace(/[?&]$/,"");var u={observe:"response",responseType:"blob",headers:new o.HttpHeaders({})};return n.from(this.transformOptions(u)).pipe(t.mergeMap((function(e){return s.http.request("post",i,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(i,e,(function(e){return s.processCreatePrivateDesignFromDesign(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(i,e,(function(e){return s.processCreatePrivateDesignFromDesign(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processCreatePrivateDesignFromDesign=function(e){var r,a,p=e.status,s=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,i={};if(e.headers)try{for(var c=u(e.headers.keys()),l=c.next();!l.done;l=c.next()){var f=l.value;i[f]=e.headers.get(f)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(a=c.return)&&a.call(c)}finally{if(r)throw r.error}}return 201===p?B(s).pipe(t.mergeMap((function(e){return n.of(null)}))):401===p?B(s).pipe(t.mergeMap((function(e){return A("Unauthorized",p,e,i)}))):403===p?B(s).pipe(t.mergeMap((function(e){return A("Forbidden",p,e,i)}))):200!==p&&204!==p?B(s).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",p,e,i)}))):n.of(null)},r.prototype.createPrivateDesignFromResource=function(e,r,a,p){var s=this,i=this.baseUrl+"/api/atoms/v1/private-designs/from-resource?";if(null!=e&&(i+="resourceId="+encodeURIComponent(""+e)+"&"),null!=r&&(i+="privateDesignId="+encodeURIComponent(""+r)+"&"),null!=a&&(i+="privateStorageOwner="+encodeURIComponent(""+a)+"&"),null===p)throw new Error("The parameter 'tenantIdQuery' cannot be null.");void 0!==p&&(i+="tenantId="+encodeURIComponent(""+p)+"&"),i=i.replace(/[?&]$/,"");var u={observe:"response",responseType:"blob",headers:new o.HttpHeaders({})};return n.from(this.transformOptions(u)).pipe(t.mergeMap((function(e){return s.http.request("post",i,e)}))).pipe(t.mergeMap((function(e){return s.transformResult(i,e,(function(e){return s.processCreatePrivateDesignFromResource(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return s.transformResult(i,e,(function(e){return s.processCreatePrivateDesignFromResource(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processCreatePrivateDesignFromResource=function(e){var r,a,p=e.status,s=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,i={};if(e.headers)try{for(var c=u(e.headers.keys()),l=c.next();!l.done;l=c.next()){var f=l.value;i[f]=e.headers.get(f)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(a=c.return)&&a.call(c)}finally{if(r)throw r.error}}return 201===p?B(s).pipe(t.mergeMap((function(e){return n.of(null)}))):401===p?B(s).pipe(t.mergeMap((function(e){return A("Unauthorized",p,e,i)}))):403===p?B(s).pipe(t.mergeMap((function(e){return A("Forbidden",p,e,i)}))):200!==p&&204!==p?B(s).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",p,e,i)}))):n.of(null)},r}(f);R.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new R(r.ɵɵinject(l),r.ɵɵinject(o.HttpClient),r.ɵɵinject(c,8))},token:R,providedIn:"root"}),R.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],R.ctorParameters=function(){return[{type:l,decorators:[{type:r.Inject,args:[l]}]},{type:o.HttpClient,decorators:[{type:r.Inject,args:[o.HttpClient]}]},{type:String,decorators:[{type:r.Optional},{type:r.Inject,args:[c]}]}]};var w,I,M,U,C,H,E,S,T,x,O,j,P=function(e){function r(r,t,n){var o=e.call(this,r)||this;return o.jsonParseReviver=void 0,o.http=t,o.baseUrl=null!=n?n:o.getBaseUrl(""),o}return p(r,e),r.prototype.cssFonts=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/ccviewer/cssfonts?";if(null===e)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"text/css"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processCssFonts(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processCssFonts(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processCssFonts=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.fonts=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/ccviewer/fonts/{psName}?";if(null==e)throw new Error("The parameter 'psName' must be defined.");if(p=p.replace("{psName}",encodeURIComponent(""+e)),null===r)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==r&&(p+="tenantId="+encodeURIComponent(""+r)+"&"),p=p.replace(/[?&]$/,"");var s={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/octet-stream"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("get",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processFonts(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processFonts(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processFonts=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}if(200===s||206===s){var m=e.headers?e.headers.get("content-disposition"):void 0,h=m?/filename="?([^"]*?)"?(;|$)/g.exec(m):void 0,v=h&&h.length>1?h[1]:void 0;return n.of({fileName:v,data:i,status:s,headers:c})}return 404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getColorPreview=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/ccviewer/GetColorPreview?";if(null===e)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processGetColorPreview(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processGetColorPreview(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetColorPreview=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):400===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Bad Request",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getColorPreviews=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/ccviewer/GetColorPreviews?";if(null===e)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processGetColorPreviews(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processGetColorPreviews(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetColorPreviews=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):400===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Bad Request",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getCssFont=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/ccviewer/GetCssFont?";if(null!=e&&(p+="fontKey="+encodeURIComponent(""+e)+"&"),null===r)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==r&&(p+="tenantId="+encodeURIComponent(""+r)+"&"),p=p.replace(/[?&]$/,"");var s={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/octet-stream"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("get",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processGetCssFont(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processGetCssFont(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetCssFont=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}if(200===s||206===s){var m=e.headers?e.headers.get("content-disposition"):void 0,h=m?/filename="?([^"]*?)"?(;|$)/g.exec(m):void 0,v=h&&h.length>1?h[1]:void 0;return n.of({fileName:v,data:i,status:s,headers:c})}return 404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getFallbackFonts=function(e){var r=this,a=this.baseUrl+"/api/atoms/v1/ccviewer/GetFallbackFonts?";if(null===e)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==e&&(a+="tenantId="+encodeURIComponent(""+e)+"&"),a=a.replace(/[?&]$/,"");var p={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return n.from(this.transformOptions(p)).pipe(t.mergeMap((function(e){return r.http.request("get",a,e)}))).pipe(t.mergeMap((function(e){return r.transformResult(a,e,(function(e){return r.processGetFallbackFonts(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return r.transformResult(a,e,(function(e){return r.processGetFallbackFonts(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetFallbackFonts=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getImageSize=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/ccviewer/GetImageSize?";if(null===e)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processGetImageSize(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processGetImageSize(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetImageSize=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getShapeBounds=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/ccviewer/GetShapeBounds?";if(null===e)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processGetShapeBounds(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processGetShapeBounds(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetShapeBounds=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getWatermarkItems=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/ccviewer/GetWatermarkItems?";if(null===e)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processGetWatermarkItems(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processGetWatermarkItems(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetWatermarkItems=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.img=function(e,r,a,p,s,i,u,c,l,f,d,m,h,v,g,y,b,R,w){var I=this,M=this.baseUrl+"/api/atoms/v1/ccviewer/img?";if(null!=e&&(M+="f="+encodeURIComponent(""+e)+"&"),null!=r&&(M+="w="+encodeURIComponent(""+r)+"&"),null!=a&&(M+="h="+encodeURIComponent(""+a)+"&"),null!=p&&(M+="cmyk="+encodeURIComponent(""+p)+"&"),null!=s&&(M+="rgb="+encodeURIComponent(""+s)+"&"),null!=i&&(M+="grayscale="+encodeURIComponent(""+i)+"&"),null!=u&&(M+="target="+encodeURIComponent(""+u)+"&"),null!=c&&(M+="sq="+encodeURIComponent(""+c)+"&"),null!=l&&(M+="effect="+encodeURIComponent(""+l)+"&"),null!=f&&(M+="kp="+encodeURIComponent(""+f)+"&"),null!=d&&(M+="color="+encodeURIComponent(""+d)+"&"),null!=m&&(M+="obm="+encodeURIComponent(""+m)+"&"),null!=h&&(M+="oo="+encodeURIComponent(""+h)+"&"),null!=v&&(M+="alphaMask="+encodeURIComponent(""+v)+"&"),null!=g&&(M+="page="+encodeURIComponent(""+g)+"&"),null!=y&&(M+="colorizeColor="+encodeURIComponent(""+y)+"&"),null!=b&&(M+="rw="+encodeURIComponent(""+b)+"&"),null!=R&&(M+="rh="+encodeURIComponent(""+R)+"&"),null===w)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==w&&(M+="tenantId="+encodeURIComponent(""+w)+"&"),M=M.replace(/[?&]$/,"");var U={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/octet-stream"})};return n.from(this.transformOptions(U)).pipe(t.mergeMap((function(e){return I.http.request("get",M,e)}))).pipe(t.mergeMap((function(e){return I.transformResult(M,e,(function(e){return I.processImg(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return I.transformResult(M,e,(function(e){return I.processImg(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processImg=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}if(200===s||206===s){var m=e.headers?e.headers.get("content-disposition"):void 0,h=m?/filename="?([^"]*?)"?(;|$)/g.exec(m):void 0,v=h&&h.length>1?h[1]:void 0;return n.of({fileName:v,data:i,status:s,headers:c})}return 304===s?B(i).pipe(t.mergeMap((function(e){return A("Not Modified",s,e,c)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.getLicense=function(e){var r=this,a=this.baseUrl+"/api/atoms/v1/ccviewer/license?";if(null===e)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==e&&(a+="tenantId="+encodeURIComponent(""+e)+"&"),a=a.replace(/[?&]$/,"");var p={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/json"})};return n.from(this.transformOptions(p)).pipe(t.mergeMap((function(e){return r.http.request("get",a,e)}))).pipe(t.mergeMap((function(e){return r.transformResult(a,e,(function(e){return r.processGetLicense(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return r.transformResult(a,e,(function(e){return r.processGetLicense(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processGetLicense=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.pth=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/ccviewer/pth?";if(null!=e&&(p+="f="+encodeURIComponent(""+e)+"&"),null===r)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==r&&(p+="tenantId="+encodeURIComponent(""+r)+"&"),p=p.replace(/[?&]$/,"");var s={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/octet-stream"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("get",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processPth(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processPth(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processPth=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}if(200===s||206===s){var m=e.headers?e.headers.get("content-disposition"):void 0,h=m?/filename="?([^"]*?)"?(;|$)/g.exec(m):void 0,v=h&&h.length>1?h[1]:void 0;return n.of({fileName:v,data:i,status:s,headers:c})}return 304===s?B(i).pipe(t.mergeMap((function(e){return A("Not Modified",s,e,c)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.resource=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/ccviewer/resource?";if(null!=e&&(p+="image="+encodeURIComponent(""+e)+"&"),null===r)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==r&&(p+="tenantId="+encodeURIComponent(""+r)+"&"),p=p.replace(/[?&]$/,"");var s={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/octet-stream"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("get",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processResource(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processResource(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processResource=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}if(200===s||206===s){var m=e.headers?e.headers.get("content-disposition"):void 0,h=m?/filename="?([^"]*?)"?(;|$)/g.exec(m):void 0,v=h&&h.length>1?h[1]:void 0;return n.of({fileName:v,data:i,status:s,headers:c})}return 404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.svg=function(e,r,a,p,s,i,u,c,l,f,d,m,h,v,g,y,b,R,w){var I=this,M=this.baseUrl+"/api/atoms/v1/ccviewer/svg?";if(null!=e&&(M+="f="+encodeURIComponent(""+e)+"&"),null!=r&&(M+="w="+encodeURIComponent(""+r)+"&"),null!=a&&(M+="h="+encodeURIComponent(""+a)+"&"),null!=p&&(M+="cmyk="+encodeURIComponent(""+p)+"&"),null!=s&&(M+="rgb="+encodeURIComponent(""+s)+"&"),null!=i&&(M+="grayscale="+encodeURIComponent(""+i)+"&"),null!=u&&(M+="target="+encodeURIComponent(""+u)+"&"),null!=c&&(M+="sq="+encodeURIComponent(""+c)+"&"),null!=l&&(M+="effect="+encodeURIComponent(""+l)+"&"),null!=f&&(M+="kp="+encodeURIComponent(""+f)+"&"),null!=d&&(M+="color="+encodeURIComponent(""+d)+"&"),null!=m&&(M+="obm="+encodeURIComponent(""+m)+"&"),null!=h&&(M+="oo="+encodeURIComponent(""+h)+"&"),null!=v&&(M+="alphaMask="+encodeURIComponent(""+v)+"&"),null!=g&&(M+="page="+encodeURIComponent(""+g)+"&"),null!=y&&(M+="colorizeColor="+encodeURIComponent(""+y)+"&"),null!=b&&(M+="rw="+encodeURIComponent(""+b)+"&"),null!=R&&(M+="rh="+encodeURIComponent(""+R)+"&"),null===w)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==w&&(M+="tenantId="+encodeURIComponent(""+w)+"&"),M=M.replace(/[?&]$/,"");var U={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/octet-stream"})};return n.from(this.transformOptions(U)).pipe(t.mergeMap((function(e){return I.http.request("get",M,e)}))).pipe(t.mergeMap((function(e){return I.transformResult(M,e,(function(e){return I.processSvg(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return I.transformResult(M,e,(function(e){return I.processSvg(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processSvg=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}if(200===s||206===s){var m=e.headers?e.headers.get("content-disposition"):void 0,h=m?/filename="?([^"]*?)"?(;|$)/g.exec(m):void 0,v=h&&h.length>1?h[1]:void 0;return n.of({fileName:v,data:i,status:s,headers:c})}return 304===s?B(i).pipe(t.mergeMap((function(e){return A("Not Modified",s,e,c)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.txt=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/ccviewer/txt?";if(null!=e&&(p+="f="+encodeURIComponent(""+e)+"&"),null===r)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==r&&(p+="tenantId="+encodeURIComponent(""+r)+"&"),p=p.replace(/[?&]$/,"");var s={observe:"response",responseType:"blob",headers:new o.HttpHeaders({Accept:"application/octet-stream"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("get",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processTxt(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processTxt(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processTxt=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}if(200===s||206===s){var m=e.headers?e.headers.get("content-disposition"):void 0,h=m?/filename="?([^"]*?)"?(;|$)/g.exec(m):void 0,v=h&&h.length>1?h[1]:void 0;return n.of({fileName:v,data:i,status:s,headers:c})}return 304===s?B(i).pipe(t.mergeMap((function(e){return A("Not Modified",s,e,c)}))):404===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),A("Not Found",s,e,c,r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.updateArchedTextItemHandler=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/ccviewer/UpdateArchedTextItemHandler?";if(null===e)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processUpdateArchedTextItemHandler(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processUpdateArchedTextItemHandler(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processUpdateArchedTextItemHandler=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.updateAutoScaledTextItemHandler=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/ccviewer/UpdateAutoScaledTextItemHandler?";if(null===e)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processUpdateAutoScaledTextItemHandler(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processUpdateAutoScaledTextItemHandler(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processUpdateAutoScaledTextItemHandler=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.updateBarcodeItemHandler=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/ccviewer/UpdateBarcodeItemHandler?";if(null===e)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processUpdateBarcodeItemHandler(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processUpdateBarcodeItemHandler(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processUpdateBarcodeItemHandler=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.updateBoundedTextItemHandler=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/ccviewer/UpdateBoundedTextItemHandler?";if(null===e)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processUpdateBoundedTextItemHandler(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processUpdateBoundedTextItemHandler(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processUpdateBoundedTextItemHandler=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.updateByColorData=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/ccviewer/UpdateByColorData?";if(null===e)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processUpdateByColorData(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processUpdateByColorData(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processUpdateByColorData=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.updateByMultiCallRequest=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/ccviewer/UpdateByMultiCallRequest?";if(null===e)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processUpdateByMultiCallRequest(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processUpdateByMultiCallRequest(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processUpdateByMultiCallRequest=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.updateCurvedTextItemHandler=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/ccviewer/UpdateCurvedTextItemHandler?";if(null===e)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processUpdateCurvedTextItemHandler(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processUpdateCurvedTextItemHandler(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processUpdateCurvedTextItemHandler=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.updateImageItemHandler=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/ccviewer/UpdateImageItemHandler?";if(null===e)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processUpdateImageItemHandler(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processUpdateImageItemHandler(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processUpdateImageItemHandler=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.updatePathBoundedTextItemHandler=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/ccviewer/UpdatePathBoundedTextItemHandler?";if(null===e)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processUpdatePathBoundedTextItemHandler(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processUpdatePathBoundedTextItemHandler(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processUpdatePathBoundedTextItemHandler=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.updatePlainTextItemHandler=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/ccviewer/UpdatePlainTextItemHandler?";if(null===e)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processUpdatePlainTextItemHandler(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processUpdatePlainTextItemHandler(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processUpdatePlainTextItemHandler=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r.prototype.updateShapeItemHandler=function(e,r){var a=this,p=this.baseUrl+"/api/atoms/v1/ccviewer/UpdateShapeItemHandler?";if(null===e)throw new Error("The parameter 'tenantId' cannot be null.");void 0!==e&&(p+="tenantId="+encodeURIComponent(""+e)+"&"),p=p.replace(/[?&]$/,"");var s={body:JSON.stringify(r),observe:"response",responseType:"blob",headers:new o.HttpHeaders({"Content-Type":"application/json",Accept:"application/json"})};return n.from(this.transformOptions(s)).pipe(t.mergeMap((function(e){return a.http.request("post",p,e)}))).pipe(t.mergeMap((function(e){return a.transformResult(p,e,(function(e){return a.processUpdateShapeItemHandler(e)}))}))).pipe(t.catchError((function(e){if(!(e instanceof o.HttpResponseBase))return n.throwError(e);try{return a.transformResult(p,e,(function(e){return a.processUpdateShapeItemHandler(e)}))}catch(e){return n.throwError(e)}})))},r.prototype.processUpdateShapeItemHandler=function(e){var r,a,p=this,s=e.status,i=e instanceof o.HttpResponse?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)try{for(var l=u(e.headers.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;c[d]=e.headers.get(d)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return 200===s?B(i).pipe(t.mergeMap((function(e){var r;return r=""===e?null:JSON.parse(e,p.jsonParseReviver),n.of(r)}))):401===s?B(i).pipe(t.mergeMap((function(e){return A("Unauthorized",s,e,c)}))):200!==s&&204!==s?B(i).pipe(t.mergeMap((function(e){return A("An unexpected server error occurred.",s,e,c)}))):n.of(null)},r}(f);P.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new P(r.ɵɵinject(l),r.ɵɵinject(o.HttpClient),r.ɵɵinject(c,8))},token:P,providedIn:"root"}),P.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],P.ctorParameters=function(){return[{type:l,decorators:[{type:r.Inject,args:[l]}]},{type:o.HttpClient,decorators:[{type:r.Inject,args:[o.HttpClient]}]},{type:String,decorators:[{type:r.Optional},{type:r.Inject,args:[c]}]}]},(w=e.ConflictType||(e.ConflictType={})).NameConflict="NameConflict",w.FolderOverwriteConflict="FolderOverwriteConflict",w.IdConflict="IdConflict",w.GeneralConflict="GeneralConflict",(I=e.DesignElementType||(e.DesignElementType={})).Product="Product",I.Design="Design",I.Surface="Surface",I.Container="Container",I.PrintArea="PrintArea",I.Item="Item",(M=e.ImagePreviewFitMode||(e.ImagePreviewFitMode={})).Fit="Fit",M.Shrink="Shrink",M.Resize="Resize",M.Fill="Fill",(U=e.ImagePreviewFormat||(e.ImagePreviewFormat={})).Jpeg="Jpeg",U.Png="Png",(C=e.ItemSourceType||(e.ItemSourceType={})).File="File",C.ImageStorage="ImageStorage",C.PrivateImageStorage="PrivateImageStorage",C.Url="Url",(H=e.ItemType||(e.ItemType={})).Image="Image",H.Shape="Shape",H.Clipart="Clipart",H.Group="Group",(e.PlaceholderItemContentType||(e.PlaceholderItemContentType={})).Image="Image",(E=e.ProductPatchType||(e.ProductPatchType={})).Undefined="Undefined",E.ReplaceImageItemFile="ReplaceImageItemFile",E.ReplacePlaceholderItemContent="ReplacePlaceholderItemContent",(S=e.ProductPreviewFormat||(e.ProductPreviewFormat={})).Jpeg="Jpeg",S.Png="Png",(T=e.ProductProofFormat||(e.ProductProofFormat={})).Jpeg="Jpeg",T.Png="Png",T.Tiff="Tiff",T.Pdf="Pdf",(x=e.ProductProofInterpolationMode||(e.ProductProofInterpolationMode={})).High="High",x.Medium="Medium",x.Low="Low",x.NearestNeighbour="NearestNeighbour",x.Linear="Linear",x.Cubic="Cubic",x.Supersampling="Supersampling",x.Lanczos="Lanczos",x.Anisotropic4="Anisotropic4",x.Anisotropic9="Anisotropic9",x.Lanczos3="Lanczos3",(O=e.TextAlignment||(e.TextAlignment={})).Left="Left",O.Center="Center",O.Right="Right",O.All="All",O.LastLeft="LastLeft",O.LastRight="LastRight",O.LastCenter="LastCenter",(j=e.TextVerticalAlignment||(e.TextVerticalAlignment={})).Top="Top",j.Center="Center",j.Bottom="Bottom";var N=function(e){function r(r,t,n,o,a){var p=e.call(this)||this;return p.isApiException=!0,p.message=r,p.status=t,p.response=n,p.headers=o,p.result=a,p}return p(r,e),r.isApiException=function(e){return!0===e.isApiException},r}(Error);function A(e,r,t,o,a){return null!=a?n.throwError(a):n.throwError(new N(e,r,t,o,null))}function B(e){return new n.Observable((function(r){if(e){var t=new FileReader;t.onload=function(e){r.next(e.target.result),r.complete()},t.readAsText(e)}else r.next(""),r.complete()}))}function F(e,r,t){void 0===t&&(t="ApiKey");var n=new l;return n.apiKey=t,n.apiUrl=r,n.setAuthorizationToken(e),n}var J=function(){function e(){}return e.forRoot=function(r,t,n){return void 0===n&&(n="ApiKey"),{ngModule:e,providers:[{provide:c,useValue:t},{provide:l,useFactory:F.bind(this,r,t,n)}]}},e}();J.decorators=[{type:r.NgModule,args:[{declarations:[],imports:[],exports:[]}]}],e.API_BASE_URL=c,e.ApiClientBase=f,e.ApiClientConfiguration=l,e.ApiException=N,e.BuildInfoApiClient=d,e.CreateApiClientConfiguration=F,e.DesignAtomsApiModule=J,e.DesignAtomsCompatibilityApiClient=m,e.DesignAtomsImagesApiClient=h,e.DesignAtomsMockups3dApiClient=v,e.DesignAtomsPalettesApiClient=g,e.DesignAtomsPrintProductApiClient=y,e.DesignAtomsPrintProductItemsApiClient=b,e.DesignAtomsServiceApiClient=R,e.DesignAtomsViewerApiClient=P,Object.defineProperty(e,"__esModule",{value:!0})}));
16
16
  //# sourceMappingURL=aurigma-ng-design-atoms-api-client.umd.min.js.map