1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[170],{7273:function(t,e,n){var i,r=n(3454),s=n(8764).lW;i=(t,e,i,o,a,c,u,h,p)=>(()=>{var d={1:t=>{"use strict";t.exports=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=void 0,r=void 0,s=void 0,o=[];return function(){var c,u="function"==typeof e?e():e,h=(new Date).getTime(),p=!i||h-i>u;i=h;for(var d=arguments.length,l=Array(d),f=0;f<d;f++)l[f]=arguments[f];if(p&&n.leading)return n.accumulate?Promise.resolve(t.call(this,[l])).then(function(t){return t[0]}):Promise.resolve(t.call.apply(t,[this].concat(l)));if(r?clearTimeout(s):((c={}).promise=new Promise(function(t,e){c.resolve=t,c.reject=e}),r=c),o.push(l),s=setTimeout(a.bind(this),u),n.accumulate){var m=o.length-1;return r.promise.then(function(t){return t[m]})}return r.promise};function a(){var e=r;clearTimeout(s),Promise.resolve(n.accumulate?t.call(this,o):t.apply(this,o[o.length-1])).then(e.resolve,e.reject),o=[],r=null}}},12:t=>{"use strict";t.exports=p},266:t=>{"use strict";t.exports=i},282:t=>{"use strict";t.exports=u},283:(t,e,n)=>{"use strict";var i=n(416);t.exports=function(t,e){if(!i(t)&&"function"!=typeof t)return{};var n={};if("string"==typeof e)return e in t&&(n[e]=t[e]),n;for(var r=e.length,s=-1;++s<r;){var o=e[s];o in t&&(n[o]=t[o])}return n}},319:(t,e,n)=>{"use strict";var i=n(12),r="function"==typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t==1/e)||t!=t&&e!=e},s=i.useState,o=i.useEffect,a=i.useLayoutEffect,c=i.useDebugValue;function u(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!r(t,n)}catch(t){return!0}}var h="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(t,e){return e()}:function(t,e){var n=e(),i=s({inst:{value:n,getSnapshot:e}}),r=i[0].inst,h=i[1];return a(function(){r.value=n,r.getSnapshot=e,u(r)&&h({inst:r})},[t,n,e]),o(function(){return u(r)&&h({inst:r}),t(function(){u(r)&&h({inst:r})})},[t]),c(n),n};e.useSyncExternalStore=void 0!==i.useSyncExternalStore?i.useSyncExternalStore:h},377:t=>{"use strict";t.exports=a},416:t=>{"use strict";t.exports=function(t){return null!=t&&"object"==typeof t&&!1===Array.isArray(t)}},517:t=>{"use strict";t.exports=o},530:(t,e)=>{var n;!function(){"use strict";var i={}.hasOwnProperty;function r(){for(var t="",e=0;e<arguments.length;e++){var n=arguments[e];n&&(t=s(t,function(t){if("string"==typeof t||"number"==typeof t)return t;if("object"!=typeof t)return"";if(Array.isArray(t))return r.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes("[native code]"))return t.toString();var e="";for(var n in t)i.call(t,n)&&t[n]&&(e=s(e,n));return e}(n)))}return t}function s(t,e){return e?t?t+" "+e:t+e:t}t.exports?(r.default=r,t.exports=r):void 0===(n=(function(){return r}).apply(e,[]))||(t.exports=n)}()},625:e=>{"use strict";e.exports=t},634:(t,e,n)=>{"use strict";t.exports=n(319)},646:t=>{"use strict";t.exports=h},824:t=>{"use strict";t.exports=e},883:t=>{"use strict";t.exports=c}},l={};function f(t){var e=l[t];if(void 0!==e)return e.exports;var n=l[t]={exports:{}};return d[t](n,n.exports,f),n.exports}f.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return f.d(e,{a:e}),e},f.d=(t,e)=>{for(var n in e)f.o(e,n)&&!f.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},f.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),f.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var m={};return(()=>{"use strict";let t,e,i,o,a,c,u,h;f.r(m),f.d(m,{ClusterProgramDetails:()=>sq});var p,d,l,v,g,w,y,b,S,C,A,E,P,T,L,O,I,R,D,k,_,x,G,N,U,F,j,q,V={};f.r(V),f.d(V,{hasBrowserEnv:()=>eJ,hasStandardBrowserEnv:()=>eY,hasStandardBrowserWebWorkerEnv:()=>eX,navigator:()=>ez,origin:()=>eZ});var B=f(12),M=f.n(B);let K={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)},Q=new Uint8Array(16),W=[];for(let t=0;t<256;++t)W.push((t+256).toString(16).slice(1));let H=function(e,n,i){if(K.randomUUID&&!n&&!e)return K.randomUUID();let r=(e=e||{}).random||(e.rng||function(){if(!t&&!(t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return t(Q)})();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,n){i=i||0;for(let t=0;t<16;++t)n[i+t]=r[t];return n}return function(t,e=0){return W[t[e+0]]+W[t[e+1]]+W[t[e+2]]+W[t[e+3]]+"-"+W[t[e+4]]+W[t[e+5]]+"-"+W[t[e+6]]+W[t[e+7]]+"-"+W[t[e+8]]+W[t[e+9]]+"-"+W[t[e+10]]+W[t[e+11]]+W[t[e+12]]+W[t[e+13]]+W[t[e+14]]+W[t[e+15]]}(r)};(p=A||(A={})).RECOMMENDATION="recommendation",p.PREVIEW_SEARCH="preview_search",p.SEARCH_RESULTS="content_grid",p.CONTENT_BLOCK="content_block",p.QUESTIONS="questions_answers",p.HTML_BLOCK="html_block",p.BANNER="banner",p.SEO="seo";let $=(t,e,n="")=>{let i=(t=>{let e=t.split("_");return`${e[0]}${e.slice(1).map(t=>t[0].toUpperCase()+t.slice(1)).join("")}`})(e);return`${t}${i[0].toUpperCase()+i.slice(1)}${n}`},J=t=>{let e=typeof t;return null!==t&&("object"===e||"function"===e)}
1,z=new Set(["__proto__","prototype","constructor"]),Y=new Set("0123456789");function X(t){let e=[],n="",i="start",r=!1;for(let s of t)switch(s){case"\\":if("index"===i)throw Error("Invalid character in an index");if("indexEnd"===i)throw Error("Invalid character after an index");r&&(n+=s),i="property",r=!r;break;case".":if("index"===i)throw Error("Invalid character in an index");if("indexEnd"===i){i="property";break}if(r){r=!1,n+=s;break}if(z.has(n))return[];e.push(n),n="",i="property";break;case"[":if("index"===i)throw Error("Invalid character in an index");if("indexEnd"===i){i="index";break}if(r){r=!1,n+=s;break}if("property"===i){if(z.has(n))return[];e.push(n),n=""}i="index";break;case"]":if("index"===i){e.push(Number.parseInt(n,10)),n="",i="indexEnd";break}if("indexEnd"===i)throw Error("Invalid character after an index");default:if("index"===i&&!Y.has(s))throw Error("Invalid character in an index");if("indexEnd"===i)throw Error("Invalid character after an index");"start"===i&&(i="property"),r&&(r=!1,n+="\\"),n+=s}switch(r&&(n+="\\"),i){case"property":if(z.has(n))return[];e.push(n);break;case"index":throw Error("Index was not closed");case"start":e.push("")}return e}function Z(t,e){if("number"!=typeof e&&Array.isArray(t)){let n=Number.parseInt(e,10);return Number.isInteger(n)&&t[n]===t[e]}return!1}function tt(t,e){if(Z(t,e))throw Error("Cannot use string index")}function te(t,e,n){if(!J(t)||"string"!=typeof e)return t;let i=t,r=X(e);for(let e=0;e<r.length;e++){let i=r[e];tt(t,i),e===r.length-1?t[i]=n:J(t[i])||(t[i]="number"==typeof r[e+1]?[]:{}),t=t[i]}return i}function tn(t,e){let n={};if(Array.isArray(e))for(let i of e){let e=Object.getOwnPropertyDescriptor(t,i);e?.enumerable&&Object.defineProperty(n,i,e)}else for(let i of Reflect.ownKeys(t)){let r=Object.getOwnPropertyDescriptor(t,i);r.enumerable&&e(i,t[i],t)&&Object.defineProperty(n,i,r)}return n}let ti=t=>t&&"object"==typeof t&&!Array.isArray(t);function tr(t,e,{mutate:n=!1}={}){let i=n?t:Object.assign({},t);return ti(t)&&ti(e)&&Object.keys(e).forEach(n=>{ti(e[n])&&n in t?i[n]=tr(t[n],e[n]):Object.assign(i,{[n]:e[n]})}),i}let ts=t=>{if("object"!=typeof t||null===t)return t;let e=Array.isArray(t)?[]:{};for(let n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=ts(t[n]));return e};var to=f(283);class ta{constructor(){Object.defineProperty(this,"listeners",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"props",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"dataSnapshot",{enumerable:!0,configurable:!0,writable:!0,value:{}})}takeSnapshot(){return this.dataSnapshot=JSON.parse(JSON.stringify(this.data)),this}restoreSnapshot(){return this.data=JSON.parse(JSON.stringify(this.dataSnapshot)),this.onChange("@restore-snapshot",null),this}set(t,e,n){if(t in this.props){let i=this.getPropExportKey(t,n);if(this.get(t,void 0)!==e){let n=this.props[t];void 0===e?this.removeKey(n.parent?.key,n.keyPath[0]):te(this.data,i,e),this.onChange(t,e)}}return this}get(t,e,n){return t in this.props?function(t,e,n){if(!J(t)||"string"!=typeof e)return void 0===n?t:n;let i=X(e);if(0===i.length)return n;for(let e=0;e<i.length;e++){let r=i[e];if(null==(t=Z(t,r)?e===i.length-1?void 0:null:t[r])){if(e!==i.length-1)return n;break}}return void 0===t?n:t}(this.data,this.getPropExportKey(t,n),e):e}resetValue(t,e){if(t in this.props){let n=this.props[t],i=n.initialValue?n.initialValue():void 0;return void 0===i&&e&&n.parent&&"map"===n.parent.type?this.removeKey(n.parent.key,e):this.set(t,i,e)}return this}getMapExportKey(t,e){return t.map(t=>"#KEY#"===t?e:t)}getPropExportKey(t,e){if(t in this.props){let n=this.props[t].exportKey;return e?this.getMapExportKey(n,e).join("."):n.join(".")}return""}getValue(t,e,n){return t in this.props?this.get(t,e,n):e}setValue(t,e,n){return t in this.props?"array"===this.props[t].type&&0===e.length?this.resetValue(t,n):this.set(t,e,n):this}removeKey(t,e){if(!t)return this.data=function(t,e){if(Array.isArray(e)){let n=new Set(e);return tn(t,t=>!n.has(t))}return tn(t,(t,n,i)=>!e(t,n,i))}(this.data,[e]),this;let n=this.getValue(t,{});return function(t,e){if(!J(t)||"string"!=typeof e)return 0;let n=X(e);for(let e=0;e<n.length;e++){let i=n[e];if(tt(t,i),e===n.length-1)return delete t[i],!0;if(!J(t=t[i]))return!1}}(n,"string"==typeof e?e:`[${e}]`),0===Object.keys(n).length&&(n=void 0),this.setValue(t,n)}updateValue(t,e,n){return this.setValue(t,tr(this.getValue(t,{},n),e),n)}addValue(t,e,n){return t in this.props&&"array"===this.props[t].type?this.setValue(t,this.getValue(t,[],n).concat(e),n):this}removeValue(t,e,n=t=>t!==e,i){return t in this.props&&"array"===this.props[t].type&&this.setValue(t,this.getValue(t,[],i).filter(t=>n(t,e)),i),this}load(t,e=!1){return this.data=t.toJson(),e&&this.onChange("load","load"),this}transformJson(t){return t}toJson(...t){return 0===Object.keys(this.data).length?this.transformJson(void 0):0===t.length?this.transformJson(ts(this.data)):this.transformJson(to(ts(this.data),t))}
1onChange(t,e){this.listeners.forEach(n=>{n.onChange(this,t,e)})}addListeners(t){t.forEach(t=>this.addListener(t))}addListener(t){this.listeners.find(e=>e===t)||this.listeners.push(t)}removeListener(t){this.listeners=this.listeners.filter(e=>e!==t)}}function tc(t,e){return(tc=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function tu(t){return(tu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function th(t){return(th="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function tp(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}let td=(t,e,n)=>{let{name:i=t}=e;return n?`${n.key}.${i}`:i},tl=(t,{parent:e},n,i=0)=>{if("map"===e?.type){if(t.length<n-i+1)throw Error("Invalid number of arguments");if("string"!=typeof t[0])throw Error(`Invalid map key argument: ${t[0]}`);let e=t.slice(1);return[...Array(n).fill(void 0).map((t,n)=>e[n]),t[0]]}return t},tf=(t,e,n,i,r)=>{let s={};return Object.keys(e).forEach(o=>{let{key:a,methodKey:c,config:u,config:{accessProp:h,exportKey:p,setter:d,getter:l,type:f,model:m,initialValue:v}}=((t,e,n)=>{let i;let{exportKey:r=[t],getter:s,setter:o}=n,a="map"===e?.type,c=td(t,n,e),u=e?`${e.accessProp}.${t}`:t,h=[...a?["#KEY#"]:[],..."__constructor__"===t?[]:r],p=e?.exportKey?.concat(...h)||h,d=(i=c,"__constructor__"===t&&(i=td(t,n,e?.parent||null)),i.replace(/\./g,"_")),l=s||$("get",d),f=o||$("set",d);return{config:{...n,key:c,accessProp:u,exportKey:p,keyPath:h,getter:l,setter:f,parent:e},key:c,methodKey:d}})(o,t,e[o]),g={type:f,...r};s[a]=u;let w=v?v():void 0;if(void 0===w||a.includes("#KEY#")||te(n,p.join("."),w),i.push({typeOptions:g,prop:h,key:l,value:function(...t){return this.getValue(a,...tl(t,g,1,1))}}),i.push({typeOptions:g,prop:h,key:d,value:function(...t){return this.setValue(a,...tl(t,g,1))}}),i.push({typeOptions:g,prop:h,key:$("reset",c),value:function(...t){return this.resetValue(a,...tl(t,g,0))}}),"array"===f){let t=c.replace(/s$/,"").replace(/ie$/,"y");i.push({typeOptions:g,prop:h,key:$("add",t),value:function(...t){return this.addValue(a,...tl(t,g,1))}}),i.push({typeOptions:g,prop:h,key:$("remove",t),value:function(...t){return this.removeValue(a,...tl(t,g,2,1))}})}else"model"===f&&m?(Object.assign(s,tf(u,m.properties,n,i,r)),i.push({typeOptions:g,prop:h,key:$("update",c),value:function(...t){return this.updateValue(a,...tl(t,g,1))}})):"map"===f&&m&&Object.assign(s,tf(u,m.properties,n,i,{parent:u,...r}))}),s},tm=t=>{let{name:e,properties:n={}}=t,i={},r=[],s=tf(null,n,i,r);!function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&tc(t,e)}(a,ta);let o=function(t){let e=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){let n;let i=tu(t);return n=e?Reflect.construct(i,arguments,tu(this).constructor):i.apply(this,arguments),function(t,e){if(e&&("object"===th(e)||"function"==typeof e))return e;if(void 0!==e)throw TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}(a);function a(...t){let e=o.call.apply(o,[this].concat(t));return tp(e,"listeners",[]),tp(e,"props",s),tp(e,"data",JSON.parse(JSON.stringify(i))),e}return r&&function(t,e){for(let n=0;n<e.length;n++){let i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}(a.prototype,r),Object.defineProperty(a,"name",{value:e}),a},tv={name:"Content",properties:{fields:{type:"array"}}},tg={name:"SearchFilter",properties:{type:{},name:{required:!0},values:{type:"array",required:!0}}},tw={name:"Rule",properties:{behaviors:{}
1,blacklist:{type:"model",model:{name:"Blacklist",properties:{filter:{type:"model",model:tg,required:!0}}}},boost:{type:"array",model:{name:"Boost",properties:{filter:{type:"model",model:tg,required:!0},slots:{type:"array",required:!0}}}},bury:{type:"model",model:{name:"Bury",properties:{filter:{type:"model",model:tg,required:!0}}}},include:{type:"array",model:{name:"Include",properties:{filter:{type:"model",model:tg,required:!0},slots:{type:"array",required:!0}}}},pin:{type:"array",model:{name:"Pin",properties:{id:{required:!0},slot:{type:"array",required:!0}}}}}},ty={name:"FacetSort",properties:{name:{required:!0},order:{required:!0}}};(d=E||(E={})).HARD_FILTERS="hard_filters",d.OTHER_FACET_VALUES="other_facet_values",d.OWN_VALUES="own_values";let tb={name:"WidgetItem",buildInterface:!0,properties:{entity:{required:!0},rfk_id:{required:!0,name:"rfkId"},recommendations:{type:"model",model:{name:"Recommendations",properties:{content:{type:"model",model:tv},filter:{type:"model",model:tg},recipe:{type:"model",model:{name:"RecommendationsRecipe",properties:{id:{},version:{}}}},limit:{},rule:{type:"model",model:tw}}}},questions:{type:"model",model:{name:"Questions",properties:{keyphrase:{},exact_answer:{type:"model",model:{name:"ExactAnswer",properties:{query_types:{type:"array"}}}},related_questions:{type:"model",model:{name:"RelatedQuestions",properties:{limit:{},offset:{}}}}}}},rfk_flags:{type:"array",name:"rfkFlags"},search:{type:"model",model:{name:"Search",properties:{sort:{type:"model",model:{name:"Sort",properties:{choices:{},value:{type:"model",model:{name:"SortItem",properties:{name:{required:!0},order:{}}},exportKey:["value[0]"],name:"criteria"}}}},content:{type:"model",model:tv},facet:{type:"model",model:{name:"Facet",properties:{all:{},max:{},sort:{type:"model",model:ty},types:{type:"array",model:{name:"FacetType",properties:{after:{},exclude:{type:"array"},filter:{},filtering_options:{type:"array"},keyphrase:{},max:{},min_count:{},name:{required:!0},sort:{type:"array",model:ty}}}}}}},filter:{},group_by:{},limit:{},offset:{},personalization:{type:"model",model:{name:"Personalization",properties:{algorithm:{},fields:{type:"array"},ids:{type:"array"}}}},query:{type:"model",model:{name:"Query",properties:{highlight:{type:"model",model:{name:"Highlight",properties:{fields:{type:"array",required:!0},fragment_size:{},post_tag:{type:"string"},pre_tag:{type:"string"}}}},keyphrase:{required:!0},operator:{},relevance:{type:"array",model:{name:"Relevance",properties:{analyzer:{required:!0},name:{required:!0},weight:{}}}}}}},ranking:{type:"array",model:{name:"Ranking",properties:{name:{required:!0},weight:{}}}},rule:{type:"model",model:tw},suggestion:{type:"array",model:{name:"Suggestion",properties:{exclude:{},keyphrase_fallback:{},max:{},name:{required:!0}}}},swatch:{type:"model",model:{name:"Swatch",properties:{fields:{type:"array"},group_by:{},max:{}}}}}}},sources:{type:"array"},appearance:{type:"model",model:{name:"Appearance",properties:{templates:{type:"model",model:{name:"Templates",properties:{sections:{type:"array"},devices:{type:"array"},keep_variables:{},keep_original_css:{}}}},variables:{type:"model",model:{name:"Variables",properties:{sections:{type:"array"}}}}}}}}},tS=tm(tb);class tC extends tS{constructor(t){super(),this.setRfkId(t)}setSearchFilter(t){return this.setValue("search.filter",t.toJson()),this}}let tA=t=>{let e=new tC(t);return e.setAppearance({}),e.setAppearanceTemplates({}),e.setAppearanceVariables({}),e};class tE extends tC{constructor(){super(...arguments),Object.defineProperty(this,"facetTypeFiltersType",{enumerable:!0,configurable:!0,writable:!0,value:"or"})}buildFacetTypeFilters(t,e="or"){if(0!==t.length)return{type:e,values:t}}setSearchFacetTypeFilterType(t){return this.facetTypeFiltersType=t,this}getSearchFacetTypeFilterType(){return this.facetTypeFiltersType}setSearchFacetType(t,e){let n=this.getSearchFacetTypes()||[];return n.find(({name:e})=>e===t)?this.setSearchFacetTypes(n.map(n=>n.name===t?{...e,name:t}:n)):this.setSearchFacetTypes([...n,{...e,name:t}]),this}updateSearchFacetType(t,e){let n=this.getSearchFacetTypes()||[];return this.setSearchFacetType(t,{...n.find(({name:e})=>e===t),...e}),this}addSearchFacetTypeFilter(t,e,n="or"){let i=this.getSearchFacetTypes()||[],r=i.find(({name:e})=>e===t)?.filter?.values||[];return this.updateSearchFacetType(t,{filter:this.buildFacetTypeFilters([...r,e],n)}),this}resetSearchFacetTypeFilter(t){return this.updateSearchFacetType(t,{filter:void 0}),this}removeSearchFacetTypeFilter(t,e){let n=this.getSearchFacetTypes()||[],i=n.find(({name:e})=>e===t)?.filter?.values||[];return this.updateSearchFacetType(t,{filter:this.buildFacetTypeFilters(i.filter(t=>!function t(e,n){if(typeof e!=typeof n)return!1;if("object"==typeof e){if(Array.isArray(e)&&Array.isArray(n)){if(e.length!==n.length)return!1;for(let i=0;i<e.length;i++)if(!t(e[i],n[i]))return!1;return!0}{let i=Object.keys(e),r=Object.keys(n);if(i.length!==r.length)return!1;for(let r of i)if(!t(e[r],n[r]))return!1;return!0}}return e===n}(t,e)))}),this}resetSearchFacetTypeFilters(){return(this.getSearchFacetTypes()||[]).forEac
1h(({name:t})=>{this.updateSearchFacetType(t,{filter:void 0})}),this}}let tP={[A.RECOMMENDATION]:t=>{let e=new tC(t);return e.setRecommendationsContent({}),e},[A.SEARCH_RESULTS]:t=>{let e=new tE(t);return e.setSearchContent({}),e.setSearchFacetAll(!0),e.setSearchOffset(0),e.setSearchSortChoices(!0),e},[A.PREVIEW_SEARCH]:t=>{let e=new tC(t);return e.setSearchContent({}),e},[A.QUESTIONS]:t=>{let e=new tE(t);return e.setQuestionsRelatedQuestionsLimit(5),e.setQuestionsExactAnswer({}),e},[A.CONTENT_BLOCK]:tA,[A.HTML_BLOCK]:tA,[A.SEO]:tA,[A.BANNER]:tA},tT={name:"Context",file:"context",buildInterface:!0,properties:{browser:{type:"model",model:{name:"ContextBrowser",file:"browser",properties:{user_agent:{},device:{},app_type:{}}}},campaign:{type:"model",model:{name:"ContextCampaign",properties:{utm_source:{},utm_medium:{},utm_campaign:{},utm_term:{},utm_content:{}}}},geo:{type:"model",model:{name:"ContextGeo",properties:{ip:{},location:{type:"model",model:{name:"ContextGeoLocation",properties:{lat:{required:!0},lon:{required:!0}}}}}}},ids:{type:"map",model:{name:"ContextEntityIds",properties:{__constructor__:{type:"array",name:"entityIds"}}},mapKey:"entity",mapKeyType:"Entity"},locale:{type:"model",model:{name:"ContextLocale",properties:{country:{required:!0},language:{required:!0}}}},page:{type:"model",model:{name:"ContextPage",properties:{uri:{required:!0},custom:{}}}},store:{type:"model",model:{name:"ContextStore",properties:{group_id:{required:!0},id:{required:!0}}}},time:{type:"model",model:{name:"ContextTime",properties:{epoch:{}}}},user:{type:"model",model:{name:"ContextUser",properties:{uuid:{required:!0},groups:{type:"array",name:"groups"},custom:{}}}}}},tL=tm(tT);class tO extends tL{}class tI{static get(){return this.context}static toJson(){if(this.context){let t=this.context.toJson();return{...t.browser?{browser:t.browser}:{},...t.geo?{geo:t.geo}:{},...t.page?{page:{...t.page,...t.locale?{...t.locale.country?{locale_country:t.locale.country}:{},...t.locale.language?{locale_language:t.locale.language}:{}}:{}}}:{},...t.user?{user:t.user}:{}}}return{}}}Object.defineProperty(tI,"context",{enumerable:!0,configurable:!0,writable:!0,value:new tO});let tR=t=>0===Object.keys(t||{}).length,tD=t=>void 0===t,tk=t=>{try{return t?JSON.parse(t):""}catch(e){return t}},t_=(t={})=>"undefined"!=typeof window?window:t;(l=P||(P={}))[l.NONE=0]="NONE",l[l.ERROR=1]="ERROR",l[l.WARN=2]="WARN",l[l.INFO=3]="INFO",l[l.DEBUG=4]="DEBUG",l[l.TRACE=5]="TRACE";let tx={none:P.NONE,error:P.ERROR,warn:P.WARN,info:P.INFO,debug:P.DEBUG,trace:P.TRACE},tG="Sitecore Search SDK",tN=[console],tU=new class{constructor(t,e=P.NONE,n=tG){Object.defineProperty(this,"NONE",{enumerable:!0,configurable:!0,writable:!0,value:P.NONE}),Object.defineProperty(this,"ERROR",{enumerable:!0,configurable:!0,writable:!0,value:P.ERROR}),Object.defineProperty(this,"WARN",{enumerable:!0,configurable:!0,writable:!0,value:P.WARN}),Object.defineProperty(this,"INFO",{enumerable:!0,configurable:!0,writable:!0,value:P.INFO}),Object.defineProperty(this,"DEBUG",{enumerable:!0,configurable:!0,writable:!0,value:P.DEBUG}),Object.defineProperty(this,"TRACE",{enumerable:!0,configurable:!0,writable:!0,value:P.TRACE}),Object.defineProperty(this,"transports",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"logLevel",{enumerable:!0,configurable:!0,writable:!0,value:P.NONE}),Object.defineProperty(this,"namespace",{enumerable:!0,configurable:!0,writable:!0,value:tG}),this.transports=t,this.namespace=n,this.setLogLevel(e)}setLogLevel(t){if("string"!=typeof t)this.logLevel=t;else{if(!tx[t])throw Error(`Logger :: Invalid logLevel (${t})`);this.logLevel=tx[t]}}send(t,e,...n){try{this.logLevel>=t&&this.transports.forEach(t=>{t[e](this.namespace," ::: ",...n)})}catch(t){console.error(t)}}error(...t){return this.send(P.ERROR,"error",...t)}warn(...t){return this.send(P.WARN,"warn",...t)}info(...t){return this.send(P.INFO,"info",...t)}debug(...t){return this.send(P.DEBUG,"debug",...t)}trace(...t){return this.send(P.TRACE,"log",...t)}}(tN),tF={dev:"https://discover-dev.sitecore-staging.cloud",staging:"https://discover-staging.sitecore-staging.cloud",uat:"https://discover-uat.sitecore-staging.cloud",prod:"https://discover.sitecorecloud.io",prodEu:"https://discover-euc1.sitecorecloud.io",apse2:"https://discover-apse2.sitecorecloud.io"},tj={australiaEast:"https://australiaeast-integrations.ordercloud.io",europeWest:"https://westeurope-integrations.ordercloud.io",japanEast:"https://japaneast-integrations.ordercloud.io",usEast:"https://useast-integrations.ordercloud.io",usWest:"https://uswest-integrations.ordercloud.io",usWestQa:"https://uswest-integrations.ordercloud-qa.com"},tq="/event/{{key}}/v4/publish",tV=(t,e)=>{let n=Object.assign({},t,e),{orderCloudRegion:i="usWest",env:r="prod",discoverDomainId:s}=e;if(!s)throw Error("{discoverDomainId} has not been provided.");return n.domainId=s,n.connector="oc",Object.assign(n,{useAccessToken:!0,apiDomain:tj[i],searchUrl:`${tj[i]}${"/api/v1/search/{{domain}}".replace("{{domain}}",s)}`,eventUrl:`${tF[r]}${tq.replace("{{key}}",s)}`})},tB=t=>{let e=t.split("-");return 2===e.length&&e[1]||""},tM=(t,e)=>{let n;let i=Object.assign({},t,e),{env:r="prod",customerKey:s=""}=i,{serviceHost:o,apiKey:a}=e,c=tK(s);if(!c)throw Error(`Invalid customerKey: "${s}". It should match the following pattern: (\\d+)-(\\d+). Example: 11111-2222222`);let[u,h]=c;if(Object.assign(i,{domainId:u,domainHash:h}),i.connector="sitecore",!a&&!o)throw Error('Invalid configuration: "apiKey" has not been set but not serviceHost provided. Please, review your domain configuration');return Object.assign(i,(n=tF[r],a?{apiDomain:n,searchUrl:`${n}${"/discover/v2/{{key}}".replace("{{key}}",tB(s))}`,eventUrl:`${n}${tq.replace("{{key}}",s)}`}:{apiDomain:o,searchUrl:`${o}/api/discover/v2`,eventUrl:`${o}/api/event/v4/publish`}))},tK=t=>{if(t){let e=t.match(/^(\d+)-(\d+)$/);if(e)return[e[1],e[2]]}return null},tQ={apiDomain:"",apiKey:"",clientId:"",connector:"sitecore",cookieOptions:{},customerKey:"",debug:!1,domainHash:"",domainId:"",env:"prod",eventUrl:"",orderCloudRegion:"usWest",publicSuffix:!1,searchUrl:"",tokenDomain:"",tokenUrl:"",trackConsent:!0,useAccessToken:!1,userId:null},tW=t=>tQ[t],tH=()=>tQ,t$=()=>{let t=t_({location:{hostname:""}}),{publicSuffix:e}=tH();return e?t.location.hostname:t.location.hostname.split(".").reverse().splice(0,2).reverse().join(".")},tJ=Date.now(),tz=((t={})=>"undefined"!=typeof document?document:t)({cookie:""});tz.cookie||(tz.cookie="");class tY{getCookieValue(t,e){let n=t.slice(e.length+1,t.length);return n?decodeURIComponent(n):""}getCookieFromBrowser(t){let e=tz.cookie.split("; ");for(let n=0;n<e.length;
1n++)if(e[n].slice(0,t.length)===t)return this.getCookieValue(e[n],t);return""}setCookieInBrowser(t,e,n){let i=new Date,r=encodeURIComponent(e);i.setMilliseconds(i.getMilliseconds()+n),r+=`;domain=${t$()};path=/;`+(n?`;expires=${i.toUTCString()}`:"")+";secure;SameSite=None;",tz.cookie=`${t}=${r}`}removeCookieFromBrowser(t){tz.cookie=`${t}=;domain=${t$()};path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;secure;SameSite=None`}removeCachedCookie(t){this.removeCookieFromBrowser(t)}set(t,e,n){if(e){let i="object"==typeof e?JSON.stringify(e):e;this.setCookieInBrowser(t,i,n)}else this.removeCachedCookie(t)}get(t){return this.getCookieFromBrowser(t)}remove(t){this.removeCachedCookie(t)}}class tX{set(t,e,n){let i={value:e,lastModifiedAt:(new Date).getTime()||0,expiryTime:n};void 0!==e?localStorage.setItem(t,JSON.stringify(i)):localStorage.removeItem(t)}get(t){let e=(new Date).getTime()||0,n=tk(localStorage.getItem(t));return n&&n.lastModifiedAt&&e-+n.lastModifiedAt>+n.expiryTime&&(this.remove(t),n=void 0),n&&n.value}remove(t){localStorage.removeItem(t)}}let tZ=class{static init(t){e=t&&t_().localStorage?new tX:new tY}static set(t,n,i){e.set(t,n,i||3e5)}static get(t){let n=e.get(t),i=n?tk(n):{};return"undefined"===n&&(n=void 0),n&&i?i:n}static remove(t){e.remove(t)}},t0={},t1=()=>{let{domainId:t,customerKey:e}=tH();return e?tB(e):t},t2=()=>{let t=0,e=tZ.get("__rutma");return tZ.get("__rutmb")||(tZ.set("__rutmb",t1(),18e5),t=1),e=e?((t,e)=>{let n=t.split(".");return n.length>3&&(e&&(n[1]=n[2],n[2]=tJ,n[3]=1*n[3]+1),4===n.length&&(n[4]=1),5===n.length&&(n[5]=1),n[4]=1*n[4]+1,n[5]=1+(e?0:1*n[5]),t=n.join(".")),t})(e,t):`${(()=>{let t=tZ.get("__ruid");if(t)return t;t=("xx-xx-4x-1"+"pc"[0]+"-").replace(/[x]/g,()=>{var t;return String.fromCharCode((t=36*Math.random()|0)<10?t+48:t<36?t+87:t+29)});for(let e=0;e<5;e++)t+=("0000"+(1679615*Math.random()|0).toString(36)).slice(-4);let e=t1()+"-"+t+"-"+tJ;return tZ.set("__ruid",e),e})()}.${tJ}.${tJ}.1.1.1`,tZ.set("__rutma",e,18e5),e},t4=()=>{let t=tW("userId");if(t)return{user_id:t};let{uid:e}=(()=>{var t;let{domainHash:e}=tH();t0.domainHashCkey=e,t0.domainHash=t0.domainHashCkey,t0.domainRoot=t$();let n=t2(),i=n.split(".");return t0.uid=i[0],t0.usetLastDigit=(t=i[0]).length?t[t.length-1]:void 0,t0.previousSessionStartTime=parseInt(i[1]),t0.currentSessionStartTime=parseInt(i[2]),t0.visitCount=parseInt(i[3]),t0.pageViewCount=parseInt(i[4]),t0.visitPageCount=parseInt(i[5]),t0.utma=n,t0})();return{uuid:e}},t3=t_();function t5(t,e){return function(){return t.apply(e,arguments)}}let{toString:t6}=Object.prototype,{getPrototypeOf:t8}=Object,{iterator:t7,toStringTag:t9}=Symbol,et=(a=Object.create(null),t=>{let e=t6.call(t);return a[e]||(a[e]=e.slice(8,-1).toLowerCase())}),ee=t=>(t=t.toLowerCase(),e=>et(e)===t),en=t=>e=>typeof e===t,{isArray:ei}=Array,er=en("undefined"),es=ee("ArrayBuffer"),eo=en("string"),ea=en("function"),ec=en("number"),eu=t=>null!==t&&"object"==typeof t,eh=t=>{if("object"!==et(t))return!1;let e=t8(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||t9 in t||t7 in t)},ep=ee("Date"),ed=ee("File"),el=ee("Blob"),ef=ee("FileList"),em=ee("URLSearchParams"),[ev,eg,ew,ey]=["ReadableStream","Request","Response","Headers"].map(ee);function eb(t,e,{allOwnKeys:n=!1}={}){let i,r;if(null!=t){if("object"!=typeof t&&(t=[t]),ei(t))for(i=0,r=t.length;i<r;i++)e.call(null,t[i],i,t);else{let r;let s=n?Object.getOwnPropertyNames(t):Object.keys(t),o=s.length;for(i=0;i<o;i++)r=s[i],e.call(null,t[r],r,t)}}}function eS(t,e){e=e.toLowerCase();let n=Object.keys(t),i,r=n.length;for(;r-- >0;)if(e===(i=n[r]).toLowerCase())return i;return null}let eC="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,eA=t=>!er(t)&&t!==eC,eE=(T="undefined"!=typeof Uint8Array&&t8(Uint8Array),t=>T&&t instanceof T),eP=ee("HTMLFormElement"),eT=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),eL=ee("RegExp"),eO=(t,e)=>{let n=Object.getOwnPropertyDescriptors(t),i={};eb(n,(n,r)=>{let s;!1!==(s=e(n,r,t))&&(i[r]=s||n)}),Object.defineProperties(t,i)},eI=ee("AsyncFunction"),eR=(L="function"==typeof setImmediate,O=ea(eC.postMessage),L?setImmediate:O?(I=`axios@${Math.random()}`,R=[],eC.addEventListener("message",({source:t,data:e})=>{t===eC&&e===I&&R.length&&R.shift()()},!1),t=>{R.push(t),eC.postMessage(I,"*")}):t=>setTimeout(t)),eD="undefined"!=typeof queueMicrotask?queueMicrotask.bind(eC):void 0!==r&&r.nextTick||eR,ek={isArray:ei,isArrayBuffer:es,isBuffer:function(t){return null!==t&&!er(t)&&null!==t.constructor&&!er(t.constructor)&&ea(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{let e;return t&&("function"==typeof FormData&&t instanceof FormData||ea(t.append)&&("formdata"===(e=et(t))||"object"===e&&ea(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&es(t.buffer)},isString:eo,isNumber:ec,isBoolean:t=>!0===t||!1===t,isObject:eu,isPlainObject:eh,isReadableStream:ev,isRequest:eg,isResponse:ew,isHeaders:ey,isUndefined:er,isDate:ep,isFile:ed,isBlob:el,isRegExp:eL,isFunction:ea,isStream:t=>eu(t)&&ea(t.pipe),isURLSearchParams:em,isTypedArray:eE,isFileList:ef,forEach:eb,merge:function t(){let{caseless:e}=eA(this)&&this||{},n={},i=(i,r)=>{let s=e&&eS(n,r)||r;eh(n[s])&&eh(i)?n[s]=t(n[s],i):eh(i)?n[s]=t({},i):ei(i)?n[s]=i.slice():n[s]=i};for(let t=0,e=arguments.length;t<e;t++)arguments[t]&&eb(arguments[t],i);return n},extend:(t,e,n,{allOwnKeys:i}={})=>(eb(e,(e,i)=>{n&&ea(e)?t[i]=t5(e,n):t[i]=e},{allOwnKeys:i}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,n,i)=>
1{t.prototype=Object.create(e.prototype,i),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},toFlatObject:(t,e,n,i)=>{let r,s,o;let a={};if(e=e||{},null==t)return e;do{for(s=(r=Object.getOwnPropertyNames(t)).length;s-- >0;)o=r[s],i&&!i(o,t,e)||a[o]||(e[o]=t[o],a[o]=!0);t=!1!==n&&t8(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},kindOf:et,kindOfTest:ee,endsWith:(t,e,n)=>{t=String(t),(void 0===n||n>t.length)&&(n=t.length),n-=e.length;let i=t.indexOf(e,n);return -1!==i&&i===n},toArray:t=>{if(!t)return null;if(ei(t))return t;let e=t.length;if(!ec(e))return null;let n=Array(e);for(;e-- >0;)n[e]=t[e];return n},forEachEntry:(t,e)=>{let n;let i=(t&&t[t7]).call(t);for(;(n=i.next())&&!n.done;){let i=n.value;e.call(t,i[0],i[1])}},matchAll:(t,e)=>{let n;let i=[];for(;null!==(n=t.exec(e));)i.push(n);return i},isHTMLForm:eP,hasOwnProperty:eT,hasOwnProp:eT,reduceDescriptors:eO,freezeMethods:t=>{eO(t,(e,n)=>{if(ea(t)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;ea(t[n])&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:(t,e)=>{let n={};return(t=>{t.forEach(t=>{n[t]=!0})})(ei(t)?t:String(t).split(e)),n},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,e,n){return e.toUpperCase()+n}),noop:()=>{},toFiniteNumber:(t,e)=>null!=t&&Number.isFinite(t=+t)?t:e,findKey:eS,global:eC,isContextDefined:eA,isSpecCompliantForm:function(t){return!!(t&&ea(t.append)&&"FormData"===t[t9]&&t[t7])},toJSONObject:t=>{let e=Array(10),n=(t,i)=>{if(eu(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[i]=t;let r=ei(t)?[]:{};return eb(t,(t,e)=>{let s=n(t,i+1);er(s)||(r[e]=s)}),e[i]=void 0,r}}return t};return n(t,0)},isAsyncFn:eI,isThenable:t=>t&&(eu(t)||ea(t))&&ea(t.then)&&ea(t.catch),setImmediate:eR,asap:eD,isIterable:t=>null!=t&&ea(t[t7])};function e_(t,e,n,i,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),i&&(this.request=i),r&&(this.response=r,this.status=r.status?r.status:null)}ek.inherits(e_,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ek.toJSONObject(this.config),code:this.code,status:this.status}}});let ex=e_.prototype,eG={};function eN(t){return ek.isPlainObject(t)||ek.isArray(t)}function eU(t){return ek.endsWith(t,"[]")?t.slice(0,-2):t}function eF(t,e,n){return t?t.concat(e).map(function(t,e){return t=eU(t),!n&&e?"["+t+"]":t}).join(n?".":""):e}["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{eG[t]={value:t}}),Object.defineProperties(e_,eG),Object.defineProperty(ex,"isAxiosError",{value:!0}),e_.from=(t,e,n,i,r,s)=>{let o=Object.create(ex);return ek.toFlatObject(t,o,function(t){return t!==Error.prototype},t=>"isAxiosError"!==t),e_.call(o,t.message,e,n,i,r),o.cause=t,o.name=t.name,s&&Object.assign(o,s),o};let ej=ek.toFlatObject(ek,{},null,function(t){return/^is[A-Z]/.test(t)}),eq=function(t,e,n){if(!ek.isObject(t))throw TypeError("target must be an object");e=e||new FormData;let i=(n=ek.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(t,e){return!ek.isUndefined(e[t])})).metaTokens,r=n.visitor||h,o=n.dots,a=n.indexes,c=(n.Blob||"undefined"!=typeof Blob&&Blob)&&ek.isSpecCompliantForm(e);if(!ek.isFunction(r))throw TypeError("visitor must be a function");function u(t){if(null===t)return"";if(ek.isDate(t))return t.toISOString();if(!c&&ek.isBlob(t))throw new e_("Blob is not supported. Use a Buffer instead.");return ek.isArrayBuffer(t)||ek.isTypedArray(t)?c&&"function"==typeof Blob?new Blob([t]):s.from(t):t}function h(t,n,r){let s=t;if(t&&!r&&"object"==typeof t){if(ek.endsWith(n,"{}"))n=i?n:n.slice(0,-2),t=JSON.stringify(t);else{var c;if(ek.isArray(t)&&(c=t,ek.isArray(c)&&!c.some(eN))||(ek.isFileList(t)||ek.endsWith(n,"[]"))&&(s=ek.toArray(t)))return n=eU(n),s.forEac
1h(function(t,i){ek.isUndefined(t)||null===t||e.append(!0===a?eF([n],i,o):null===a?n:n+"[]",u(t))}),!1}}return!!eN(t)||(e.append(eF(r,n,o),u(t)),!1)}let p=[],d=Object.assign(ej,{defaultVisitor:h,convertValue:u,isVisitable:eN});if(!ek.isObject(t))throw TypeError("data must be an object");return function t(n,i){if(!ek.isUndefined(n)){if(-1!==p.indexOf(n))throw Error("Circular reference detected in "+i.join("."));p.push(n),ek.forEach(n,function(n,s){!0===(!(ek.isUndefined(n)||null===n)&&r.call(e,n,ek.isString(s)?s.trim():s,i,d))&&t(n,i?i.concat(s):[s])}),p.pop()}}(t),e};function eV(t){let e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(t){return e[t]})}function eB(t,e){this._pairs=[],t&&eq(t,this,e)}let eM=eB.prototype;function eK(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function eQ(t,e,n){let i;if(!e)return t;let r=n&&n.encode||eK;ek.isFunction(n)&&(n={serialize:n});let s=n&&n.serialize;if(i=s?s(e,n):ek.isURLSearchParams(e)?e.toString():new eB(e,n).toString(r)){let e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+i}return t}eM.append=function(t,e){this._pairs.push([t,e])},eM.toString=function(t){let e=t?function(e){return t.call(this,e,eV)}:eV;return this._pairs.map(function(t){return e(t[0])+"="+e(t[1])},"").join("&")};let eW=class{constructor(){this.handlers=[]}use(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){ek.forEach(this.handlers,function(e){null!==e&&t(e)})}},eH={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},e$={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:eB,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},eJ="undefined"!=typeof window&&"undefined"!=typeof document,ez="object"==typeof navigator&&navigator||void 0,eY=eJ&&(!ez||0>["ReactNative","NativeScript","NS"].indexOf(ez.product)),eX="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,eZ=eJ&&window.location.href||"http://localhost",e0={...V,...e$},e1=function(t){if(ek.isFormData(t)&&ek.isFunction(t.entries)){let e={};return ek.forEachEntry(t,(t,n)=>{(function t(e,n,i,r){let s=e[r++];if("__proto__"===s)return!0;let o=Number.isFinite(+s),a=r>=e.length;return s=!s&&ek.isArray(i)?i.length:s,a?ek.hasOwnProp(i,s)?i[s]=[i[s],n]:i[s]=n:(i[s]&&ek.isObject(i[s])||(i[s]=[]),t(e,n,i[s],r)&&ek.isArray(i[s])&&(i[s]=function(t){let e,n;let i={},r=Object.keys(t),s=r.length;for(e=0;e<s;e++)i[n=r[e]]=t[n];return i}(i[s]))),!o})(ek.matchAll(/\w+|\[(\w*)]/g,t).map(t=>"[]"===t[0]?"":t[1]||t[0]),n,e,0)}),e}return null},e2={transitional:eH,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){let n;let i=e.getContentType()||"",r=i.indexOf("application/json")>-1,s=ek.isObject(t);if(s&&ek.isHTMLForm(t)&&(t=new FormData(t)),ek.isFormData(t))return r?JSON.stringify(e1(t)):t;if(ek.isArrayBuffer(t)||ek.isBuffer(t)||ek.isStream(t)||ek.isFile(t)||ek.isBlob(t)||ek.isReadableStream(t))return t;if(ek.isArrayBufferView(t))return t.buffer;if(ek.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();if(s){if(i.indexOf("application/x-www-form-urlencoded")>-1){var o,a;return(o=t,a=this.formSerializer,eq(o,new e0.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,i){return e0.isNode&&ek.isBuffer(t)?(this.append(e,t.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},a))).toString()}if((n=ek.isFileList(t))||i.indexOf("multipart/form-data")>-1){let e=this.env&&this.env.FormData;return eq(n?{"files[]":t}:t,e&&new e,this.formSerializer)}}return s||r?(e.setContentType("application/json",!1),function(t){if(ek.isString(t))try{return(0,JSON.parse)(t),ek.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(0,JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){let e=this.transitional||e2.transitional,n=e&&e.forcedJSONParsing,i="json"===this.responseType;if(ek.isResponse(t)||ek.isReadableStream(t))return t;if(t&&ek.isString(t)&&(n&&!this.responseType||i)){let n=!(e&&e.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(t){if(n){if("SyntaxError"===t.name)throw e_.from(t,e_.ERR_BAD_RESPONSE,this,null,this.response);throw t}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:e0.classes.FormData,Blob:e0.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};
1ek.forEach(["delete","get","head","post","put","patch"],t=>{e2.headers[t]={}});let e4=ek.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),e3=Symbol("internals");function e5(t){return t&&String(t).trim().toLowerCase()}function e6(t){return!1===t||null==t?t:ek.isArray(t)?t.map(e6):String(t)}function e8(t,e,n,i,r){return ek.isFunction(i)?i.call(this,e,n):(r&&(e=n),ek.isString(e)?ek.isString(i)?-1!==e.indexOf(i):ek.isRegExp(i)?i.test(e):void 0:void 0)}class e7{constructor(t){t&&this.set(t)}set(t,e,n){let i=this;function r(t,e,n){let r=e5(e);if(!r)throw Error("header name must be a non-empty string");let s=ek.findKey(i,r);s&&void 0!==i[s]&&!0!==n&&(void 0!==n||!1===i[s])||(i[s||e]=e6(t))}let s=(t,e)=>ek.forEach(t,(t,n)=>r(t,n,e));if(ek.isPlainObject(t)||t instanceof this.constructor)s(t,e);else if(ek.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim()))s((t=>{let e,n,i;let r={};return t&&t.split("\n").forEach(function(t){i=t.indexOf(":"),e=t.substring(0,i).trim().toLowerCase(),n=t.substring(i+1).trim(),!e||r[e]&&e4[e]||("set-cookie"===e?r[e]?r[e].push(n):r[e]=[n]:r[e]=r[e]?r[e]+", "+n:n)}),r})(t),e);else if(ek.isObject(t)&&ek.isIterable(t)){let n,i,r={};for(let e of t){if(!ek.isArray(e))throw TypeError("Object iterator must return a key-value pair");r[i=e[0]]=(n=r[i])?ek.isArray(n)?[...n,e[1]]:[n,e[1]]:e[1]}s(r,e)}else null!=t&&r(e,t,n);return this}get(t,e){if(t=e5(t)){let n=ek.findKey(this,t);if(n){let t=this[n];if(!e)return t;if(!0===e)return function(t){let e;let n=Object.create(null),i=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
1for(;e=i.exec(t);)n[e[1]]=e[2];return n}(t);if(ek.isFunction(e))return e.call(this,t,n);if(ek.isRegExp(e))return e.exec(t);throw TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=e5(t)){let n=ek.findKey(this,t);return!(!n||void 0===this[n]||e&&!e8(0,this[n],n,e))}return!1}delete(t,e){let n=this,i=!1;function r(t){if(t=e5(t)){let r=ek.findKey(n,t);r&&(!e||e8(0,n[r],r,e))&&(delete n[r],i=!0)}}return ek.isArray(t)?t.forEach(r):r(t),i}clear(t){let e=Object.keys(this),n=e.length,i=!1;for(;n--;){let r=e[n];t&&!e8(0,this[r],r,t,!0)||(delete this[r],i=!0)}return i}normalize(t){let e=this,n={};return ek.forEach(this,(i,r)=>{let s=ek.findKey(n,r);if(s)return e[s]=e6(i),void delete e[r];let o=t?r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,n)=>e.toUpperCase()+n):String(r).trim();o!==r&&delete e[r],e[o]=e6(i),n[o]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){let e=Object.create(null);return ek.forEach(this,(n,i)=>{null!=n&&!1!==n&&(e[i]=t&&ek.isArray(n)?n.join(", "):n)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){let n=new this(t);return e.forEach(t=>n.set(t)),n}static accessor(t){let e=(this[e3]=this[e3]={accessors:{}}).accessors,n=this.prototype;function i(t){let i=e5(t);e[i]||(function(t,e){let n=ek.toCamelCase(" "+e);["get","set","has"].forEach(i=>{Object.defineProperty(t,i+n,{value:function(t,n,r){return this[i].call(this,e,t,n,r)},configurable:!0})})}(n,t),e[i]=!0)}return ek.isArray(t)?t.forEach(i):i(t),this}}function e9(t,e){let n=this||e2,i=e||n,r=e7.from(i.headers),s=i.data;return ek.forEach(t,function(t){s=t.call(n,s,r.normalize(),e?e.status:void 0)}),r.normalize(),s}function nt(t){return!(!t||!t.__CANCEL__)}function ne(t,e,n){e_.call(this,null==t?"canceled":t,e_.ERR_CANCELED,e,n),this.name="CanceledError"}function nn(t,e,n){let i=n.config.validateStatus;n.status&&i&&!i(n.status)?e(new e_("Request failed with status code "+n.status,[e_.ERR_BAD_REQUEST,e_.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}e7.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ek.reduceDescriptors(e7.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[n]=t}}}),ek.freezeMethods(e7),ek.inherits(ne,e_,{__CANCEL__:!0});let ni=(t,e,n=3)=>{let i=0,r=function(t,e){let n=Array(t=t||10),i=Array(t),r,s=0,o=0;return e=void 0!==e?e:1e3,function(a){let c=Date.now(),u=i[o];r||(r=c),n[s]=a,i[s]=c;let h=o,p=0;for(;h!==s;)p+=n[h++],h%=t;if((s=(s+1)%t)===o&&(o=(o+1)%t),c-r<e)return;let d=u&&c-u;return d?Math.round(1e3*p/d):void 0}}(50,250);return function(t,e){let n,i,r=0,s=1e3/e,o=(e,s=Date.now())=>{r=s,n=null,i&&(clearTimeout(i),i=null),t.apply(null,e)};return[(...t)=>{let e=Date.now(),a=e-r;a>=s?o(t,e):(n=t,i||(i=setTimeout(()=>{i=null,o(n)},s-a)))},()=>n&&o(n)]}(n=>{let s=n.loaded,o=n.lengthComputable?n.total:void 0,a=s-i,c=r(a);i=s,t({loaded:s,total:o,progress:o?s/o:void 0,bytes:a,rate:c||void 0,estimated:c&&o&&s<=o?(o-s)/c:void 0,event:n,lengthComputable:null!=o,[e?"download":"upload"]:!0})},n)},nr=(t,e)=>{let n=null!=t;return[i=>e[0]({lengthComputable:n,total:t,loaded:i}),e[1]]},ns=t=>(...e)=>ek.asap(()=>t(...e)),no=e0.hasStandardBrowserEnv?(c=new URL(e0.origin),u=e0.navigator&&/(msie|trident)/i.test(e0.navigator.userAgent),t=>(t=new URL(t,e0.origin),c.protocol===t.protocol&&c.host===t.host&&(u||c.port===t.port))):()=>!0,na=e0.hasStandardBrowserEnv?{write(t,e,n,i,r,s){let o=[t+"="+encodeURIComponent(e)];ek.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),ek.isString(i)&&o.push("path="+i),ek.isString(r)&&o.push("domain="+r),!0===s&&o.push("secure"),document.cookie=o.join("; ")},read(t){let e=document.cookie.match(RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function nc(t,e,n){let i=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);return t&&(i||0==n)?e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t:e}let nu=t=>t instanceof e7?{...t}:t;function nh(t,e){e=e||{};let n={};function i(t,e,n,i){return ek.isPlainObject(t)&&ek.isPlainObject(e)?ek.merge.call({caseless:i},t,e):ek.isPlainObject(e)?ek.merge({},e):ek.isArray(e)?e.slice():e}function r(t,e,n,r){return ek.isUndefined(e)?ek.isUndefined(t)?void 0:i(void 0,t,0,r):i(t,e,0,r)}function s(t,e){if(!ek.isUndefined(e))return i(void 0,e)}function o(t,e){return ek.isUndefined(e)?ek.isUndefined(t)?void 0:i(void 0,t):i(void 0,e)}function a(n,r,s){return s in e?i(n,r):s in t?i(void 0,n):void 0}let c={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBo
1dyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(t,e,n)=>r(nu(t),nu(e),0,!0)};return ek.forEach(Object.keys(Object.assign({},t,e)),function(i){let s=c[i]||r,o=s(t[i],e[i],i);ek.isUndefined(o)&&s!==a||(n[i]=o)}),n}let np=t=>{let e=nh({},t),n,{data:i,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:o,headers:a,auth:c}=e;if(e.headers=a=e7.from(a),e.url=eQ(nc(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),ek.isFormData(i)){if(e0.hasStandardBrowserEnv||e0.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(!1!==(n=a.getContentType())){let[t,...e]=n?n.split(";").map(t=>t.trim()).filter(Boolean):[];a.setContentType([t||"multipart/form-data",...e].join("; "))}}if(e0.hasStandardBrowserEnv&&(r&&ek.isFunction(r)&&(r=r(e)),r||!1!==r&&no(e.url))){let t=s&&o&&na.read(o);t&&a.set(s,t)}return e},nd="undefined"!=typeof XMLHttpRequest&&function(t){return new Promise(function(e,n){let i=np(t),r=i.data,s=e7.from(i.headers).normalize(),o,a,c,u,h,{responseType:p,onUploadProgress:d,onDownloadProgress:l}=i;function f(){u&&u(),h&&h(),i.cancelToken&&i.cancelToken.unsubscribe(o),i.signal&&i.signal.removeEventListener("abort",o)}let m=new XMLHttpRequest;function v(){if(!m)return;let i=e7.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());nn(function(t){e(t),f()},function(t){n(t),f()},{data:p&&"text"!==p&&"json"!==p?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:i,config:t,request:m}),m=null}m.open(i.method.toUpperCase(),i.url,!0),m.timeout=i.timeout,"onloadend"in m?m.onloadend=v:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(v)},m.onabort=function(){m&&(n(new e_("Request aborted",e_.ECONNABORTED,t,m)),m=null)},m.onerror=function(){n(new e_("Network Error",e_.ERR_NETWORK,t,m)),m=null},m.ontimeout=function(){let e=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded",r=i.transitional||eH;i.timeoutErrorMessage&&(e=i.timeoutErrorMessage),n(new e_(e,r.clarifyTimeoutError?e_.ETIMEDOUT:e_.ECONNABORTED,t,m)),m=null},void 0===r&&s.setContentType(null),"setRequestHeader"in m&&ek.forEach(s.toJSON(),function(t,e){m.setRequestHeader(e,t)}),ek.isUndefined(i.withCredentials)||(m.withCredentials=!!i.withCredentials),p&&"json"!==p&&(m.responseType=i.responseType),l&&([c,h]=ni(l,!0),m.addEventListener("progress",c)),d&&m.upload&&([a,u]=ni(d),m.upload.addEventListener("progress",a),m.upload.addEventListener("loadend",u)),(i.cancelToken||i.signal)&&(o=e=>{m&&(n(!e||e.type?new ne(null,t,m):e),m.abort(),m=null)},i.cancelToken&&i.cancelToken.subscribe(o),i.signal&&(i.signal.aborted?o():i.signal.addEventListener("abort",o))
1);let g=function(t){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(i.url);g&&-1===e0.protocols.indexOf(g)?n(new e_("Unsupported protocol "+g+":",e_.ERR_BAD_REQUEST,t)):m.send(r||null)})},nl=(t,e)=>{let{length:n}=t=t?t.filter(Boolean):[];if(e||n){let n,i=new AbortController,r=function(t){if(!n){n=!0,o();let e=t instanceof Error?t:this.reason;i.abort(e instanceof e_?e:new ne(e instanceof Error?e.message:e))}},s=e&&setTimeout(()=>{s=null,r(new e_(`timeout ${e} of ms exceeded`,e_.ETIMEDOUT))},e),o=()=>{t&&(s&&clearTimeout(s),s=null,t.forEach(t=>{t.unsubscribe?t.unsubscribe(r):t.removeEventListener("abort",r)}),t=null)};t.forEach(t=>t.addEventListener("abort",r));let{signal:a}=i;return a.unsubscribe=()=>ek.asap(o),a}},nf=function*(t,e){let n=t.byteLength;if(!e||n<e)return void(yield t);let i,r=0;for(;r<n;)i=r+e,yield t.slice(r,i),r=i},nm=(t,e,n,i)=>{let r=async function*(t,e){for await(let n of async function*(t){if(t[Symbol.asyncIterator])return void(yield*t);let e=t.getReader();try{for(;;){let{done:t,value:n}=await e.read();if(t)break;yield n}}finally{await e.cancel()}}(t))yield*nf(n,e)}(t,e),s,o=0,a=t=>{s||(s=!0,i&&i(t))};return new ReadableStream({async pull(t){try{let{done:e,value:i}=await r.next();if(e)return a(),void t.close();let s=i.byteLength;if(n){let t=o+=s;n(t)}t.enqueue(new Uint8Array(i))}catch(t){throw a(t),t}},cancel:t=>(a(t),r.return())},{highWaterMark:2})},nv="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,ng=nv&&"function"==typeof ReadableStream,nw=nv&&("function"==typeof TextEncoder?(D=new TextEncoder,t=>D.encode(t)):async t=>new Uint8Array(await new Response(t).arrayBuffer())),ny=(t,...e)=>{try{return!!t(...e)}catch(t){return!1}},nb=ng&&ny(()=>{let t=!1,e=new Request(e0.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),nS=ng&&ny(()=>ek.isReadableStream(new Response("").body)),nC={stream:nS&&(t=>t.body)};nv&&(k=new Response,["text","arrayBuffer","blob","formData","stream"].forEach(t=>{nC[t]||(nC[t]=ek.isFunction(k[t])?e=>e[t]():(e,n)=>{throw new e_(`Response type '${t}' is not supported`,e_.ERR_NOT_SUPPORT,n)})}));let nA={http:null,xhr:nd,fetch:nv&&(async t=>{let e,{url:n,method:i,data:r,signal:s,cancelToken:o,timeout:a,onDownloadProgress:c,onUploadProgress:u,responseType:h,headers:p,withCredentials:d="same-origin",fetchOptions:l}=np(t);h=h?(h+"").toLowerCase():"text";let f,m=nl([s,o&&o.toAbortSignal()],a),v=m&&m.unsubscribe&&(()=>{m.unsubscribe()});try{if(u&&nb&&"get"!==i&&"head"!==i&&0!==(e=await (async(t,e)=>{let n=ek.toFiniteNumber(t.getContentLength());return null==n?(async t=>{if(null==t)return 0;if(ek.isBlob(t))return t.size;if(ek.isSpecCompliantForm(t)){let e=new Request(e0.origin,{method:"POST",body:t});return(await e.arrayBuffer()).byteLength}return ek.isArrayBufferView(t)||ek.isArrayBuffer(t)?t.byteLength:(ek.isURLSearchParams(t)&&(t+=""),ek.isString(t)?(await nw(t)).byteLength:void 0)})(e):n})(p,r))){let t,i=new Request(n,{method:"POST",body:r,duplex:"half"});if(ek.isFormData(r)&&(t=i.headers.get("content-type"))&&p.setContentType(t),i.body){let[t,n]=nr(e,ni(ns(u)));r=nm(i.body,65536,t,n)}}ek.isString(d)||(d=d?"include":"omit");let s="credentials"in Request.prototype;f=new Request(n,{...l,signal:m,method:i.toUpperCase(),headers:p.normalize().toJSON(),body:r,duplex:"half",credentials:s?d:void 0});let o=await fetch(f),a=nS&&("stream"===h||"response"===h);if(nS&&(c||a&&v)){let t={};["status","statusText","headers"].forEach(e=>{t[e]=o[e]});let e=ek.toFiniteNumber(o.headers.get("content-length")),[n,i]=c&&nr(e,ni(ns(c),!0))||[];o=new Response(nm(o.body,65536,n,()=>{i&&i(),v&&v()}),t)}h=h||"text";let g=await nC[ek.findKey(nC,h)||"text"](o,t);return!a&&v&&v(),await new Promise((e,n)=>{nn(e,n,{data:g,headers:e7.from(o.headers),status:o.status,statusText:o.statusText,config:t,request:f})})}catch(e){if(v&&v(),e&&"TypeError"===e.name&&/Load failed|fetch/i.test(e.message))throw Object.assign(new e_("Network Error",e_.ERR_NETWORK,t,f),{cause:e.cause||e});throw e_.from(e,e&&e.code,t,f)}})};
1ek.forEach(nA,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}});let nE=t=>`- ${t}`,nP=t=>ek.isFunction(t)||null===t||!1===t,nT=t=>{let e,n;let{length:i}=t=ek.isArray(t)?t:[t],r={};for(let s=0;s<i;s++){let i;if(n=e=t[s],!nP(e)&&void 0===(n=nA[(i=String(e)).toLowerCase()]))throw new e_(`Unknown adapter '${i}'`);if(n)break;r[i||"#"+s]=n}if(!n){let t=Object.entries(r).map(([t,e])=>`adapter ${t} `+(!1===e?"is not supported by the environment":"is not available in the build"));throw new e_("There is no suitable adapter to dispatch the request "+(i?t.length>1?"since :\n"+t.map(nE).join("\n"):" "+nE(t[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return n};function nL(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new ne(null,t)}function nO(t){return nL(t),t.headers=e7.from(t.headers),t.data=e9.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1),nT(t.adapter||e2.adapter)(t).then(function(e){return nL(t),e.data=e9.call(t,t.transformResponse,e),e.headers=e7.from(e.headers),e},function(e){return nt(e)||(nL(t),e&&e.response&&(e.response.data=e9.call(t,t.transformResponse,e.response),e.response.headers=e7.from(e.response.headers))),Promise.reject(e)})}let nI={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{nI[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});let nR={};nI.transitional=function(t,e,n){function i(t,e){return"[Axios v1.9.0] Transitional option '"+t+"'"+e+(n?". "+n:"")}return(n,r,s)=>{if(!1===t)throw new e_(i(r," has been removed"+(e?" in "+e:"")),e_.ERR_DEPRECATED);return e&&!nR[r]&&(nR[r]=!0,console.warn(i(r," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,r,s)}},nI.spelling=function(t){return(e,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};let nD={assertOptions:function(t,e,n){if("object"!=typeof t)throw new e_("options must be an object",e_.ERR_BAD_OPTION_VALUE);let i=Object.keys(t),r=i.length;for(;r-- >0;){let s=i[r],o=e[s];if(o){let e=t[s],n=void 0===e||o(e,s,t);if(!0!==n)throw new e_("option "+s+" must be "+n,e_.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new e_("Unknown option "+s,e_.ERR_BAD_OPTION)}},validators:nI},nk=nD.validators;class n_{constructor(t){this.defaults=t||{},this.interceptors={request:new eW,response:new eW}}async request(t,e){try{return await this._request(t,e)}catch(t){if(t instanceof Error){let e={};Error.captureStackTrace?Error.captureStackTrace(e):e=Error();let n=e.stack?e.stack.replace(/^.+\n/,""):"";try{t.stack?n&&!String(t.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(t.stack+="\n"+n):t.stack=n}catch(t){}}throw t}}_request(t,e){let n;"string"==typeof t?(e=e||{}).url=t:e=t||{};let{transitional:i,paramsSerializer:r,headers:s}=e=nh(this.defaults,e);void 0!==i&&nD.assertOptions(i,{silentJSONParsing:nk.transitional(nk.boolean),forcedJSONParsing:nk.transitional(nk.boolean),clarifyTimeoutError:nk.transitional(nk.boolean)},!1),null!=r&&(ek.isFunction(r)?e.paramsSerializer={serialize:r}:nD.assertOptions(r,{encode:nk.function,serialize:nk.function},!0)),void 0!==e.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),nD.assertOptions(e,{baseUrl:nk.spelling("baseURL"),withXsrfToken:nk.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let o=s&&ek.merge(s.common,s[e.method]);s&&ek.forEach(["delete","get","head","post","put","patch","common"],t=>{delete s[t]}),e.headers=e7.concat(o,s);let a=[],c=!0;this.interceptors.request.forEach(function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(c=c&&t.synchronous,a.unshift(t.fulfilled,t.rejected))});let u=[];this.interceptors.response.forEach(function(t){u.push(t.fulfilled,t.rejected)});let h,p=0;if(!c){let t=[nO.bind(this),void 0];for(t.unshift.apply(t,a),t.push.apply(t,u),h=t.length,n=Promise.resolve(e);p<h;)n=n.then(t[p++],t[p++]);return n}h=a.length;let d=e;for(p=0;p<h;){let t=a[p++],e=a[p++];try{d=t(d)}catch(t){e.call(this,t);break}}try{n=nO.call(this,d)}catch(t){return Promise.reject(t)}for(p=0,h=u.length;p<h;)n=n.then(u[p++],u[p++]);return n}getUri(t){return eQ(nc((t=nh(this.defaults,t)).baseURL,t.url,t.allowAbsoluteUrls),t.params,t.paramsSerializer)}}
1ek.forEach(["delete","get","head","options"],function(t){n_.prototype[t]=function(e,n){return this.request(nh(n||{},{method:t,url:e,data:(n||{}).data}))}}),ek.forEach(["post","put","patch"],function(t){function e(e){return function(n,i,r){return this.request(nh(r||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}n_.prototype[t]=e(),n_.prototype[t+"Form"]=e(!0)});class nx{constructor(t){let e;if("function"!=typeof t)throw TypeError("executor must be a function.");this.promise=new Promise(function(t){e=t});let n=this;this.promise.then(t=>{if(!n._listeners)return;let e=n._listeners.length;for(;e-- >0;)n._listeners[e](t);n._listeners=null}),this.promise.then=t=>{let e;let i=new Promise(t=>{n.subscribe(t),e=t}).then(t);return i.cancel=function(){n.unsubscribe(e)},i},t(function(t,i,r){n.reason||(n.reason=new ne(t,i,r),e(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;let e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}toAbortSignal(){let t=new AbortController,e=e=>{t.abort(e)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let t;return{token:new nx(function(e){t=e}),cancel:t}}}let nG={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,Parti
1alContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(nG).forEach(([t,e])=>{nG[e]=t});let nN=function t(e){let n=new n_(e),i=t5(n_.prototype.request,n);return ek.extend(i,n_.prototype,n,{allOwnKeys:!0}),ek.extend(i,n,null,{allOwnKeys:!0}),i.create=function(n){return t(nh(e,n))},i}(e2);nN.Axios=n_,nN.CanceledError=ne,nN.CancelToken=nx,nN.isCancel=nt,nN.VERSION="1.9.0",nN.toFormData=eq,nN.AxiosError=e_,nN.Cancel=nN.CanceledError,nN.all=function(t){return Promise.all(t)},nN.spread=function(t){return function(e){return t.apply(null,e)}},nN.isAxiosError=function(t){return ek.isObject(t)&&!0===t.isAxiosError},nN.mergeConfig=nh,nN.AxiosHeaders=e7,nN.formToJSON=t=>e1(ek.isHTMLForm(t)?new FormData(t):t),nN.getAdapter=nT,nN.HttpStatusCode=nG,nN.default=nN;var nU=function(t,e){return(nU=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},nF=function(){return(nF=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function nj(t,e,n,i){return new(n||(n=Promise))(function(r,s){function o(t){try{c(i.next(t))}catch(t){s(t)}}function a(t){try{c(i.throw(t))}catch(t){s(t)}}function c(t){t.done?r(t.value):new n(function(e){e(t.value)}).then(o,a)}c((i=i.apply(t,e||[])).next())})}function nq(t,e){var n,i,r,s,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(r=2&s[0]?i.return:s[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,s[1])).done)return r;switch(i=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,i=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((r=(r=o.trys).length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){o.label=s[1];break}if(6===s[0]&&o.label<r[1]){o.label=r[1],r=s;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(s);break}r[2]&&o.ops.pop(),o.trys.pop();continue}s=e.call(t,o)}catch(t){s=[6,t],i=0}finally{n=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}}var nV=new(function(){function t(){this.defaultConfig={baseApiUrl:"https://api.ordercloud.io",apiVersion:"v1",timeoutInMilliseconds:6e4,clientID:null,cookieOptions:{samesite:"lax",secure:!1,domain:null,prefix:"ordercloud",path:"/"}},this.config=JSON.parse(JSON.stringify(this.defaultConfig)),this.Set=this.Set.bind(this),this.Get=this.Get.bind(this)}return t.prototype.Set=function(t){this.config=nF(nF(nF({},this.defaultConfig),this.config),t||{}),this.config.cookieOptions=nF(nF(nF({},this.defaultConfig.cookieOptions),this.config.cookieOptions),(null==t?void 0:t.cookieOptions)||{})},t.prototype.Get=function(){return this.config},t}()),nB=function(t){function e(e){var n=this,i=function(t){var e;try{var n=null===(e=null==t?void 0:t.response)||void 0===e?void 0:e.data;return n?"object"==typeof n?n.Errors:"string"==typeof n?(n&&65279===n.charCodeAt(0)&&(n=n.substring(1)),JSON.parse(n).Errors):n:[]}catch(t){return[]}}(e),r=null==i?void 0:i[0];return(n=t.call(this,r?"NotFound"===r.ErrorCode?"".concat(r.Data.ObjectType," ").concat(r.Data.ObjectID," not found"):r.Message:e.response.statusText)||this).isOrderCloudError=!0,n.errors=i,n.name="OrderCloudError",n.errorCode=r?r.ErrorCode:"OrderCloudError",n.status=e.response.status,n.statusText=e.response.statusText,n.response=e.response,n.request=e.request,n}return function(t,e){function n(){this.constructor=t}nU(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),e}(Error),nM=new(function(){function t(){}return t.prototype.write=function(t,e,n){void 0===e&&(e=void 0),document.cookie=this.buildCookieString(t,e,n)},t.prototype.read=function(t){for(var e=0,n=document.cookie.split(";");e<n.length;e++){var i=n[e].split("="),r=i[0],s=i[1];if(decodeURIComponent(r.trim().toLowerCase())===t.toLowerCase())return decodeURIComponent(s)}return""},t.prototype.buildCookieString=function(t,e,n){void 0===e&&(e=void 0),e?(i=new Date).setFullYear(i.getFullYear()+1):(i=new Date("Thu, 01 Jan 1970 00:00:00 GMT"),e="");var i,r=encodeURIComponent(t)+"="+encodeURIComponent(e),s=(r+=(n.domain?";domain="+n.domain:"")+(i?";expires="+i.toUTCString():"")+(n.secure?";secure":"")+(n.samesite?";samesite="+n.samesite:"")+(n.path?";path="+n.path:"")).length+1;return s>4096&&console.warn("Cookie ".concat(t," possibly not set or overflowed because it was too large! (").concat(s," > 4096 bytes)")),r},t}()),nK=new(function(){function t(){this.get=this.get.bind(this),this.set=this.set.bind(this),this.remove=this.remove.bind(this)}return t.prototype.get=function(t){var e=nV.Get().cookieOptions.prefix+t;return nM.read(e)},t.prototype.set=function(t,e){var n=nV.Get(),i=n.cookieOptions.prefix+t;nM.write(i,e,n.cookieOptions)},t.prototype.remove=function(t){var e=nV.Get(),n=e.cookieOptions.prefix+t;nM.write(n,void 0,e.cookieOptions)},t}());function nQ(t){try{var e=t.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),n=decodeURIComponent(("undefined"!=typeof atob?atob(e):s.from(e,"base64").toString("binary")).split("").map(function(t){return"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(n)}catch(t){throw Error("Invalid token")}}var nW={serialize:function(t){var e=JSON.parse(JSON.stringify(t)),n=[];if(e.filters){var i=function(t){var e={};for(var n in t)(function t(e,n,i){if("[object Object]"===Object.prototype.toString.call(e))for(var r in e)t(e[r],"".concat(n,".").concat(r),i);else{if(null===e)throw Error('Null is not a valid filter prop. Use negative filter "!" combined with wildcard filter "*" to define a filter for the absence of a value. \nex: an order list call with { xp: { hasPaid: \'!*\' } } would return a list of orders where xp.hasPaid is null or undefined\nhttps://
1ordercloud.io/features/advanced-querying#filtering');i[n]=e}})(t[n],n,e);return e}(e.filters),r=function(t){var e=i[t];Array.isArray(e)?e.forEach(function(e){return n.push("".concat(t,"=").concat(encodeURIComponent(e)))}):("boolean"==typeof e||0===e||e)&&n.push("".concat(t,"=").concat(encodeURIComponent(e)))};for(var s in i)r(s);delete e.filters}for(var s in e){var o=e[s];o&&n.push("".concat(s,"=").concat(encodeURIComponent(o)))}return n.length?"".concat(n.join("&")):""}},nH=new(function(){function t(){if(void 0===nN)throw Error("Ordercloud is missing required peer dependency axios. This must be installed and loaded before the OrderCloud SDK");this.Anonymous=this.Anonymous.bind(this),this.ClientCredentials=this.ClientCredentials.bind(this),this.ElevatedLogin=this.ElevatedLogin.bind(this),this.Login=this.Login.bind(this),this.RefreshToken=this.RefreshToken.bind(this)}return t.prototype.Login=function(t,e,n,i,r,s){return void 0===s&&(s={}),nj(this,void 0,void 0,function(){var o,a,c;return nq(this,function(u){switch(u.label){case 0:if(i&&!Array.isArray(i))throw Error("scope must be a string array");if(null!=r&&!Array.isArray(r))throw Error("custom roles must be defined as a string array");return(null==i?void 0:i.length)&&!(null==r?void 0:r.length)?o=i.join(" "):!(null==i?void 0:i.length)&&(null==r?void 0:r.length)?o+=" ".concat(r.join(" ")):(null==i?void 0:i.length)&&(null==r?void 0:r.length)&&(o="".concat(i.join(" ")," ").concat(r.join(" "))),a={grant_type:"password",username:t,password:e,client_id:n,scope:o},c=nV.Get(),[4,nN.post("".concat(c.baseApiUrl,"/oauth/token"),nW.serialize(a),nF({headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},adapter:c.axiosAdapter},s)).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,u.sent().data]}})})},t.prototype.ElevatedLogin=function(t,e,n,i,r,s,o){return void 0===o&&(o={}),nj(this,void 0,void 0,function(){var a,c,u;return nq(this,function(h){switch(h.label){case 0:if(r&&!Array.isArray(r))throw Error("scope must be a string array");if(null!=s&&!Array.isArray(s))throw Error("custom roles must be defined as a string array");return(null==r?void 0:r.length)&&!(null==s?void 0:s.length)?a=r.join(" "):!(null==r?void 0:r.length)&&(null==s?void 0:s.length)?a+=" ".concat(s.join(" ")):(null==r?void 0:r.length)&&(null==s?void 0:s.length)&&(a="".concat(r.join(" ")," ").concat(s.join(" "))),c={grant_type:"password",scope:a,client_id:i,username:e,password:n,client_secret:t},u=nV.Get(),[4,nN.post("".concat(u.baseApiUrl,"/oauth/token"),nW.serialize(c),nF({headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},adapter:u.axiosAdapter},o)).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,h.sent().data]}})})},t.prototype.ClientCredentials=function(t,e,n,i,r){return void 0===r&&(r={}),nj(this,void 0,void 0,function(){var s,o,a;return nq(this,function(c){switch(c.label){case 0:if(n&&!Array.isArray(n))throw Error("scope must be a string array");if(null!=i&&!Array.isArray(i))throw Error("custom roles must be defined as a string array");return(null==n?void 0:n.length)&&!(null==i?void 0:i.length)?s=n.join(" "):!(null==n?void 0:n.length)&&(null==i?void 0:i.length)?s+=" ".concat(i.join(" ")):(null==n?void 0:n.length)&&(null==i?void 0:i.length)&&(s="".concat(n.join(" ")," ").concat(i.join(" "))),o={grant_type:"client_credentials",scope:s,client_id:e,client_secret:t},a=nV.Get(),[4,nN.post("".concat(a.baseApiUrl,"/oauth/token"),nW.serialize(o),nF({headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},adapter:a.axiosAdapter},r)).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,c.sent().data]}})})},t.prototype.RefreshToken=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i,r;return nq(this,function(s){switch(s.label){case 0:return i={grant_type:"refresh_token",client_id:e,refresh_token:t},r=nV.Get(),[4,nN.post("".concat(r.baseApiUrl,"/oauth/token"),nW.serialize(i),nF({headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},adapter:r.axiosAdapter},n)).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent().data]}})})},t.prototype.Anonymous=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r,s,o;return nq(this,function(a){switch(a.label){case 0:if(e&&!Array.isArray(e))throw Error("scope must be a string array");if(null!=n&&!Array.isArray(n))throw Error("custom roles must be defined as a string array");return(null==e?void 0:e.length)&&!(null==n?void 0:n.length)?r=e.join(" "):!(null==e?void 0:e.length)&&(null==n?void 0:n.length)?r+=" ".concat(n.join(" ")):(null==e?void 0:e.length)&&(null==n?void 0:n.length)&&(r="".concat(e.join(" ")," ").concat(n.join(" "))),s={grant_type:"client_credentials",client_id:t,scope:r},i.anonuserid&&(s.anonuserid=i.anonuserid,delete i.anonuserid),o=nV.Get(),[4,nN.post("".concat(o.baseApiUrl,"/oauth/token"),nW.serialize(s),nF({headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},adapter:o.axiosAdapter},i)).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,a.sent().data]}})})},t}()),n$=Function("try {return this===global;}catch(e){return false;}"),nJ=new(function(){function t(){this.accessTokenCookieName=".access-token",this.impersonationTokenCookieName=".impersonation-token",this.refreshTokenCookieName=".refresh-token",this.identityTokenCookieName=".identity-token",this.accessToken=null,this.impersonationToken=null,this.refreshToken=null,this.identityToken=null,this.GetAccessToken=this.GetAccessToken.bind(this),this.GetImpersonationToken=this.GetImpersonationToken.bind(this),this.GetRefreshToken=this.GetRefreshToken.bind(this),this.RemoveAccessToken=this.RemoveAccessToken.bind(this),this.RemoveImpersonationToken=this.RemoveImpersonationToken.bind(this),this.SetA
1ccessToken=this.SetAccessToken.bind(this),this.RemoveRefreshToken=this.RemoveRefreshToken.bind(this),this.SetImpersonationToken=this.SetImpersonationToken.bind(this),this.SetRefreshToken=this.SetRefreshToken.bind(this),this.RemoveIdentityToken=this.RemoveIdentityToken.bind(this),this.GetIdentityToken=this.GetIdentityToken.bind(this),this.SetIdentityToken=this.SetIdentityToken.bind(this),this._isTokenExpired=this._isTokenExpired.bind(this),this._tryRefreshToken=this._tryRefreshToken.bind(this)}return t.prototype.GetAccessToken=function(){return n$()?this.accessToken:nK.get(this.accessTokenCookieName)},t.prototype.SetAccessToken=function(t){nQ(t),n$()?this.accessToken=t:nK.set(this.accessTokenCookieName,t)},t.prototype.RemoveAccessToken=function(){n$()?this.accessToken="":nK.remove(this.accessTokenCookieName)},t.prototype.GetImpersonationToken=function(){return n$()?this.impersonationToken:nK.get(this.impersonationTokenCookieName)},t.prototype.SetImpersonationToken=function(t){nQ(t),n$()?this.impersonationToken=t:nK.set(this.impersonationTokenCookieName,t)},t.prototype.RemoveImpersonationToken=function(){n$()?this.impersonationToken=null:nK.remove(this.impersonationTokenCookieName)},t.prototype.GetRefreshToken=function(){return n$()?this.refreshToken:nK.get(this.refreshTokenCookieName)},t.prototype.SetRefreshToken=function(t){n$()?this.refreshToken=t:nK.set(this.refreshTokenCookieName,t)},t.prototype.RemoveRefreshToken=function(){n$()?this.refreshToken=null:nK.remove(this.refreshTokenCookieName)},t.prototype.GetIdentityToken=function(){return n$()?this.identityToken:nK.get(this.identityTokenCookieName)},t.prototype.SetIdentityToken=function(t){n$()?this.identityToken=t:nK.set(this.identityTokenCookieName,t)},t.prototype.RemoveIdentityToken=function(){n$()?this.identityToken=null:nK.remove(this.identityTokenCookieName)},t.prototype.GetValidToken=function(t){return nj(this,void 0,void 0,function(){var e;return nq(this,function(n){switch(n.label){case 0:return e=t||this.GetAccessToken(),this._isTokenExpired(e)?[4,this._tryRefreshToken(e)]:[3,2];case 1:e=n.sent(),n.label=2;case 2:return[2,Promise.resolve(e||"")]}})})},t.prototype._isTokenExpired=function(t){if(!t)return!0;var e=nQ(t),n=Date.now()/1e3-10;return e.exp<n},t.prototype._tryRefreshToken=function(t){return nj(this,void 0,void 0,function(){var e,n,i,r;return nq(this,function(s){switch(s.label){case 0:if(!(e=this.GetRefreshToken())||(n=nV.Get(),!t&&!n.clientID))return[2,t||""];if(t&&(i=nQ(t).cid),n.clientID&&(i=n.clientID),!i)return[2,""];if(!i)return[3,4];s.label=1;case 1:return s.trys.push([1,3,,4]),[4,nH.RefreshToken(e,i)];
1case 2:return r=s.sent().access_token,this.SetAccessToken(r),[2,r];case 3:return s.sent(),[2,""];case 4:return[2]}})})},t}()),nz=new(function(){function t(){var t=this;if(this.get=function(e,n){return nj(t,void 0,void 0,function(){return nq(this,function(t){switch(t.label){case 0:return[4,this.makeApiCall("get",e,n)];case 1:return[2,t.sent()]}})})},this.post=function(e,n){return nj(t,void 0,void 0,function(){return nq(this,function(t){switch(t.label){case 0:return[4,this.makeApiCall("post",e,n)];case 1:return[2,t.sent()]}})})},this.put=function(e,n){return nj(t,void 0,void 0,function(){return nq(this,function(t){switch(t.label){case 0:return[4,this.makeApiCall("put",e,n)];case 1:return[2,t.sent()]}})})},this.patch=function(e,n){return nj(t,void 0,void 0,function(){return nq(this,function(t){switch(t.label){case 0:return[4,this.makeApiCall("patch",e,n)];case 1:return[2,t.sent()]}})})},this.delete=function(e,n){return nj(t,void 0,void 0,function(){return nq(this,function(t){switch(t.label){case 0:return[4,this.makeApiCall("delete",e,n)];case 1:return[2,t.sent()]}})})},void 0===nN)throw Error("Missing required peer dependency axios. This must be installed and loaded before the OrderCloud SDK");this.get=this.get.bind(this),this.put=this.put.bind(this),this.post=this.post.bind(this),this.patch=this.patch.bind(this),this.delete=this.delete.bind(this),this._resolveToken=this._resolveToken.bind(this),this._buildRequestConfig=this._buildRequestConfig.bind(this),this._addTokenToConfig=this._addTokenToConfig.bind(this)}return t.prototype.makeApiCall=function(t,e,n){return nj(this,void 0,void 0,function(){var i,r,s;return nq(this,function(o){switch(o.label){case 0:return[4,this._buildRequestConfig(n)];case 1:return i=o.sent(),r=e.includes("oauth/")?"".concat(nV.Get().baseApiUrl,"/").concat(e):"".concat(nV.Get().baseApiUrl,"/").concat(nV.Get().apiVersion).concat(e),"put"!==t&&"post"!==t&&"patch"!==t?[3,3]:(s=i.data,delete i.data,[4,nN[t](r,s,i)]);case 2:case 4:return[2,o.sent().data];case 3:return[4,nN[t](r,i)]}})})},t.prototype._addTokenToConfig=function(t){return nj(this,void 0,void 0,function(){var e,n;return nq(this,function(i){switch(i.label){case 0:return e=this._resolveToken(t),[4,nJ.GetValidToken(e)];case 1:return n=i.sent(),t.headers||(t.headers={}),t.headers.Authorization="Bearer ".concat(n),[2,t]}})})},t.prototype._resolveToken=function(t){var e;return e=t.accessToken?t.accessToken:t.impersonating?nJ.GetImpersonationToken():nJ.GetAccessToken(),delete t.accessToken,delete t.impersonating,e},t.prototype._buildRequestConfig=function(t){var e=nV.Get(),n=nF(nF({},t),{paramsSerializer:nW,adapter:e.axiosAdapter,timeout:e.timeoutInMilliseconds,headers:{"Content-Type":"application/json"}});return this._addTokenToConfig(n)},t}());new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this),this.DeleteAssignment=this.DeleteAssignment.bind(this),this.ListAssignments=this.ListAssignments.bind(this),this.SaveAssignment=this.SaveAssignment.bind(this)}return t.prototype.List=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/securityprofiles",nF(nF({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.post("/securityprofiles",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/securityprofiles/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.put("/securityprofiles/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.delete("/securityprofiles/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.patch("/securityprofiles/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.DeleteAssignment=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.delete("/securityprofiles/".concat(t,"/assignments"),nF(nF({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListAssignments=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/securityprofiles/assignments",nF(nF({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SaveAssignment=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.post("/securityprofiles/assignments",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.SendVerificationCode=this.SendVerificationCode.bind(this),this.ResetPasswordByVerificationCode=this.ResetPasswordByVerificationCode.bind(this)}return t.prototype.SendVerificationCode=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.post("/password/reset",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.ResetPasswordByVerificationCode=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.put("/password/reset/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this)}return t.prototype.List=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/impersonationconfig",nF(nF({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.post("/impersonationconfig",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/impersonationconfig/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.put("/impersonationconfig/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.delete("/impersonationconfig/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.patch("/impersonationconfig/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.GetPublicKey=this.GetPublicKey.bind(this)}return t.prototype.GetPublicKey=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("oauth/certs/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this)}return t.prototype.List=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/openidconnects",nF(nF({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.post("/openidconnects",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/openidconnects/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.put("/openidconnects/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.delete("/openidconnects/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.patch("/openidconnects/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this)}return t.prototype.List=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/adminusers",nF(nF({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.post("/adminusers",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/adminusers/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.put("/adminusers/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.delete("/adminusers/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.patch("/adminusers/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this),this.DeleteUserAssignment=this.DeleteUserAssignment.bind(this),this.ListUserAssignments=this.ListUserAssignments.bind(this),this.SaveUserAssignment=this.SaveUserAssignment.bind(this)}return t.prototype.List=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonat
1ing=!1,[4,nz.get("/usergroups",nF(nF({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.post("/usergroups",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/usergroups/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.put("/usergroups/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.delete("/usergroups/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.patch("/usergroups/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.DeleteUserAssignment=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.delete("/usergroups/".concat(t,"/assignments/").concat(e),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListUserAssignments=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/usergroups/assignments",nF(nF({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SaveUserAssignment=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.post("/usergroups/assignments",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this)}return t.prototype.List=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/addresses",nF(nF({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.post("/addresses",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/addresses/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.put("/addresses/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.delete("/addresses/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.patch("/addresses/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this),this.ListAssignments=this.ListAssignments.bind(this),this.SaveAssignment=this.SaveAssignment.bind(this),this.DeleteBuyerAssignment=this.DeleteBuyerAssignment.bind(this),this.DeleteSupplierAssignment=this.DeleteSupplierAssignment.bind(this)}return t.prototype.List=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/apiclients",nF(nF({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.post("/apiclients",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/apiclients/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.put("/apiclients/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.delete("/apiclients/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.patch("/apiclients/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListAssignments=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/apiclients/assignments",nF(nF({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SaveAssignment=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.post("/apiclients/assignments",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.DeleteBuyerAssignment=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.delete("/buyers/".concat(e,"/ApiClients/Assignments/").concat(t),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.DeleteSupplierAssignment=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.delete("/suppliers/".concat(e,"/ApiClients/Assignments/").concat(t),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this)}return t.prototype.List=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/incrementors",nF(nF({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.post("/incrementors",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/incrementors/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.put("/incrementors/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.delete("/incrementors/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.patch("/incrementors/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this),this.DeleteAssignment=this.DeleteAssignment.bind(this),this.ListAssignments=this.ListAssignments.bind(this),this.SaveAssignment=this.SaveAssignment.bind(this)}return t.prototype.List=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/locales",nF(nF({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.post("/locales",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/locales/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.put("/locales/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.delete("/locales/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.patch("/locales/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.DeleteAssignment=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.delete("/locales/".concat(t,"/assignments"),nF(nF({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListAssignments=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/locales/assignments",nF(nF({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SaveAssignment=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.post("/locales/assignments",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Crea
1te.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this)}return t.prototype.List=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/webhooks",nF(nF({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.post("/webhooks",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/webhooks/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.put("/webhooks/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.delete("/webhooks/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.patch("/webhooks/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Put=this.Put.bind(this),this.Delete=this.Delete.bind(this)}return t.prototype.List=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/xpindices",nF(nF({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Put=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.put("/xpindices",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Delete=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.delete("/xpindices/".concat(t,"/").concat(e),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this),this.ListBuyerSellers=this.ListBuyerSellers.bind(this)}return t.prototype.List=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/buyers",nF(nF({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.post("/buyers",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/buyers/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.put("/buyers/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.delete("/buyers/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.patch("/buyers/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListBuyerSellers=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/buyers/".concat(t,"/sellers"),nF(nF({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this),this.GetAccessToken=this.GetAccessToken.bind(this),this.Move=this.Move.bind(this),this.ListAcrossBuyers=this.ListAcrossBuyers.bind(this)}return t.prototype.List=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/buyers/".concat(t,"/users"),nF(nF({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Create=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.post("/buyers/".concat(t,"/users"),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Get=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/buyers/".concat(t,"/users/").concat(e),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Save=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.put("/buyers/".concat(t,"/users/").concat(e),nF(nF({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Delete=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.delete("/buyers/".concat(t,"/users/").concat(e),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Patch=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.patch("/buyers/".concat(t,"/users/").concat(e),nF(nF({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.GetAccessToken=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.post("/buyers/".concat(t,"/users/").concat(e,"/accesstoken"),nF(nF({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Move=function(t,e,n,i,r){return void 0===i&&(i={}),void 0===r&&(r={}),nj(this,void 0,void 0,function(){var s;return nq(this,function(o){switch(o.label){case 0:return s=this.impersonating,this.impersonating=!1,[4,nz.post("/buyers/".concat(t,"/users/").concat(e,"/moveto/").concat(n),nF(nF({},r),{impersonating:s,params:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,o.sent()]}})})},t.prototype.ListAcrossBuyers=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/buyerusers",nF(nF({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this),this.DeleteUserAssignment=this.DeleteUserAssignment.bind(this),this.ListUserAssignments=this.ListUserAssignments.bind(this),this.SaveUserAssignment=this.SaveUserAssignment.bind(this)}return t.prototype.List=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/buyers/".concat(t,"/usergroups"),nF(nF({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Create=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.post("/buyers/".concat(t,"/usergroups"),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Get=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/buyers/".concat(t,"/usergroups/").concat(e),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Save=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.put("/buyers/".concat(t,"/usergroups/").concat(e),nF(nF({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Delete=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.delete("/buyers/".concat(t,"/usergroups/").concat(e),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Patch=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.patch("/buyers/".concat(t,"/usergroups/").concat(e),nF(nF({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.DeleteUserAssignment=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.delete("/buyers/".concat(t,"/usergroups/").concat(e,"/assignments/").concat(n),nF(nF({},i),{impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.ListUserAssignments=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/buyers/".concat(t,"/usergroups/assignments"),nF(nF({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.SaveUserAssignment=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.post("/buyers/".concat(t,"/usergroups/assignments"),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this),this.DeleteAssignment=this.DeleteAssignment.bind(this),this.ListAssignments=this.ListAssignments.bind(this),this.SaveAssignment=this.SaveAssignment.bind(this)}return t.prototype.List=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/buyers/".concat(t,"/addresses"),nF(nF({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Create=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.post("/buyers/".concat(t,"/addresses"),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Get=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/buyers/".concat(t,"/addresses/").concat(e),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Save=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.put("/buyers/".concat(t,"/addresses
1/").concat(e),nF(nF({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Delete=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.delete("/buyers/".concat(t,"/addresses/").concat(e),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Patch=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.patch("/buyers/".concat(t,"/addresses/").concat(e),nF(nF({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.DeleteAssignment=function(t,e,n,i){return void 0===n&&(n={}),void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.delete("/buyers/".concat(t,"/addresses/").concat(e,"/assignments"),nF(nF({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.ListAssignments=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/buyers/".concat(t,"/addresses/assignments"),nF(nF({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.SaveAssignment=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.post("/buyers/".concat(t,"/addresses/assignments"),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this),this.DeleteAssignment=this.DeleteAssignment.bind(this),this.ListAssignments=this.ListAssignments.bind(this),this.SaveAssignment=this.SaveAssignment.bind(this)}return t.prototype.List=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/buyers/".concat(t,"/costcenters"),nF(nF({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Create=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.post("/buyers/".concat(t,"/costcenters"),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Get=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/buyers/".concat(t,"/costcenters/").concat(e),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Save=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.put("/buyers/".concat(t,"/costcenters/").concat(e),nF(nF({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Delete=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.delete("/buyers/".concat(t,"/costcenters/").concat(e),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Patch=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.patch("/buyers/".concat(t,"/costcenters/").concat(e),nF(nF({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.DeleteAssignment=function(t,e,n,i){return void 0===n&&(n={}),void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.delete("/buyers/".concat(t,"/costcenters/").concat(e,"/assignments"),nF(nF({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.ListAssignments=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/buyers/".concat(t,"/costcenters/assignments"),nF(nF({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.SaveAssignment=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.post("/buyers/".concat(t,"/costcenters/assignments"),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this),this.DeleteAssignment=this.DeleteAssignment.bind(this),this.ListAssignments=this.ListAssignments.bind(this),this.SaveAssignment=this.SaveAssignment.bind(this)}return t.prototype.List=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/buyers/".concat(t,"/creditcards"),nF(nF({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Create=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.post("/buyers/".concat(t,"/creditcards"),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Get=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/buyers/".concat(t,"/creditcards/").concat(e),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Save=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.put("/buyers/".concat(t,"/creditcards/").concat(e),nF(nF({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Delete=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.delete("/buyers/".concat(t,"/creditcards/").concat(e),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Patch=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.patch("/buyers/".concat(t,"/creditcards/").concat(e),nF(nF({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.DeleteAssignment=function(t,e,n,i){return void 0===n&&(n={}),void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.delete("/buyers/".concat(t,"/creditcards/").concat(e,"/assignments"),nF(nF({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.ListAssignments=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/buyers/".concat(t,"/creditcards/assignments"),nF(nF({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.SaveAssignment=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.post("/buyers/".concat(t,"/creditcards/assignments"),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this),this.DeleteAssignment=this.DeleteAssignment.bind(this),this.ListAssignments=this.ListAssignments.bind(this),this.SaveAssignment=this.SaveAssignment.bind(this)}return t.prototype.List=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/buyers/".concat(t,"/spendingaccounts"),nF(nF({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Create=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.post("/buyers/".concat(t,"/spendingaccounts"),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Get=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/buyers/".concat(t,"/spendingaccounts/").concat(e),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Save=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.put("/buyers/".concat(t,"/spendingaccounts/").concat(e),nF(nF({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Delete=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.delete("/buyers/".concat(t,"/spendingaccounts/").concat(e),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Patch=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.patch("/buyers/".concat(t,"/spendingaccounts/").concat(e),nF(nF({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.DeleteAssignment=function(t,e,n,i){return void 0===n&&(n={}),void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.delete("/buyers/".concat(t,"/spendingaccounts/").concat(e,"/assignments"),nF(nF({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.ListAssignments=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/buyers/".concat(t,"/spendingaccounts/assignments"),nF(nF({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.SaveAssignment=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.post("/buyers/".concat(t,"/spendingaccounts/assignments"),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this)}return t.prototype.List=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/buyers/".concat(t,"/approvalrules"),nF(nF({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Create=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.post("/buyers/".concat(t,"/approvalrules"),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Get=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/buyers/".concat(t,"/approvalrules/").concat(e),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Save=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.put("/buyers/".concat(t,"/approvalrules/").concat(e),nF(nF({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Delete=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,
1[4,nz.delete("/buyers/".concat(t,"/approvalrules/").concat(e),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Patch=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.patch("/buyers/".concat(t,"/approvalrules/").concat(e),nF(nF({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Get=this.Get.bind(this),this.ListEntries=this.ListEntries.bind(this)}return t.prototype.List=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/buyers/".concat(t,"/productcollections"),nF(nF({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Get=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/buyers/".concat(t,"/productcollections/").concat(e),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListEntries=function(t,e,n,i){return void 0===n&&(n={}),void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.get("/buyers/".concat(t,"/productcollections/").concat(e,"/products"),nF(nF({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this),this.ListBuyers=this.ListBuyers.bind(this),this.SaveBuyer=this.SaveBuyer.bind(this),this.DeleteBuyer=this.DeleteBuyer.bind(this)}return t.prototype.List=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/suppliers",nF(nF({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.post("/suppliers",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/suppliers/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.put("/suppliers/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.delete("/suppliers/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.patch("/suppliers/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListBuyers=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/suppliers/".concat(t,"/buyers"),nF(nF({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.SaveBuyer=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.put("/suppliers/".concat(t,"/buyers/").concat(e),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.DeleteBuyer=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.delete("/suppliers/".concat(t,"/buyers/").concat(e),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this)}return t.prototype.List=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/suppliers/".concat(t,"/users"),nF(nF({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Create=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.post("/suppliers/".concat(t,"/users"),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Get=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/suppliers/".concat(t,"/users/").concat(e),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Save=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.put("/suppliers/".concat(t,"/users/").concat(e),nF(nF({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Delete=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.delete("/suppliers/".concat(t,"/users/").concat(e),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Patch=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.patch("/suppliers/".concat(t,"/users/").concat(e),nF(nF({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this),this.DeleteUserAssignment=this.DeleteUserAssignment.bind(this),this.ListUserAssignments=this.ListUserAssignments.bind(this),this.SaveUserAssignment=this.SaveUserAssignment.bind(this)}return t.prototype.List=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/suppliers/".concat(t,"/usergroups"),nF(nF({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Create=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.post("/suppliers/".concat(t,"/usergroups"),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Get=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/suppliers/".concat(t,"/usergroups/").concat(e),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Save=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.put("/suppliers/".concat(t,"/usergroups/").concat(e),nF(nF({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Delete=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.delete("/suppliers/".concat(t,"/usergroups/").concat(e),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Patch=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.patch("/suppliers/".concat(t,"/usergroups/").concat(e),nF(nF({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.DeleteUserAssignment=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.delete("/suppliers/".concat(t,"/usergroups/").concat(e,"/assignments/").concat(n),nF(nF({},i),{impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.ListUserAssignments=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/suppliers/".concat(t,"/usergroups/assignments"),nF(nF({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.SaveUserAssignment=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.post("/suppliers/".concat(t,"/usergroups/assignments"),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this)}return t.prototype.List=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/suppliers/".concat(t,"/addresses"),nF(nF({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Create=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.post("/suppliers/".concat(t,"/addresses"),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Get=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/suppliers/".concat(t,"/addresses/").concat(e),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Save=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.put("/suppliers/".concat(t,"/addresses/").concat(e),nF(nF({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Delete=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.delete("/suppliers/".concat(t,"/addresses/").concat(e),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Patch=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.patch("/suppliers/".concat(t,"/addresses/").concat(e),nF(nF({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this),this.DeleteAssignment=this.DeleteAssignment.bind(this),this.DeleteBundleAssignment=this.DeleteBundleAssignment.bind(this),this.DeleteProductAssignment=this.DeleteProductAssignment.bind(this),this.ListAssignments=this.ListAssignments.bind(this),this.SaveAssignment=this.SaveAssignment.bind(this),this.ListBundleAssignments=this.ListBundleAssignments.bind(this),this.SaveBundleAssignment=this.SaveBundleAssignment.bind(this),this.ListProductAssignments=this.ListProductAssignments.bind(this),this.SaveProductAssignment=this.SaveProductAssignment.bind(this)}return t.prototype.List=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/catalogs",nF(nF({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=functio
1n(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.post("/catalogs",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/catalogs/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.put("/catalogs/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.delete("/catalogs/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.patch("/catalogs/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.DeleteAssignment=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.delete("/catalogs/".concat(t,"/assignments"),nF(nF({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.DeleteBundleAssignment=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.delete("/catalogs/".concat(t,"/bundleassignments/").concat(e),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.DeleteProductAssignment=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.delete("/catalogs/".concat(t,"/productassignments/").concat(e),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListAssignments=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/catalogs/assignments",nF(nF({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SaveAssignment=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.post("/catalogs/assignments",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.ListBundleAssignments=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/catalogs/bundleassignments",nF(nF({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SaveBundleAssignment=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.post("/catalogs/bundleassignments",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.ListProductAssignments=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/catalogs/productassignments",nF(nF({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SaveProductAssignment=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.post("/catalogs/productassignments",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this),this.DeleteAssignment=this.DeleteAssignment.bind(this),this.DeleteBundleAssignment=this.DeleteBundleAssignment.bind(this),this.DeleteProductAssignment=this.DeleteProductAssignment.bind(this),this.ListAssignments=this.ListAssignments.bind(this),this.SaveAssignment=this.SaveAssignment.bind(this),this.ListBundleAssignments=this.ListBundleAssignments.bind(this),this.SaveBundleAssignment=this.SaveBundleAssignment.bind(this),this.ListProductAssignments=this.ListProductAssignments.bind(this),this.SaveProductAssignment=this.SaveProductAssignment.bind(this)}return t.prototype.List=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/catalogs/".concat(t,"/categories"),nF(nF({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Create=function(t,e,n,i){return void 0===n&&(n={}),void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.post("/catalogs/".concat(t,"/categories"),nF(nF({},i),{data:e,impersonating:r,params:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Get=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/catalogs/".concat(t,"/categories/").concat(e),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Save=function(t,e,n,i,r){return void 0===i&&(i={}),void 0===r&&(r={}),nj(this,void 0,void 0,function(){var s;return nq(this,function(o){switch(o.label){case 0:return s=this.impersonating,this.impersonating=!1,[4,nz.put("/catalogs/".concat(t,"/categories/").concat(e),nF(nF({},r),{data:n,impersonating:s,params:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,o.sent()]}})})},t.prototype.Delete=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.delete("/catalogs/".concat(t,"/categories/").concat(e),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Patch=function(t,e,n,i,r){return void 0===i&&(i={}),void 0===r&&(r={}),nj(this,void 0,void 0,function(){var s;return nq(this,function(o){switch(o.label){case 0:return s=this.impersonating,this.impersonating=!1,[4,nz.patch("/catalogs/".concat(t,"/categories/").concat(e),nF(nF({},r),{data:n,impersonating:s,params:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,o.sent()]}})})},t.prototype.DeleteAssignment=function(t,e,n,i){return void 0===n&&(n={}),void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.delete("/catalogs/".concat(t,"/categories/").concat(e,"/assignments"),nF(nF({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.DeleteBundleAssignment=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.delete("/catalogs/".concat(t,"/categories/").concat(e,"/bundleassignments/").concat(n),nF(nF({},i),{impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.DeleteProductAssignment=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.delete("/catalogs/".concat(t,"/categories/").concat(e,"/productassignments/").concat(n),nF(nF({},i),{impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.ListAssignments=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/catalogs/".concat(t,"/categories/assignments"),nF(nF({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.SaveAssignment=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.post("/catalogs/".concat(t,"/categories/assignments"),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListBundleAssignments=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/catalogs/".concat(t,"/categories/bundleassignments"),nF(nF({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.SaveBundleAssignment=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.post("/catalogs/".concat(t,"/categories/bundleassignments"),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListProductAssignments=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/catalogs/".concat(t,"/categories/productassignments"),nF(nF({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.SaveProductAssignment=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.post("/catalogs/".concat(t,"/categories/productassignments"),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this),this.DeleteAssignment=this.DeleteAssignment.bind(this),this.ListSpecs=this.ListSpecs.bind(this),this.ListSuppliers=this.ListSuppliers.bind(this),this.SaveSupplier=this.SaveSupplier.bind(this),this.RemoveSupplier=this.RemoveSupplier.bind(this),this.ListVariants=this.ListVariants.bind(this),this.GetVariant=this.GetVariant.bind(this),this.SaveVariant=this.SaveVariant.bind(this),this.PatchVariant=this.PatchVariant.bind(this),this.GenerateVariants=this.GenerateVariants.bind(this),this.ListAssignments=this.ListAssignments.bind(this),this.SaveAssignment=this.SaveAssignment.bind(this)}return t.prototype.List=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/products",nF(nF({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.post("/products",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/products/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.put("/products/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.delete("/products/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.patch("/products/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.DeleteAssignment=function(t,e,n,i){return void 0===n&&(n={}),void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.delete("/products/".concat(t,"/assignments/").concat(e),nF(nF({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.ListSpecs=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/products/".concat(t,"/specs"),nF(nF({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListSuppliers=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nj(t
1his,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/products/".concat(t,"/suppliers"),nF(nF({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.SaveSupplier=function(t,e,n,i){return void 0===n&&(n={}),void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.put("/products/".concat(t,"/suppliers/").concat(e),nF(nF({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.RemoveSupplier=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.delete("/products/".concat(t,"/suppliers/").concat(e),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListVariants=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/products/".concat(t,"/variants"),nF(nF({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.GetVariant=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/products/".concat(t,"/variants/").concat(e),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.SaveVariant=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.put("/products/".concat(t,"/variants/").concat(e),nF(nF({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.PatchVariant=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.patch("/products/".concat(t,"/variants/").concat(e),nF(nF({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.GenerateVariants=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.post("/products/".concat(t,"/variants/generate"),nF(nF({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListAssignments=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/products/assignments",nF(nF({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SaveAssignment=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.post("/products/assignments",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this),this.SavePriceBreak=this.SavePriceBreak.bind(this),this.DeletePriceBreak=this.DeletePriceBreak.bind(this)}return t.prototype.List=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/priceschedules",nF(nF({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.post("/priceschedules",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/priceschedules/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.put("/priceschedules/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.delete("/priceschedules/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.patch("/priceschedules/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.SavePriceBreak=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.post("/priceschedules/".concat(t,"/PriceBreaks"),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.DeletePriceBreak=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.delete("/priceschedules/".concat(t,"/PriceBreaks"),nF(nF({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this),this.ListOptions=this.ListOptions.bind(this),this.CreateOption=this.CreateOption.bind(this),this.GetOption=this.GetOption.bind(this),this.SaveOption=this.SaveOption.bind(this),this.DeleteOption=this.DeleteOption.bind(this),this.PatchOption=this.PatchOption.bind(this),this.DeleteProductAssignment=this.DeleteProductAssignment.bind(this),this.ListProductAssignments=this.ListProductAssignments.bind(this),this.SaveProductAssignment=this.SaveProductAssignment.bind(this)}return t.prototype.List=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/specs",nF(nF({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.post("/specs",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/specs/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.put("/specs/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.delete("/specs/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.patch("/specs/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListOptions=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/specs/".concat(t,"/options"),nF(nF({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.CreateOption=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.post("/specs/".concat(t,"/options"),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.GetOption=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/specs/".concat(t,"/options/").concat(e),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.SaveOption=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.put("/specs/".concat(t,"/options/").concat(e),nF(nF({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.DeleteOption=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.delete("/specs/".concat(t,"/options/").concat(e),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.PatchOption=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.patch("/specs/".concat(t,"/options/").concat(e),nF(nF({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.DeleteProductAssignment=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.delete("/specs/".concat(t,"/productassignments/").concat(e),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListProductAssignments=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/specs/productassignments",nF(nF({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SaveProductAssignment=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.post("/specs/productassignments",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this)}return t.prototype.List=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/productfacets",nF(nF({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.post("/productfacets",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/productfacets/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.put("/productfacets/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.delete("/productfacets/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.patch("/productfacets/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Crea
1te=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this),this.DeleteAssignment=this.DeleteAssignment.bind(this),this.ListAssignments=this.ListAssignments.bind(this),this.SaveAssignment=this.SaveAssignment.bind(this),this.ListVariant=this.ListVariant.bind(this),this.CreateVariant=this.CreateVariant.bind(this),this.GetVariant=this.GetVariant.bind(this),this.SaveVariant=this.SaveVariant.bind(this),this.DeleteVariant=this.DeleteVariant.bind(this),this.PatchVariant=this.PatchVariant.bind(this),this.DeleteVariantAssignment=this.DeleteVariantAssignment.bind(this),this.ListVariantAssignments=this.ListVariantAssignments.bind(this),this.SaveVariantAssignment=this.SaveVariantAssignment.bind(this)}return t.prototype.List=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/products/".concat(t,"/inventoryrecords"),nF(nF({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Create=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.post("/products/".concat(t,"/inventoryrecords"),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Get=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/products/".concat(t,"/inventoryrecords/").concat(e),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Save=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.put("/products/".concat(t,"/inventoryrecords/").concat(e),nF(nF({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Delete=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.delete("/products/".concat(t,"/inventoryrecords/").concat(e),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Patch=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.patch("/products/".concat(t,"/inventoryrecords/").concat(e),nF(nF({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.DeleteAssignment=function(t,e,n,i){return void 0===n&&(n={}),void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.delete("/products/".concat(t,"/inventoryrecords/").concat(e,"/assignments"),nF(nF({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.ListAssignments=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/products/".concat(t,"/inventoryrecords/assignments"),nF(nF({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.SaveAssignment=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.post("/products/".concat(t,"/inventoryrecords/assignments"),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListVariant=function(t,e,n,i){return void 0===n&&(n={}),void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.get("/products/".concat(t,"/variants/").concat(e,"/inventoryrecords"),nF(nF({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.CreateVariant=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.post("/products/".concat(t,"/variants/").concat(e,"/inventoryrecords"),nF(nF({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.GetVariant=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.get("/products/".concat(t,"/variants/").concat(e,"/inventoryrecords/").concat(n),nF(nF({},i),{impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.SaveVariant=function(t,e,n,i,r){return void 0===r&&(r={}),nj(this,void 0,void 0,function(){var s;return nq(this,function(o){switch(o.label){case 0:return s=this.impersonating,this.impersonating=!1,[4,nz.put("/products/".concat(t,"/variants/").concat(e,"/inventoryrecords/").concat(n),nF(nF({},r),{data:i,impersonating:s})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,o.sent()]}})})},t.prototype.DeleteVariant=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.delete("/products/".concat(t,"/variants/").concat(e,"/inventoryrecords/").concat(n),nF(nF({},i),{impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.PatchVariant=function(t,e,n,i,r){return void 0===r&&(r={}),nj(this,void 0,void 0,function(){var s;return nq(this,function(o){switch(o.label){case 0:return s=this.impersonating,this.impersonating=!1,[4,nz.patch("/products/".concat(t,"/variants/").concat(e,"/inventoryrecords/").concat(n),nF(nF({},r),{data:i,impersonating:s})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,o.sent()]}})})},t.prototype.DeleteVariantAssignment=function(t,e,n,i,r){return void 0===i&&(i={}),void 0===r&&(r={}),nj(this,void 0,void 0,function(){var s;return nq(this,function(o){switch(o.label){case 0:return s=this.impersonating,this.impersonating=!1,[4,nz.delete("/products/".concat(t,"/variants/").concat(e,"/inventoryrecords/").concat(n,"/assignments"),nF(nF({},r),{impersonating:s,params:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,o.sent()]}})})},t.prototype.ListVariantAssignments=function(t,e,n,i){return void 0===n&&(n={}),void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.get("/products/".concat(t,"/variants/").concat(e,"/inventoryrecords/assignments"),nF(nF({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.SaveVariantAssignment=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.post("/products/".concat(t,"/variants/").concat(e,"/inventoryrecords/assignments"),nF(nF({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this),this.DeleteAssignment=this.DeleteAssignment.bind(this),this.DeleteProductAssignment=this.DeleteProductAssignment.bind(this),this.ListAssignments=this.ListAssignments.bind(this),this.SaveAssignment=this.SaveAssignment.bind(this),this.ListProductAssignments=this.ListProductAssignments.bind(this),this.SaveProductAssignment=this.SaveProductAssignment.bind(this)}return t.prototype.List=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/bundles",nF(nF({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.post("/bundles",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/bundles/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.put("/bundles/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.delete("/bundles/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.patch("/bundles/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.DeleteAssignment=function(t,e,n,i){return void 0===n&&(n={}),void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.delete("/bundles/".concat(t,"/assignments/").concat(e),nF(nF({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.DeleteProductAssignment=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.delete("/bundles/".concat(t,"/productassignments/").concat(e),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListAssignments=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/bundles/assignments",nF(nF({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SaveAssignment=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.post("/bundles/assignments",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.ListProductAssignments=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/bundles/productassignments",nF(nF({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SaveProductAssignment=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.post("/bundles/productassignments",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this),this.Ap
1plyPromotions=this.ApplyPromotions.bind(this),this.ListApprovals=this.ListApprovals.bind(this),this.Approve=this.Approve.bind(this),this.SetBillingAddress=this.SetBillingAddress.bind(this),this.PatchBillingAddress=this.PatchBillingAddress.bind(this),this.Cancel=this.Cancel.bind(this),this.Complete=this.Complete.bind(this),this.Decline=this.Decline.bind(this),this.ListEligibleApprovers=this.ListEligibleApprovers.bind(this),this.ListEligiblePromotions=this.ListEligiblePromotions.bind(this),this.Forward=this.Forward.bind(this),this.PatchFromUser=this.PatchFromUser.bind(this),this.ListPromotions=this.ListPromotions.bind(this),this.AddPromotion=this.AddPromotion.bind(this),this.RemovePromotion=this.RemovePromotion.bind(this),this.Ship=this.Ship.bind(this),this.ListShipments=this.ListShipments.bind(this),this.SetShippingAddress=this.SetShippingAddress.bind(this),this.PatchShippingAddress=this.PatchShippingAddress.bind(this),this.Split=this.Split.bind(this),this.Submit=this.Submit.bind(this),this.Validate=this.Validate.bind(this)}return t.prototype.List=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/orders/".concat(t),nF(nF({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Create=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.post("/orders/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Get=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/orders/".concat(t,"/").concat(e),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Save=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.put("/orders/".concat(t,"/").concat(e),nF(nF({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Delete=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.delete("/orders/".concat(t,"/").concat(e),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Patch=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.patch("/orders/".concat(t,"/").concat(e),nF(nF({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.ApplyPromotions=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.post("/orders/".concat(t,"/").concat(e,"/applypromotions"),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListApprovals=function(t,e,n,i){return void 0===n&&(n={}),void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.get("/orders/".concat(t,"/").concat(e,"/approvals"),nF(nF({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Approve=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.post("/orders/".concat(t,"/").concat(e,"/approve"),nF(nF({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.SetBillingAddress=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.put("/orders/".concat(t,"/").concat(e,"/billto"),nF(nF({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.PatchBillingAddress=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.patch("/orders/".concat(t,"/").concat(e,"/billto"),nF(nF({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Cancel=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.post("/orders/".concat(t,"/").concat(e,"/cancel"),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Complete=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.post("/orders/".concat(t,"/").concat(e,"/complete"),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Decline=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.post("/orders/".concat(t,"/").concat(e,"/decline"),nF(nF({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.ListEligibleApprovers=function(t,e,n,i){return void 0===n&&(n={}),void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.get("/orders/".concat(t,"/").concat(e,"/eligibleapprovers"),nF(nF({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.ListEligiblePromotions=function(t,e,n,i){return void 0===n&&(n={}),void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.get("/orders/".concat(t,"/").concat(e,"/eligiblepromotions"),nF(nF({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Forward=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.post("/orders/".concat(t,"/").concat(e,"/forward"),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.PatchFromUser=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.patch("/orders/".concat(t,"/").concat(e,"/fromuser"),nF(nF({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.ListPromotions=function(t,e,n,i){return void 0===n&&(n={}),void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.get("/orders/".concat(t,"/").concat(e,"/promotions"),nF(nF({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.AddPromotion=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.post("/orders/".concat(t,"/").concat(e,"/promotions/").concat(n),nF(nF({},i),{impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.RemovePromotion=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.delete("/orders/".concat(t,"/").concat(e,"/promotions/").concat(n),nF(nF({},i),{impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Ship=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.post("/orders/".concat(t,"/").concat(e,"/ship"),nF(nF({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.ListShipments=function(t,e,n,i){return void 0===n&&(n={}),void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.get("/orders/".concat(t,"/").concat(e,"/shipments"),nF(nF({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.SetShippingAddress=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.put("/orders/".concat(t,"/").concat(e,"/shipto"),nF(nF({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.PatchShippingAddress=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.patch("/orders/".concat(t,"/").concat(e,"/shipto"),nF(nF({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Split=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.post("/orders/".concat(t,"/").concat(e,"/split"),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Submit=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.post("/orders/".concat(t,"/").concat(e,"/submit"),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Validate=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.post("/orders/".concat(t,"/").concat(e,"/validate"),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this),this.SetA
1ctiveCart=this.SetActiveCart.bind(this),this.ApplyPromotions=this.ApplyPromotions.bind(this),this.SetBillingAddress=this.SetBillingAddress.bind(this),this.PatchBillingAddress=this.PatchBillingAddress.bind(this),this.CreateBundleItem=this.CreateBundleItem.bind(this),this.DeleteBundleItem=this.DeleteBundleItem.bind(this),this.Calculate=this.Calculate.bind(this),this.ListEligiblePromotions=this.ListEligiblePromotions.bind(this),this.EstimateShipping=this.EstimateShipping.bind(this),this.PatchFromUser=this.PatchFromUser.bind(this),this.ListLineItems=this.ListLineItems.bind(this),this.CreateLineItem=this.CreateLineItem.bind(this),this.GetLineItem=this.GetLineItem.bind(this),this.SaveLineItem=this.SaveLineItem.bind(this),this.DeleteLineItem=this.DeleteLineItem.bind(this),this.PatchLineItem=this.PatchLineItem.bind(this),this.ListPayments=this.ListPayments.bind(this),this.CreatePayment=this.CreatePayment.bind(this),this.GetPayment=this.GetPayment.bind(this),this.DeletePayment=this.DeletePayment.bind(this),this.PatchPayment=this.PatchPayment.bind(this),this.CreatePaymentTransaction=this.CreatePaymentTransaction.bind(this),this.DeletePaymentTransaction=this.DeletePaymentTransaction.bind(this),this.ListPromotions=this.ListPromotions.bind(this),this.AddPromotion=this.AddPromotion.bind(this),this.DeletePromotion=this.DeletePromotion.bind(this),this.SelectShipMethods=this.SelectShipMethods.bind(this),this.SetShippingAddress=this.SetShippingAddress.bind(this),this.PatchShippingAddress=this.PatchShippingAddress.bind(this),this.Submit=this.Submit.bind(this),this.Validate=this.Validate.bind(this),this.GetOrderWorksheet=this.GetOrderWorksheet.bind(this)}return t.prototype.Get=function(t){return void 0===t&&(t={}),nj(this,void 0,void 0,function(){var e;return nq(this,function(n){switch(n.label){case 0:return e=this.impersonating,this.impersonating=!1,[4,nz.get("/cart",nF(nF({},t),{impersonating:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,n.sent()]}})})},t.prototype.Save=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.put("/cart",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Delete=function(t){return void 0===t&&(t={}),nj(this,void 0,void 0,function(){var e;return nq(this,function(n){switch(n.label){case 0:return e=this.impersonating,this.impersonating=!1,[4,nz.delete("/cart",nF(nF({},t),{impersonating:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,n.sent()]}})})},t.prototype.Patch=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.patch("/cart",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SetActiveCart=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.put("/cart/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.ApplyPromotions=function(t){return void 0===t&&(t={}),nj(this,void 0,void 0,function(){var e;return nq(this,function(n){switch(n.label){case 0:return e=this.impersonating,this.impersonating=!1,[4,nz.post("/cart/applypromotions",nF(nF({},t),{impersonating:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,n.sent()]}})})},t.prototype.SetBillingAddress=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.put("/cart/billto",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.PatchBillingAddress=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.patch("/cart/billto",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.CreateBundleItem=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.post("/cart/bundles/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.DeleteBundleItem=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.delete("/cart/bundles/".concat(t,"/").concat(e),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Calculate=function(t){return void 0===t&&(t={}),nj(this,void 0,void 0,function(){var e;return nq(this,function(n){switch(n.label){case 0:return e=this.impersonating,this.impersonating=!1,[4,nz.post("/cart/calculate",nF(nF({},t),{impersonating:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,n.sent()]}})})},t.prototype.ListEligiblePromotions=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/cart/eligiblepromotions",nF(nF({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.EstimateShipping=function(t){return void 0===t&&(t={}),nj(this,void 0,void 0,function(){var e;return nq(this,function(n){switch(n.label){case 0:return e=this.impersonating,this.impersonating=!1,[4,nz.post("/cart/estimateshipping",nF(nF({},t),{impersonating:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,n.sent()]}})})},t.prototype.PatchFromUser=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.patch("/cart/fromuser",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.ListLineItems=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/cart/lineitems",nF(nF({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.CreateLineItem=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.post("/cart/lineitems",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.GetLineItem=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/cart/lineitems/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SaveLineItem=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.put("/cart/lineitems/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.DeleteLineItem=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.delete("/cart/lineitems/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.PatchLineItem=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.patch("/cart/lineitems/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListPayments=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/cart/payments",nF(nF({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.CreatePayment=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.post("/cart/payments",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.GetPayment=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/cart/payments/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.DeletePayment=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.delete("/cart/payments/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.PatchPayment=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.patch("/cart/payments/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.CreatePaymentTransaction=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.post("/cart/payments/".concat(t,"/transactions"),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.DeletePaymentTransaction=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.delete("/cart/payments/".concat(t,"/transactions/").concat(e),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListPromotions=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/cart/promotions",nF(nF({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.AddPromotion=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.post("/cart/promotions/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.DeletePromotion=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.delete("/cart/promotions/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SelectShipMethods=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.post("/cart/shipmethods",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SetShippingAddress=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.put("/cart/shipto",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.PatchShippingAddress=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.patch("/cart/shipto",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Submit=function(t){return void 0===t&&(t={}),nj(this,void 0,void 0,function(){var e;return nq(this,function(n){switch(n.label){case 0:return e=this.impersonating,this.impersonating=!1,[4,nz.post("/cart/submit",nF(nF({},t),{impersonating:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,n.sent()]}})})},t.prototype.Validate=function(t){return void 0===t&&(t={}),nj(this,void 0,void 0,function(){var e;return nq(this,function(n){switch(n.label){case 0:return e=this.impersonating,this.impersonating=!1,[4,nz.post("/cart/validate",nF(nF({},t),{impersonating:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,n.sent()]}})})},t.prototype.GetOrderWorksheet=function(t){return void 0===t&&(t={}),nj(this,void 0,void 0,function(){var e;return nq(this,function(n){switch(n.label){case 0:return e=this.impersonating,this.impersonating=!1,[4,nz.get("/cart/worksheet",nF(nF({},t),{impersonating:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,n.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.ListAcrossOrders=this.ListAcrossOrders.bind(this),this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this),this.SetShippingAddress=this.SetShippingAddress.bind(this),this.PatchShippingAddress=this.PatchShippingAddress.bind(this)}return t.prototype.ListAcrossOrders=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/lineitems/".concat(t),nF(nF({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.List=function(t,e,n,i){return void 0===n&&(n={}),void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.get("/orders/".concat(t,"/").concat(e,"/lineitems"),nF(nF({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Create=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this
1.impersonating,this.impersonating=!1,[4,nz.post("/orders/".concat(t,"/").concat(e,"/lineitems"),nF(nF({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Get=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.get("/orders/".concat(t,"/").concat(e,"/lineitems/").concat(n),nF(nF({},i),{impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Save=function(t,e,n,i,r){return void 0===r&&(r={}),nj(this,void 0,void 0,function(){var s;return nq(this,function(o){switch(o.label){case 0:return s=this.impersonating,this.impersonating=!1,[4,nz.put("/orders/".concat(t,"/").concat(e,"/lineitems/").concat(n),nF(nF({},r),{data:i,impersonating:s})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,o.sent()]}})})},t.prototype.Delete=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.delete("/orders/".concat(t,"/").concat(e,"/lineitems/").concat(n),nF(nF({},i),{impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Patch=function(t,e,n,i,r){return void 0===r&&(r={}),nj(this,void 0,void 0,function(){var s;return nq(this,function(o){switch(o.label){case 0:return s=this.impersonating,this.impersonating=!1,[4,nz.patch("/orders/".concat(t,"/").concat(e,"/lineitems/").concat(n),nF(nF({},r),{data:i,impersonating:s})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,o.sent()]}})})},t.prototype.SetShippingAddress=function(t,e,n,i,r){return void 0===r&&(r={}),nj(this,void 0,void 0,function(){var s;return nq(this,function(o){switch(o.label){case 0:return s=this.impersonating,this.impersonating=!1,[4,nz.put("/orders/".concat(t,"/").concat(e,"/lineitems/").concat(n,"/shipto"),nF(nF({},r),{data:i,impersonating:s})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,o.sent()]}})})},t.prototype.PatchShippingAddress=function(t,e,n,i,r){return void 0===r&&(r={}),nj(this,void 0,void 0,function(){var s;return nq(this,function(o){switch(o.label){case 0:return s=this.impersonating,this.impersonating=!1,[4,nz.patch("/orders/".concat(t,"/").concat(e,"/lineitems/").concat(n,"/shipto"),nF(nF({},r),{data:i,impersonating:s})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,o.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this),this.DeleteAssignment=this.DeleteAssignment.bind(this),this.ListAssignments=this.ListAssignments.bind(this),this.SaveAssignment=this.SaveAssignment.bind(this)}return t.prototype.List=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/promotions",nF(nF({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.post("/promotions",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/promotions/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.put("/promotions/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.delete("/promotions/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.patch("/promotions/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.DeleteAssignment=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.delete("/promotions/".concat(t,"/assignments"),nF(nF({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListAssignments=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/promotions/assignments",nF(nF({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SaveAssignment=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.post("/promotions/assignments",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this),this.CreateTransaction=this.CreateTransaction.bind(this),this.DeleteTransaction=this.DeleteTransaction.bind(this)}return t.prototype.List=function(t,e,n,i){return void 0===n&&(n={}),void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.get("/orders/".concat(t,"/").concat(e,"/payments"),nF(nF({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Create=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.post("/orders/".concat(t,"/").concat(e,"/payments"),nF(nF({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Get=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.get("/orders/".concat(t,"/").concat(e,"/payments/").concat(n),nF(nF({},i),{impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Delete=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.delete("/orders/".concat(t,"/").concat(e,"/payments/").concat(n),nF(nF({},i),{impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Patch=function(t,e,n,i,r){return void 0===r&&(r={}),nj(this,void 0,void 0,function(){var s;return nq(this,function(o){switch(o.label){case 0:return s=this.impersonating,this.impersonating=!1,[4,nz.patch("/orders/".concat(t,"/").concat(e,"/payments/").concat(n),nF(nF({},r),{data:i,impersonating:s})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,o.sent()]}})})},t.prototype.CreateTransaction=function(t,e,n,i,r){return void 0===r&&(r={}),nj(this,void 0,void 0,function(){var s;return nq(this,function(o){switch(o.label){case 0:return s=this.impersonating,this.impersonating=!1,[4,nz.post("/orders/".concat(t,"/").concat(e,"/payments/").concat(n,"/transactions"),nF(nF({},r),{data:i,impersonating:s})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,o.sent()]}})})},t.prototype.DeleteTransaction=function(t,e,n,i,r){return void 0===r&&(r={}),nj(this,void 0,void 0,function(){var s;return nq(this,function(o){switch(o.label){case 0:return s=this.impersonating,this.impersonating=!1,[4,nz.delete("/orders/".concat(t,"/").concat(e,"/payments/").concat(n,"/transactions/").concat(i),nF(nF({},r),{impersonating:s})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,o.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this),this.ListItems=this.ListItems.bind(this),this.SaveItem=this.SaveItem.bind(this),this.GetItem=this.GetItem.bind(this),this.DeleteItem=this.DeleteItem.bind(this),this.SetShipFromAddress=this.SetShipFromAddress.bind(this),this.SetShipToAddress=this.SetShipToAddress.bind(this)}return t.prototype.List=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/shipments",nF(nF({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.post("/shipments",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/shipments/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.put("/shipments/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.delete("/shipments/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.patch("/shipments/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListItems=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/shipments/".concat(t,"/items"),nF(nF({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.SaveItem=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.post("/shipments/".concat(t,"/items"),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.GetItem=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.get("/shipments/".concat(t,"/items/").concat(e,"/").concat(n),nF(nF({},i),{impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.DeleteItem=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.delete("/shipments/".concat(t,"/items/").concat(e,"/").concat(n),nF(nF({},i),{impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.SetShipFromAddress=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.put("/shipments/".concat(t,"/shipfrom"),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.SetShipToAddress=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.put("/shipments/".concat(t,"/shipto"),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this),this.ListApprovals=this.ListApprovals.bind(this),this.Ap
1prove=this.Approve.bind(this),this.Cancel=this.Cancel.bind(this),this.Complete=this.Complete.bind(this),this.Decline=this.Decline.bind(this),this.ListEligibleApprovers=this.ListEligibleApprovers.bind(this),this.DeleteItem=this.DeleteItem.bind(this),this.Submit=this.Submit.bind(this)}return t.prototype.List=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/orderreturns",nF(nF({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.post("/orderreturns",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/orderreturns/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.put("/orderreturns/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.delete("/orderreturns/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.patch("/orderreturns/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListApprovals=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/orderreturns/".concat(t,"/approvals"),nF(nF({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Approve=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.post("/orderreturns/".concat(t,"/approve"),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Cancel=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.post("/orderreturns/".concat(t,"/cancel"),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Complete=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.post("/orderreturns/".concat(t,"/complete"),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Decline=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.post("/orderreturns/".concat(t,"/decline"),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListEligibleApprovers=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/orderreturns/".concat(t,"/eligibleapprovers"),nF(nF({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.DeleteItem=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.delete("/orderreturns/".concat(t,"/items/").concat(e),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Submit=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.post("/orderreturns/".concat(t,"/submit"),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this)}return t.prototype.List=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/approvalrules",nF(nF({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.post("/approvalrules",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/approvalrules/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.put("/approvalrules/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.delete("/approvalrules/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.patch("/approvalrules/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.Create=this.Create.bind(this),this.Delete=this.Delete.bind(this)}return t.prototype.Create=function(t,e,n,i,r){return void 0===r&&(r={}),nj(this,void 0,void 0,function(){var s;return nq(this,function(o){switch(o.label){case 0:return s=this.impersonating,this.impersonating=!1,[4,nz.post("/orders/".concat(t,"/").concat(e,"/bundles/").concat(n),nF(nF({},r),{data:i,impersonating:s})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,o.sent()]}})})},t.prototype.Delete=function(t,e,n,i,r){return void 0===r&&(r={}),nj(this,void 0,void 0,function(){var s;return nq(this,function(o){switch(o.label){case 0:return s=this.impersonating,this.impersonating=!1,[4,nz.delete("/orders/".concat(t,"/").concat(e,"/bundles/").concat(n,"/").concat(i),nF(nF({},r),{impersonating:s})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,o.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.Create=this.Create.bind(this),this.Delete=this.Delete.bind(this)}return t.prototype.Create=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.post("/subscriptions/".concat(t,"/bundles/").concat(e),nF(nF({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Delete=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.delete("/subscriptions/".concat(t,"/bundles/").concat(e,"/").concat(n),nF(nF({},i),{impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this)}return t.prototype.List=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/subscriptions/".concat(t,"/items"),nF(nF({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Create=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.post("/subscriptions/".concat(t,"/items"),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Get=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/subscriptions/".concat(t,"/items/").concat(e),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Save=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.put("/subscriptions/".concat(t,"/items/").concat(e),nF(nF({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.Delete=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.delete("/subscriptions/".concat(t,"/items/").concat(e),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Patch=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.patch("/subscriptions/".concat(t,"/items/").concat(e),nF(nF({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this)}return t.prototype.List=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/subscriptions",nF(nF({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.post("/subscriptions",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/subscriptions/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.put("/subscriptions/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.delete("/subscriptions/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.patch("/subscriptions/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Patch=this.Patch.bind(this),this.ListAddresses=this.ListAddresses.bind(this),this.CreateAddress=this.CreateAddress.bind(this),this.GetAddress=this.GetAddress.bind(this),this.SaveAddress=this.SaveAddress.bind(this),this.DeleteAddress=this.DeleteAddress.bind(this),this.PatchAddress=this.PatchAddress.bind(this),this.ListCatalogs=this.ListCatalogs.bind(this),this.GetCatalog=this.GetCatalog.bind(this),this.ListCategories=this.ListCategories.bind(this),this.GetCategory=this.GetCategory.bind(this),this.ListCostCenters=this.ListCostCenters.bind(this),this.ListCreditCards=this.ListCreditCards.bind(this),this.CreateCreditCard=this.CreateCreditCard.bind(this),this.GetCredit
1Card=this.GetCreditCard.bind(this),this.SaveCreditCard=this.SaveCreditCard.bind(this),this.DeleteCreditCard=this.DeleteCreditCard.bind(this),this.PatchCreditCard=this.PatchCreditCard.bind(this),this.ListOrders=this.ListOrders.bind(this),this.TransferAnonUserOrder=this.TransferAnonUserOrder.bind(this),this.ListApprovableOrders=this.ListApprovableOrders.bind(this),this.ResetPasswordByToken=this.ResetPasswordByToken.bind(this),this.ListProductCollections=this.ListProductCollections.bind(this),this.CreateProductCollection=this.CreateProductCollection.bind(this),this.GetProductCollection=this.GetProductCollection.bind(this),this.SaveProductCollection=this.SaveProductCollection.bind(this),this.DeleteProductCollection=this.DeleteProductCollection.bind(this),this.PatchProductCollection=this.PatchProductCollection.bind(this),this.CreateProductCollectionEntry=this.CreateProductCollectionEntry.bind(this),this.DeleteProductCollectionEntry=this.DeleteProductCollectionEntry.bind(this),this.ListProductCollectionInvitations=this.ListProductCollectionInvitations.bind(this),this.CreateProductCollectionInvitation=this.CreateProductCollectionInvitation.bind(this),this.GetProductCollectionInvitation=this.GetProductCollectionInvitation.bind(this),this.DeleteProductCollectionInvitation=this.DeleteProductCollectionInvitation.bind(this),this.PatchProductCollectionInvitation=this.PatchProductCollectionInvitation.bind(this),this.AcceptProductCollectionInvitation=this.AcceptProductCollectionInvitation.bind(this),this.DeclineProductCollectionInvitation=this.DeclineProductCollectionInvitation.bind(this),this.ListProductCollectionEntries=this.ListProductCollectionEntries.bind(this),this.ListProducts=this.ListProducts.bind(this),this.GetProduct=this.GetProduct.bind(this),this.ListProductInventoryRecords=this.ListProductInventoryRecords.bind(this),this.ListProductSellers=this.ListProductSellers.bind(this),this.ListSpecs=this.ListSpecs.bind(this),this.GetSpec=this.GetSpec.bind(this),this.ListVariants=this.ListVariants.bind(this),this.GetVariant=this.GetVariant.bind(this),this.ListVariantInventoryRecords=this.ListVariantInventoryRecords.bind(this),this.ListPromotions=this.ListPromotions.bind(this),this.GetPromotion=this.GetPromotion.bind(this),this.Register=this.Register.bind(this),this.ListBuyerSellers=this.ListBuyerSellers.bind(this),this.ListShipments=this.ListShipments.bind(this),this.GetShipment=this.GetShipment.bind(this),this.ListShipmentItems=this.ListShipmentItems.bind(this),this.ListSpendingAccounts=this.ListSpendingAccounts.bind(this),this.GetSpendingAccount=this.GetSpendingAccount.bind(this),this.ListSubscriptions=this.ListSubscriptions.bind(this),this.CreateSubscription=this.CreateSubscription.bind(this),this.GetSubscription=this.GetSubscription.bind(this),this.SaveSubscription=this.SaveSubscription.bind(this),this.DeleteSubscription=this.DeleteSubscription.bind(this),this.PatchSubscription=this.PatchSubscription.bind(this),this.ListSubscriptionItems=this.ListSubscriptionItems.bind(this),this.CreateSubscriptionItem=this.CreateSubscriptionItem.bind(this),this.GetSubscriptionItem=this.GetSubscriptionItem.bind(this),this.SaveSubscriptionItem=this.SaveSubscriptionItem.bind(this),this.DeleteSubscriptionItem=this.DeleteSubscriptionItem.bind(this),this.PatchSubscriptionItem=this.PatchSubscriptionItem.bind(this),this.CreateSubscriptionBundleItem=this.CreateSubscriptionBundleItem.bind(this),this.DeleteSubscriptionBundleItem=this.DeleteSubscriptionBundleItem.bind(this),this.ListUserGroups=this.ListUserGroups.bind(this)}return t.prototype.Get=function(t){return void 0===t&&(t={}),nj(this,void 0,void 0,function(){var e;return nq(this,function(n){switch(n.label){case 0:return e=this.impersonating,this.impersonating=!1,[4,nz.get("/me",nF(nF({},t),{impersonating:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,n.sent()]}})})},t.prototype.Save=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.put("/me",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.patch("/me",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.ListAddresses=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/me/addresses",nF(nF({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.CreateAddress=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.post("/me/addresses",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.GetAddress=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/me/addresses/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SaveAddress=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.put("/me/addresses/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.DeleteAddress=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.delete("/me/addresses/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.PatchAddress=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.patch("/me/addresses/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})}
1,t.prototype.ListCatalogs=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/me/catalogs",nF(nF({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.GetCatalog=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/me/catalogs/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.ListCategories=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/me/categories",nF(nF({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.GetCategory=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/me/categories/".concat(t),nF(nF({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListCostCenters=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/me/costcenters",nF(nF({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.ListCreditCards=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/me/creditcards",nF(nF({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.CreateCreditCard=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.post("/me/creditcards",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.GetCreditCard=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/me/creditcards/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SaveCreditCard=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.put("/me/creditcards/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.DeleteCreditCard=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.delete("/me/creditcards/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.PatchCreditCard=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.patch("/me/creditcards/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListOrders=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/me/orders",nF(nF({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.TransferAnonUserOrder=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.put("/me/orders",nF(nF({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.ListApprovableOrders=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/me/orders/approvable",nF(nF({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.ResetPasswordByToken=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.post("/me/password",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.ListProductCollections=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/me/productcollections",nF(nF({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.CreateProductCollection=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.post("/me/productcollections",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.GetProductCollection=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/me/productcollections/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SaveProductCollection=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.put("/me/productcollections/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.DeleteProductCollection=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.delete("/me/productcollections/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.PatchProductCollection=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.patch("/me/productcollections/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.CreateProductCollectionEntry=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.put("/me/productcollections/".concat(t,"/").concat(e),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.DeleteProductCollectionEntry=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.delete("/me/productcollections/".concat(t,"/").concat(e),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListProductCollectionInvitations=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/me/productcollections/".concat(t,"/invitations"),nF(nF({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.CreateProductCollectionInvitation=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.post("/me/productcollections/".concat(t,"/invitations"),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.GetProductCollectionInvitation=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/me/productcollections/".concat(t,"/invitations/").concat(e),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.DeleteProductCollectionInvitation=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.delete("/me/productcollections/".concat(t,"/invitations/").concat(e),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.PatchProductCollectionInvitation=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.patch("/me/productcollections/".concat(t,"/invitations/").concat(e),nF(nF({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.AcceptProductCollectionInvitation=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.post("/me/productcollections/".concat(t,"/invitations/accept/").concat(e),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.DeclineProductCollectionInvitation=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.post("/me/productcollections/".concat(t,"/invitations/decline/").concat(e),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListProductCollectionEntries=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/me/productcollections/".concat(t,"/products"),nF(nF({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListProducts=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/me/products",nF(nF({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.GetProduct=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/me/products/".concat(t),nF(nF({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListProductInventoryRecords=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/me/products/".concat(t,"/inventoryrecords"),nF(nF({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListProductSellers=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/me/products/".concat(t,"/sellers"),nF(nF({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListSpecs=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/me/products/".concat(t,"/specs"),nF(nF({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.GetSpec=function(t,e,n,i){return void 0===n&&(n={}),void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.get("/me/products/".concat(t,"/specs/").concat(e),nF(nF({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.ListVariants=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/me/products/".concat(t,"/variants"),nF(nF({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.GetVariant=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/me/products/".concat(t,"/variants/").concat(e),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListVariantInventoryRecords=function(t,e,n,i){return void 0===n&&(n={}),void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.get("/me/products/".concat(t,"/variants/").concat(e,"/inventoryrecords"),nF(nF({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.ListPromotions=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/me/promotions",nF(nF({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.GetPromotion=function(t,e){return void 0===e&&(e={}),nj(this,void 0,v
1oid 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/me/promotions/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Register=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.put("/me/register",nF(nF({},n),{data:t,impersonating:i,params:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListBuyerSellers=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/me/sellers",nF(nF({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.ListShipments=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/me/shipments",nF(nF({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.GetShipment=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/me/shipments/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.ListShipmentItems=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/me/shipments/".concat(t,"/items"),nF(nF({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListSpendingAccounts=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/me/spendingAccounts",nF(nF({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.GetSpendingAccount=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/me/spendingaccounts/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.ListSubscriptions=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/me/subscriptions",nF(nF({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.CreateSubscription=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.post("/me/subscriptions",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.GetSubscription=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/me/subscriptions/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SaveSubscription=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.put("/me/subscriptions/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.DeleteSubscription=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.delete("/me/subscriptions/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.PatchSubscription=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.patch("/me/subscriptions/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListSubscriptionItems=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/me/subscriptions/".concat(t,"/items"),nF(nF({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.CreateSubscriptionItem=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.post("/me/subscriptions/".concat(t,"/items"),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.GetSubscriptionItem=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/me/subscriptions/".concat(t,"/items/").concat(e),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.SaveSubscriptionItem=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.put("/me/subscriptions/".concat(t,"/items/").concat(e),nF(nF({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.DeleteSubscriptionItem=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.delete("/me/subscriptions/".concat(t,"/items/").concat(e),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.PatchSubscriptionItem=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.patch("/me/subscriptions/".concat(t,"/items/").concat(e),nF(nF({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.CreateSubscriptionBundleItem=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.post("/me/subscriptions/".concat(t,"/items/bundles/").concat(e),nF(nF({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.DeleteSubscriptionBundleItem=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.delete("/me/subscriptions/".concat(t,"/items/bundles/").concat(e,"/").concat(n),nF(nF({},i),{impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.ListUserGroups=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/me/usergroups",nF(nF({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this)}return t.prototype.List=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/integrations/trackingEvents",nF(nF({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.post("/integrations/trackingEvents",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/integrations/trackingEvents/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.put("/integrations/trackingEvents/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.delete("/integrations/trackingEvents/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.patch("/integrations/trackingEvents/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this)}return t.prototype.List=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/integrations/deliveryconfig",nF(nF({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.post("/integrations/deliveryconfig",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/integrations/deliveryconfig/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.put("/integrations/deliveryconfig/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.delete("/integrations/deliveryconfig/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.patch("/integrations/deliveryconfig/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this),this.Validate=this.Validate.bind(this)}return t.prototype.Get=function(t){return void 0===t&&(t={}),nj(this,void 0,void 0,function(){var e;return nq(this,function(n){switch(n.label){case 0:return e=this.impersonating,this.impersonating=!1,[4,nz.get("/integrations/ErrorConfig",nF(nF({},t),{impersonating:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,n.sent()]}})})},t.prototype.Save=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.put("/integrations/ErrorConfig",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Delete=function(t){return void 0===t&&(t={}),nj(this,void 0,void 0,function(){var e;return nq(this,function(n){switch(n.label){case 0:return e=this.impersonating,this.impersonating=!1,[4,nz.delete("/integrations/ErrorConfig",nF(nF({},t),{impersonating:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,n.sent()]}})})},t.prototype.Patch=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.patch("/integrations/ErrorConfig",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Validate=function(t){return void 0===t&&(t={}),nj(this,void 0,void 0,function(){var e;return nq(this,function(n){switch(n.label){case 0:return e=this.impersonating,this.impersonating=!1,[4,nz.post("/integrations/ErrorConfig/validate",nF(nF({},t),{impersonating:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,n.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),thi
1s.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this),this.Calculate=this.Calculate.bind(this),this.EstimateShipping=this.EstimateShipping.bind(this),this.SelectShipmethods=this.SelectShipmethods.bind(this),this.GetWorksheet=this.GetWorksheet.bind(this)}return t.prototype.List=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/integrationEvents",nF(nF({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.post("/integrationEvents",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/integrationEvents/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.put("/integrationEvents/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.delete("/integrationEvents/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.patch("/integrationEvents/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Calculate=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.post("/orders/".concat(t,"/").concat(e,"/calculate"),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.EstimateShipping=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.post("/orders/".concat(t,"/").concat(e,"/estimateshipping"),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.SelectShipmethods=function(t,e,n,i){return void 0===i&&(i={}),nj(this,void 0,void 0,function(){var r;return nq(this,function(s){switch(s.label){case 0:return r=this.impersonating,this.impersonating=!1,[4,nz.post("/orders/".concat(t,"/").concat(e,"/shipmethods"),nF(nF({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,s.sent()]}})})},t.prototype.GetWorksheet=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.get("/orders/".concat(t,"/").concat(e,"/worksheet"),nF(nF({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.List=this.List.bind(this),this.Create=this.Create.bind(this),this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this),this.DeleteAssignment=this.DeleteAssignment.bind(this),this.ListAssignments=this.ListAssignments.bind(this),this.SaveAssignment=this.SaveAssignment.bind(this),this.ListCCListenerAssignments=this.ListCCListenerAssignments.bind(this),this.SaveCCListenerAssignment=this.SaveCCListenerAssignment.bind(this)}return t.prototype.List=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/messagesenders",nF(nF({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Create=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.post("/messagesenders",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Get=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/messagesenders/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Save=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.put("/messagesenders/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.Delete=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.delete("/messagesenders/".concat(t),nF(nF({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Patch=function(t,e,n){return void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.patch("/messagesenders/".concat(t),nF(nF({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.DeleteAssignment=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),nj(this,void 0,void 0,function(){var i;return nq(this,function(r){switch(r.label){case 0:return i=this.impersonating,this.impersonating=!1,[4,nz.delete("/messagesenders/".concat(t,"/assignments"),nF(nF({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,r.sent()]}})})},t.prototype.ListAssignments=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/messagesenders/assignments",nF(nF({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SaveAssignment=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.post("/messagesenders/assignments",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})}
1,t.prototype.ListCCListenerAssignments=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.get("/messagesenders/CCListenerAssignments",nF(nF({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.SaveCCListenerAssignment=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.post("/messagesenders/CCListenerAssignments",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this)}return t.prototype.Get=function(t){return void 0===t&&(t={}),nj(this,void 0,void 0,function(){var e;return nq(this,function(n){switch(n.label){case 0:return e=this.impersonating,this.impersonating=!1,[4,nz.get("/integrations/OrderSync",nF(nF({},t),{impersonating:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,n.sent()]}})})},t.prototype.Save=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.put("/integrations/OrderSync",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Delete=function(t){return void 0===t&&(t={}),nj(this,void 0,void 0,function(){var e;return nq(this,function(n){switch(n.label){case 0:return e=this.impersonating,this.impersonating=!1,[4,nz.delete("/integrations/OrderSync",nF(nF({},t),{impersonating:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,n.sent()]}})})},t.prototype.Patch=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.patch("/integrations/OrderSync",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this)}return t.prototype.Get=function(t){return void 0===t&&(t={}),nj(this,void 0,void 0,function(){var e;return nq(this,function(n){switch(n.label){case 0:return e=this.impersonating,this.impersonating=!1,[4,nz.get("/integrations/productsync",nF(nF({},t),{impersonating:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,n.sent()]}})})},t.prototype.Save=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.put("/integrations/productsync",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Delete=function(t){return void 0===t&&(t={}),nj(this,void 0,void 0,function(){var e;return nq(this,function(n){switch(n.label){case 0:return e=this.impersonating,this.impersonating=!1,[4,nz.delete("/integrations/productsync",nF(nF({},t),{impersonating:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,n.sent()]}})})},t.prototype.Patch=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.patch("/integrations/productsync",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.Get=this.Get.bind(this),this.Save=this.Save.bind(this),this.Delete=this.Delete.bind(this),this.Patch=this.Patch.bind(this)}return t.prototype.Get=function(t){return void 0===t&&(t={}),nj(this,void 0,void 0,function(){var e;return nq(this,function(n){switch(n.label){case 0:return e=this.impersonating,this.impersonating=!1,[4,nz.get("/integrations/subscription",nF(nF({},t),{impersonating:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,n.sent()]}})})},t.prototype.Save=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.put("/integrations/subscription",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.Delete=function(t){return void 0===t&&(t={}),nj(this,void 0,void 0,function(){var e;return nq(this,function(n){switch(n.label){case 0:return e=this.impersonating,this.impersonating=!1,[4,nz.delete("/integrations/subscription",nF(nF({},t),{impersonating:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,n.sent()]}})})},t.prototype.Patch=function(t,e){return void 0===e&&(e={}),nj(this,void 0,void 0,function(){var n;return nq(this,function(i){switch(i.label){case 0:return n=this.impersonating,this.impersonating=!1,[4,nz.patch("/integrations/subscription",nF(nF({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,i.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}()),new(function(){function t(){this.impersonating=!1,this.GetToken=this.GetToken.bind(this)}return t.prototype.GetToken=function(t){return void 0===t&&(t={}),nj(this,void 0,void 0,function(){var e;return nq(this,function(n){switch(n.label){case 0:return e=this.impersonating,this.impersonating=!1,[4,nz.get("oauth/userinfo",nF(nF({},t),{impersonating:e})).catch(function(t){if(t.response)throw new nB(t);throw t})];case 1:return[2,n.sent()]}})})},t.prototype.As=function(){return this.impersonating=!0,this},t}());let nY={sitecore:{async getAuthHeader(){let{apiKey:t}=tH();return Promise.resolve(t)}},oc:{async getAuthHeader(){let t=nJ.GetIdentityToken();if(!t)throw tU.error("Could not found an Order Cloud Cloud logged user."),Error("Could not found an Order Cloud Cloud logged user.");return tU.info("Using existing Order Cloud Token."),`Bearer ${t}`}}},nX=async()=>{let{connector:t="oc"}=tH();return{"Content-Type":"application/json",Authorization:await nY[t].getAuthHeader()||""}}
1,nZ=new class{constructor(t){Object.defineProperty(this,"cache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=t,this.cache={},t3.RFK_CACHE||(t3.RFK_CACHE={}),t3.RFK_CACHE[t]=this.cache}hashKey(t){let e,n,i=0;for(e=0,n=t.length;e<n;e++)i=(i<<5)-i+t.charCodeAt(e)|0;return i}sortObjectKeys(t){return null==t?"":"object"!=typeof t?t:Object.keys(t).sort().reduce((e,n)=>(Array.isArray(t[n])?e[n]=t[n].map(t=>this.sortObjectKeys(t)):"object"==typeof t[n]?e[n]=this.sortObjectKeys(t[n]):e[n]=t[n],e),{})}createKey(t){let e=JSON.stringify(this.sortObjectKeys(t));return tW("debug")?(tU.debug("cache ::: createKey",t),e):String(this.hashKey(e))}has(t){return t in this.cache}get(t){return this.cache[t]}set(t,e){this.cache[t]=e}delete(t){delete this.cache[t]}all(){return this.cache}clear(){this.cache={},window.RFK_CACHE[this.name]=this.cache}getName(){return this.name}}("api-adapter"),n0={cache:!0};class n1{static async trackEvent(t){let e=n7(t),{eventUrl:n,apiKey:i}=tH();try{return(await fetch(n,{method:"POST",headers:{"Content-Type":"application/json",Authorization:i},body:JSON.stringify(e)})).json()}catch(t){return tU.error(t),tU.error("There was a problem on the service call"),t.message||null}}static async callApiWithoutCache(t,e){try{let n=await fetch(t,e),i=await n.json();return Promise.resolve(i)}catch(t){return tU.error(t),tU.error("There was a problem on the service call"),t.message||null}}static async callApiWithCache(t,e){let n=nZ.createKey(e);if(nZ.has(n))return nZ.get(n);let i=await n1.callApiWithoutCache(t,e);return nZ.set(n,i),i}static async callApi(t,e=n0){let{searchUrl:n}=tH(),i={method:"POST",headers:await nX(),body:JSON.stringify(t),signal:e.signal};return e.cache?n1.callApiWithCache(n,i):n1.callApiWithoutCache(n,i)}static clearCache(){nZ.clear()}}let n2=async t=>{let{trackConsent:e}=tH();if(tU.debug("trackEvent ",`Consent: ${e} `,n7(t)),!e)return;let n={...t,...t4(),client_time_ms:Date.now()};return tU.debug("trackEvent","Sending: ",JSON.stringify(n,null,4)),await n1.trackEvent(n)},n4=t=>!t.find(({id:t,entity_type:e})=>tD(t)||tD(e)),n3=(t,e)=>e.map(({id:e,entitySubtype:n,attributes:i,variant:r,uri:s,sourceId:o})=>({id:e,entity_type:t,...n?{entity_subtype:n}:{},...i&&!tR(i)?{attributes:i}:{},...r?{variant:r}:{},...s?{uri:s}:{},...o?{source_id:o}:{}})),n5=(t,e,n,i)=>({order_id:t,...e?{order_total:e}:{},...n?{order_subtotal:n}:{},...i?{coupon:i}:{}}),n6=({keyword:t,advancedQueryText:e,modifiedKeyword:n,numResults:i,totalResults:r,numRequested:s,pageSize:o,pageNumber:a,redirectUrl:c})=>({...t?{keyword:t}:{keyword:""},...e?{advanced_query_text:e}:{},...n?{modified_keyword:n}:{},...i?{num_results:i}:{},...r?{total_results:r}:{},...s?{num_requested:s}:{},...o?{page_size:o}:{},...a?{page_number:a}:{},...c?{redirect_url:c}:{}}),n8=t=>t.map(({facetId:t,facetValue:e,startValue:n,endValue:i,facetValueId:r,valueIndex:s,facetIndex:o,facetTitle:a,displayName:c})=>({name:t,title:a,...c?{display_name:c}:{},...t?{field:t}:{},...r?{value:[r]}:e?{value:[e]}:{},...n?{start_value:n}:{},...i?{end_value:i}:{},...e?{display_name:[e]}:{},...s||0===s?{value_position:[s]}:{},...o||0===o?{facet_position:o}:{}}));function n7(t){let e={};for(let n in t){let i=t[n];if(null!=i&&("object"!=typeof i||0!==Object.keys(i).length||Array.isArray(i))&&void 0!==i){if(Array.isArray(i)){let t=[];for(let e=0;e<i.length;e++){let n=i[e];if(null!=n&&("object"!=typeof n||0!==Object.keys(n).length||Array.isArray(n))){if("object"==typeof n){let e=n7(n);(Object.keys(e).length>0||Array.isArray(e))&&t.push(e)}else t.push(n)}}t.length>0&&(e[n]=t)}else if("object"==typeof i&&Object.keys(i).length>0){let t=n7(i);(Object.keys(t).length>0||Array.isArray(t))&&(e[n]=t)}else e[n]=i}}return e}let n9=async(t,e,{review:n,transaction:i,items:r,customAttributes:s,actionSubtype:o})=>{if(!e)return void tU.warn("trackEvent :::","Event name is not defined");let a=[];return t&&r&&(a=n3(t,r)),n2({name:e,action:"add",action_sub_type:o,value:{entities:a,transaction:i,review:n,custom_attributes:s,context:tI.toJson()}})};(v=_||(_={})).LOAD="core/LOAD",v.UNLOAD="core/UNLOAD",v.REQUEST="core/REQUEST",v.REQUEST_SUCCESS="core/REQUEST_SUCCESS",v.REQUEST_FAIL="core/REQUEST_FAIL",v.REQUEST_CANCELED="core/REQUEST_CANCELED",v.WIDGET_DATA_REQUEST="core/WIDGET_DATA_REQUEST",v.WIDGET_DATA_REQUEST_SUCCESS="core/WIDGET_DATA_REQUEST_SUCCESS",v.WIDGET_DATA_REQUEST_FAIL="core/WIDGET_DATA_REQUEST_FAIL",v.WIDGET_DATA_REQUEST_CANCELED="core/WIDGET_DATA_REQUEST_CANCELED",v.WIDGET_STATE_CHANGED="core/WIDGET_STATE_CHANGED",v.WIDGET_APPEAR="core/WIDGET_APPEAR",v.PAGE_CONTAINER_READY="core/PAGE_CONTAINER_READY",v.WIDGET_READY="core/WIDGET_READY",v.INITIALIZE="core/INITIALIZE",v.INITIALIZED="core/INITIALIZED",v.RESET_WIDGET="core/RESET_WIDGET",v.PAGE_CONTEXT_CHANGED="core/PAGE_CONTEXT_CHANGED",v.OC_CONTEXT_CHANGED="core/OC_CONTEXT_CHANGED",v.FOUND_WIDGETS="core/FOUND_WIDGETS",v.ADD_TO_CART="core/interaction/ADD_TO_CART",v.ORDER_CONFIRM="core/interaction/ORDER_CONFIRM",v.USER_LOGIN="core/interaction/USER_LOGIN",v.ADD_TO_WISHLIST="core/interaction/ADD_TO_WISHLIST",v.CART_STATUS="core/interaction/CART_STATUS",v.ITEM_CLICKED="core/interaction/ITEM_CLICKED",v.PAGE_WIDGETS_DATA_REQUEST="core/PAGE_WIDGETS_DATA_REQUEST",v.PAGE_WIDGETS_DATA_REQUEST_SUCCESS="core/PAGE_WIDGETS_DATA_REQUEST_SUCCESS",v.PAGE_WIDGETS_DATA_REQUEST_FAIL="core/PAGE_WIDGETS_DATA_REQUEST_FAIL",v.PAGE_WIDGETS_DATA_REQUEST_CANCELED="core/PAGE_WIDGETS_DATA_REQUEST_CANCELED";let it=_,ie=[],ii=[];class ir{static addActionHandler(t){ie.push(t)}static removeActionHandler(t){let e=ii.indexOf(t);-1!==e&&ii.splice(e,1)}static subscribe(t){ie.push(t)}static unsubscribe(t){let e=ie.indexOf(t);-1!==e&&ie.splice(e,1)}static dispatch(t){tU.debug("dispatcher ::: dispatch",`[${t.type}
1]`,t.payload),ie.forEach(e=>{e.handleAction(t)}),ii.forEach(e=>{e.handleAction(t)})}}let is=(t,e)=>`${t}${e?`@${e}`:""}`,io={widgetTypesConfigMapping:{},widgetsConfigMapping:{},setWidgetType(t,e){tr(this.widgetTypesConfigMapping,{[t]:e},{mutate:!0})},getType(t){let{type:e}=this.widgetsConfigMapping[is(t)]||{};return e},set(t,e,n){"string"==typeof e?this.widgetsConfigMapping[is(t,e)]=n:this.widgetsConfigMapping[is(t)]=e},update(t,e,n){tr("string"==typeof e?this.getOrCreate(t,e):this.getOrCreate(t),n,{mutate:!0})},get(t,e){let n=this.widgetsConfigMapping[is(t,e)],i=this.widgetsConfigMapping[is(t)];if(!i&&!n)return;let r=tr(i||{},n||{}),{component:s,options:o}=this.getForType(t)||{},{component:a=s,options:c}=r;return{...r,component:a,options:c?tr(o||{},c):o}},getWidgetIds(){return Object.keys(this.widgetsConfigMapping)},getByType(t){return this.widgetTypesConfigMapping[t]||void 0},getForType(t){let e=this.getType(t);return e?this.getByType(e):void 0},getOrCreate(t,e){return this.widgetsConfigMapping[is(t,e)]||(this.widgetsConfigMapping[is(t,e)]={}),this.widgetsConfigMapping[is(t,e)]},getMetadata(t){let{metadata:e}=this.widgetsConfigMapping[is(t)]||{};return e},setMetadata(t,e){Object.assign(this.getOrCreate(t),{metadata:e}),this.setType(t,e.type)},updateMetadata(t,e){tr(this.getOrCreate(t),{metadata:e},{mutate:!0}),this.setType(t,e.type)},setType(t,e){this.getType(t)||Object.assign(this.getOrCreate(t),{type:e})}};class ia{constructor(){Object.defineProperty(this,"initialized",{enumerable:!0,configurable:!0,writable:!0,value:!1})}register(t){ir.subscribe(t)}unregister(t){ir.unsubscribe(t)}getDispatcher(){return ir}initialize(){this.initialized=!0,ir.dispatch({type:it.INITIALIZED,payload:{}})}}let ic=new class extends ia{constructor(){super(),Object.defineProperty(this,"context",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.setContext(tI.get()),ir.subscribe(this)}getContext(){return this.context}setContext(t){this.context=t,this.context.addListener(this)}toggleTrackConsent(t){t?this.context.setUserUuid(t4().uuid):(tZ.remove("__ruid"),tZ.remove("__rutma"),tZ.remove("__rutmb"),tZ.remove("__ec"),tQ.trackConsent=!1)}handleAction(t){switch(t.type){case it.INITIALIZE:this.initialize();break;case it.ADD_TO_CART:{let{entity:e,items:n}=t.payload;(async(t,e)=>{n9(t,"cart",e)})(e,{items:n});break}case it.ADD_TO_WISHLIST:{let{entity:e,items:n}=t.payload;(async(t,e)=>{n9(t,"wishlist",e)})(e,{items:n});break}case it.USER_LOGIN:{let{id:e,email:n}=t.payload;(async t=>{if(!t||tR(t))return void tU.warn("trackEvent :::","User information is empty or not complete");n2({action:"identify",name:"login",action_sub_type:void 0,value:{context:tr(tI.toJson(),{user:{...t.id?{cuid:t.id}:{},...t.email?{email:t.email}:{}}})}})})({id:e,email:n});break}case it.CART_STATUS:{let{entity:e,items:n}=t.payload;(async(t,{items:e,actionSubtype:n})=>{let i=[];if(t&&e&&(i=n3(t,e))&&!n4(i))return void tU.warn("trackEvent :::","A field is missing on one or more of the items provided");n2({action:"view",name:"cart",action_sub_type:n,value:{entities:i,context:tI.toJson()}})})(e,{items:n});break}case it.ORDER_CONFIRM:{let{entity:e,items:n,orderId:i,orderTotal:r,orderSubtotal:s,coupon:o}=t.payload;(async(t,e)=>{let{orderId:n,orderTotal:i,orderSubtotal:r,coupon:s,items:o,actionSubtype:a}=e;if(!tD(n))return n9(t,"order_confirm",{items:o,transaction:n5(n,i,r,s),actionSubtype:a});tU.warn("trackEvent :::","Transaction orderId is not defined")})(e,{orderId:i,orderTotal:r,orderSubtotal:s,coupon:o,items:n});break}case it.WIDGET_APPEAR:{let{rfkId:e,entity:n}=t.payload;(async(t,e,{request:n,items:i}={})=>{let r=[];if(e&&i&&(r=n3(e,i))&&!n4(r))return void tU.warn("trackEvent :::","A field is missing on one or more of the items provided");n2({action:"view",name:"widget",value:{rfk_id:t,request:n,entities:r,context:tI.toJson()}})})(e,n)}}}onChange(t,e,n){this.initialized&&ir.dispatch({type:it.PAGE_CONTEXT_CHANGED,payload:{context:this.context}})}},iu=null,ih=async(t,e)=>{if(!iu)return Promise.reject(Error("No data processor configured"));try{let n=await n1.callApi(t,{cache:!1,...e}),i=iu.validateResponse(n,t);return i?Promise.reject(i):Promise.resolve(iu.processResponse(n,t))}catch(t){return Promise.reject(t)}},ip=t=>{iu=t};class id{validateResponse(t,e){return t&&(t.errors||[]).length>0?t:null}processResponse(t,e){return t}}let il=(t,{processor:e=new id}={})=>{let n;n=tQ,"useToken"in t&&void 0!==t.useToken&&tU.warn('Parameter "useToken" has been deprecated'),tQ=t.customerKey?tM(n,t):tV(n,t);
1let{useStorage:i=!1}=t;tZ.init(i),e&&ip(e)};class im extends id{processResponse(t){return t.widgets?.forEach(({rfk_id:t,type:e,variation_id:n,used_in:i})=>{io.setMetadata(t,{rfkId:t,type:e,variationId:n,usedIn:i})}),t}}let iv=!1,ig=()=>{iv||((()=>{let{trackConsent:t}=tH();ic.toggleTrackConsent(t),ic.getContext().setBrowserUserAgent(t_({navigator:{userAgent:""}}).navigator.userAgent)})(),iv=!0,ic.getDispatcher().dispatch({type:it.INITIALIZE,payload:{options:{}}}))},iw="undefined"==typeof window||"Deno"in window;function iy(){}function ib(t){return"number"==typeof t&&t>=0&&t!==1/0}function iS(t,e){return Math.max(t+(e||0)-Date.now(),0)}function iC(t,e,n){return i_(t)?"function"==typeof e?{...n,queryKey:t,queryFn:e}:{...e,queryKey:t}:t}function iA(t,e,n){return i_(t)?[{...e,queryKey:t},n]:[t||{},e]}function iE(t,e){let{type:n="all",exact:i,fetchStatus:r,predicate:s,queryKey:o,stale:a}=t;if(i_(o)){if(i){if(e.queryHash!==iT(o,e.options))return!1}else{if(!iO(e.queryKey,o))return!1}}if("all"!==n){let t=e.isActive();if("active"===n&&!t||"inactive"===n&&t)return!1}return!("boolean"==typeof a&&e.isStale()!==a||void 0!==r&&r!==e.state.fetchStatus||s&&!s(e))}function iP(t,e){let{exact:n,fetching:i,predicate:r,mutationKey:s}=t;if(i_(s)){if(!e.options.mutationKey)return!1;if(n){if(iL(e.options.mutationKey)!==iL(s))return!1}else{if(!iO(e.options.mutationKey,s))return!1}}return!("boolean"==typeof i&&"loading"===e.state.status!==i||r&&!r(e))}function iT(t,e){return((null==e?void 0:e.queryKeyHashFn)||iL)(t)}function iL(t){return JSON.stringify(t,(t,e)=>iD(e)?Object.keys(e).sort().reduce((t,n)=>(t[n]=e[n],t),{}):e)}function iO(t,e){return t===e||typeof t==typeof e&&!(!t||!e||"object"!=typeof t||"object"!=typeof e)&&!Object.keys(e).some(n=>!iO(t[n],e[n]))}function iI(t,e){if(t&&!e||e&&!t)return!1;for(let n in t)if(t[n]!==e[n])return!1;return!0}function iR(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function iD(t){if(!ik(t))return!1;let e=t.constructor;if(void 0===e)return!0;let n=e.prototype;return!!ik(n)&&!!n.hasOwnProperty("isPrototypeOf")}function ik(t){return"[object Object]"===Object.prototype.toString.call(t)}function i_(t){return Array.isArray(t)}function ix(t){return new Promise(e=>{setTimeout(e,t)})}function iG(t){ix(0).then(t)}function iN(t,e,n){return null!=n.isDataEqual&&n.isDataEqual(t,e)?t:"function"==typeof n.structuralSharing?n.structuralSharing(t,e):!1!==n.structuralSharing?function t(e,n){if(e===n)return e;let i=iR(e)&&iR(n);if(i||iD(e)&&iD(n)){let r=i?e.length:Object.keys(e).length,s=i?n:Object.keys(n),o=s.length,a=i?[]:{},c=0;for(let r=0;r<o;r++){let o=i?r:s[r];a[o]=t(e[o],n[o]),a[o]===e[o]&&c++}return r===o&&c===r?e:a}return n}(t,e):e}let iU=console,iF=function(){let t=[],e=0,n=t=>{t()},i=t=>{t()},r=i=>{e?t.push(i):iG(()=>{n(i)})};return{batch:r=>{let s;e++;try{s=r()}finally{--e||(()=>{let e=t;t=[],e.length&&iG(()=>{i(()=>{e.forEach(t=>{n(t)})})})})()}return s},batchCalls:t=>(...e)=>{r(()=>{t(...e)})},schedule:r,setNotifyFunction:t=>{n=t},setBatchNotifyFunction:t=>{i=t}}}();class ij{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){let e={listener:t};return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}let iq=new class extends ij{constructor(){super(),this.setup=t=>{if(!iw&&window.addEventListener){let e=()=>t();return window.addEventListener("visibilitychange",e,!1),window.addEventListener("focus",e,!1),()=>{window.removeEventListener("visibilitychange",e),window.removeEventListener("focus",e)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){var t;this.hasListeners()||(null==(t=this.cleanup)||t.call(this),this.cleanup=void 0)}setEventListener(t){var e;this.setup=t,null==(e=this.cleanup)||e.call(this),this.cleanup=t(t=>{"boolean"==typeof t?this.setFocused(t):this.onFocus()})}setFocused(t){this.focused!==t&&(this.focused=t,this.onFocus())}onFocus(){this.listeners.forEach(({listener:t})=>{t()})}isFocused(){return"boolean"==typeof this.focused?this.focused:"undefined"==typeof document||[void 0,"visible","prerender"].includes(document.visibilityState)}},iV=["online","offline"],iB=new class extends ij{constructor(){super(),this.setup=t=>{if(!iw&&window.addEventListener){let e=()=>t();return iV.forEach(t=>{window.addEventListener(t,e,!1)}),()=>{iV.forEach(t=>{window.removeEventListener(t,e)})}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){var t;this.hasListeners()||(null==(t=this.cleanup)||t.call(this),this.cleanup=void 0)}setEventListener(t){var e;this.setup=t,null==(e=this.cleanup)||e.call(this),this.cleanup=t(t=>{"boolean"==typeof t?this.setOnline(t):this.onOnline()})}setOnline(t){this.online!==t&&(this.online=t,this.onOnline())}
1onOnline(){this.listeners.forEach(({listener:t})=>{t()})}isOnline(){return"boolean"==typeof this.online?this.online:"undefined"==typeof navigator||void 0===navigator.onLine||navigator.onLine}};function iM(t){return Math.min(1e3*2**t,3e4)}function iK(t){return"online"!==(null!=t?t:"online")||iB.isOnline()}class iQ{constructor(t){this.revert=null==t?void 0:t.revert,this.silent=null==t?void 0:t.silent}}function iW(t){return t instanceof iQ}function iH(t){let e,n,i,r=!1,s=0,o=!1,a=new Promise((t,e)=>{n=t,i=e}),c=()=>!iq.isFocused()||"always"!==t.networkMode&&!iB.isOnline(),u=i=>{o||(o=!0,null==t.onSuccess||t.onSuccess(i),null==e||e(),n(i))},h=n=>{o||(o=!0,null==t.onError||t.onError(n),null==e||e(),i(n))},p=()=>new Promise(n=>{e=t=>{let e=o||!c();return e&&n(t),e},null==t.onPause||t.onPause()}).then(()=>{e=void 0,o||null==t.onContinue||t.onContinue()}),d=()=>{let e;if(!o){try{e=t.fn()}catch(t){e=Promise.reject(t)}Promise.resolve(e).then(u).catch(e=>{var n,i;if(o)return;let a=null!=(n=t.retry)?n:3,u=null!=(i=t.retryDelay)?i:iM,l="function"==typeof u?u(s,e):u,f=!0===a||"number"==typeof a&&s<a||"function"==typeof a&&a(s,e);!r&&f?(s++,null==t.onFail||t.onFail(s,e),ix(l).then(()=>{if(c())return p()}).then(()=>{r?h(e):d()})):h(e)})}};return iK(t.networkMode)?d():p().then(d),{promise:a,cancel:e=>{o||(h(new iQ(e)),null==t.abort||t.abort())},continue:()=>(null==e?void 0:e())?a:Promise.resolve(),cancelRetry:()=>{r=!0},continueRetry:()=>{r=!1}}}class i${destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ib(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(t){this.cacheTime=Math.max(this.cacheTime||0,null!=t?t:iw?1/0:3e5)}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class iJ extends i${constructor(t){super(),this.abortSignalConsumed=!1,this.defaultOptions=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.cache=t.cache,this.logger=t.logger||iU,this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.initialState=t.state||function(t){let e="function"==typeof t.initialData?t.initialData():t.initialData,n=void 0!==e,i=n?"function"==typeof t.initialDataUpdatedAt?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:n?null!=i?i:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"loading",fetchStatus:"idle"}}(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(t){this.options={...this.defaultOptions,...t},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.cache.remove(this)}setData(t,e){let n=iN(this.state.data,t,this.options);return this.dispatch({data:n,type:"success",dataUpdatedAt:null==e?void 0:e.updatedAt,manual:null==e?void 0:e.manual}),n}setState(t,e){this.dispatch({type:"setState",state:t,setStateOptions:e})}cancel(t){var e;let n=this.promise;return null==(e=this.retryer)||e.cancel(t),n?n.then(iy).catch(iy):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some(t=>!1!==t.options.enabled)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(t=>t.getCurrentResult().isStale)}isStaleByTime(t=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!iS(this.state.dataUpdatedAt,t)}onFocus(){var t;let e=this.observers.find(t=>t.shouldFetchOnWindowFocus());e&&e.refetch({cancelRefetch:!1}),null==(t=this.retryer)||t.continue()}onOnline(){var t;let e=this.observers.find(t=>t.shouldFetchOnReconnect());e&&e.refetch({cancelRefetch:!1}),null==(t=this.retryer)||t.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(e=>
1e!==t),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(t,e){var n,i,r,s;if("idle"!==this.state.fetchStatus){if(this.state.dataUpdatedAt&&null!=e&&e.cancelRefetch)this.cancel({silent:!0});else if(this.promise)return null==(r=this.retryer)||r.continueRetry(),this.promise}if(t&&this.setOptions(t),!this.options.queryFn){let t=this.observers.find(t=>t.options.queryFn);t&&this.setOptions(t.options)}let o=function(){if("function"==typeof AbortController)return new AbortController}(),a={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},c=t=>{Object.defineProperty(t,"signal",{enumerable:!0,get:()=>{if(o)return this.abortSignalConsumed=!0,o.signal}})};c(a);let u={fetchOptions:e,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(a)):Promise.reject("Missing queryFn for queryKey '"+this.options.queryHash+"'")};c(u),null==(n=this.options.behavior)||n.onFetch(u),this.revertState=this.state,("idle"===this.state.fetchStatus||this.state.fetchMeta!==(null==(i=u.fetchOptions)?void 0:i.meta))&&this.dispatch({type:"fetch",meta:null==(s=u.fetchOptions)?void 0:s.meta});let h=t=>{var e,n,i,r;iW(t)&&t.silent||this.dispatch({type:"error",error:t}),iW(t)||(null==(e=(n=this.cache.config).onError)||e.call(n,t,this),null==(i=(r=this.cache.config).onSettled)||i.call(r,this.state.data,t,this)),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=iH({fn:u.fetchFn,abort:null==o?void 0:o.abort.bind(o),onSuccess:t=>{var e,n,i,r;void 0!==t?(this.setData(t),null==(e=(n=this.cache.config).onSuccess)||e.call(n,t,this),null==(i=(r=this.cache.config).onSettled)||i.call(r,t,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1):h(Error(this.queryHash+" data is undefined"))},onError:h,onFail:(t,e)=>{this.dispatch({type:"failed",failureCount:t,error:e})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(t){this.state=(e=>{var n,i;switch(t.type){case"failed":return{...e,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...e,fetchStatus:"paused"};case"continue":return{...e,fetchStatus:"fetching"};case"fetch":return{...e,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null!=(n=t.meta)?n:null,fetchStatus:iK(this.options.networkMode)?"fetching":"paused",...!e.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...e,data:t.data,dataUpdateCount:e.dataUpdateCount+1,dataUpdatedAt:null!=(i=t.dataUpdatedAt)?i:Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":let r=t.error;return iW(r)&&r.revert&&this.revertState?{...this.revertState,fetchStatus:"idle"}:{...e,error:r,errorUpdateCount:e.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:e.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...e,isInvalidated:!0};case"setState":return{...e,...t.state}}})(this.state),iF.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate(t)}),this.cache.notify({query:this,type:"updated",action:t})})}}class iz extends ij{constructor(t){super(),this.config=t||{},this.queries=[],this.queriesMap={}}build(t,e,n){var i;let r=e.queryKey,s=null!=(i=e.queryHash)?i:iT(r,e),o=this.get(s);return o||(o=new iJ({cache:this,logger:t.getLogger(),queryKey:r,queryHash:s,options:t.defaultQueryOptions(e),state:n,defaultOptions:t.getQueryDefaults(r)}),this.add(o)),o}add(t){this.queriesMap[t.queryHash]||(this.queriesMap[t.queryHash]=t,this.queries.push(t),this.notify({type:"added",query:t}))}remove(t){let e=this.queriesMap[t.queryHash];
1e&&(t.destroy(),this.queries=this.queries.filter(e=>e!==t),e===t&&delete this.queriesMap[t.queryHash],this.notify({type:"removed",query:t}))}clear(){iF.batch(()=>{this.queries.forEach(t=>{this.remove(t)})})}get(t){return this.queriesMap[t]}getAll(){return this.queries}find(t,e){let[n]=iA(t,e);return void 0===n.exact&&(n.exact=!0),this.queries.find(t=>iE(n,t))}findAll(t,e){let[n]=iA(t,e);return Object.keys(n).length>0?this.queries.filter(t=>iE(n,t)):this.queries}notify(t){iF.batch(()=>{this.listeners.forEach(({listener:e})=>{e(t)})})}onFocus(){iF.batch(()=>{this.queries.forEach(t=>{t.onFocus()})})}onOnline(){iF.batch(()=>{this.queries.forEach(t=>{t.onOnline()})})}}class iY extends i${constructor(t){super(),this.defaultOptions=t.defaultOptions,this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.logger=t.logger||iU,this.observers=[],this.state=t.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0},this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options={...this.defaultOptions,...t},this.updateCacheTime(this.options.cacheTime)}get meta(){return this.options.meta}setState(t){this.dispatch({type:"setState",state:t})}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.observers=this.observers.filter(e=>e!==t),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.observers.length||("loading"===this.state.status?this.scheduleGc():this.mutationCache.remove(this))}continue(){var t,e;return null!=(t=null==(e=this.retryer)?void 0:e.continue())?t:this.execute()}async execute(){var t,e,n,i,r,s,o,a,c,u,h,p,d,l,f,m,v,g,w,y;let b="loading"===this.state.status;try{if(!b){this.dispatch({type:"loading",variables:this.options.variables}),await (null==(c=(u=this.mutationCache.config).onMutate)?void 0:c.call(u,this.state.variables,this));let t=await (null==(h=(p=this.options).onMutate)?void 0:h.call(p,this.state.variables));t!==this.state.context&&this.dispatch({type:"loading",context:t,variables:this.state.variables})}let d=await (()=>{var t;return this.retryer=iH({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(t,e)=>{this.dispatch({type:"failed",failureCount:t,error:e})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:null!=(t=this.options.retry)?t:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise})();return await (null==(t=(e=this.mutationCache.config).onSuccess)?void 0:t.call(e,d,this.state.variables,this.state.context,this)),await (null==(n=(i=this.options).onSuccess)?void 0:n.call(i,d,this.state.variables,this.state.context)),await (null==(r=(s=this.mutationCache.config).onSettled)?void 0:r.call(s,d,null,this.state.variables,this.state.context,this)),await (null==(o=(a=this.options).onSettled)?void 0:o.call(a,d,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:d}),d}catch(t){try{throw await (null==(d=(l=this.mutationCache.config).onError)?void 0:d.call(l,t,this.state.variables,this.state.context,this)),await (null==(f=(m=this.options).onError)?void 0:f.call(m,t,this.state.variables,this.state.context)),await (null==(v=(g=this.mutationCache.config).onSettled)?void 0:v.call(g,void 0,t,this.state.variables,this.state.context,this)),await (null==(w=(y=this.options).onSettled)?void 0:w.call(y,void 0,t,this.state.variables,this.state.context)),t}finally{this.dispatch({type:"error",error:t})}}}dispatch(t){this.state=(e=>{switch(t.type){case"failed":return{...e,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...e,isPaused:!0};case"continue":return{...e,isPaused:!1};case"loading":return{...e,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!iK(this.options.networkMode),status:"loading",variables:t.variables};case"success":return{...e,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...e,data:void 0,error:t.error,failureCount:e.failureCount+1,failureReason:t.error,isPau
1sed:!1,status:"error"};case"setState":return{...e,...t.state}}})(this.state),iF.batch(()=>{this.observers.forEach(e=>{e.onMutationUpdate(t)}),this.mutationCache.notify({mutation:this,type:"updated",action:t})})}}class iX extends ij{constructor(t){super(),this.config=t||{},this.mutations=[],this.mutationId=0}build(t,e,n){let i=new iY({mutationCache:this,logger:t.getLogger(),mutationId:++this.mutationId,options:t.defaultMutationOptions(e),state:n,defaultOptions:e.mutationKey?t.getMutationDefaults(e.mutationKey):void 0});return this.add(i),i}add(t){this.mutations.push(t),this.notify({type:"added",mutation:t})}remove(t){this.mutations=this.mutations.filter(e=>e!==t),this.notify({type:"removed",mutation:t})}clear(){iF.batch(()=>{this.mutations.forEach(t=>{this.remove(t)})})}getAll(){return this.mutations}find(t){return void 0===t.exact&&(t.exact=!0),this.mutations.find(e=>iP(t,e))}findAll(t){return this.mutations.filter(e=>iP(t,e))}notify(t){iF.batch(()=>{this.listeners.forEach(({listener:e})=>{e(t)})})}resumePausedMutations(){var t;return this.resuming=(null!=(t=this.resuming)?t:Promise.resolve()).then(()=>{let t=this.mutations.filter(t=>
1t.state.isPaused);return iF.batch(()=>t.reduce((t,e)=>t.then(()=>e.continue().catch(iy)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}}function iZ(t,e){return null==t.getNextPageParam?void 0:t.getNextPageParam(e[e.length-1],e)}class i0{constructor(t={}){this.queryCache=t.queryCache||new iz,this.mutationCache=t.mutationCache||new iX,this.logger=t.logger||iU,this.defaultOptions=t.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,1===this.mountCount&&(this.unsubscribeFocus=iq.subscribe(()=>{iq.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=iB.subscribe(()=>{iB.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var t,e;this.mountCount--,0===this.mountCount&&(null==(t=this.unsubscribeFocus)||t.call(this),this.unsubscribeFocus=void 0,null==(e=this.unsubscribeOnline)||e.call(this),this.unsubscribeOnline=void 0)}isFetching(t,e){let[n]=iA(t,e);return n.fetchStatus="fetching",this.queryCache.findAll(n).length}isMutating(t){return this.mutationCache.findAll({...t,fetching:!0}).length}getQueryData(t,e){var n;return null==(n=this.queryCache.find(t,e))?void 0:n.state.data}ensureQueryData(t,e,n){let i=iC(t,e,n),r=this.getQueryData(i.queryKey);return r?Promise.resolve(r):this.fetchQuery(i)}getQueriesData(t){return this.getQueryCache().findAll(t).map(({queryKey:t,state:e})=>[t,e.data])}setQueryData(t,e,n){var i;let r=this.queryCache.find(t),s=(i=null==r?void 0:r.state.data,"function"==typeof e?e(i):e);if(void 0===s)return;let o=iC(t),a=this.defaultQueryOptions(o);return this.queryCache.build(this,a).setData(s,{...n,manual:!0})}setQueriesData(t,e,n){return iF.batch(()=>this.getQueryCache().findAll(t).map(({queryKey:t})=>[t,this.setQueryData(t,e,n)]))}getQueryState(t,e){var n;return null==(n=this.queryCache.find(t,e))?void 0:n.state}removeQueries(t,e){let[n]=iA(t,e),i=this.queryCache;iF.batch(()=>{i.findAll(n).forEach(t=>{i.remove(t)})})}resetQueries(t,e,n){let[i,r]=iA(t,e,n),s=this.queryCache,o={type:"active",...i};return iF.batch(()=>(s.findAll(i).forEach(t=>{t.reset()}),this.refetchQueries(o,r)))}cancelQueries(t,e,n){let[i,r={}]=iA(t,e,n);return void 0===r.revert&&(r.revert=!0),Promise.all(iF.batch(()=>this.queryCache.findAll(i).map(t=>t.cancel(r)))).then(iy).catch(iy)}invalidateQueries(t,e,n){let[i,r]=iA(t,e,n);return iF.batch(()=>{var t,e;if(this.queryCache.findAll(i).forEach(t=>{t.invalidate()}),"none"===i.refetchType)return Promise.resolve();let n={...i,type:null!=(t=null!=(e=i.refetchType)?e:i.type)?t:"active"};return this.refetchQueries(n,r)})}refetchQueries(t,e,n){let[i,r]=iA(t,e,n),s=Promise.all(iF.batch(()=>this.queryCache.findAll(i).filter(t=>!t.isDisabled()).map(t=>{var e;return t.fetch(void 0,{...r,cancelRefetch:null==(e=null==r?void 0:r.cancelRefetch)||e,meta:{refetchPage:i.refetchPage}})}))).then(iy);return null!=r&&r.throwOnError||(s=s.catch(iy)),s}fetchQuery(t,e,n){let i=iC(t,e,n),r=this.defaultQueryOptions(i);void 0===r.retry&&(r.retry=!1);let s=this.queryCache.build(this,r);return s.isStaleByTime(r.staleTime)?s.fetch(r):Promise.resolve(s.state.data)}prefetchQuery(t,e,n){return this.fetchQuery(t,e,n).then(iy).catch(iy)}fetchInfiniteQuery(t,e,n){let i=iC(t,e,n);return i.behavior={onFetch:t=>{t.fetchFn=()=>{var e,n,i,r,s,o,a;let c;let u=null==(e=t.fetchOptions)||null==(n=e.meta)?void 0:n.refetchPage,h=null==(i=t.fetchOptions)||null==(r=i.meta)?void 0:r.fetchMore,p=null==h?void 0:h.pageParam,d="forward"===(null==h?void 0:h.direction),l="backward"===(null==h?void 0:h.direction),f=(null==(s=t.state.data)?void 0:s.pages)||[],m=(null==(o=t.state.data)?void 0:o.pageParams)||[],v=m,g=!1,w=t.options.queryFn||(()=>Promise.reject("Missing queryFn for queryKey '"+t.options.queryHash+"'")),y=(t,e,n,i)=>(v=i?[e,...v]:[...v,e],i?[n,...t]:[...t,n]),b=(e,n,i,r)=>{if(g)return Promise.reject("Cancelled");if(void 0===i&&!n&&e.length)return Promise.resolve(e);let s={queryKey:t.queryKey,pageParam:i,meta:t.options.meta};return Object.defineProperty(s,"signal",{enumerable:!0,get:()=>{var e,n;return null!=(e=t.signal)&&e.aborted?g=!0:null==(n=t.signal)||n.addEventListener("abort",()=>{g=!0}),t.signal}}),Promise.resolve(w(s)).then(t=>y(e,i,t,r))};if(f.length){if(d){let e=void 0!==p,n=e?p:iZ(t.options,f);c=b(f,e,n)}else if(l){let e=void 0!==p,n=e?p:null==(a=t.options).getPreviousPageParam?void 0:a.getPreviousPageParam(f[0],f);c=b(f,e,n,!0)}else{v=[];let e=void 0===t.options.getNextPageParam;c=u&&f[0]&&!u(f[0],0,f)?Promise.resolve(y([],m[0],f[0])):b([],e,m[0]);for(let n=1;n<f.length;n++)c=c.then(i=>{if(!u||!f[n]||u(f[n],n,f)){let r=e?m[n]:iZ(t.options,i);return b(i,e,r)}return Promise.resolve(y(i,m[n],f[n]))})}}else c=b([]);return c.then(t=>({pages:t,pageParams:v}))}}},this.fetchQuery(i)}prefetchInfiniteQuery(t,e,n){return this.fetchInfiniteQuery(t,e,n).then(iy).catch(iy)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(t){this.defaultOptions=t}setQueryDefaults(t,e){let n=this.queryDefaults.find(e=>iL(t)===iL(e.queryKey));n?n.defaultOptions=e:this.queryDefaults.push({queryKey:t,defaultOptions:e})}getQueryDefaults(t){if(!t)return;let e=this.queryDefaults.find(e=>iO(t,e.queryKey));return null==e?void 0:e.defaultOptions}setMutationDefaults(t,e){let n=this.mutationDefaults.find(e=>iL(t)===iL(e.mutationKey));n?n.defaultOptions=e:this.mutationDefaults.push({mutationKey:t,defaultOptions:e})}getMutationDefaults(t){if(!t)return;let e=this.mutationDefaults.find(e=>iO(t,e.mutationKey));return null==e?void 0:e.defaultOptions}defaultQueryOptions(t){if(null!=t&&t._defaulted)return t;let e={...this.defaultOptions.queries,...this.getQueryDefaults(null==t?void 0:t.queryKey),...t,_defaulted:!0};return!e.queryHash&&e.queryKey&&(e.queryHash=iT(e.queryKey,e)),void 0===e.refetchOnReconnect&&(e.refetchOnReconnect="always"!==e.networkMode),void 0===e.useErrorBoundary&&(e.useErrorBoundary=!!e.suspense),e}defaultMutationOptions(t){return null!=t&&t._defaulted?t:{...this.defaultOptions.mutations,...this.getMutationDefaults(null==t?void 0:t.mutationKey),...t,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}let i1=B.createContext(void 0),i2=B.createContext(!1);function i4(t,e){return t||(e&&"undefined"!=typeof window?(window.ReactQueryClientContext||(window.ReactQueryClientContext=i1),window.ReactQueryClientContext):i1)}let i3=({context:t}={})=>{let e=B.useContext(i4(t,B.useContext(i2)));if(!e)throw Error("No QueryClient set, use QueryClientProvider to set one");return e},i5=({client:t,children:e,context:n,contextSharing:i=!1})=>{B.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]);let r=i4(n,i);return B.createElement(i2.Provider,{value:!n&&i},B.createElement(r.Provider,{value:t},e))};class i6{constructor(){Object.defineProperty(this,"containerHandled",{enumerable:!0,configurable:!0,writable:!0,value:!1}),ic.register(this)}handleAction(t){switch(t.type){case it.PAGE_CONTAINER_READY:this.containerHandled||(this.containerHandled=this.handlePageContainerReadyAction(t.payload));break;case it.FOUND_WIDGETS:{let{widgets:e=[]}=t.payload;e.forEach(({rfkId:t,entity:e,node:n})=>{this.handleAddWidget(t,e,n)})}}}handlePageContainerReadyAction(t){return!0}handleAddWidget(t,e,n){}}let i8='[data-rfkid="rfkid_container"]',i7=()=>
1{if(i)return;let t=document.querySelector(i8);(i=new MutationObserver(e=>{let n=[];e.forEach(e=>{e.addedNodes.forEach(e=>{let i=e.dataset.rfkid,r=e.dataset.entity;e.nodeType!==Node.ELEMENT_NODE||t&&t.contains(e)||!i||!r||n.push({rfkId:i,entity:r,node:e})})}),Object.keys(n).length>0&&ic.getDispatcher().dispatch({type:it.FOUND_WIDGETS,payload:{widgets:n}})})).observe(document.body,{subtree:!0,childList:!0,characterData:!0})},i9={keyphrase:(t,e)=>e.keyphrase&&t.setSearchQueryKeyphrase(e.keyphrase),suggestionsList:(t,e)=>e.suggestionsList&&t.setSearchSuggestion(e.suggestionsList.map(({suggestion:t,max:e=3})=>({name:t,max:e}))),itemsPerPage:(t,e)=>t.setSearchLimit(e.itemsPerPage)};(g=x||(x={})).ITEM_CLICKED="search/ITEM_CLICKED",g.SUGGESTION_CLICKED="search/SUGGESTION_CLICKED",g.SUGGESTION_ADDED="search/SUGGESTION_ADDED",g.SUGGESTION_REMOVED="search/SUGGESTION_REMOVED",g.KEYPHRASE_CHANGED="search/KEYPHRASE_CHANGED";let rt={onItemClick:x.ITEM_CLICKED,onSuggestionClick:x.SUGGESTION_CLICKED,onSuggestionAdded:x.SUGGESTION_ADDED,onSuggestionRemoved:x.SUGGESTION_REMOVED,onKeyphraseChange:x.KEYPHRASE_CHANGED},re={itemsPerPage:(t,e)=>t.setRecommendationsLimit(e.itemsPerPage)};(w=G||(G={})).ITEM_CLICKED="recommendation/ITEM_CLICKED",w.NAVIGATION_NEXT="recommendation/NAVIGATION_NEXT",w.NAVIGATION_PREV="recommendation/NAVIGATION_PREV";let rn={onNavigationNext:G.NAVIGATION_NEXT,onNavigationPrev:G.NAVIGATION_PREV,onItemClick:G.ITEM_CLICKED},ri={keyphrase:(t,e)=>e.keyphrase&&t.setQuestionsKeyphrase(e.keyphrase),relatedQuestions:(t,e)=>e.relatedQuestions&&t.setQuestionsRelatedQuestionsLimit(e.relatedQuestions)};(N||(N={})).KEYPHRASE_CHANGED="questions/KEYPHRASE_CHANGED";let rr={onKeyphraseChanged:N.KEYPHRASE_CHANGED},rs={keyphrase:(t,e)=>e.keyphrase&&t.setSearchQueryKeyphrase(e.keyphrase),page:(t,e)=>t.setSearchOffset((e.itemsPerPage??t.getSearchLimit())*((e.page??1)-1)||0),itemsPerPage:(t,e)=>t.setSearchLimit(e.itemsPerPage),sortType:(t,e)=>t.setSearchSortCriteriaName(e.sortType)};(y=U||(U={})).FACET_CLICKED="searchResults/FACET_CLICKED",y.FILTER_CLICKED="searchResults/FILTER_CLICKED",y.REMOVE_FILTER="searchResults/REMOVE_FILTER",y.SORT_CHANGED="searchResults/SORT_CHANGED",y.PAGE_NUMBER_CHANGED="searchResults/PAGE_NUMBER_CHANGED",y.ITEM_CLICKED="searchResults/ITEM_CLICKED",y.RESULTS_PER_PAGE_CHANGED="searchResults/RESULTS_PER_PAGE_CHANGED",y.KEYPHRASE_CHANGED="searchResults/KEYPHRASE_CHANGED",y.CLEAR_FILTERS="searchResults/CLEAR_FILTERS";let ro={onKeyphraseChange:U.KEYPHRASE_CHANGED,onClearFilters:U.CLEAR_FILTERS,onResultsPerPageChange:U.RESULTS_PER_PAGE_CHANGED,onPageNumberChange:U.PAGE_NUMBER_CHANGED,onItemClick:U.ITEM_CLICKED,onSortChange:U.SORT_CHANGED,onFacetClick:U.FACET_CLICKED,onFilterClick:U.FILTER_CLICKED,onRemoveFilter:U.REMOVE_FILTER};(b=F||(F={})).DESKTOP="pc",b.MOBILE="mobile",b.TABLET="tablet",(S=j||(j={})).JS="js",S.HTML="html",S.CSS="css",(C=q||(q={})).PAGE="page",C.COMMON_ACROSS_PAGES="common_across_pages",C.DIALOG="dialog";let ra=(0,B.createContext)({}),rc=(0,B.createContext)({}),ru=()=>(0,B.useContext)(ra);class rh extends Error{constructor({_requestId:t,_canceled:e,...n}){super("Request canceled"),Object.defineProperty(this,"response",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name="AbortError",this.response=n}getResponse(){return this.response}}class rp extends ij{constructor(t,e){super(),this.client=t,this.options=e,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(e)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.currentQuery.addObserver(this),rd(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return rl(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return rl(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(t,e){let n=this.options,i=this.currentQuery;if(this.options=this.client.defaultQueryOptions(t),iI(n,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled)throw Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=n.queryKey),this.updateQuery();let r=this.hasListeners();r&&rf(this.currentQuery,i,this.options,n)&&this.executeFetch(),this.updateResult(e),r&&(this.currentQuery!==i||this.options.enabled!==n.enabled||this.options.staleTime!==n.staleTime)&&this.updateStaleTimeout();let s=this.computeRefetchInterval();r&&(this.currentQuery!==i||this.options.enabled!==n.enabled||s!==this.currentRefetchInterval)&&this.updateRefetchInterval(s)}getOptimisticResult(t){let e=this.client.getQueryCache().build(this.client,t),n=this.createResult(e,t);return t.keepPreviousData||(void 0!==t.placeholderData?!n.isPlaceholderData:iI(this.getCurrentResult(),n))||(this.currentResult=n,this.currentResultOptions=this.options,this.currentResultState=this.currentQuery.state),n}getCurrentResult(){return this.currentResult}trackResult(t){let e={};return Object.keys(t).forEach(n=>{Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(n),t[n])})}),e}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:t,...e}={}){return this.fetch({...e,meta:{refetchPage:t}})}fetchOptimistic(t){let e=this.client.defaultQueryOptions(t),n=this.client.getQueryCache().build(this.client,e);return n.isFetchingOptimistic=!0,n.fetch().then(()=>this.createResult(n,e))}fetch(t){var e;return this.executeFetch({...t,cancelRefetch:null==(e=t.cancelRefetch)||e}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(t){this.updateQuery();let e=this.currentQuery.fetch(this.options,t);return null!=t&&t.throwOnError||(e=e.catch(iy)),e}updateStaleTimeout(){if(this.clearStaleTimeout(),iw||this.currentResult.isStale||!ib(this.options.staleTime))return;let t=iS(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},t)}computeRefetchInterval(){var t;return"function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.currentResult.data,this.currentQuery):null!=(t=this.options.refetchInterval)&&t}updateRefetchInterval(t){this.clearRefetchInterval(),this.currentRefetchInterval=t,!iw&&!1!==this.options.enabled&&ib(this.currentRefetchInterval)&&0!==this.currentRefetchInterval&&(this.refetchIntervalId=setInterval(()=>
1{(this.options.refetchIntervalInBackground||iq.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(t,e){let n=this.currentQuery,i=this.options,r=this.currentResult,s=this.currentResultState,o=this.currentResultOptions,a=t!==n,c=a?t.state:this.currentQueryInitialState,u=a?this.currentResult:this.previousQueryResult,{state:h}=t,p,{dataUpdatedAt:d,error:l,errorUpdatedAt:f,fetchStatus:m,status:v}=h,g=!1,w=!1;if(e._optimisticResults){let r=this.hasListeners(),s=!r&&rd(t,e),o=r&&rf(t,n,e,i);(s||o)&&(m=iK(t.options.networkMode)?"fetching":"paused",d||(v="loading")),"isRestoring"===e._optimisticResults&&(m="idle")}if(e.keepPreviousData&&!h.dataUpdatedAt&&null!=u&&u.isSuccess&&"error"!==v)p=u.data,d=u.dataUpdatedAt,v=u.status,g=!0;else if(e.select&&void 0!==h.data){if(r&&h.data===(null==s?void 0:s.data)&&e.select===this.selectFn)p=this.selectResult;else try{this.selectFn=e.select,p=e.select(h.data),p=iN(null==r?void 0:r.data,p,e),this.selectResult=p,this.selectError=null}catch(t){this.selectError=t}}else p=h.data;if(void 0!==e.placeholderData&&void 0===p&&"loading"===v){let t;if(null!=r&&r.isPlaceholderData&&e.placeholderData===(null==o?void 0:o.placeholderData))t=r.data;else if(t="function"==typeof e.placeholderData?e.placeholderData():e.placeholderData,e.select&&void 0!==t)try{t=e.select(t),this.selectError=null}catch(t){this.selectError=t}void 0!==t&&(v="success",p=iN(null==r?void 0:r.data,t,e),w=!0)}this.selectError&&(l=this.selectError,p=this.selectResult,f=Date.now(),v="error");let y="fetching"===m,b="loading"===v,S="error"===v;return{status:v,fetchStatus:m,isLoading:b,isSuccess:"success"===v,isError:S,isInitialLoading:b&&y,data:p,dataUpdatedAt:d,error:l,errorUpdatedAt:f,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>c.dataUpdateCount||h.errorUpdateCount>c.errorUpdateCount,isFetching:y,isRefetching:y&&!b,isLoadingError:S&&0===h.dataUpdatedAt,isPaused:"paused"===m,isPlaceholderData:w,isPreviousData:g,isRefetchError:S&&0!==h.dataUpdatedAt,isStale:rm(t,e),refetch:this.refetch,remove:this.remove}}updateResult(t){let e=this.currentResult,n=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,iI(n,e))return;this.currentResult=n;let i={cache:!0};!1!==(null==t?void 0:t.listeners)&&(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n="function"==typeof t?t():t;if("all"===n||!n&&!this.trackedProps.size)return!0;let i=new Set(null!=n?n:this.trackedProps);return this.options.useErrorBoundary&&i.add("error"),Object.keys(this.currentResult).some(t=>this.currentResult[t]!==e[t]&&i.has(t))})()&&(i.listeners=!0),this.notify({...i,...t})}updateQuery(){let t=this.client.getQueryCache().build(this.client,this.options);if(t===this.currentQuery)return;let e=this.currentQuery;this.currentQuery=t,this.currentQueryInitialState=t.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(null==e||e.removeObserver(this),t.addObserver(this))}onQueryUpdate(t){let e={};"success"===t.type?e.onSuccess=!t.manual:"error"!==t.type||iW(t.error)||(e.onError=!0),this.updateResult(e),this.hasListeners()&&this.updateTimers()}notify(t){iF.batch(()=>{var e,n,i,r,s,o,a,c;t.onSuccess?(null==(e=(n=this.options).onSuccess)||e.call(n,this.currentResult.data),null==(i=(r=this.options).onSettled)||i.call(r,this.currentResult.data,null)):t.onError&&(null==(s=(o=this.options).onError)||s.call(o,this.currentResult.error),null==(a=(c=this.options).onSettled)||a.call(c,void 0,this.currentResult.error)),t.listeners&&this.listeners.forEach(({listener:t})=>{t(this.currentResult)}),t.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function rd(t,e){return!(!1===e.enabled||t.state.dataUpdatedAt||"error"===t.state.status&&!1===e.retryOn
1Mount)||t.state.dataUpdatedAt>0&&rl(t,e,e.refetchOnMount)}function rl(t,e,n){if(!1!==e.enabled){let i="function"==typeof n?n(t):n;return"always"===i||!1!==i&&rm(t,e)}return!1}function rf(t,e,n,i){return!1!==n.enabled&&(t!==e||!1===i.enabled)&&(!n.suspense||"error"!==t.state.status)&&rm(t,n)}function rm(t,e){return t.isStaleByTime(e.staleTime)}let rv=f(634).useSyncExternalStore,rg=B.createContext((h=!1,{clearReset:()=>{h=!1},reset:()=>{h=!0},isReset:()=>h})),rw=B.createContext(!1);rw.Provider;let ry=t=>{let[e,n]=(0,B.useState)(()=>t.getKey()),i=i3();return(0,B.useEffect)(()=>(t.onUpdate(()=>{n(t.getKey())}),()=>{i.cancelQueries({queryKey:t.getKey(),exact:!0}),t.destroy()}),[t,i]),function(t,e){let n=i3({context:t.context}),i=B.useContext(rw),r=B.useContext(rg),s=n.defaultQueryOptions(t);s._optimisticResults=i?"isRestoring":"optimistic",s.onError&&(s.onError=iF.batchCalls(s.onError)),s.onSuccess&&(s.onSuccess=iF.batchCalls(s.onSuccess)),s.onSettled&&(s.onSettled=iF.batchCalls(s.onSettled)),s.suspense&&"number"!=typeof s.staleTime&&(s.staleTime=1e3),(s.suspense||s.useErrorBoundary)&&(r.isReset()||(s.retryOnMount=!1)),B.useEffect(()=>{r.clearReset()},[r]);let[o]=B.useState(()=>new e(n,s)),a=o.getOptimisticResult(s);if(rv(B.useCallback(t=>{let e=i?()=>{}:o.subscribe(iF.batchCalls(t));return o.updateResult(),e},[o,i]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),B.useEffect(()=>{o.setOptions(s,{listeners:!1})},[s,o]),(null==s?void 0:s.suspense)&&a.isLoading&&a.isFetching&&!i)throw o.fetchOptimistic(s).then(({data:t})=>{null==s.onSuccess||s.onSuccess(t),null==s.onSettled||s.onSettled(t,null)}).catch(t=>{r.clearReset(),null==s.onError||s.onError(t),null==s.onSettled||s.onSettled(void 0,t)});if((({result:t,errorResetBoundary:e,useErrorBoundary:n,query:i})=>{var r;return t.isError&&!e.isReset()&&!t.isFetching&&(r=[t.error,i],"function"==typeof n?n(...r):!!n)})({result:a,errorResetBoundary:r,useErrorBoundary:s.useErrorBoundary,query:o.getCurrentQuery()}))throw a.error;return s.notifyOnChangeProps?a:o.trackResult(a)}(iC({queryKey:e,queryFn:e=>t.run({signal:e.signal}).catch(t=>t instanceof rh?i.cancelQueries({queryKey:e.queryKey,exact:!0}).then(()=>null):Promise.reject(t)),refetchOnMount:!1,enabled:t.isEnabled()},void 0,void 0),rp)},rb=()=>(0,B.useContext)(rc);function rS(){return(rS=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}function rC(t,e){return(rC=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var rA=new Map,rE=new WeakMap,rP=0;function rT(t,e,n,i){if(void 0===n&&(n={}),void 0===i&&(i=void 0),void 0===window.IntersectionObserver&&void 0!==i){var r=t.getBoundingClientRect();return e(i,{isIntersecting:i,target:t,intersectionRatio:"number"==typeof n.threshold?n.threshold:0,time:0,boundingClientRect:r,intersectionRect:r,rootBounds:r}),function(){}}var s=function(t){var e=Object.keys(t).sort().filter(function(e){return void 0!==t[e]}).map(function(e){var n;return e+"_"+("root"===e?(n=t.root)?(rE.has(n)||(rP+=1,rE.set(n,rP.toString())),rE.get(n)):"0":t[e])}).toString(),n=rA.get(e);if(!n){var i,r=new Map,s=new IntersectionObserver(function(e){e.forEach(function(e){var n,s=e.isIntersecting&&i.some(function(t){return e.intersectionRatio>=t});t.trackVisibility&&void 0===e.isVisible&&(e.isVisible=s),null==(n=r.get(e.target))||n.forEach(function(t){t(s,e)})})},t);i=s.thresholds||(Array.isArray(t.threshold)?t.threshold:[t.threshold||0]),n={id:e,observer:s,elements:r},rA.set(e,n)}return n}(n),o=s.id,a=s.observer,c=s.elements,u=c.get(t)||[];return c.has(t)||c.set(t,u),u.push(e),a.observe(t),function(){u.splice(u.indexOf(e),1),0===u.length&&(c.delete(t),a.unobserve(t)),0===c.size&&(a.disconnect(),rA.delete(o))}}var rL=["children","as","triggerOnce","threshold","root","rootMargin","onChange","skip","trackVisibility","delay","initialInView","fallbackInView"];function rO(t){return"function"!=typeof t.children}var rI=function(t){function e(e){var n;return(n=t.call(this,e)||this).node=null,n._unobserveCb=null,n.handleNode=function(t){n.node&&(n.unobserve(),t||n.props.triggerOnce||n.props.skip||n.setState({inView:!!n.props.initialInView,entry:void 0})),n.node=t||null,n.observeNode()},n.handleChange=function(t,e){t&&n.props.triggerOnce&&n.unobserve(),rO(n.props)||n.setState({inView:t,entry:e}),n.props.onChange&&n.props.onChange(t,e)},n.state={inView:!!e.initialInView,entry:void 0},n}e.prototype=Object.create(t.prototype),e.prototype.constructor=e,rC(e,t);var n=e.prototype;return n.componentDidUpdate=function(t){t.rootMargin===this.props.rootMargin&&t.root===this.props.root&&t.threshold===this.props.threshold&&t.skip===this.props.skip&&t.trackVisibility===this.props.trackVisibility&&t.delay===this.props.delay||(this.unobserve(),this.observeNode())},n.componentWillUnmount=function(){this.unobserve(),this.node=null},n.observeNode=function(){if(this.node&&!this.props.skip){var t=this.props,e=t.threshold,n=t.root,i=t.rootMargin,r=t.trackVisibility,s=t.delay,o=t.fallbackInView;this._unobserveCb=rT(this.node,this.handleChange,{threshold:e,root:n,rootMargin:i,trackVisibility:r,delay:s},o)}},n.unobserve=function(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)},n.render=function(){if(!rO(this.props)){var t=this.state,e=t.inView,n=t.entry;return this.props.children({inView:e,entry:n,ref:this.handleNode})}var i=this.props,r=i.children,s=i.as,o=function(t,e){if(null==t)return{};var n,i,r={},s=Object.keys(t);for(i=0;i<s.length;i++)n=s[i],e.indexOf(n)>=0||(r[n]=t[n]);return r}(i,rL);return B.createElement(s||"div",rS({ref:this.handleNode},o),r)},e}
1(B.Component);rI.displayName="InView",rI.defaultProps={threshold:0,triggerOnce:!1,initialInView:!1};let rR=t=>{t({type:it.WIDGET_APPEAR,payload:{}})},rD=()=>{let{options:t}=rb(),{visibility:{onInView:e,onUpdate:n}={}}=t,{ref:i,inView:r,entry:s}=(()=>{var t,e,n,i,r,s,o,a,c,u,h,p,d,l,f,m,v;let{dispatch:g}=ru(),{options:{visibility:w={}}={}}=rb(),{triggerOnce:y=!0}=w,b=(0,B.useRef)(!0),{ref:S,inView:C,entry:A}=(n=(e={...w,triggerOnce:y}).threshold,i=e.delay,r=e.trackVisibility,s=e.rootMargin,o=e.root,a=e.triggerOnce,c=e.skip,u=e.initialInView,h=e.fallbackInView,p=B.useRef(),l=(d=B.useState({inView:!!u}))[0],f=d[1],m=B.useCallback(function(t){void 0!==p.current&&(p.current(),p.current=void 0),c||t&&(p.current=rT(t,function(t,e){f({inView:t,entry:e}),e.isIntersecting&&a&&p.current&&(p.current(),p.current=void 0)},{root:o,rootMargin:s,threshold:n,trackVisibility:r,delay:i},h))},[Array.isArray(n)?n.toString():n,o,s,a,c,r,h,i]),(0,B.useEffect)(function(){p.current||!l.entry||a||c||f({inView:!!u})}),(v=[m,l.inView,l.entry]).ref=v[0],v.inView=v[1],v.entry=v[2],v),E=(0,B.useCallback)(()=>{rR(g)},[g]);return(0,B.useEffect)(()=>{b.current&&C&&(b.current=!y,rR(g))},[g,C,A,y]),{ref:S,inView:C,entry:A,trigger:E}})();return(0,B.useEffect)(()=>{r&&e&&e(s),n&&n(r,s)},[r,s,n,e]),i},rk=()=>{let t=rb(),{rfkId:e,instanceId:n}=ru(),[i,r]=(0,B.useState)(t.state),s=(0,B.useRef)({});return(0,B.useEffect)(()=>{let t={handleAction(t){if(t.type===it.WIDGET_STATE_CHANGED){let{rfkId:i,instanceId:o=null,state:a}=t.payload;if(i===e&&n===o){let t=((t,e)=>{let n=Object.fromEntries(Object.entries(t).filter(([t])=>e[t]));return 0===Object.keys(n).length?null:n})(a,s.current);t&&r(e=>({...e,...t}))}}}};return ic.register(t),()=>ic.unregister(t)},[e,n]),((t,e)=>{let n={};for(let i in t)"request"!==i&&"response"!==i&&Object.defineProperty(n,i,{get:()=>(e[i]=!0,t[i])});return n})(i,s.current)},r_=function(t){let{rfkId:e,dispatch:n}=ru(),i=rb();i.isInitialized()||i.initialize(t||{});let{query:r,options:s,actions:o}=i,a=rk(),c=ry(r);return{widgetRef:rD(),rfkId:e,state:a,queryResult:c,actions:o,options:s,dispatch:n,query:r}},rx=()=>{let{rfkId:t}=r_(),{widgetRef:e,queryResult:{data:{appearance:{css_names:n=[],templates:{html:{devices:{[F.DESKTOP]:{content:i=null}={}}={}}={},css:{devices:{[F.DESKTOP]:{content:r=null}={}}={}}={}}={}}={}}={}}}=r_(),s=(0,B.useRef)(null);return(0,B.useLayoutEffect)(()=>{var e;let n;s.current&&r&&(e=s.current,(n=document.querySelector(`[data-rfk-id-style=${t}]`))||((n=document.createElement("style")).setAttribute("type","text/css"),n.dataset.rfkIdStyle=t,e.parentNode?.appendChild(n)),n.innerHTML=r)},[t,r]),(0,B.useLayoutEffect)(()=>{s.current&&i&&(s.current.innerHTML=i)},[i]),(0,B.createElement)("div",{ref:e,"data-rfkid":t,className:n.join(" ")},(0,B.createElement)("div",{ref:s}))},rG=()=>{let{queryResult:{data:{appearance:{templates:{html:{devices:{[F.DESKTOP]:{content:t=null}={}}={}}={}}={}}={}}={}}}=r_();return(0,B.useLayoutEffect)(()=>{t&&document.head.insertAdjacentHTML("afterbegin",t)},[t]),null},rN={component:rx,options:{state:{}}},rU=(t,e)=>{tU.debug("setWidgetType",`Type: ${t}`,`Mapping: ${JSON.stringify(e)}`),io.setWidgetType(t,e)},rF=class{constructor(){Object.defineProperty(this,"widgets",{enumerable:!0,configurable:!0,writable:!0,value:{}})}getWidgetComponentConfig(t,e){let n=io.get(t,e);if(n&&n.type&&n.component)return n}getWidget(t,e){if(!this.widgets[t]){let n=this.getWidgetComponentConfig(t,e);n&&(this.widgets[t]=this.doSetup({...n,entity:e},t))}return this.widgets[t]}setup(t,e){return this.getWidget(t,e)}},rj=({rfkId:t,entity:e,children:n})=>{let i=(0,B.useMemo)(()=>Math.random().toString(36).substring(2,9),[]),r=(0,B.useCallback)(n=>ir.dispatch({...n,payload:{rfkId:t,instanceId:i,entity:e,...n.payload}}),[t,e,i]),s=(0,B.useMemo)(()=>({rfkId:t,instanceId:i,dispatch:r,entity:e}),[t,r,e,i]);return(0,B.createElement)(ra.Provider,{value:s},n)},rq=t=>{let{children:e}=t,n=ru();return n?.rfkId===t.rfkId?(0,B.createElement)(B.Fragment,{},e||null):(0,B.createElement)(rj,t,e)},rV={visibility:{threshold:.2,triggerOnce:!0}},rB={name:"Ordercloud",buildInterface:!0,file:"ocContext",properties:{sellerId:{type:"string"},requiredInventoryLocations:{type:"array",name:"requiredInventoryLocations"}}},rM=tm(rB);class rK extends rM{}let rQ=new class extends ia{constructor(){super(),Object.defineProperty(this,"ocContext",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.setContext(new rK),ir.subscribe(this)}setContext(t){this.ocContext=t,this.ocContext.addListener(this)}getContext(){return this.ocContext}handleAction(t){switch(t.type){case it.OC_CONTEXT_CHANGED:tU.info("OC Context changed");break;case it.INITIALIZE:this.initialize()}}onChange(t,e,n){this.initialized&&ir.dispatch({type:it.OC_CONTEXT_CHANGED,payload:{context:this.ocContext}})}};var rW=f(1);let rH=(t,e)=>(t.cancel=()=>{e.abort()},t),r$={async getData(t,e){let n=new AbortController,i={...e,signal:n.signal,abortController:n};return rH(this.fetch(t.toJson(),i),n)},async fetch(t,e){let n=String(Date.now().toString(32)+Math.random().toString(16)).replace(/\./g,""),i=ic.getContext(),r=tr({context:i.toJson()},t);ir.dispatch({type:it.REQUEST,payload:{requestId:n,request:t,pageContext:i,payload:r}});try{let s=await ih(r,{signal:e?.signal});return ir.dispatch({type:it.REQUEST_SUCCESS,payload:{requestId:n,request:t,pageContext:i,payload:r,response:s}}),{_requestId:n,...s}}catch(e){return ir.dispatch({type:it.REQUEST_FAIL,payload:{error:e,requestId:n,request:t,pageContext:i,payload:r}}),Promise.reject(e)}}},rJ={context:{type:"model",model:tT},rfk_flags:{type:"array",name:"rfkFlags"},widget:{type:"model",model:{name:"Widget",properties:{items:{type:"array",model:tb}}}}},rz=tm({name:"OCSearchRequest",file:"OCSearchRequest",buildInterface:!0,properties:{...rJ,ordercloud:{type:"model",model:rB,setter:"setOrderCloudContext",getter:"getOrderCloudContext"}}});class rY extends rz{getWidgetInfo(t){return this.getWidgetItems()?.find(e=>e.rfk_id&&e.rfk_id===t)}addWidgets(t){return t.forEach(t=>this.addWidgetItem(t)),this}}let rX=tm({name:"SearchRequest",file:"SearchRequest",buildInterface:!0,properties:{...rJ}});class rZ extends rX{getWidgetInfo(t){return this.getWidgetItems()?.find(e=>e.rfk_id&&e.rfk_id===t)}addWidgets(t){return t.forEach(t=>this.addWidgetItem(t)),this}}let r0=()=>{let{connector:t}=tH();if("oc"===t){tU.info("Using OC Request");let t=new rY;return t.setOrderCloudContext(rQ.getContext().toJson()),t}return tU.info("Using default Request"),new rZ},r1=async t=>{let e=r0(),n=Array.from((t=>{let e=new Map;
1return t.slice().reverse().forEach(([t,n])=>{var i,r;let{rfkId:s,instanceId:o,payload:a}=t,c=(({rfkId:t,entity:e})=>`${t}@${e}`)(t);e.get(c)?.get(o||"")?n.abortController.abort():(i=o||"",r={...a,rfk_id:s},e.has(c)||e.set(c,new Map([[i,{}]])),e.get(c).set(i,r))}),e})(t.filter(([t,e])=>!e.signal.aborted)).values()).map(t=>Array.from(t.values())).flat();e.addWidgets(n),t[0][0].context&&e.setContext(t[0][0].context.toJson());let{requestMiddleware:i}=tH();i&&await i();let r=await r$.fetch(e.toJson());return t.map(([,{abortController:t}])=>t.signal.aborted?Object.assign({},r,{_canceled:!0}):r)},r2={},r4=(t,e)=>{if(e?.debounceBy)return`debounceBy@${e.debounceBy}`;let n=t.context?.toJson();return n?JSON.stringify(n):"default"},r3={async getWidgetData(t,e){let{rfkId:n,entity:i,request:r}=t,s=ic.getContext(),o=r.toJson();ir.dispatch({type:it.WIDGET_DATA_REQUEST,payload:{...t,pageContext:s,payload:o}});try{let r=await this.fetchWidgetData({...t,payload:o},e);if(r._canceled)return ir.dispatch({type:it.WIDGET_DATA_REQUEST_CANCELED,payload:{...t,pageContext:s,payload:o}}),Promise.reject(new rh(r));let{_requestId:a,...c}=r,{widgets:u=[]}=c,h=u.find(({rfk_id:t,entity:e})=>t===n&&e===i);if(!h)throw Error(`Response processing error: could not find ${n} in response`);return ir.dispatch({type:it.WIDGET_DATA_REQUEST_SUCCESS,payload:{...t,pageContext:s,response:h,payload:o,requestId:a}}),h}catch(e){return ir.dispatch({type:it.WIDGET_DATA_REQUEST_FAIL,payload:{error:e,...t,pageContext:s,payload:o}}),Promise.reject(e)}},fetchWidgetData(t,e){var n;let i=new AbortController,r={...e,signal:i.signal,abortController:i,groupBy:r4(t,e)};return e?.signal?.addEventListener("abort",()=>{i.abort()}),rH(e?.debounce?(r2[n=r.groupBy]||(r2[n]=rW(r1,250,{accumulate:!0})),r2[n])(t,r):((t,e)=>{let{payload:n}=t,i=r0();return i.addWidgetItem(n),t.context&&i.setContext(t.context.toJson()),r$.fetch(i.toJson(),e)})(t,r),i)}};class r5{constructor(t,e){Object.defineProperty(this,"instanceId",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"context",{enumerable:!0,configurable:!0,writable:!0,value:new tO}),Object.defineProperty(this,"ocContext",{enumerable:!0,configurable:!0,writable:!0,value:new rK}),Object.defineProperty(this,"initialized",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"debounced",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"debounceBy",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"widgetRequest",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"lastResponse",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"enabled",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"enabledChangeListeners",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"destroyListeners",{enumerable:!0,configurable:!0,writable:!0,value:[]}),this.widgetRequest=e,this.instanceId=t}onUpdate(t){var e;let n;let i=(e=()=>{t()},function(...t){let i=this;clearTimeout(n),n=setTimeout(function(){n=null,e.apply(i,t)},50)}),r={handleAction(t){switch(t.type){case it.OC_CONTEXT_CHANGED:case it.PAGE_CONTEXT_CHANGED:i()}}};ic.register(r);let s={onChange(t,e,n){i()}};this.getRequest().addListener(s),this.getContext().addListener(s),this.getOCContext().addListener(s);let o=t=>{t&&i()};this.enabledChangeListeners.push(o),this.destroyListeners.push(()=>{ic.unregister(r),this.getRequest().removeListener(s),this.getContext().removeListener(s),this.getOCContext().removeListener(s),this.enabledChangeListeners=this.enabledChangeListeners.filter(t=>t!==o)})}destroy(){this.destroyListeners.forEach(t=>{t()}),this.destroyListeners=[]}getContext(){return this.context}getOCContext(){return this.ocContext}getRequest(){return this.widgetRequest}getKey(){return((t,e,...n)=>[e.getRfkId(),t,ic.getContext().toJson(),e.toJson(),rQ.getContext().toJson(),...n])(this.instanceId,this.widgetRequest,this.context.toJson())}getLastResponse(){return this.lastResponse}getRequestContext(){return tr(ic.getContext().toJson(),this.context.toJson())}getRequestOCContext(){return tr(rQ.getContext().toJson(),this.ocContext.toJson())}setDebounced(t){this.debounced=t}isDebounced(){return this.debounced}setDebounceBy(...t){this.debounceBy=t.join("#")}getDebounceBy(){return this.debounceBy}fetch(t={}){return this.run(t)}run(t={}
1){let e={rfkId:this.getRequest().getRfkId(),entity:this.getRequest().getEntity(),instanceId:this.instanceId,request:this.getRequest(),context:this.getContext(),ocContext:this.getOCContext()};return r3.getWidgetData(e,{debounceBy:this.getDebounceBy(),debounce:this.isDebounced(),...t}).then(t=>(this.lastResponse=t,t))}setEnabled(t){t!==this.enabled&&(this.enabled=t,this.enabledChangeListeners.forEach(e=>{e(t)}))}toggleEnabled(){this.setEnabled(!this.enabled)}isEnabled(){return this.enabled}getInstanceId(){return this.instanceId}}let r6=(t,e,n)=>{t({type:e,payload:n})},r8=({dispatch:t,entity:e,instanceId:n,rfkId:i})=>{let r={},s={},o=!1,a=(t=>{let{type:e,options:{setupRequest:n=()=>{}}={}}=io.get(t)||{},i=e?((t,e)=>{if(tP[t])return tP[t](e);throw Error(`Invalid widget type: "${t}"`)})(e,t):new tC(t);return i.setRfkId(t),n(i),i})(i);a.setEntity(e);let c=new r5(n,a),u=tr(rV,io.get(i,e)?.options);return{actions:((t,e)=>{let{actionProps:n={}}=e;return Object.keys(n).reduce((e,i)=>({...e,[i]:r6.bind(null,t,n[i])}),{})})(t,u),options:u,query:c,state:r,config:s,updateState:s=>{let o=Object.fromEntries(Object.entries(s).filter(([t,e])=>r[t]!==e));Object.assign(r,s),t({type:it.WIDGET_STATE_CHANGED,payload:{rfkId:i,entity:e,instanceId:n,state:o}})},initialize:t=>{var e,n;o||(Object.assign(r,"function"==typeof(n=t.state)?n():n),e=t.query,((t,e,n={})=>{let{options:{propStateMapping:i=null,props:{initial:r={}}={}}={}}=io.get(t)||{};i&&((t,e,n)=>{Object.keys(n).forEach(i=>{"function"==typeof t[i]&&t[i](e,n)})})(i,e,tr(r,n))})(c.getRequest().getRfkId(),c.getRequest(),r),e&&e(c),c.getRequest().takeSnapshot(),Object.assign(s,t.config),o=!0)},isInitialized:()=>o}},r7=({children:t})=>{let{rfkId:e,entity:n,dispatch:i,instanceId:r}=ru(),s=(0,B.useRef)();return s.current||(s.current=r8({dispatch:i,entity:n,instanceId:r,rfkId:e})),(0,B.useEffect)(()=>(i({type:it.LOAD,payload:{rfkId:e,entity:n,instanceId:r}}),()=>{i({type:it.UNLOAD,payload:{rfkId:e,entity:n,instanceId:r}})}),[i,e,n,r]),(0,B.createElement)(rc.Provider,{value:s.current},t)},r9=(t,e,n)=>((...t)=>(e,n)=>t.reduceRight((t,e)=>(0,B.createElement)(e,n,t),e))(rq,r7)((0,B.createElement)(n,t),e),st=(t,e,n)=>(tU.debug("widget",t&&t.name,e),((t,e,n)=>{if(!0===t.__wrapped)throw Error(`Seems you are trying to wrap an already wrapped Widget component (entity: ${e})`);return n.__wrapped=!0,n})(t,n,i=>{let{rfkId:r}=i;return(0,B.useMemo)(()=>{io.setType(r,e)},[r]),r9(i,{rfkId:r,entity:n},t)}));st(rx,A.BANNER,"content"),st(rx,A.HTML_BLOCK,"content"),st(rG,A.SEO,"content");let se=class extends rF{doSetup({type:t,entity:e,component:n}){return st(n,t,e)}},sn=(...t)=>{rU(A.CONTENT_BLOCK,rN),rU(A.HTML_BLOCK,rN),rU(A.BANNER,rN),rU(A.SEO,{...rN,component:rG}),rU(A.PREVIEW_SEARCH,{options:{propStateMapping:i9,actionProps:rt,state:{}}}),rU(A.RECOMMENDATION,{options:{propStateMapping:re,actionProps:rn,state:{}}}),rU(A.QUESTIONS,{options:{propStateMapping:ri,actionProps:rr,state:{}}}),rU(A.SEARCH_RESULTS,{options:{propStateMapping:rs,actionProps:ro,state:{selectedFacets:{},page:1}}}),new i6,new se,(t=>{let{autoIncludeNewWidgets:e=!1,autoIncludeWidgets:n=!0,uri:i}=t||{};if("undefined"==typeof document||!document.createElement)return i&&ic.getContext().setPageUri(i),void ig();if(ic.getContext().setPageUri(i||window.location.pathname),e&&i7(),n){let t=Array.from(document.querySelectorAll(`:not(${i8}) > [data-rfkid]:not(${i8})`)).filter((t,e,n)=>n.indexOf(t)===e).map(t=>({rfkId:t.dataset.rfkid,entity:t.dataset.entity,node:t}));t.length&&setTimeout(()=>{ic.getDispatcher().dispatch({type:it.FOUND_WIDGETS,payload:{widgets:t}})},0)}ig()})(...t)},si=({apiKey:t,children:e,clientId:n,cookieOptions:i,customerKey:r,debug:s,discoverDomainId:a,env:c="prod",orderCloudRegion:u,publicSuffix:h=!1,requestMiddleware:p,serviceHost:d,trackConsent:l=!0,uri:f,useAccessToken:m,useStorage:v,useToken:g,...w})=>{var y;return(0,B.useMemo)(()=>{il({apiKey:t,clientId:n,cookieOptions:i,customerKey:r,debug:s,discoverDomainId:a,env:c,orderCloudRegion:u,publicSuffix:h,requestMiddleware:p,serviceHost:d,trackConsent:l,useAccessToken:m,useStorage:v,useToken:g},{processor:new im}),sn({uri:f,autoIncludeWidgets:!1,autoIncludeNewWidgets:!1})},[]),(0,B.useEffect)(()=>{ic.toggleTrackConsent(l)},[l]),(0,B.createElement)(i5,{...w,client:(y=w.client,!o&&y?o=y:o||(o=new i0({defaultOptions:{queries:{retry:!1,keepPreviousData:!0,refetchOnWindowFocus:!1}}})),o)},e)};var sr=f(646);let ss=async(t,{index:e,filters:n,...i})=>{if(t){if(!n||!n.find(({facetId:t})=>tD(t)))return await (async(t,{index:e,request:n,filters:i})=>n2({name:"widget",action:"click",action_cause:"filter",value:{rfk_id:t,index:e,request:n,filters:i,context:tI.toJson()}}))(t,{index:e,request:n6(i),filters:n8(n)});tU.warn("trackEvent :::","Filter's name is not defined")}else tU.warn("trackEvent :::","Widget's rfkId mandatory field is empty")},so=(t,e)=>{let n=(0,B.useRef)(e),i=(0,B.useRef)(t);return n.current!==e&&(n.current.length!==e.length||n.current.some((t,n)=>t!==e[n]))&&(n.current=e,i.current=t),i},sa=t=>
1{let e=t.getRequest().getSearchLimit()?t.getRequest().getSearchLimit():t.getLastResponse()?.limit,n=e?Math.floor((t.getRequest().getSearchOffset()||0)/e+1):0;return{keyword:t.getRequest().getSearchQueryKeyphrase(),pageNumber:isNaN(n)?void 0:n,pageSize:e,numResults:t.getLastResponse()?.content?.length,totalResults:t.getLastResponse()?.total_item}},sc=class{static buildItem(t,e){let{facetId:n,facetValueId:i,type:r,facetValueText:s}=e;if("text"===r){if(s)return{type:"eq",value:s};let{facet:e=[]}=t.getLastResponse()||{},{value:r=[]}=e.find(({name:t})=>t===n)||{};return{type:"eq",value:r.find(({id:t})=>t===i)?.text||""}}return i}};class su{getCurrentFacetInfo(t,e){let{facetId:n}=e,{facet:i=[]}=t.getLastResponse()||{},{value:r=[],label:s=""}=i.find(({name:t})=>t===n)||{};return{facetValues:r,facetTitle:s}}}let sh=new class extends su{process(t,e,n){let{facetId:i,facetValueId:r,facetIndex:s,facetValueIndex:o,silentTracking:a,checked:c}=n,{facetValues:u,facetTitle:h}=this.getCurrentFacetInfo(e,n),p=u.find(({id:t})=>t===r)?.text||"";a||ss(t,{filters:[{facetId:i,facetValueId:r,facetValue:p,valueIndex:o,facetIndex:s,facetTitle:h}]}),e.getRequest().setSearchOffset(0),c?e.getRequest().addSearchFacetTypeFilter(i,sc.buildItem(e,n)):e.getRequest().removeSearchFacetTypeFilter(i,sc.buildItem(e,n))}},sp={range:new class extends su{process(t,e,n){let{facetId:i,min:r,max:s,facetIndex:o,silentTracking:a}=n;if(e.getRequest().resetSearchFacetTypeFilter(i),void 0!==r||void 0!==s){e.getRequest().addSearchFacetTypeFilter(i,{value:r,type:"gte"},"and"),e.getRequest().addSearchFacetTypeFilter(i,{value:s,type:"lte"},"and");let{facetTitle:c}=this.getCurrentFacetInfo(e,n);a||ss(t,{filters:[{facetId:i,...void 0!==r?{startValue:r.toString()}:{},...void 0!==s?{endValue:s.toString()}:{},facetValue:`${r} - ${s}`,valueIndex:0,facetIndex:o,facetTitle:c}]})}}},valueId:sh,text:sh},sd=class{},sl=new class extends sd{process(t,e){let{facetId:n}=e;t.getRequest().removeSearchFacetTypeFilter(n,sc.buildItem(t,e))}},sf={range:new class extends sd{process(t,e){let{facetId:n}=e;t.getRequest().resetSearchFacetTypeFilter(n)}},valueId:sl,text:sl};function sm(t,e){return t?.facet.find(({name:t})=>t===e)}function sv(t,e,n){let i=sm(t,e);if(i)return i.value.find(({id:t})=>n===t)}let sg=(t,e)=>"facetValueId"in e&&t.id===e.facetValueId||"facetValueText"in e&&t.text===e.facetValueText;function sw(t,e,n){return t.findIndex(t=>n&&t.facetId===e&&t.facetValueId===n)}let sy={range:new class{run(t,e){if("min"in e||"max"in e){let{min:n,max:i,facetId:r}=e;return t.getRequest().addSearchFacetTypeFilter(r,{value:n,type:"gte"},"and").addSearchFacetTypeFilter(r,{value:i,type:"lte"},"and"),!0}return tU.error("Type range expected properties min or max to be present on the initial state for selected facets. Since none of them has been provided, initializer will not run."),!1}},valueId:new class{run(t,e){if("facetValueId"in e){let{facetId:n,facetValueId:i}=e;return t.getRequest().addSearchFacetTypeFilter(n,i),!0}return tU.error("Type valueId expected property facetValueId to be present on the initial state for selected facets. Since it has not been provided, initializer will not run."),!1}},text:new class{run(t,e){if("facetValueText"in e){let{facetId:n,facetValueText:i}=e;return t.getRequest().addSearchFacetTypeFilter(n,{value:i,type:"eq"}),!0}return tU.error("Type text expected property facetValueText to be present on the initial state for selected facets. Since it has not been provided, initializer will not run."),!1}}};class sb{process(t,e,n){let{facetId:i,facetValueId:r,checked:s}=n,o=this.findPreviousValueIndex(t,i,r,e);if(!s&&o>-1)return t.filter((t,e)=>e!==o);let a=[...t],c=sm(e,i),u=sv(e,i,r);return s&&-1===o&&a.push(this.buildNewItem(c,u,i,r)),a}}let sS={range:new class{process(t,e,n){let{facetId:i,min:r,max:s}=n,o=t.findIndex(t=>t.facetId===i),a=[...t],c=sm(e,i);return o>-1?a[o]={...a[o],min:r,max:s,facetLabel:c?c.label:a[o].facetLabel}:a.push({min:r,max:s,facetId:i,facetLabel:c?c.label:""}),a}},valueId:new class extends sb{buildNewItem(t,e,n,i){return{facetId:n,facetValueId:i,facetLabel:t?t.label:"",valueLabel:e?e.text:""}}
1findPreviousValueIndex(t,e,n){return sw(t,e,n)}},text:new class extends sb{findPreviousValueIndex(t,e,n,i){return function(t,e,n,i){if(void 0!==n){let r=sv(i,e,n);if(r)return t.findIndex(t=>t.facetId===e&&t.facetValueText===r.text)}return -1}(t,e,n,i)}buildNewItem(t,e,n,i){return{facetId:n,facetValueId:i,facetValueText:e?.text,facetLabel:t?t.label:"",valueLabel:e?e.text:""}}}},sC={valueId:new class{process(t,e){let n=sw(t,e.facetId,e.facetValueId);return t.filter((t,e)=>e!==n)}},range:new class{process(t,e){return t.filter(t=>t.facetId!==e.facetId)}},text:new class{process(t,e,n){let{facetId:i,facetValueText:r}=e,s=t.findIndex(t=>t.facetId===i&&t.facetValueText===r);return t.filter((t,e)=>e!==s)}}},sA=(t,e)=>{switch(e.type){case it.WIDGET_DATA_REQUEST_SUCCESS:return(t=>{let{selectedFacets:e=[],response:n}=t;return e.some(t=>{let e=sm(n,t.facetId);if(!t.facetLabel)return!0;let i=e?.value?.find(e=>sg(e,t));return!(!i||!i.text||t.valueLabel)})?{...t,selectedFacets:e.map(t=>{let e=sm(n,t.facetId);return e?((t,e)=>{let n=e.value.find(e=>sg(e,t));return{...t,facetValueId:n?n.id:t.facetValueId,facetLabel:e.label||t.facetLabel,valueLabel:n?n.text:t.valueLabel}})(t,e):t})}:t})(t);case U.FILTER_CLICKED:case U.REMOVE_FILTER:return((t,e)=>{let{selectedFacets:n=[],response:i}=t,{type:r}=e,s=sC[r];return s?{...t,page:1,selectedFacets:s.process(n,e,i)}:(tU.warn(`${r} has not a valid reducer for REMOVE_FILTER action. No reduce transformation applied.`),{...t,page:1})})(t,e.payload);case U.FACET_CLICKED:return((t,e)=>{let{selectedFacets:n=[],response:i}=t,{type:r}=e,s=sS[r];return s?{...t,page:1,selectedFacets:s.process(n,i,e)}:(tU.warn(`${r} has not a valid action reducer. No reduce transformation applied.`),{...t,selectedFacets:n})})(t,e.payload);case U.SORT_CHANGED:return{...t,page:1,sortType:e.payload.name};case U.PAGE_NUMBER_CHANGED:return{...t,page:e.payload.page};case U.RESULTS_PER_PAGE_CHANGED:return{...t,page:1,itemsPerPage:e.payload.numItems};case U.KEYPHRASE_CHANGED:return{...t,page:1,keyphrase:e.payload.keyphrase,selectedFacets:[]};case U.CLEAR_FILTERS:return{...t,page:1,selectedFacets:[]};default:return t}},sE=function(t){let{rfkId:e,dispatch:n}=ru(),i=rb();i.isInitialized()||(i.initialize(t||{}),(t=>{let{query:e,state:{selectedFacets:n=[]},config:i={}}=t;n.forEach(t=>{let n=function(t,e){let{facets:n={}}=t,{type:i}=n[e]||{};return i||t.defaultFacetType||"valueId"}(i,t.facetId),r=sy[n];if(!r)return tU.warn(`Facet type ${n} is not supported.`);r.run(e,t)})})(i));let{query:r,options:s,actions:o}=i,a=rk(),c=ry(r),u=rD();return((t,e)=>{let n=rb(),{rfkId:i,instanceId:r}=ru(),s=so(t,e);(0,B.useEffect)(()=>{let t={handleAction(t){let{rfkId:e,instanceId:o=null}=t.payload;if(e===i&&r===o){let e=s.current(((t,e)=>{switch(e.type){case it.WIDGET_DATA_REQUEST_SUCCESS:{let{response:n}=e.payload;return{...t,response:n}}case it.WIDGET_DATA_REQUEST:{let{request:n}=e.payload;return{...t,request:n}}default:return t}})(n.state,t),t);e!==n.state&&n.updateState(e)}}};return ic.register(t),()=>ic.unregister(t)},[i,r,n,s])})(sA,[]),((t,e)=>{let{rfkId:n,instanceId:i}=ru(),r=so(t,e);(0,B.useEffect)(()=>{let t={handleAction(t){let{rfkId:e,instanceId:s}=t.payload;e&&(e!==n||s!==i)||r.current(t)}};return ic.register(t),()=>ic.unregister(t)},[n,i,r])})(t=>{switch(t.type){case U.FACET_CLICKED:!function(t,e){let{type:n,rfkId:i}=e,r=sp[n];r?r.process(i,t,e):tU.warn(`${n} has not a valid action handler`)}(r,t.payload);break;case U.FILTER_CLICKED:case U.REMOVE_FILTER:!function(t,e){let{type:n}=e,i=sf[n];i?i.process(t,e):tU.warn(`${n} has not a valid action handler`)}(r,t.payload);break;case U.ITEM_CLICKED:{let{index:n,id:i,entity:s,sourceId:o}=t.payload;(async(t,e,{index:n,items:i,...r})=>
1{if(t)return await (async(t,e,{actionCause:n,index:i,request:r,items:s})=>{let o=[];return e&&s&&(o=n3(e,s))&&!n4(o)?void tU.warn("trackEvent :::","A field is missing on one or more of the items provided"):n&&"entity"===n&&tD(i)?void tU.warn("trackEvent :::","Field index is mandatory for widget click entity events and is having invalid/missing value"):n2({name:"widget",action:"click",action_cause:n,value:{rfk_id:t,index:i,entities:o,request:r,context:tI.toJson()}})})(t,e,{actionCause:"entity",index:n,request:n6(r),items:i});tU.warn("trackEvent :::","Widget's rfkId mandatory field is empty")})(e,s,{index:n,items:[{id:i,sourceId:o}],...sa(r)});break}case U.SORT_CHANGED:r.getRequest().resetSearchSortCriteria().setSearchSortCriteriaName(t.payload.name).setSearchOffset(0);break;case U.PAGE_NUMBER_CHANGED:{let n=r.getRequest().getSearchLimit()??r.getLastResponse()?.limit;void 0===n?tU.warn(`Widget "${e}" has triggered a onPageNumberChanged action and there is no itemsPerPage state or query search limit defined`):r.getRequest().setSearchOffset(n*(t.payload.page-1));break}case U.RESULTS_PER_PAGE_CHANGED:r.getRequest().setSearchLimit(t.payload.numItems).setSearchOffset(0);break;case U.KEYPHRASE_CHANGED:r.getRequest().resetSearchFacetTypeFilters().setSearchOffset(0),t.payload.keyphrase?r.getRequest().setSearchQueryKeyphrase(t.payload.keyphrase):r.getRequest().resetSearchQueryKeyphrase();break;case U.CLEAR_FILTERS:r.getRequest().resetSearchFacetTypeFilters().setSearchOffset(0)}},[e,r]),{widgetRef:u,rfkId:e,state:a,queryResult:c,actions:o,options:s,dispatch:n,query:r}};function sP(t,e){if("function"==typeof t)return t(e);null!=t&&(t.current=e)}var sT=globalThis?.document?B.useLayoutEffect:()=>{},sL=t=>{let e;let{present:n,children:i}=t,r=function(t){var e,n;let[i,r]=B.useState(),s=B.useRef(null),o=B.useRef(t),a=B.useRef("none"),[c,u]=(e=t?"mounted":"unmounted",n={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},B.useReducer((t,e)=>n[t][e]??t,e));return B.useEffect(()=>{let t=sO(s.current);a.current="mounted"===c?t:"none"},[c]),sT(()=>{let e=s.current,n=o.current;if(n!==t){let i=a.current,r=sO(e);u(t?"MOUNT":"none"===r||"none"===e?.display?"UNMOUNT":n&&i!==r?"ANIMATION_OUT":"UNMOUNT"),o.current=t}},[t,u]),sT(()=>{if(i){let t;let e=i.ownerDocument.defaultView??window,n=n=>{let r=sO(s.current).includes(n.animationName);if(n.target===i&&r&&(u("ANIMATION_END"),!o.current)){let n=i.style.animationFillMode;i.style.animationFillMode="forwards",t=e.setTimeout(()=>{"forwards"===i.style.animationFillMode&&(i.style.animationFillMode=n)})}},r=t=>{t.target===i&&(a.current=sO(s.current))};return i.addEventListener("animationstart",r),i.addEventListener("animationcancel",n),i.addEventListener("animationend",n),()=>{e.clearTimeout(t),i.removeEventListener("animationstart",r),i.removeEventListener("animationcancel",n),i.removeEventListener("animationend",n)}}u("ANIMATION_END")},[i,u]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:B.useCallback(t=>{s.current=t?getComputedStyle(t):null,r(t)},[])}}(n),s="function"==typeof i?i({present:r.isPresent}):B.Children.only(i),o=function(...t){return B.useCallback(function(...t){return e=>{let n=!1,i=t.map(t=>{let i=sP(t,e);return n||"function"!=typeof i||(n=!0),i});if(n)return()=>{for(let e=0;e<i.length;e++){let n=i[e];"function"==typeof n?n():sP(t[e],null)}}}}(...t),t)}(r.ref,(e=Object.getOwnPropertyDescriptor(s.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning?s.ref:(e=Object.getOwnPropertyDescriptor(s,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning?s.props.ref:s.props.ref||s.ref);return"function"==typeof i||r.isPresent?B.cloneElement(s,{ref:o}):null};function sO(t){return t?.animationName||"none"}sL.displayName="Presence";var sI=f(266),sR=f(282),sD=f(824);"function"==typeof SuppressedError&&SuppressedError;var sk=f(377),s_=f(517),sx=f(883),sG=f(530),sN=f.n(sG),sU=f(625);let sF=function({props:t}){var e,n,i,r,s,o,a,c,u,h;let[p,d]=(0,B.useState)(null),[l,f]=(0,B.useState)(!1),[m,v]=(0,B.useState)(!1),{cardApplyLabel:g,cardOverviewLabel:w,fields:y}=t,{sitecoreSource:b,pillColors:S,tooltipText:C}=y,A=(0,sr.useClusterProgramStore)(t=>t.flyoutSource);(0,B.useEffect)(()=>{(()=>{var t,e,n,i;t=this,e=void 0,i=function*(){v(!0),f(!1);try{let t=yield(0,sr.useFetchWithProgramSource)({programSource:A,customerKey:null==y?void 0:y.sitecoreCustomerKey,rfk_id:null==y?void 0:y.sitecoreWidgetId,sitecoreApiKey:null==y?void 0:y.sitecoreApiKey,sources:b,sitecoreIsSubdomain:null==y?void 0:y.sitecoreIsSubdomain,sitecoreServiceHost:null==y?void 0:y.sitecoreServiceHost});d(t)}catch(t){d(null),f(!0)}finally{v(!1)}},new(n=void 0,n=Promise)(function(r,s){function o(t){try{c(i.next(t))}catch(t){s(t)}}function a(t){try{c(i.throw(t))}catch(t){s(t)}}function c(t){var e;t.done?r(t.value):((e=t.value)instanceof n?e:new n(function(t){t(e)})).then(o,a)}c((i=i.apply(t,e||[])).next())})})()},[A]);let E=p&&(null===(i=null===(n=null===(e=null==p?void 0:p.widgets)||void 0===e?void 0:e[0])||void 0===n?void 0:n.content)||void 0===i?void 0:i.length)&&(null===(s=null===(r=null==p?void 0:p.widgets)||void 0===r?void 0:r[0])||void 0===s?void 0:s.content)||[],P=[{name:"degreetypeabbreviation",color:(null==S?void 0:S.degreetypeabbreviation)||"degreetypeabbreviationcolor"},{name:"careercluster",color:(null==S?void 0:S.careercluster)||"careerclustercolor"},{name:"careercompetency",color:(null==S?void 0:S.careercompetency)||"careercompetencycolor"},{name:"modality",color:(null==S?void 0:S.modality)||"modalitycolor"}],T={params:{identifier:"",styles:""},fields:{bgImage:(null===(u=E[0])||void 0===u?void 0:u.groupflyoutbannerimage)||"",title:(null===(h=E[0])||void 0===h?void 0:h.programgroup)||"",content:(null==E?void 0:E.length)?Array.from(new Set(null==E?void 0:E.map(t=>t.academiccareer))).map(t=>{var e;return{academicLevel:t,courses:null===(e=null==E?void 0:E.filter(e=>(null==e?void 0:e.academiccareer)===t))||void 0===e?void 0:e.map(e=>{var n,i,r;return{params:{identifier:null==e?void 0:e.id,styles:""},fields:{degreeType:Array.isArray(r=null==e?void 0:e.degreetype)?(null==r?void 0:r.reduce((t,e)=>`${t?`${t},`:""} ${e||""}`,""))||"":r,college:Array.isArray(i=null==e?void 0:e.college)?null==i?void 0:i.reduce((t,e)=>`${t?`${t},`:""} ${null!=e?e:""}`,""):i||"",description:null==e?void 0:e.description,tags:null===(n=P.map(t=>Array.isArray(e[t.name])?e[t.name].map(e=>({params:{identifier:`${t.name}-${e}`,styles:""},fields:{content:e,color:t.color.toLowerCase()}})):{params:{identifier:`${t.name}-${e[t.name]}`,styles:""},fields:{content:e[t.name],color:t.color.toLowerCase()}}))||void 0===n?void 0:n.flat(),cta1:{params:{identifier:"Link01",styles:""},fields:{link:{params:{identifier:"",styles:""},fields:{linkType:"external",url:null==e?void 0:e.url,label:w,target:"_self"}}}},cta1Type:sU.ButtonVariant.SECONDARY,cta2:{params:{identifier:"Link01",styles:""},fields:{link:{params:{identifier:"",styles:""},fields:{linkType:"external",url:function(t){let e=null==t?void 0:t.toLowerCase().trim();return"undergraduate"===e?null==y?void 0:y.cardApplyUndergradUrl:"graduate"===e?null==y?void 0:y.cardApplyGradUrl:null==y?void 0:y.cardApplyOther
1Url}(t),label:g,target:"_self"}}}},cta2Type:sU.ButtonVariant.SECONDARY,tooltipText:C}}})}}):[]}};return M().createElement(sk.PopupWindow,{id:"program-detail",type:"flyout",iconCloseProps:{name:"cross",height:"24",width:"24",className:(null===(o=null==T?void 0:T.fields)||void 0===o?void 0:o.bgImage)?"icon--dark-mode":""},style:{borderTopLeftRadius:"72px"}},M().createElement(M().Fragment,null,m&&M().createElement("div",{className:sN()("search-results-content",{"search-results-content--fetching":m})},M().createElement(sR.SearchResultsLoader,null)),!m&&((null==E?void 0:E.length)?M().createElement(sx.ProgramCardsFlyout,Object.assign({},T)):M().createElement(s_.NoResultsContent,{params:null===(a=null==y?void 0:y.noResults)||void 0===a?void 0:a.params,fields:Object.assign(Object.assign({},null===(c=null==y?void 0:y.noResults)||void 0===c?void 0:c.fields),{hasFailed:l})}))))},sj=st(function({props:t}){var e,n,i,r,s,o,a;let{programSource:c,cardContent:u,setCardContent:h,setMatchCount:p,flyoutSource:d}=(0,sr.useClusterProgramStore)(t=>t),{params:l,fields:f}=t,{widgetRef:m,actions:{onItemClick:v,onFacetClick:g,onClearFilters:w,onPageNumberChange:y},queryResult:{isLoading:b,isFetching:S,isError:C,data:{content:A=[],total_item:E=0,facet:P=[],offset:T=0,limit:L=10}={}}}=sE({query:t=>{t.getRequest().setEntity("content").setSources(null==f?void 0:f.sitecoreSource).setSearch(c)},state:{sortType:(null===(n=null===(e=null==c?void 0:c.sort)||void 0===e?void 0:e.value[0])||void 0===n?void 0:n.name)||"title_ascending",page:1,itemsPerPage:null!==(i=null==f?void 0:f.pageSize)&&void 0!==i?i:10,keyphrase:""}});(0,B.useEffect)(()=>{(null==A?void 0:A.length)&&h(A)},[A]),(0,B.useEffect)(()=>{p(E)},[E]);let O=(null===(r=null==P?void 0:P.find(t=>"grouppills"===t.name))||void 0===r?void 0:r.value)||[],I=(0,B.useMemo)(()=>M().createElement(sF,{rfkId:null==f?void 0:f.sitecoreWidgetId,key:`flyout-${null==f?void 0:f.sitecoreWidgetId}`,props:{cardApplyLabel:null==f?void 0:f.cardApplyLabel,cardOverviewLabel:null==f?void 0:f.cardOverviewLabel,fields:f}}),[null==f?void 0:f.sitecoreWidgetId,null==f?void 0:f.cardApplyLabel,null==f?void 0:f.cardOverviewLabel,f,d]);return M().createElement("div",{id:null!==(s=null==l?void 0:l.identifier)&&void 0!==s?s:"",className:"cluster-program-details"},M().createElement(sR.SearchResultsContent,{onItemClick:v,widgetRef:m,onFacetClick:g,onClearFilters:w,isLoading:b,isFetching:S,content:u,totalItems:E,facets:P,resultsFoundLabel:f.resultsFoundLabel,groupPills:O,listStyle:"grid-view",noResultsText:null==f?void 0:f.noResultsText,groupCTALabel:null==f?void 0:f.groupCTALabel,cardApplyLabel:null==f?void 0:f.cardApplyLabel,cardOverviewLabel:null==f?void 0:f.cardOverviewLabel,fields:Object.assign(Object.assign({},f),{params:Object.assign(Object.assign({},f.params||{}),{searchIgnore:!0})}),offset:T,pageLimit:L,isCluster:!0,isError:C,flyoutWidget:I}),M().createElement("div",{className:"search__load-more-container"},S&&(null!==(o=null==A?void 0:A.length)&&void 0!==o?o:0)>0?M().createElement(sL,{present:!0},M().createElement("div",{className:"load-more__loader"},M().createElement(sI.Loader,{params:{identifier:"Loader01",styles:""},fields:{content:""}}))):M().createElement("button",{type:"button",className:"news-card__load-more "+(T+L>=E?"hidden":""),onClick:()=>{y({page:Math.floor(Number(T)/Number(L)+1)+1})}},null!==(a=null==f?void 0:f.loadMoreLabel)&&void 0!==a?a:"Load more"," ",M().createElement(sD.Icon,{name:"arrowDownTriangle"}))))},A.SEARCH_RESULTS,"content");function sq({params:t,fields:e}){ic.getContext().setLocaleLanguage("en"),ic.getContext().setLocaleCountry("us");let n=(0,sr.useClusterProgramStore)(t=>t.programSourceInitial),i=(0,sr.useClusterProgramStore)(t=>t.programSource),r=(0,sr.useClusterProgramStore)(t=>t.setProgramSource),s=(0,sr.useClusterProgramStore)(t=>t.setProgramSourceInitial),o=(0,sr.useClusterProgramStore)(t=>
1t.setFlyoutSource),a=(0,sr.useClusterProgramStore)(t=>t.setFlyoutSourceInitial);return(0,B.useEffect)(()=>{var t,n,i,c,u,h,p,d;r(null==e?void 0:e.groupSource),s(null==e?void 0:e.groupSource),o(JSON.parse(null===(c=null===(i=null===(n=null===(t=null==e?void 0:e.cardSource)||void 0===t?void 0:t.jsonValue)||void 0===n?void 0:n.fields)||void 0===i?void 0:i.SourceBody)||void 0===c?void 0:c.value)),a(JSON.parse(null===(d=null===(p=null===(h=null===(u=null==e?void 0:e.cardSource)||void 0===u?void 0:u.jsonValue)||void 0===h?void 0:h.fields)||void 0===p?void 0:p.SourceBody)||void 0===d?void 0:d.value))},[]),n&&i?M().createElement(si,Object.assign({env:null==e?void 0:e.sitecoreEnv,customerKey:null==e?void 0:e.sitecoreCustomerKey},(null==e?void 0:e.sitecoreServiceHost)&&(null==e?void 0:e.sitecoreIsSubdomain)?{serviceHost:null==e?void 0:e.sitecoreServiceHost}:{apiKey:null==e?void 0:e.sitecoreApiKey},t.searchIgnore?{"data-attribute-search-ignore":!0}:{}),M().createElement(sj,{key:H(),rfkId:null==e?void 0:e.sitecoreWidgetId,props:{params:t,fields:e}})):null}})(),m})(),t.exports=i(n(7356),n(1136),n(2905),n(5951),n(5430),n(4529),n(4967),n(6664),n(7294))}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.