1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[203],{4967:function(t,e,n){var i,r=n(3454),s=n(8764).lW;i=(t,e,i,o,a,c,u,h,l,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(),l=!i||h-i>u;i=h;for(var p=arguments.length,d=Array(p),f=0;f<p;f++)d[f]=arguments[f];if(l&&n.leading)return n.accumulate?Promise.resolve(t.call(this,[d])).then(function(t){return t[0]}):Promise.resolve(t.call.apply(t,[this].concat(d)));if(r?clearTimeout(s):((c={}).promise=new Promise(function(t,e){c.resolve=t,c.reject=e}),r=c),o.push(d),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=l},33:t=>{"use strict";t.exports=p},100:t=>{"use strict";t.exports=c},266:t=>{"use strict";t.exports=i},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=u}},f={};function m(t){var e=f[t];if(void 0!==e)return e.exports;var n=f[t]={exports:{}};return d[t](n,n.exports,m),n.exports}m.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return m.d(e,{a:e}),e},m.d=(t,e)=>{for(var n in e)m.o(e,n)&&!m.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},m.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),m.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var v={};return(()=>{"use strict";let t,e,i,o,a,c,u,h;m.r(v),m.d(v,{SearchResults:()=>sK,SearchResultsContent:()=>sU,SearchResultsLoader:()=>sF});var l,p,d,f,g,w,y,b,S,C,E,A,P,T,L,O,I,R,D,_,k,x,N,G,F,U,j,q,B={};m.r(B),m.d(B,{hasBrowserEnv:()=>eJ,hasStandardBrowserEnv:()=>eY,hasStandardBrowserWebWorkerEnv:()=>eX,navigator:()=>ez,origin:()=>eZ});var V=m(12),M=m.n(V);let K={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)},W=new Uint8Array(16),Q=[];for(let t=0;t<256;++t)Q.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(W)})();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 Q[t[e+0]]+Q[t[e+1]]+Q[t[e+2]]+Q[t[e+3]]+"-"+Q[t[e+4]]+Q[t[e+5]]+"-"+Q[t[e+6]]+Q[t[e+7]]+"-"+Q[t[e+8]]+Q[t[e+9]]+"-"+Q[t[e+10]]+Q[t[e+11]]+Q[t[e+12]]+Q[t[e+13]]+Q[t[e+14]]+Q[t[e+15]]}(r)};(l=E||(E={})).RECOMMENDATION="recommendation",l.PREVIEW_SEARCH="preview_search",l.SEARCH_RESULTS="content_grid",l.CONTENT_BLOCK="content_block",l.QUESTIONS="questions_answers",l.HTML_BLOCK="html_block",l.BANNER="banner",l.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=m(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 tl(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}let tp=(t,e,n)=>{let{name:i=t}=e;return n?`${n.key}.${i}`:i},td=(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:l,setter:p,getter:d,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=tp(t,n,e),u=e?`${e.accessProp}.${t}`:t,h=[...a?["#KEY#"]:[],..."__constructor__"===t?[]:r],l=e?.exportKey?.concat(...h)||h,p=(i=c,"__constructor__"===t&&(i=tp(t,n,e?.parent||null)),i.replace(/\./g,"_")),d=s||$("get",p),f=o||$("set",p);return{config:{...n,key:c,accessProp:u,exportKey:l,keyPath:h,getter:d,setter:f,parent:e},key:c,methodKey:p}})(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,l.join("."),w),i.push({typeOptions:g,prop:h,key:d,value:function(...t){return this.getValue(a,...td(t,g,1,1))}}),i.push({typeOptions:g,prop:h,key:p,value:function(...t){return this.setValue(a,...td(t,g,1))}}),i.push({typeOptions:g,prop:h,key:$("reset",c),value:function(...t){return this.resetValue(a,...td(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,...td(t,g,1))}}),i.push({typeOptions:g,prop:h,key:$("remove",t),value:function(...t){return this.removeValue(a,...td(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,...td(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 tl(e,"listeners",[]),tl(e,"props",s),tl(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}}};(p=A||(A={})).HARD_FILTERS="hard_filters",p.OTHER_FACET_VALUES="other_facet_values",p.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 tE=t=>{let e=new tC(t);return e.setAppearance({}),e.setAppearanceTemplates({}),e.setAppearanceVariables({}),e};class tA 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={[E.RECOMMENDATION]:t=>{let e=new tC(t);return e.setRecommendationsContent({}),e},[E.SEARCH_RESULTS]:t=>{let e=new tA(t);return e.setSearchContent({}),e.setSearchFacetAll(!0),e.setSearchOffset(0),e.setSearchSortChoices(!0),e},[E.PREVIEW_SEARCH]:t=>{let e=new tC(t);return e.setSearchContent({}),e},[E.QUESTIONS]:t=>{let e=new tA(t);return e.setQuestionsRelatedQuestionsLimit(5),e.setQuestionsExactAnswer({}),e},[E.CONTENT_BLOCK]:tE,[E.HTML_BLOCK]:tE,[E.SEO]:tE,[E.BANNER]:tE},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,t_=t=>{try{return t?JSON.parse(t):""}catch(e){return t}},tk=(t={})=>"undefined"!=typeof window?window:t;(d=P||(P={}))[d.NONE=0]="NONE",d[d.ERROR=1]="ERROR",d[d.WARN=2]="WARN",d[d.INFO=3]="INFO",d[d.DEBUG=4]="DEBUG",d[d.TRACE=5]="TRACE";let tx={none:P.NONE,error:P.ERROR,warn:P.WARN,info:P.INFO,debug:P.DEBUG,trace:P.TRACE},tN="Sitecore Search SDK",tG=[console],tF=new class{constructor(t,e=P.NONE,n=tN){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:tN}),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)}}(tG),tU={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",tB=(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:`${tU[r]}${tq.replace("{{key}}",s)}`})},tV=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=tU[r],a?{apiDomain:n,searchUrl:`${n}${"/discover/v2/{{key}}".replace("{{key}}",tV(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},tW={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},tQ=t=>tW[t],tH=()=>tW,t$=()=>{let t=tk({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=t_(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&&tk().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?t_(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?tV(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=tQ("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=tk();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)},el=ee("Date"),ep=ee("File"),ed=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,eE=t=>!er(t)&&t!==eC,eA=(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,e_={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:el,isFile:ep,isBlob:ed,isRegExp:eL,isFunction:ea,isStream:t=>eu(t)&&ea(t.pipe),isURLSearchParams:em,isTypedArray:eA,isFileList:ef,forEach:eb,merge:function t(){let{caseless:e}=eE(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:eE,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 ek(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)}e_.inherits(ek,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:e_.toJSONObject(this.config),code:this.code,status:this.status}}});let ex=ek.prototype,eN={};function eG(t){return e_.isPlainObject(t)||e_.isArray(t)}function eF(t){return e_.endsWith(t,"[]")?t.slice(0,-2):t}function eU(t,e,n){return t?t.concat(e).map(function(t,e){return t=eF(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=>{eN[t]={value:t}}),Object.defineProperties(ek,eN),Object.defineProperty(ex,"isAxiosError",{value:!0}),ek.from=(t,e,n,i,r,s)=>{let o=Object.create(ex);return e_.toFlatObject(t,o,function(t){return t!==Error.prototype},t=>"isAxiosError"!==t),ek.call(o,t.message,e,n,i,r),o.cause=t,o.name=t.name,s&&Object.assign(o,s),o};let ej=e_.toFlatObject(e_,{},null,function(t){return/^is[A-Z]/.test(t)}),eq=function(t,e,n){if(!e_.isObject(t))throw TypeError("target must be an object");e=e||new FormData;let i=(n=e_.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(t,e){return!e_.isUndefined(e[t])})).metaTokens,r=n.visitor||h,o=n.dots,a=n.indexes,c=(n.Blob||"undefined"!=typeof Blob&&Blob)&&e_.isSpecCompliantForm(e);if(!e_.isFunction(r))throw TypeError("visitor must be a function");function u(t){if(null===t)return"";if(e_.isDate(t))return t.toISOString();if(!c&&e_.isBlob(t))throw new ek("Blob is not supported. Use a Buffer instead.");return e_.isArrayBuffer(t)||e_.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(e_.endsWith(n,"{}"))n=i?n:n.slice(0,-2),t=JSON.stringify(t);else{var c;if(e_.isArray(t)&&(c=t,e_.isArray(c)&&!c.some(eG))||(e_.isFileList(t)||e_.endsWith(n,"[]"))&&(s=e_.toArray(t)))return n=eF(n),s.forEac
1h(function(t,i){e_.isUndefined(t)||null===t||e.append(!0===a?eU([n],i,o):null===a?n:n+"[]",u(t))}),!1}}return!!eG(t)||(e.append(eU(r,n,o),u(t)),!1)}let l=[],p=Object.assign(ej,{defaultVisitor:h,convertValue:u,isVisitable:eG});if(!e_.isObject(t))throw TypeError("data must be an object");return function t(n,i){if(!e_.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+i.join("."));l.push(n),e_.forEach(n,function(n,s){!0===(!(e_.isUndefined(n)||null===n)&&r.call(e,n,e_.isString(s)?s.trim():s,i,p))&&t(n,i?i.concat(s):[s])}),l.pop()}}(t),e};function eB(t){let e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(t){return e[t]})}function eV(t,e){this._pairs=[],t&&eq(t,this,e)}let eM=eV.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 eW(t,e,n){let i;if(!e)return t;let r=n&&n.encode||eK;e_.isFunction(n)&&(n={serialize:n});let s=n&&n.serialize;if(i=s?s(e,n):e_.isURLSearchParams(e)?e.toString():new eV(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,eB)}:eB;return this._pairs.map(function(t){return e(t[0])+"="+e(t[1])},"").join("&")};let eQ=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){e_.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:eV,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={...B,...e$},e1=function(t){if(e_.isFormData(t)&&e_.isFunction(t.entries)){let e={};return e_.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&&e_.isArray(i)?i.length:s,a?e_.hasOwnProp(i,s)?i[s]=[i[s],n]:i[s]=n:(i[s]&&e_.isObject(i[s])||(i[s]=[]),t(e,n,i[s],r)&&e_.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})(e_.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=e_.isObject(t);if(s&&e_.isHTMLForm(t)&&(t=new FormData(t)),e_.isFormData(t))return r?JSON.stringify(e1(t)):t;if(e_.isArrayBuffer(t)||e_.isBuffer(t)||e_.isStream(t)||e_.isFile(t)||e_.isBlob(t)||e_.isReadableStream(t))return t;if(e_.isArrayBufferView(t))return t.buffer;if(e_.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&&e_.isBuffer(t)?(this.append(e,t.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},a))).toString()}if((n=e_.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(e_.isString(t))try{return(0,JSON.parse)(t),e_.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(e_.isResponse(t)||e_.isReadableStream(t))return t;if(t&&e_.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 ek.from(t,ek.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}}};e_.forEach(["delete","get","head","post","put","patch"],t=>{e2.headers[t]={}});let e4=e_.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:e_.isArray(t)?t.map(e6):String(t)}function e8(t,e,n,i,r){return e_.isFunction(i)?i.call(this,e,n):(r&&(e=n),e_.isString(e)?e_.isString(i)?-1!==e.indexOf(i):e_.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=e_.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)=>e_.forEach(t,(t,n)=>r(t,n,e));if(e_.isPlainObject(t)||t instanceof this.constructor)s(t,e);else if(e_.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(e_.isObject(t)&&e_.isIterable(t)){let n,i,r={};for(let e of t){if(!e_.isArray(e))throw TypeError("Object iterator must return a key-value pair");r[i=e[0]]=(n=r[i])?e_.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=e_.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,;
1=]+)\s*(?:=\s*([^,;]+))?/g;for(;e=i.exec(t);)n[e[1]]=e[2];return n}(t);if(e_.isFunction(e))return e.call(this,t,n);if(e_.isRegExp(e))return e.exec(t);throw TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=e5(t)){let n=e_.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=e_.findKey(n,t);r&&(!e||e8(0,n[r],r,e))&&(delete n[r],i=!0)}}return e_.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 e_.forEach(this,(i,r)=>{let s=e_.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 e_.forEach(this,(n,i)=>{null!=n&&!1!==n&&(e[i]=t&&e_.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=e_.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 e_.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 e_.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){ek.call(this,null==t?"canceled":t,ek.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 ek("Request failed with status code "+n.status,[ek.ERR_BAD_REQUEST,ek.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"]),e_.reduceDescriptors(e7.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[n]=t}}}),e_.freezeMethods(e7),e_.inherits(ne,ek,{__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,l=0;for(;h!==s;)l+=n[h++],h%=t;if((s=(s+1)%t)===o&&(o=(o+1)%t),c-r<e)return;let p=u&&c-u;return p?Math.round(1e3*l/p):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)=>e_.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)];e_.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),e_.isString(i)&&o.push("path="+i),e_.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 e_.isPlainObject(t)&&e_.isPlainObject(e)?e_.merge.call({caseless:i},t,e):e_.isPlainObject(e)?e_.merge({},e):e_.isArray(e)?e.slice():e}function r(t,e,n,r){return e_.isUndefined(e)?e_.isUndefined(t)?void 0:i(void 0,t,0,r):i(t,e,0,r)}function s(t,e){if(!e_.isUndefined(e))return i(void 0,e)}function o(t,e){return e_.isUndefined(e)?e_.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 e_.forEach(Object.keys(Object.assign({},t,e)),function(i){let s=c[i]||r,o=s(t[i],e[i],i);e_.isUndefined(o)&&s!==a||(n[i]=o)}),n}let nl=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=eW(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)):""))),e_.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&&e_.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},np="undefined"!=typeof XMLHttpRequest&&function(t){return new Promise(function(e,n){let i=nl(t),r=i.data,s=e7.from(i.headers).normalize(),o,a,c,u,h,{responseType:l,onUploadProgress:p,onDownloadProgress:d}=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:l&&"text"!==l&&"json"!==l?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 ek("Request aborted",ek.ECONNABORTED,t,m)),m=null)},m.onerror=function(){n(new ek("Network Error",ek.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 ek(e,r.clarifyTimeoutError?ek.ETIMEDOUT:ek.ECONNABORTED,t,m)),m=null},void 0===r&&s.setContentType(null),"setRequestHeader"in m&&e_.forEach(s.toJSON(),function(t,e){m.setRequestHeader(e,t)}),e_.isUndefined(i.withCredentials)||(m.withCredentials=!!i.withCredentials),l&&"json"!==l&&(m.responseType=i.responseType),d&&([c,h]=ni(d,!0),m.addEventListener("progress",c)),p&&m.upload&&([a,u]=ni(p),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 ek("Unsupported protocol "+g+":",ek.ERR_BAD_REQUEST,t)):m.send(r||null)})},nd=(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 ek?e:new ne(e instanceof Error?e.message:e))}},s=e&&setTimeout(()=>{s=null,r(new ek(`timeout ${e} of ms exceeded`,ek.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=()=>e_.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(()=>e_.isReadableStream(new Response("").body)),nC={stream:nS&&(t=>t.body)};nv&&(_=new Response,["text","arrayBuffer","blob","formData","stream"].forEach(t=>{nC[t]||(nC[t]=e_.isFunction(_[t])?e=>e[t]():(e,n)=>{throw new ek(`Response type '${t}' is not supported`,ek.ERR_NOT_SUPPORT,n)})}));let nE={http:null,xhr:np,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:l,withCredentials:p="same-origin",fetchOptions:d}=nl(t);h=h?(h+"").toLowerCase():"text";let f,m=nd([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=e_.toFiniteNumber(t.getContentLength());return null==n?(async t=>{if(null==t)return 0;if(e_.isBlob(t))return t.size;if(e_.isSpecCompliantForm(t)){let e=new Request(e0.origin,{method:"POST",body:t});return(await e.arrayBuffer()).byteLength}return e_.isArrayBufferView(t)||e_.isArrayBuffer(t)?t.byteLength:(e_.isURLSearchParams(t)&&(t+=""),e_.isString(t)?(await nw(t)).byteLength:void 0)})(e):n})(l,r))){let t,i=new Request(n,{method:"POST",body:r,duplex:"half"});if(e_.isFormData(r)&&(t=i.headers.get("content-type"))&&l.setContentType(t),i.body){let[t,n]=nr(e,ni(ns(u)));r=nm(i.body,65536,t,n)}}e_.isString(p)||(p=p?"include":"omit");let s="credentials"in Request.prototype;f=new Request(n,{...d,signal:m,method:i.toUpperCase(),headers:l.normalize().toJSON(),body:r,duplex:"half",credentials:s?p: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=e_.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[e_.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 ek("Network Error",ek.ERR_NETWORK,t,f),{cause:e.cause||e});throw ek.from(e,e&&e.code,t,f)}})};e_.forEach(nE,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}});let nA=t=>`- ${t}`,nP=t=>e_.isFunction(t)||null===t||!1===t,nT=t=>{let e,n;let{length:i}=t=e_.isArray(t)?t:[t],r={};for(let s=0;s<i;s++){let i;if(n=e=t[s],!nP(e)&&void 0===(n=nE[(i=String(e)).toLowerCase()]))throw new ek(`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 ek("There is no suitable adapter to dispatch the request "+(i?t.length>
11?"since :\n"+t.map(nA).join("\n"):" "+nA(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 ek(i(r," has been removed"+(e?" in "+e:"")),ek.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 ek("options must be an object",ek.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 ek("option "+s+" must be "+n,ek.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new ek("Unknown option "+s,ek.ERR_BAD_OPTION)}},validators:nI},n_=nD.validators;class nk{constructor(t){this.defaults=t||{},this.interceptors={request:new eQ,response:new eQ}}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:n_.transitional(n_.boolean),forcedJSONParsing:n_.transitional(n_.boolean),clarifyTimeoutError:n_.transitional(n_.boolean)},!1),null!=r&&(e_.isFunction(r)?e.paramsSerializer={serialize:r}:nD.assertOptions(r,{encode:n_.function,serialize:n_.function},!0)),void 0!==e.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),nD.assertOptions(e,{baseUrl:n_.spelling("baseURL"),withXsrfToken:n_.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let o=s&&e_.merge(s.common,s[e.method]);s&&e_.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,l=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);l<h;)n=n.then(t[l++],t[l++]);return n}h=a.length;let p=e;for(l=0;l<h;){let t=a[l++],e=a[l++];try{p=t(p)}catch(t){e.call(this,t);break}}try{n=nO.call(this,p)}catch(t){return Promise.reject(t)}for(l=0,h=u.length;l<h;)n=n.then(u[l++],u[l++]);return n}getUri(t){return eW(nc((t=nh(this.defaults,t)).baseURL,t.url,t.allowAbsoluteUrls),t.params,t.paramsSerializer)}}e_.forEach(["delete","get","head","options"],function(t){nk.prototype[t]=function(e,n){return this.request(nh(n||{},{method:t,url:e,data:(n||{}).data}))}}),e_.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}))}}nk.prototype[t]=e(),nk.prototype[t+"Form"]=e(!0)});
1class 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 nN={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};
1Object.entries(nN).forEach(([t,e])=>{nN[e]=t});let nG=function t(e){let n=new nk(e),i=t5(nk.prototype.request,n);return e_.extend(i,nk.prototype,n,{allOwnKeys:!0}),e_.extend(i,n,null,{allOwnKeys:!0}),i.create=function(n){return t(nh(e,n))},i}(e2);nG.Axios=nk,nG.CanceledError=ne,nG.CancelToken=nx,nG.isCancel=nt,nG.VERSION="1.9.0",nG.toFormData=eq,nG.AxiosError=ek,nG.Cancel=nG.CanceledError,nG.all=function(t){return Promise.all(t)},nG.spread=function(t){return function(e){return t.apply(null,e)}},nG.isAxiosError=function(t){return e_.isObject(t)&&!0===t.isAxiosError},nG.mergeConfig=nh,nG.AxiosHeaders=e7,nG.formToJSON=t=>e1(e_.isHTMLForm(t)?new FormData(t):t),nG.getAdapter=nT,nG.HttpStatusCode=nN,nG.default=nG;var nF=function(t,e){return(nF=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)},nU=function(){return(nU=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 nB=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=nU(nU(nU({},this.defaultConfig),this.config),t||{}),this.config.cookieOptions=nU(nU(nU({},this.defaultConfig.cookieOptions),this.config.cookieOptions),(null==t?void 0:t.cookieOptions)||{})},t.prototype.Get=function(){return this.config},t}()),nV=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}nF(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=nB.Get().cookieOptions.prefix+t;return nM.read(e)},t.prototype.set=function(t,e){var n=nB.Get(),i=n.cookieOptions.prefix+t;nM.write(i,e,n.cookieOptions)},t.prototype.remove=function(t){var e=nB.Get(),n=e.cookieOptions.prefix+t;nM.write(n,void 0,e.cookieOptions)},t}());function nW(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 nQ={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===nG)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=nB.Get(),[4,nG.post("".concat(c.baseApiUrl,"/oauth/token"),nQ.serialize(a),nU({headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},adapter:c.axiosAdapter},s)).catch(function(t){if(t.response)throw new nV(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=nB.Get(),[4,nG.post("".concat(u.baseApiUrl,"/oauth/token"),nQ.serialize(c),nU({headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},adapter:u.axiosAdapter},o)).catch(function(t){if(t.response)throw new nV(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=nB.Get(),[4,nG.post("".concat(a.baseApiUrl,"/oauth/token"),nQ.serialize(o),nU({headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},adapter:a.axiosAdapter},r)).catch(function(t){if(t.response)throw new nV(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=nB.Get(),[4,nG.post("".concat(r.baseApiUrl,"/oauth/token"),nQ.serialize(i),nU({headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},adapter:r.axiosAdapter},n)).catch(function(t){if(t.response)throw new nV(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=nB.Get(),[4,nG.post("".concat(o.baseApiUrl,"/oauth/token"),nQ.serialize(s),nU({headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},adapter:o.axiosAdapter},i)).catch(function(t){if(t.response)throw new nV(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){nW(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){nW(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=nW(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=nB.Get(),!t&&!n.clientID))return[2,t||""];if(t&&(i=nW(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===nG)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(nB.Get().baseApiUrl,"/").concat(e):"".concat(nB.Get().baseApiUrl,"/").concat(nB.Get().apiVersion).concat(e),"put"!==t&&"post"!==t&&"patch"!==t?[3,3]:(s=i.data,delete i.data,[4,nG[t](r,s,i)]);case 2:case 4:return[2,o.sent().data];case 3:return[4,nG[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=nB.Get(),n=nU(nU({},t),{paramsSerializer:nQ,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",nU(nU({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},r),{impersonating:s,params:i})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},i),{impersonating:r})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},i),{impersonating:r})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},i),{data:e,impersonating:r,params:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},r),{data:n,impersonating:s,params:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},r),{data:n,impersonating:s,params:i})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},i),{impersonating:r})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},i),{impersonating:r})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},i),{impersonating:r})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},r),{data:i,impersonating:s})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},i),{impersonating:r})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},r),{data:i,impersonating:s})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},r),{impersonating:s,params:i})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},i),{impersonating:r})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},i),{impersonating:r})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},t),{impersonating:e})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},t),{impersonating:e})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},t),{impersonating:e})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},t),{impersonating:e})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},t),{impersonating:e})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},t),{impersonating:e})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},t),{impersonating:e})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},t),{impersonating:e})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},i),{impersonating:r})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},r),{data:i,impersonating:s})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},i),{impersonating:r})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},r),{data:i,impersonating:s})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},r),{data:i,impersonating:s})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},r),{data:i,impersonating:s})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},i),{impersonating:r})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},i),{impersonating:r})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},r),{data:i,impersonating:s})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},r),{data:i,impersonating:s})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},r),{impersonating:s})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},i),{impersonating:r})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},i),{impersonating:r})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},r),{data:i,impersonating:s})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},r),{impersonating:s})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},i),{impersonating:r})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},t),{impersonating:e})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},i),{impersonating:r,params:n})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},n),{data:t,impersonating:i,params:e})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},i),{impersonating:r})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},t),{impersonating:e})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},t),{impersonating:e})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},t),{impersonating:e})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},i),{data:n,impersonating:r})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{impersonating:i})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},e),{impersonating:n})).catch(function(t){if(t.response)throw new nV(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),nU(nU({},n),{data:e,impersonating:i})).catch(function(t){if(t.response)throw new nV(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"),nU(nU({},n),{impersonating:i,params:e})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{impersonating:n,params:t})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},t),{impersonating:e})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},t),{impersonating:e})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},t),{impersonating:e})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},t),{impersonating:e})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},t),{impersonating:e})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},t),{impersonating:e})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},e),{data:t,impersonating:n})).catch(function(t){if(t.response)throw new nV(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",nU(nU({},t),{impersonating:e})).catch(function(t){if(t.response)throw new nV(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 tF.error("Could not found an Order Cloud Cloud logged user."),Error("Could not found an Order Cloud Cloud logged user.");return tF.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 tQ("debug")?(tF.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 tF.error(t),tF.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 tF.error(t),tF.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(tF.debug("trackEvent ",`Consent: ${e} `,n7(t)),!e)return;let n={...t,...t4(),client_time_ms:Date.now()};return tF.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 tF.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()}})},it=async(t,e,{actionCause:n,index:i,request:r,items:s})=>{let o=[];return e&&s&&(o=n3(e,s))&&!n4(o)?void tF.warn("trackEvent :::","A field is missing on one or more of the items provided"):n&&"entity"===n&&tD(i)?void tF.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()}})};(f=k||(k={})).LOAD="core/LOAD",f.UNLOAD="core/UNLOAD",f.REQUEST="core/REQUEST",f.REQUEST_SUCCESS="core/REQUEST_SUCCESS",f.REQUEST_FAIL="core/REQUEST_FAIL",f.REQUEST_CANCELED="core/REQUEST_CANCELED",f.WIDGET_DATA_REQUEST="core/WIDGET_DATA_REQUEST",f.WIDGET_DATA_REQUEST_SUCCESS="core/WIDGET_DATA_REQUEST_SUCCESS",f.WIDGET_DATA_REQUEST_FAIL="core/WIDGET_DATA_REQUEST_FAIL",f.WIDGET_DATA_REQUEST_CANCELED="core/WIDGET_DATA_REQUEST_CANCELED",f.WIDGET_STATE_CHANGED="core/WIDGET_STATE_CHANGED",f.WIDGET_APPEAR="core/WIDGET_APPEAR",f.PAGE_CONTAINER_READY="core/PAGE_CONTAINER_READY",f.WIDGET_READY="core/WIDGET_READY",f.INITIALIZE="core/INITIALIZE",f.INITIALIZED="core/INITIALIZED",f.RESET_WIDGET="core/RESET_WIDGET",f.PAGE_CONTEXT_CHANGED="core/PAGE_CONTEXT_CHANGED",f.OC_CONTEXT_CHANGED="core/OC_CONTEXT_CHANGED",f.FOUND_WIDGETS="core/FOUND_WIDGETS",f.ADD_TO_CART="core/interaction/ADD_TO_CART",f.ORDER_CONFIRM="core/interaction/ORDER_CONFIRM",f.USER_LOGIN="core/interaction/USER_LOGIN",f.ADD_TO_WISHLIST="core/interaction/ADD_TO_WISHLIST",f.CART_STATUS="core/interaction/CART_STATUS",f.ITEM_CLICKED="core/interaction/ITEM_CLICKED",f.PAGE_WIDGETS_DATA_REQUEST="core/PAGE_WIDGETS_DATA_REQUEST",f.PAGE_WIDGETS_DATA_REQUEST_SUCCESS="core/PAGE_WIDGETS_DATA_REQUEST_SUCCESS",f.PAGE_WIDGETS_DATA_REQUEST_FAIL="core/PAGE_WIDGETS_DATA_REQUEST_FAIL",f.PAGE_WIDGETS_DATA_REQUEST_CANCELED="core/PAGE_WIDGETS_DATA_REQUEST_CANCELED";let ie=k,ii=[],ir=[];class is{static addActionHandler(t){ii.push(t)}static removeActionHandler(t){let e=ir.indexOf(t);-1!==e&&ir.splice(e,1)}static subscribe(t){ii.push(t)}static unsubscribe(t){let e=ii.indexOf(t);-1!==e&&ii.splice(e,1)}static dispatch(t){tF.debug("dispatcher ::: dispatch",`[${t.type}
1]`,t.payload),ii.forEach(e=>{e.handleAction(t)}),ir.forEach(e=>{e.handleAction(t)})}}let io=(t,e)=>`${t}${e?`@${e}`:""}`,ia={widgetTypesConfigMapping:{},widgetsConfigMapping:{},setWidgetType(t,e){tr(this.widgetTypesConfigMapping,{[t]:e},{mutate:!0})},getType(t){let{type:e}=this.widgetsConfigMapping[io(t)]||{};return e},set(t,e,n){"string"==typeof e?this.widgetsConfigMapping[io(t,e)]=n:this.widgetsConfigMapping[io(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[io(t,e)],i=this.widgetsConfigMapping[io(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[io(t,e)]||(this.widgetsConfigMapping[io(t,e)]={}),this.widgetsConfigMapping[io(t,e)]},getMetadata(t){let{metadata:e}=this.widgetsConfigMapping[io(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 ic{constructor(){Object.defineProperty(this,"initialized",{enumerable:!0,configurable:!0,writable:!0,value:!1})}register(t){is.subscribe(t)}unregister(t){is.unsubscribe(t)}getDispatcher(){return is}initialize(){this.initialized=!0,is.dispatch({type:ie.INITIALIZED,payload:{}})}}let iu=new class extends ic{constructor(){super(),Object.defineProperty(this,"context",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.setContext(tI.get()),is.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"),tW.trackConsent=!1)}handleAction(t){switch(t.type){case ie.INITIALIZE:this.initialize();break;case ie.ADD_TO_CART:{let{entity:e,items:n}=t.payload;(async(t,e)=>{n9(t,"cart",e)})(e,{items:n});break}case ie.ADD_TO_WISHLIST:{let{entity:e,items:n}=t.payload;(async(t,e)=>{n9(t,"wishlist",e)})(e,{items:n});break}case ie.USER_LOGIN:{let{id:e,email:n}=t.payload;(async t=>{if(!t||tR(t))return void tF.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 ie.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 tF.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 ie.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});tF.warn("trackEvent :::","Transaction orderId is not defined")})(e,{orderId:i,orderTotal:r,orderSubtotal:s,coupon:o,items:n});break}case ie.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 tF.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&&is.dispatch({type:ie.PAGE_CONTEXT_CHANGED,payload:{context:this.context}})}},ih=null,il=async(t,e)=>{if(!ih)return Promise.reject(Error("No data processor configured"));try{let n=await n1.callApi(t,{cache:!1,...e}),i=ih.validateResponse(n,t);return i?Promise.reject(i):Promise.resolve(ih.processResponse(n,t))}catch(t){return Promise.reject(t)}},ip=t=>{ih=t};class id{validateResponse(t,e){return t&&(t.errors||[]).length>0?t:null}processResponse(t,e){return t}}let im=(t,{processor:e=new id}={})=>{let n;n=tW,"useToken"in t&&void 0!==t.useToken&&tF.warn('Parameter "useToken" has been deprecated'),tW=t.customerKey?tM(n,t):tB(n,t);
1let{useStorage:i=!1}=t;tZ.init(i),e&&ip(e)};class iv extends id{processResponse(t){return t.widgets?.forEach(({rfk_id:t,type:e,variation_id:n,used_in:i})=>{ia.setMetadata(t,{rfkId:t,type:e,variationId:n,usedIn:i})}),t}}let ig=!1,iw=()=>{ig||((()=>{let{trackConsent:t}=tH();iu.toggleTrackConsent(t),iu.getContext().setBrowserUserAgent(tk({navigator:{userAgent:""}}).navigator.userAgent)})(),ig=!0,iu.getDispatcher().dispatch({type:ie.INITIALIZE,payload:{options:{}}}))},iy="undefined"==typeof window||"Deno"in window;function ib(){}function iS(t){return"number"==typeof t&&t>=0&&t!==1/0}function iC(t,e){return Math.max(t+(e||0)-Date.now(),0)}function iE(t,e,n){return ix(t)?"function"==typeof e?{...n,queryKey:t,queryFn:e}:{...e,queryKey:t}:t}function iA(t,e,n){return ix(t)?[{...e,queryKey:t},n]:[t||{},e]}function iP(t,e){let{type:n="all",exact:i,fetchStatus:r,predicate:s,queryKey:o,stale:a}=t;if(ix(o)){if(i){if(e.queryHash!==iL(o,e.options))return!1}else{if(!iI(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 iT(t,e){let{exact:n,fetching:i,predicate:r,mutationKey:s}=t;if(ix(s)){if(!e.options.mutationKey)return!1;if(n){if(iO(e.options.mutationKey)!==iO(s))return!1}else{if(!iI(e.options.mutationKey,s))return!1}}return!("boolean"==typeof i&&"loading"===e.state.status!==i||r&&!r(e))}function iL(t,e){return((null==e?void 0:e.queryKeyHashFn)||iO)(t)}function iO(t){return JSON.stringify(t,(t,e)=>i_(e)?Object.keys(e).sort().reduce((t,n)=>(t[n]=e[n],t),{}):e)}function iI(t,e){return t===e||typeof t==typeof e&&!(!t||!e||"object"!=typeof t||"object"!=typeof e)&&!Object.keys(e).some(n=>!iI(t[n],e[n]))}function iR(t,e){if(t&&!e||e&&!t)return!1;for(let n in t)if(t[n]!==e[n])return!1;return!0}function iD(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function i_(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 ix(t){return Array.isArray(t)}function iN(t){return new Promise(e=>{setTimeout(e,t)})}function iG(t){iN(0).then(t)}function iF(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=iD(e)&&iD(n);if(i||i_(e)&&i_(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,ij=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 iq{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 iB=new class extends iq{constructor(){super(),this.setup=t=>{if(!iy&&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"],iM=new class extends iq{constructor(){super(),this.setup=t=>{if(!iy&&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 iK(t){return Math.min(1e3*2**t,3e4)}function iW(t){return"online"!==(null!=t?t:"online")||iM.isOnline()}class iQ{constructor(t){this.revert=null==t?void 0:t.revert,this.silent=null==t?void 0:t.silent}}function iH(t){return t instanceof iQ}function i$(t){let e,n,i,r=!1,s=0,o=!1,a=new Promise((t,e)=>{n=t,i=e}),c=()=>!iB.isFocused()||"always"!==t.networkMode&&!iM.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))},l=()=>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()}),p=()=>{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:iK,d="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),iN(d).then(()=>{if(c())return l()}).then(()=>{r?h(e):p()})):h(e)})}};return iW(t.networkMode)?p():l().then(p),{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 iJ{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),iS(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(t){this.cacheTime=Math.max(this.cacheTime||0,null!=t?t:iy?1/0:3e5)}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class iz extends iJ{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=iF(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(ib).catch(ib):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||!iC(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;iH(t)&&t.silent||this.dispatch({type:"error",error:t}),iH(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=i$({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:iW(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 iH(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),ij.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate(t)}),this.cache.notify({query:this,type:"updated",action:t})})}}class iY extends iq{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:iL(r,e),o=this.get(s);return o||(o=new iz({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(){ij.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=>iP(n,t))}findAll(t,e){let[n]=iA(t,e);return Object.keys(n).length>0?this.queries.filter(t=>iP(n,t)):this.queries}notify(t){ij.batch(()=>{this.listeners.forEach(({listener:e})=>{e(t)})})}onFocus(){ij.batch(()=>{this.queries.forEach(t=>{t.onFocus()})})}onOnline(){ij.batch(()=>{this.queries.forEach(t=>{t.onOnline()})})}}class iX extends iJ{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,l,p,d,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=(l=this.options).onMutate)?void 0:h.call(l,this.state.variables));t!==this.state.context&&this.dispatch({type:"loading",context:t,variables:this.state.variables})}let p=await (()=>{var t;return this.retryer=i$({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,p,this.state.variables,this.state.context,this)),await (null==(n=(i=this.options).onSuccess)?void 0:n.call(i,p,this.state.variables,this.state.context)),await (null==(r=(s=this.mutationCache.config).onSettled)?void 0:r.call(s,p,null,this.state.variables,this.state.context,this)),await (null==(o=(a=this.options).onSettled)?void 0:o.call(a,p,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:p}),p}catch(t){try{throw await (null==(p=(d=this.mutationCache.config).onError)?void 0:p.call(d,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:!iW(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),ij.batch(()=>{this.observers.forEach(e=>{e.onMutationUpdate(t)}),this.mutationCache.notify({mutation:this,type:"updated",action:t})})}}class iZ extends iq{constructor(t){super(),this.config=t||{},this.mutations=[],this.mutationId=0}build(t,e,n){let i=new iX({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(){ij.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=>iT(t,e))}findAll(t){return this.mutations.filter(e=>iT(t,e))}notify(t){ij.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 ij.batch(()=>t.reduce((t,e)=>t.then(()=>e.continue().catch(ib)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}}function i0(t,e){return null==t.getNextPageParam?void 0:t.getNextPageParam(e[e.length-1],e)}class i1{constructor(t={}){this.queryCache=t.queryCache||new iY,this.mutationCache=t.mutationCache||new iZ,this.logger=t.logger||iU,this.defaultOptions=t.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,1===this.mountCount&&(this.unsubscribeFocus=iB.subscribe(()=>{iB.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=iM.subscribe(()=>{iM.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=iE(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=iE(t),a=this.defaultQueryOptions(o);return this.queryCache.build(this,a).setData(s,{...n,manual:!0})}setQueriesData(t,e,n){return ij.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;ij.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 ij.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(ij.batch(()=>this.queryCache.findAll(i).map(t=>t.cancel(r)))).then(ib).catch(ib)}invalidateQueries(t,e,n){let[i,r]=iA(t,e,n);return ij.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(ij.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(ib);return null!=r&&r.throwOnError||(s=s.catch(ib)),s}fetchQuery(t,e,n){let i=iE(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(ib).catch(ib)}fetchInfiniteQuery(t,e,n){let i=iE(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,l=null==h?void 0:h.pageParam,p="forward"===(null==h?void 0:h.direction),d="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(p){let e=void 0!==l,n=e?l:i0(t.options,f);c=b(f,e,n)}else if(d){let e=void 0!==l,n=e?l: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]:i0(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(ib).catch(ib)}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=>iO(t)===iO(e.queryKey));n?n.defaultOptions=e:this.queryDefaults.push({queryKey:t,defaultOptions:e})}getQueryDefaults(t){if(!t)return;let e=this.queryDefaults.find(e=>iI(t,e.queryKey));return null==e?void 0:e.defaultOptions}setMutationDefaults(t,e){let n=this.mutationDefaults.find(e=>iO(t)===iO(e.mutationKey));n?n.defaultOptions=e:this.mutationDefaults.push({mutationKey:t,defaultOptions:e})}getMutationDefaults(t){if(!t)return;let e=this.mutationDefaults.find(e=>iI(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=iL(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 i2=V.createContext(void 0),i4=V.createContext(!1);function i3(t,e){return t||(e&&"undefined"!=typeof window?(window.ReactQueryClientContext||(window.ReactQueryClientContext=i2),window.ReactQueryClientContext):i2)}let i5=({context:t}={})=>{let e=V.useContext(i3(t,V.useContext(i4)));if(!e)throw Error("No QueryClient set, use QueryClientProvider to set one");return e},i6=({client:t,children:e,context:n,contextSharing:i=!1})=>{V.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]);let r=i3(n,i);return V.createElement(i4.Provider,{value:!n&&i},V.createElement(r.Provider,{value:t},e))};class i8{constructor(){Object.defineProperty(this,"containerHandled",{enumerable:!0,configurable:!0,writable:!0,value:!1}),iu.register(this)}handleAction(t){switch(t.type){case ie.PAGE_CONTAINER_READY:this.containerHandled||(this.containerHandled=this.handlePageContainerReadyAction(t.payload));break;case ie.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 i7='[data-rfkid="rfkid_container"]',i9=()=>{if(i)return;let t=document.querySelector(i7);(i=new MutationObserver(e=>{let n=[];
1e.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&&iu.getDispatcher().dispatch({type:ie.FOUND_WIDGETS,payload:{widgets:n}})})).observe(document.body,{subtree:!0,childList:!0,characterData:!0})},rt={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 re={onItemClick:x.ITEM_CLICKED,onSuggestionClick:x.SUGGESTION_CLICKED,onSuggestionAdded:x.SUGGESTION_ADDED,onSuggestionRemoved:x.SUGGESTION_REMOVED,onKeyphraseChange:x.KEYPHRASE_CHANGED},rn={itemsPerPage:(t,e)=>t.setRecommendationsLimit(e.itemsPerPage)};(w=N||(N={})).ITEM_CLICKED="recommendation/ITEM_CLICKED",w.NAVIGATION_NEXT="recommendation/NAVIGATION_NEXT",w.NAVIGATION_PREV="recommendation/NAVIGATION_PREV";let ri={onNavigationNext:N.NAVIGATION_NEXT,onNavigationPrev:N.NAVIGATION_PREV,onItemClick:N.ITEM_CLICKED},rr={keyphrase:(t,e)=>e.keyphrase&&t.setQuestionsKeyphrase(e.keyphrase),relatedQuestions:(t,e)=>e.relatedQuestions&&t.setQuestionsRelatedQuestionsLimit(e.relatedQuestions)};(G||(G={})).KEYPHRASE_CHANGED="questions/KEYPHRASE_CHANGED";let rs={onKeyphraseChanged:G.KEYPHRASE_CHANGED},ro={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=F||(F={})).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 ra={onKeyphraseChange:F.KEYPHRASE_CHANGED,onClearFilters:F.CLEAR_FILTERS,onResultsPerPageChange:F.RESULTS_PER_PAGE_CHANGED,onPageNumberChange:F.PAGE_NUMBER_CHANGED,onItemClick:F.ITEM_CLICKED,onSortChange:F.SORT_CHANGED,onFacetClick:F.FACET_CLICKED,onFilterClick:F.FILTER_CLICKED,onRemoveFilter:F.REMOVE_FILTER};(b=U||(U={})).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 rc=(0,V.createContext)({}),ru=(0,V.createContext)({}),rh=()=>(0,V.useContext)(rc);class rl 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 iq{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 rf(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return rf(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),iR(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&&rm(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:iR(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(ib)),e}updateStaleTimeout(){if(this.clearStaleTimeout(),iy||this.currentResult.isStale||!iS(this.options.staleTime))return;let t=iC(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,!iy&&!1!==this.options.enabled&&iS(this.currentRefetchInterval)&&0!==this.currentRefetchInterval&&(this.refetchIntervalId=setInterval(()=>
1{(this.options.refetchIntervalInBackground||iB.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,l,{dataUpdatedAt:p,error:d,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&&rm(t,n,e,i);(s||o)&&(m=iW(t.options.networkMode)?"fetching":"paused",p||(v="loading")),"isRestoring"===e._optimisticResults&&(m="idle")}if(e.keepPreviousData&&!h.dataUpdatedAt&&null!=u&&u.isSuccess&&"error"!==v)l=u.data,p=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)l=this.selectResult;else try{this.selectFn=e.select,l=e.select(h.data),l=iF(null==r?void 0:r.data,l,e),this.selectResult=l,this.selectError=null}catch(t){this.selectError=t}}else l=h.data;if(void 0!==e.placeholderData&&void 0===l&&"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",l=iF(null==r?void 0:r.data,t,e),w=!0)}this.selectError&&(d=this.selectError,l=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:l,dataUpdatedAt:p,error:d,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:rv(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,iR(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||iH(t.error)||(e.onError=!0),this.updateResult(e),this.hasListeners()&&this.updateTimers()}notify(t){ij.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&&rf(t,e,e.refetchOnMount)}function rf(t,e,n){if(!1!==e.enabled){let i="function"==typeof n?n(t):n;return"always"===i||!1!==i&&rv(t,e)}return!1}function rm(t,e,n,i){return!1!==n.enabled&&(t!==e||!1===i.enabled)&&(!n.suspense||"error"!==t.state.status)&&rv(t,n)}function rv(t,e){return t.isStaleByTime(e.staleTime)}let rg=m(634).useSyncExternalStore,rw=V.createContext((h=!1,{clearReset:()=>{h=!1},reset:()=>{h=!0},isReset:()=>h})),ry=V.createContext(!1);ry.Provider;let rb=t=>{let[e,n]=(0,V.useState)(()=>t.getKey()),i=i5();return(0,V.useEffect)(()=>(t.onUpdate(()=>{n(t.getKey())}),()=>{i.cancelQueries({queryKey:t.getKey(),exact:!0}),t.destroy()}),[t,i]),function(t,e){let n=i5({context:t.context}),i=V.useContext(ry),r=V.useContext(rw),s=n.defaultQueryOptions(t);s._optimisticResults=i?"isRestoring":"optimistic",s.onError&&(s.onError=ij.batchCalls(s.onError)),s.onSuccess&&(s.onSuccess=ij.batchCalls(s.onSuccess)),s.onSettled&&(s.onSettled=ij.batchCalls(s.onSettled)),s.suspense&&"number"!=typeof s.staleTime&&(s.staleTime=1e3),(s.suspense||s.useErrorBoundary)&&(r.isReset()||(s.retryOnMount=!1)),V.useEffect(()=>{r.clearReset()},[r]);let[o]=V.useState(()=>new e(n,s)),a=o.getOptimisticResult(s);if(rg(V.useCallback(t=>{let e=i?()=>{}:o.subscribe(ij.batchCalls(t));return o.updateResult(),e},[o,i]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),V.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)}(iE({queryKey:e,queryFn:e=>t.run({signal:e.signal}).catch(t=>t instanceof rl?i.cancelQueries({queryKey:e.queryKey,exact:!0}).then(()=>null):Promise.reject(t)),refetchOnMount:!1,enabled:t.isEnabled()},void 0,void 0),rp)},rS=()=>(0,V.useContext)(ru);function rC(){return(rC=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 rE(t,e){return(rE=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var rA=new Map,rP=new WeakMap,rT=0;function rL(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)?(rP.has(n)||(rT+=1,rP.set(n,rT.toString())),rP.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 rO=["children","as","triggerOnce","threshold","root","rootMargin","onChange","skip","trackVisibility","delay","initialInView","fallbackInView"];function rI(t){return"function"!=typeof t.children}var rR=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(),rI(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,rE(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=rL(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(!rI(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,rO);return V.createElement(s||"div",rC({ref:this.handleNode},o),r)},e}(V.Component);rR.displayName="InView",rR.defaultProps={threshold:0,triggerOnce:!1,initialInView:!1};let rD=t=>{t({type:ie.WIDGET_APPEAR,payload:{}})},r_=()=>{let{options:t}=rS(),{visibility:{onInView:e,onUpdate:n}={}}=t,{ref:i,inView:r,entry:s}=(()=>{var t,e,n,i,r,s,o,a,c,u,h,l,p,d,f,m,v;let{dispatch:g}=rh(),{options:{visibility:w={}}={}}=rS(),{triggerOnce:y=!0}=w,b=(0,V.useRef)(!0),{ref:S,inView:C,entry:E}=(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,l=V.useRef(),d=(p=V.useState({inView:!!u}))[0],f=p[1],m=V.useCallback(function(t){void 0!==l.current&&(l.current(),l.current=void 0),c||t&&(l.current=rL(t,function(t,e){f({inView:t,entry:e}),e.isIntersecting&&a&&l.current&&(l.current(),l.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,V.useEffect)(function(){l.current||!d.entry||a||c||f({inView:!!u})}),(v=[m,d.inView,d.entry]).ref=v[0],v.inView=v[1],v.entry=v[2],v),A=(0,V.useCallback)(()=>{rD(g)},[g]);return(0,V.useEffect)(()=>{b.current&&C&&(b.current=!y,rD(g))},[g,C,E,y]),{ref:S,inView:C,entry:E,trigger:A}})();return(0,V.useEffect)(()=>{r&&e&&e(s),n&&n(r,s)},[r,s,n,e]),i},rk=()=>{let t=rS(),{rfkId:e,instanceId:n}=rh(),[i,r]=(0,V.useState)(t.state),s=(0,V.useRef)({});return(0,V.useEffect)(()=>{let t={handleAction(t){if(t.type===ie.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 iu.register(t),()=>iu.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)}
1,rx=function(t){let{rfkId:e,dispatch:n}=rh(),i=rS();i.isInitialized()||i.initialize(t||{});let{query:r,options:s,actions:o}=i,a=rk(),c=rb(r);return{widgetRef:r_(),rfkId:e,state:a,queryResult:c,actions:o,options:s,dispatch:n,query:r}},rN=()=>{let{rfkId:t}=rx(),{widgetRef:e,queryResult:{data:{appearance:{css_names:n=[],templates:{html:{devices:{[U.DESKTOP]:{content:i=null}={}}={}}={},css:{devices:{[U.DESKTOP]:{content:r=null}={}}={}}={}}={}}={}}={}}}=rx(),s=(0,V.useRef)(null);return(0,V.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,V.useLayoutEffect)(()=>{s.current&&i&&(s.current.innerHTML=i)},[i]),(0,V.createElement)("div",{ref:e,"data-rfkid":t,className:n.join(" ")},(0,V.createElement)("div",{ref:s}))},rG=()=>{let{queryResult:{data:{appearance:{templates:{html:{devices:{[U.DESKTOP]:{content:t=null}={}}={}}={}}={}}={}}={}}}=rx();return(0,V.useLayoutEffect)(()=>{t&&document.head.insertAdjacentHTML("afterbegin",t)},[t]),null},rF={component:rN,options:{state:{}}},rU=(t,e)=>{tF.debug("setWidgetType",`Type: ${t}`,`Mapping: ${JSON.stringify(e)}`),ia.setWidgetType(t,e)},rj=class{constructor(){Object.defineProperty(this,"widgets",{enumerable:!0,configurable:!0,writable:!0,value:{}})}getWidgetComponentConfig(t,e){let n=ia.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)}},rq=({rfkId:t,entity:e,children:n})=>{let i=(0,V.useMemo)(()=>Math.random().toString(36).substring(2,9),[]),r=(0,V.useCallback)(n=>is.dispatch({...n,payload:{rfkId:t,instanceId:i,entity:e,...n.payload}}),[t,e,i]),s=(0,V.useMemo)(()=>({rfkId:t,instanceId:i,dispatch:r,entity:e}),[t,r,e,i]);return(0,V.createElement)(rc.Provider,{value:s},n)},rB=t=>{let{children:e}=t,n=rh();return n?.rfkId===t.rfkId?(0,V.createElement)(V.Fragment,{},e||null):(0,V.createElement)(rq,t,e)},rV={visibility:{threshold:.2,triggerOnce:!0}},rM={name:"Ordercloud",buildInterface:!0,file:"ocContext",properties:{sellerId:{type:"string"},requiredInventoryLocations:{type:"array",name:"requiredInventoryLocations"}}},rK=tm(rM);class rW extends rK{}let rQ=new class extends ic{constructor(){super(),Object.defineProperty(this,"ocContext",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.setContext(new rW),is.subscribe(this)}setContext(t){this.ocContext=t,this.ocContext.addListener(this)}getContext(){return this.ocContext}handleAction(t){switch(t.type){case ie.OC_CONTEXT_CHANGED:tF.info("OC Context changed");break;case ie.INITIALIZE:this.initialize()}}onChange(t,e,n){this.initialized&&is.dispatch({type:ie.OC_CONTEXT_CHANGED,payload:{context:this.ocContext}})}};var rH=m(1);let r$=(t,e)=>(t.cancel=()=>{e.abort()},t),rJ={async getData(t,e){let n=new AbortController,i={...e,signal:n.signal,abortController:n};return r$(this.fetch(t.toJson(),i),n)},async fetch(t,e){let n=String(Date.now().toString(32)+Math.random().toString(16)).replace(/\./g,""),i=iu.getContext(),r=tr({context:i.toJson()},t);is.dispatch({type:ie.REQUEST,payload:{requestId:n,request:t,pageContext:i,payload:r}});try{let s=await il(r,{signal:e?.signal});return is.dispatch({type:ie.REQUEST_SUCCESS,payload:{requestId:n,request:t,pageContext:i,payload:r,response:s}}),{_requestId:n,...s}}catch(e){return is.dispatch({type:ie.REQUEST_FAIL,payload:{error:e,requestId:n,request:t,pageContext:i,payload:r}}),Promise.reject(e)}}},rz={context:{type:"model",model:tT},rfk_flags:{type:"array",name:"rfkFlags"},widget:{type:"model",model:{name:"Widget",properties:{items:{type:"array",model:tb}}}}},rY=tm({name:"OCSearchRequest",file:"OCSearchRequest",buildInterface:!0,properties:{...rz,ordercloud:{type:"model",model:rM,setter:"setOrderCloudContext",getter:"getOrderCloudContext"}}});class rX extends rY{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 rZ=tm({name:"SearchRequest",file:"SearchRequest",buildInterface:!0,properties:{...rz}});class r0 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 r1=()=>{let{connector:t}=tH();if("oc"===t){tF.info("Using OC Request");let t=new rX;return t.setOrderCloudContext(rQ.getContext().toJson()),t}return tF.info("Using default Request"),new r0},r2=async t=>{let e=r1(),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 rJ.fetch(e.toJson());return t.map(([,{abortController:t}])=>t.signal.aborted?Object.assign({},r,{_canceled:!0}):r)},r4={},r3=(t,e)=>{if(e?.debounceBy)return`debounceBy@${e.debounceBy}`;let n=t.context?.toJson();return n?JSON.stringify(n):"default"},r5={async getWidgetData(t,e){let{rfkId:n,entity:i,request:r}=t,s=iu.getContext(),o=r.toJson();is.dispatch({type:ie.WIDGET_DATA_REQUEST,payload:{...t,pageContext:s,payload:o}});try{let r=await this.fetchWidgetData({...t,payload:o},e);if(r._canceled)return is.dispatch({type:ie.WIDGET_DATA_REQUEST_CANCELED,payload:{...t,pageContext:s,payload:o}}),Promise.reject(new rl(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 is.dispatch({type:ie.WIDGET_DATA_REQUEST_SUCCESS,payload:{...t,pageContext:s,response:h,payload:o,requestId:a}}),h}catch(e){return is.dispatch({type:ie.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:r3(t,e)};return e?.signal?.addEventListener("abort",()=>{i.abort()}),r$(e?.debounce?(r4[n=r.groupBy]||(r4[n]=rH(r2,250,{accumulate:!0})),r4[n])(t,r):((t,e)=>{let{payload:n}=t,i=r1();return i.addWidgetItem(n),t.context&&i.setContext(t.context.toJson()),rJ.fetch(i.toJson(),e)})(t,r),i)}};class r6{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 rW}),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 ie.OC_CONTEXT_CHANGED:case ie.PAGE_CONTEXT_CHANGED:i()}}};iu.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(()=>{iu.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,iu.getContext().toJson(),e.toJson(),rQ.getContext().toJson(),...n])(this.instanceId,this.widgetRequest,this.context.toJson())}getLastResponse(){return this.lastResponse}getRequestContext(){return tr(iu.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 r5.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 r8=(t,e,n)=>{t({type:e,payload:n})},r7=({dispatch:t,entity:e,instanceId:n,rfkId:i})=>{let r={},s={},o=!1,a=(t=>{let{type:e,options:{setupRequest:n=()=>{}}={}}=ia.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 r6(n,a),u=tr(rV,ia.get(i,e)?.options);return{actions:((t,e)=>{let{actionProps:n={}}=e;return Object.keys(n).reduce((e,i)=>({...e,[i]:r8.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:ie.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={}}={}}={}}=ia.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}},r9=({children:t})=>{let{rfkId:e,entity:n,dispatch:i,instanceId:r}=rh(),s=(0,V.useRef)();return s.current||(s.current=r7({dispatch:i,entity:n,instanceId:r,rfkId:e})),(0,V.useEffect)(()=>(i({type:ie.LOAD,payload:{rfkId:e,entity:n,instanceId:r}}),()=>{i({type:ie.UNLOAD,payload:{rfkId:e,entity:n,instanceId:r}})}),[i,e,n,r]),(0,V.createElement)(ru.Provider,{value:s.current},t)},st=(t,e,n)=>((...t)=>(e,n)=>t.reduceRight((t,e)=>(0,V.createElement)(e,n,t),e))(rB,r9)((0,V.createElement)(n,t),e),se=(t,e,n)=>(tF.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,V.useMemo)(()=>{ia.setType(r,e)},[r]),st(i,{rfkId:r,entity:n},t)}));se(rN,E.BANNER,"content"),se(rN,E.HTML_BLOCK,"content"),se(rG,E.SEO,"content");let sn=class extends rj{doSetup({type:t,entity:e,component:n}){return se(n,t,e)}},si=(...t)=>{rU(E.CONTENT_BLOCK,rF),rU(E.HTML_BLOCK,rF),rU(E.BANNER,rF),rU(E.SEO,{...rF,component:rG}),rU(E.PREVIEW_SEARCH,{options:{propStateMapping:rt,actionProps:re,state:{}}}),rU(E.RECOMMENDATION,{options:{propStateMapping:rn,actionProps:ri,state:{}}}),rU(E.QUESTIONS,{options:{propStateMapping:rr,actionProps:rs,state:{}}}),rU(E.SEARCH_RESULTS,{options:{propStateMapping:ro,actionProps:ra,state:{selectedFacets:{},page:1}}}),new i8,new sn,(t=>{let{autoIncludeNewWidgets:e=!1,autoIncludeWidgets:n=!0,uri:i}=t||{};if("undefined"==typeof document||!document.createElement)return i&&iu.getContext().setPageUri(i),void iw();if(iu.getContext().setPageUri(i||window.location.pathname),e&&i9(),n){let t=Array.from(document.querySelectorAll(`:not(${i7}) > [data-rfkid]:not(${i7})`)).filter((t,e,n)=>n.indexOf(t)===e).map(t=>({rfkId:t.dataset.rfkid,entity:t.dataset.entity,node:t}));t.length&&setTimeout(()=>{iu.getDispatcher().dispatch({type:ie.FOUND_WIDGETS,payload:{widgets:t}})},0)}iw()})(...t)},sr=({apiKey:t,children:e,clientId:n,cookieOptions:i,customerKey:r,debug:s,discoverDomainId:a,env:c="prod",orderCloudRegion:u,publicSuffix:h=!1,requestMiddleware:l,serviceHost:p,trackConsent:d=!0,uri:f,useAccessToken:m,useStorage:v,useToken:g,...w})=>{var y;return(0,V.useMemo)(()=>{im({apiKey:t,clientId:n,cookieOptions:i,customerKey:r,debug:s,discoverDomainId:a,env:c,orderCloudRegion:u,publicSuffix:h,requestMiddleware:l,serviceHost:p,trackConsent:d,useAccessToken:m,useStorage:v,useToken:g},{processor:new iv}),si({uri:f,autoIncludeWidgets:!1,autoIncludeNewWidgets:!1})},[]),(0,V.useEffect)(()=>{iu.toggleTrackConsent(d)},[d]),(0,V.createElement)(i6,{...w,client:(y=w.client,!o&&y?o=y:o||(o=new i1({defaultOptions:{queries:{retry:!1,keepPreviousData:!0,refetchOnWindowFocus:!1}}})),o)},e)};var ss=m(646),so=m(33);let sa=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)});tF.warn("trackEvent :::","Filter's name is not defined")}else tF.warn("trackEvent :::","Widget's rfkId mandatory field is empty")},sc=(t,e)=>{let n=(0,V.useRef)(e),i=(0,V.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},su=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}},sh=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 sl{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 sp=new class extends sl{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),l=u.find(({id:t})=>t===r)?.text||"";a||sa(t,{filters:[{facetId:i,facetValueId:r,facetValue:l,valueIndex:o,facetIndex:s,facetTitle:h}]}),e.getRequest().setSearchOffset(0),c?e.getRequest().addSearchFacetTypeFilter(i,sh.buildItem(e,n)):e.getRequest().removeSearchFacetTypeFilter(i,sh.buildItem(e,n))}},sd={range:new class extends sl{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||sa(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:sp,text:sp},sf=class{},sm=new class extends sf{process(t,e){let{facetId:n}=e;t.getRequest().removeSearchFacetTypeFilter(n,sh.buildItem(t,e))}},sv={range:new class extends sf{process(t,e){let{facetId:n}=e;t.getRequest().resetSearchFacetTypeFilter(n)}},valueId:sm,text:sm};function sg(t,e){return t?.facet.find(({name:t})=>t===e)}function sw(t,e,n){let i=sg(t,e);if(i)return i.value.find(({id:t})=>n===t)}let sy=(t,e)=>"facetValueId"in e&&t.id===e.facetValueId||"facetValueText"in e&&t.text===e.facetValueText;function sb(t,e,n){return t.findIndex(t=>n&&t.facetId===e&&t.facetValueId===n)}let sS={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 tF.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 tF.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 tF.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 sC{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=sg(e,i),u=sw(e,i,r);return s&&-1===o&&a.push(this.buildNewItem(c,u,i,r)),a}}let sE={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=sg(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 sC{buildNewItem(t,e,n,i){return{facetId:n,facetValueId:i,facetLabel:t?t.label:"",valueLabel:e?e.text:""}}
1findPreviousValueIndex(t,e,n){return sb(t,e,n)}},text:new class extends sC{findPreviousValueIndex(t,e,n,i){return function(t,e,n,i){if(void 0!==n){let r=sw(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:""}}}},sA={valueId:new class{process(t,e){let n=sb(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)}}},sP=(t,e)=>{switch(e.type){case ie.WIDGET_DATA_REQUEST_SUCCESS:return(t=>{let{selectedFacets:e=[],response:n}=t;return e.some(t=>{let e=sg(n,t.facetId);if(!t.facetLabel)return!0;let i=e?.value?.find(e=>sy(e,t));return!(!i||!i.text||t.valueLabel)})?{...t,selectedFacets:e.map(t=>{let e=sg(n,t.facetId);return e?((t,e)=>{let n=e.value.find(e=>sy(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 F.FILTER_CLICKED:case F.REMOVE_FILTER:return((t,e)=>{let{selectedFacets:n=[],response:i}=t,{type:r}=e,s=sA[r];return s?{...t,page:1,selectedFacets:s.process(n,e,i)}:(tF.warn(`${r} has not a valid reducer for REMOVE_FILTER action. No reduce transformation applied.`),{...t,page:1})})(t,e.payload);case F.FACET_CLICKED:return((t,e)=>{let{selectedFacets:n=[],response:i}=t,{type:r}=e,s=sE[r];return s?{...t,page:1,selectedFacets:s.process(n,i,e)}:(tF.warn(`${r} has not a valid action reducer. No reduce transformation applied.`),{...t,selectedFacets:n})})(t,e.payload);case F.SORT_CHANGED:return{...t,page:1,sortType:e.payload.name};case F.PAGE_NUMBER_CHANGED:return{...t,page:e.payload.page};case F.RESULTS_PER_PAGE_CHANGED:return{...t,page:1,itemsPerPage:e.payload.numItems};case F.KEYPHRASE_CHANGED:return{...t,page:1,keyphrase:e.payload.keyphrase,selectedFacets:[]};case F.CLEAR_FILTERS:return{...t,page:1,selectedFacets:[]};default:return t}},sT=function(t){let{rfkId:e,dispatch:n}=rh(),i=rS();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=sS[n];if(!r)return tF.warn(`Facet type ${n} is not supported.`);r.run(e,t)})})(i));let{query:r,options:s,actions:o}=i,a=rk(),c=rb(r),u=r_();return((t,e)=>{let n=rS(),{rfkId:i,instanceId:r}=rh(),s=sc(t,e);(0,V.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 ie.WIDGET_DATA_REQUEST_SUCCESS:{let{response:n}=e.payload;return{...t,response:n}}case ie.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 iu.register(t),()=>iu.unregister(t)},[i,r,n,s])})(sP,[]),((t,e)=>{let{rfkId:n,instanceId:i}=rh(),r=sc(t,e);(0,V.useEffect)(()=>{let t={handleAction(t){let{rfkId:e,instanceId:s}=t.payload;e&&(e!==n||s!==i)||r.current(t)}};return iu.register(t),()=>iu.unregister(t)},[n,i,r])})(t=>{switch(t.type){case F.FACET_CLICKED:!function(t,e){let{type:n,rfkId:i}=e,r=sd[n];r?r.process(i,t,e):tF.warn(`${n} has not a valid action handler`)}(r,t.payload);break;case F.FILTER_CLICKED:case F.REMOVE_FILTER:!function(t,e){let{type:n}=e,i=sv[n];i?i.process(t,e):tF.warn(`${n} has not a valid action handler`)}(r,t.payload);break;case F.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 it(t,e,{actionCause:"entity",index:n,request:n6(r),items:i});tF.warn("trackEvent :::","Widget's rfkId mandatory field is empty")})(e,s,{index:n,items:[{id:i,sourceId:o}],...su(r)});break}case F.SORT_CHANGED:r.getRequest().resetSearchSortCriteria().setSearchSortCriteriaName(t.payload.name).setSearchOffset(0);break;case F.PAGE_NUMBER_CHANGED:{let n=r.getRequest().getSearchLimit()??r.getLastResponse()?.limit;void 0===n?tF.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 F.RESULTS_PER_PAGE_CHANGED:r.getRequest().setSearchLimit(t.payload.numItems).setSearchOffset(0);break;case F.KEYPHRASE_CHANGED:r.getRequest().resetSearchFacetTypeFilters().setSearchOffset(0),t.payload.keyphrase?r.getRequest().setSearchQueryKeyphrase(t.payload.keyphrase):r.getRequest().resetSearchQueryKeyphrase();break;case F.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 sL(t,e){if("function"==typeof t)return t(e);null!=t&&(t.current=e)}var sO=globalThis?.document?V.useLayoutEffect:()=>{},sI=t=>{let e;let{present:n,children:i}=t,r=function(t){var e,n;let[i,r]=V.useState(),s=V.useRef(null),o=V.useRef(t),a=V.useRef("none"),[c,u]=(e=t?"mounted":"unmounted",n={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},V.useReducer((t,e)=>n[t][e]??t,e));return V.useEffect(()=>{let t=sR(s.current);a.current="mounted"===c?t:"none"},[c]),sO(()=>{let e=s.current,n=o.current;if(n!==t){let i=a.current,r=sR(e);u(t?"MOUNT":"none"===r||"none"===e?.display?"UNMOUNT":n&&i!==r?"ANIMATION_OUT":"UNMOUNT"),o.current=t}},[t,u]),sO(()=>{if(i){let t;let e=i.ownerDocument.defaultView??window,n=n=>{let r=sR(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=sR(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:V.useCallback(t=>{s.current=t?getComputedStyle(t):null,r(t)},[])}}(n),s="function"==typeof i?i({present:r.isPresent}):V.Children.only(i),o=function(...t){return V.useCallback(function(...t){return e=>{let n=!1,i=t.map(t=>{let i=sL(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():sL(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?V.cloneElement(s,{ref:o}):null};function sR(t){return t?.animationName||"none"}sI.displayName="Presence";var sD=m(266),s_=m(824),sk=m(530),sx=m.n(sk),sN=m(100),sG=m(517);function sF(){return M().createElement(sI,{present:!0},M().createElement("div",{className:"search-results__loader"},M().createElement(sD.Loader,{params:{identifier:"Loader01",styles:""},fields:{content:""}})))}function sU({widgetRef:t,isLoading:e,isFetching:n,isError:i,content:r,facets:s,totalItems:o,groupPills:a,listStyle:c="grid-view",groupCTALabel:u="View Program",fields:h,flyoutWidget:l,isCluster:p=!1}){var d;let f=s.find(t=>"programgroup"===t.name),m=(t,e)=>{if(!e)return[];let n=null==e?void 0:e.filter(e=>e.text.split("_")[0]===t);return[...new Set(null==n?void 0:n.map(t=>{let e=t.text.split("_");return e[e.length-1]}))]};return e?M().createElement("div",{ref:t,className:sx()("search-results-content",{"search-results-content--fetching":e})},M().createElement(sF,null)):M().createElement("div",Object.assign({ref:t,className:sx()("search-results-content",{"search-results-content--fetching":n,"search-results-content--no-results":!r})},(null===(d=null==h?void 0:h.params)||void 0===d?void 0:d.searchIgnore)?{"data-attribute-search-ignore":!0}:{}),n&&M().createElement(sF,null),M().createElement("div",{className:"search-results-content__content"},(()=>{var t,e,s,d;if(o<=0&&!n)return M().createElement("div",{className:"search-results-content__results--no-matches"},M().createElement(sG.NoResultsContent,{params:null===(t=null==h?void 0:h.noResults)||void 0===t?void 0:t.params,fields:Object.assign(Object.assign({},null===(e=null==h?void 0:h.noResults)||void 0===e?void 0:e.fields),{hasFailed:i})}));let v={params:{},fields:{results:null==r?void 0:r.map(t=>{var e,n;return{params:{identifier:"",styles:""},fields:{id:null==t?void 0:t.id,title:null==t?void 0:t.programgroup,bgImage:{url:null==t?void 0:t.groupcardimage},pillTags:m(null==t?void 0:t.programgroup,a),ctaButton:u,programGroupId:(e=null==t?void 0:t.programgroup,(null===(n=null==f?void 0:f.value.find(t=>t.text===e))||void 0===n?void 0:n.id)||"")}}})}};return M().createElement(M().Fragment,null,M().createElement("ul",{className:`search-results-content__results search-results-content__results--${c}`},v&&(null===(d=null===(s=null==v?void 0:v.fields)||void 0===s?void 0:s.results)||void 0===d?void 0:d.map(t=>{let e;return e=H(),M().createElement("li",{key:e},M().createElement(sN.ProgramCard,{params:null==t?void 0:t.params,fields:null==t?void 0:t.fields,variant:"grid-view"===c?"grid":"list",isCluster:p}))}))),l,M().createElement("div",{className:"search-results__pagination"},o?M().createElement("span",{className:"search-results__info"},(0,ss.replaceStr)(null==h?void 0:h.programsBottomCount,{"{PageSize}":null==r?void 0:r.length,"{total}":o})):""))})()))}"function"==typeof SuppressedError&&SuppressedError;var sj=m(377),sq=m(883),sB=m(625);let sV=se(function({props:t}){var e,n,i,r,s,o,a,c,u,h;let{cardApplyLabel:l,cardOverviewLabel:p,fields:d}=t,{sitecoreSource:f,pillColors:m,tooltipText:v}=d,[g,w]=(0,V.useState)(null),[y,b]=(0,V.useState)(!1),[S,C]=(0,V.useState)(!1),E=(0,ss.useSearchStore)(t=>t.flyoutSource);(0,V.useEffect)(()=>{E&&Object.keys(E).length>0&&(()=>{var t,e,n,i;return t=this,e=void 0,i=function*(){b(!0),C(!1);try{let t=yield(0,ss.useFetchWithProgramSource)({programSource:E,customerKey:null==d?void 0:d.sitecoreCustomerKey,rfk_id:null==d?void 0:d.sitecoreWidgetId,sitecoreApiKey:null==d?void 0:d.sitecoreApiKey,sources:f,
1sitecoreIsSubdomain:null==d?void 0:d.sitecoreIsSubdomain,sitecoreServiceHost:null==d?void 0:d.sitecoreServiceHost});w(t)}catch(t){w(null),C(!0)}finally{b(!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())})})()},[E,null==d?void 0:d.sitecoreCustomerKey,null==d?void 0:d.sitecoreWidgetId,null==d?void 0:d.sitecoreApiKey,f]);let A=g&&(null===(i=null===(n=null===(e=null==g?void 0:g.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==g?void 0:g.widgets)||void 0===r?void 0:r[0])||void 0===s?void 0:s.content)||[],P=[{name:"degreetypeabbreviation",color:(null==m?void 0:m.degreetypeabbreviation)||"degreetypeabbreviationcolor"},{name:"fieldofstudy",color:(null==m?void 0:m.careercluster)||"careerclustercolor"},{name:"careercompetency",color:(null==m?void 0:m.careercompetency)||"careercompetencycolor"},{name:"modality",color:(null==m?void 0:m.modality)||"modalitycolor"}],T={params:{identifier:"",styles:""},fields:{bgImage:(null===(u=A[0])||void 0===u?void 0:u.groupflyoutbannerimage)||"",title:(null===(h=A[0])||void 0===h?void 0:h.programgroup)||"",content:(null==A?void 0:A.length)?Array.from(new Set(null==A?void 0:A.map(t=>null==t?void 0:t.academiccareer))).map(t=>{var e;return{academicLevel:t,courses:null===(e=null==A?void 0:A.filter(e=>(null==e?void 0:e.academiccareer)===t))||void 0===e?void 0:e.map((e,n)=>{var i,r,s;return{params:{identifier:null==e?void 0:e.id,styles:""},fields:{title:null==e?void 0:e.title,degreeType:Array.isArray(s=null==e?void 0:e.degreetype)?(null==s?void 0:s.reduce((t,e)=>`${t?`${t},`:""} ${e||""}`,""))||"":s,college:Array.isArray(r=null==e?void 0:e.college)?null==r?void 0:r.reduce((t,e)=>`${t?`${t},`:""} ${null!=e?e:""}`,""):r||"",description:null==e?void 0:e.description,tags:null===(i=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===i?void 0:i.flat(),cta1:{params:{identifier:"",styles:""},fields:{link:{params:{identifier:`ProgramDetail-cta1-${n}`,styles:""},fields:{linkType:"external",url:null==e?void 0:e.url,label:p,target:"_self"},onClick:()=>{it(null==d?void 0:d.sitecoreWidgetId,"entity",{items:[{id:null==e?void 0:e.id,sourceId:null==e?void 0:e.source_id}],index:0,actionCause:"entity"})}}}},cta1Type:sB.ButtonVariant.SECONDARY,cta2:{params:{identifier:"",styles:""},fields:{link:{params:{identifier:`ProgramDetail-cta2-${n}`,styles:""},fields:{linkType:"external",url:function(t){let e=null==t?void 0:t.toLowerCase().trim();return"undergraduate"===e?null==d?void 0:d.cardApplyUndergradUrl:"graduate"===e?null==d?void 0:d.cardApplyGradUrl:null==d?void 0:d.cardApplyOtherUrl}(t),label:l,target:"_self"}}}},cta2Type:sB.ButtonVariant.SECONDARY,tooltipText:v}}})}}):[]}};return M().createElement(sj.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,y&&M().createElement("div",{className:sx()("search-results-content",{"search-results-content--fetching":y})},M().createElement(sF,null)),!y&&((null==A?void 0:A.length)?M().createElement(sq.ProgramCardsFlyout,Object.assign({},T)):M().createElement(sG.NoResultsContent,{params:null===(a=null==d?void 0:d.noResults)||void 0===a?void 0:a.params,fields:Object.assign(Object.assign({},null===(c=null==d?void 0:d.noResults)||void 0===c?void 0:c.fields),{hasFailed:S})}))))},E.SEARCH_RESULTS,"content"),sM=se(function({props:t}){var e,n,i,r,s,o,a,c,u,h,l,p,d,f,m,v,g,w,y,b,S,C,E,A,P,T,L,O,I,R;let{params:D,fields:_}=t,{sitecoreSource:k}=_,[x,N]=(0,V.useState)({}),[G,F]=(0,V.useState)(!1),[U,j]=(0,V.useState)(!1),q=null!==(e=null==_?void 0:_.groupCTALabel)&&void 0!==e?e:"View Program",B=null!==(n=null==_?void 0:_.cardApplyLabel)&&void 0!==n?n:"Apply Now",K=null!==(i=null==_?void 0:_.cardOverviewLabel)&&void 0!==i?i:"Overview",W=null!==(o=null===(s=null===(r=null==_?void 0:_.checkboxFacet)||void 0===r?void 0:r.fields)||void 0===s?void 0:s.FacetN
1ame)&&void 0!==o&&o,{isDesktop:Q}=(0,ss.useDeviceContext)(),H="undefined"!=typeof window&&new URLSearchParams(window.location.search).get("search")||"",{setInitialRender:$,initialRender:J,removeFacet:z,viewMode:Y,setViewMode:X,onlineOnly:Z,setOnlineOnly:tt,removeSearchQuery:te,filteredFacets:tn,setFilteredFacets:ti,clearAll:tr,setSearchCardContent:ts,setCardContent:to,cardContent:ta,setSelectedAlphabet:tc,selectedAlphabet:tu,setSelectedDropdownFilters:th,setSelectedFilters:tl,deselectFilters:tp,replaceSelectedFilters:td,selectedFilters:tf,setPageSearchLimit:tm,replaceFacets:tv,addFacet:tg,setProgramSource:tw,programSource:ty,searchInput:tb,setSearchInput:tS,isFirstChangeDone:tC,setIsFirstChangeDone:tE,checkboxFacet:tA,setCheckboxFacet:tP}=(0,ss.useSearchStore)(t=>t),[tT,tL]=(0,V.useState)(ty),tO=(0,V.useRef)(null);(0,V.useEffect)(()=>{H&&tb!==H&&tS(H)},[]),(0,V.useEffect)(()=>{tO.current&&tC&&tO.current.focus()},[tb]),(0,V.useEffect)(()=>{(null==_?void 0:_.pageSize)&&(null==ty?void 0:ty.limit)!==(null==_?void 0:_.pageSize)&&tm(_.pageSize)},[null==_?void 0:_.pageSize,null==ty?void 0:ty.limit]);let tI=t=>{""!==(null==t?void 0:t.trim())&&tw(Object.assign(Object.assign({},ty),{query:{keyphrase:t}}))},tR=(0,ss.debounce)(tI,300),tD=()=>{let t=Object.assign({},ty);delete t.query,tw(t),tS("")},{widgetRef:t_,actions:{onItemClick:tk,onFacetClick:tx,onClearFilters:tN,onPageNumberChange:tG},queryResult:{isLoading:tF,isFetching:tU,isError:tj,data:{content:tq,total_item:tB=0,facet:tV=[],offset:tM=0,limit:tK=10}={}}}=sT({query:t=>{var e,n,i;null===(i=null===(n=null===(e=null==t?void 0:t.getRequest())||void 0===e?void 0:e.setEntity("content"))||void 0===n?void 0:n.setSources(k))||void 0===i||i.setSearch(ty)},state:{sortType:(null===(c=null===(a=null==ty?void 0:ty.sort)||void 0===a?void 0:a.value[0])||void 0===c?void 0:c.name)||"title_ascending",page:1,itemsPerPage:null!==(u=null==_?void 0:_.pageSize)&&void 0!==u?u:10,keyphrase:tb}}),tW=(null==tn?void 0:tn.length)?null==tn?void 0:tn.map(t=>t.name):[];(0,V.useEffect)(()=>{if(J){let t=window.location.hash.substring(1);if(t){let e=document.getElementById(t);tU||tF||requestAnimationFrame(()=>{null==e||e.scrollIntoView({behavior:"instant",block:"start"}),$(!1)})}}},[tU,tF]),(0,V.useEffect)(()=>{(null==tq?void 0:tq.length)?U?to(tq):ts(tq):ts([])},[tq]);let tQ=(0,V.useRef)(!1);(0,V.useEffect)(()=>{var t,e,n,i;if(!tQ.current&&(null==tV?void 0:tV.length)&&0===tn.length){let r=null!==(n=(null===(t=null==_?void 0:_.facets)||void 0===t?void 0:t.length)&&(null===(e=null==_?void 0:_.facets)||void 0===e?void 0:e.map(t=>{var e,n,i;return null===(i=null===(n=null===(e=null==t?void 0:t.fields)||void 0===e?void 0:e.FacetName)||void 0===n?void 0:n.value)||void 0===i?void 0:i.toLowerCase()})))&&void 0!==n?n:[];if(ti((null==r?void 0:r.map(t=>{var e;return null===(e=(null==tV?void 0:tV.length)>(null==tn?void 0:tn.length)?tV:tn)||void 0===e?void 0:e.find(e=>{var n;return(null===(n=null==e?void 0:e.name)||void 0===n?void 0:n.toLowerCase())===t})})).filter(Boolean)),tQ.current=!0,!(null==tA?void 0:tA.id)){let t=null==tV?void 0:tV.find(t=>{var e,n,i;return t.name===(null===(i=null===(n=null===(e=null==_?void 0:_.checkboxFacet)||void 0===e?void 0:e.fields)||void 0===n?void 0:n.FacetName)||void 0===i?void 0:i.value)}),e=null===(i=null==t?void 0:t.value)||void 0===i?void 0:i.find(t=>"true"===t.text);tP({id:(null==e?void 0:e.id)||"",name:(null==t?void 0:t.name)||""})}}},[tV]),(0,V.useEffect)(()=>{var t,e;if("undefined"==typeof window||!(null==tn?void 0:tn.length)||(null===(t=Object.keys(tf))||void 0===t?void 0:t.length)>0)return;let n=new URLSearchParams(null===(e=null==window?void 0:window.location)||void 0===e?void 0:e.search);null==tn||tn.forEach(t=>{var e;let i=null==n?void 0:n.get(null==t?void 0:t.name);if(i){let n=null===(e=null==t?void 0:t.value)||void 0===e?void 0:e.find(t=>{var e;return t.id===i||(null===(e=null==t?void 0:t.text)||void 0===e?void 0:e.toLowerCase())===(null==i?void 0:i.toLowerCase())});n&&(tl({[t.name]:null==n?void 0:n.id}),tg({name:t.name,filter:{type:"or",values:[null==n?void 0:n.id]}}))}})},[tn]),(0,V.useEffect)(()=>{var t,e,n;if(tA&&"true"===new URLSearchParams(null===(t=null==window?void 0:window.location)||void 0===t?void 0:t.search).get(null==tA?void 0:tA.name)){if(null===(n=null===(e=null==ty?void 0:ty.facet)||void 0===e?void 0:e.types)||void 0===n?void 0:n.some(t=>t.name===tA.name))return;tt(!0),tg({name:tA.name,filter:{type:"or",values:[tA.id]}})}},[tA]),(0,V.useEffect)(()=>{var t,e,n;return G?(document.body.style.overflow="hidden",tL(ty),td(Object.assign({},...null!==(n=null===(e=null===(t=null==ty?void 0:ty.facet)||void 0===t?void 0:t.types)||void 0===e?void 0:e.map(t=>{var e;return(null==tW?void 0:tW.includes(null==t?void 0:t.name))&&{[t.name]:null===(e=null==t?void 0:t.filter)||void 0===e?void 0:e.values[0]}}))&&void 0!==n?n:[]))):document.body.style.overflow="",()=>{document.body.style.overflow=""}},[G]);let tH=(null===(h=null==tV?void 0:tV.find(t=>"grouppills"===t.name))||void 0===h?void 0:h.value)||[],t$=!!Object.keys(tf).length||Z||"All"!==tu||""!==tb,tJ=t=>{var e,n,i,r,s,o;let a=null===(e=null==t?void 0:t.target)||void 0===e?void 0:e.checked;if(tt(a),!(null==tA?void 0:tA.id))return;let c={name:tA.name,filter:{type:"or",values:[tA.id]}};if(a?Q?tg(c):N(c):(n=null==tA?void 0:tA.name,(null===(r=null===(i=null==ty?void 0:ty.facet)||void 0===i?void 0:i.types)||void 0===r?void 0:r.some(t=>t.name===n))&&Q?(tv(null===(o=null===(s=null==ty?void 0:ty.facet)||void 0===s?void 0:s.types)||void 0===o?void 0:o.filter(t=>t.name!==n)),tx({facetId:n,facetIndex:ty.facet.types.length-1,type:"valueId"})):N({})),"undefined"==typeof window||!Q)return;let u=new URL(window.location.href);a?u.searchParams.set(tA.name,"true"):u.searchParams.delete(tA.name),window.history.replaceState({},"",u.toString())},tz=t=>{X(t)},tY=()=>{F(t=>!t)},tX=t=>{var e;let{value:n,id:i}=t.target;th({[i]:n});let r=null==tn?void 0:tn.find(t=>t.name===i),s=null===(e=null==r?void 0:r.value)||void 0===e?void 0:e.find(t=>
1t.id===n);r&&s&&tL(t=>{var e,n;let i=null!==(n=null===(e=null==t?void 0:t.facet)||void 0===e?void 0:e.types)&&void 0!==n?n:[],o=i.some(t=>(null==t?void 0:t.name)===r.name)?i.map(t=>(null==t?void 0:t.name)===r.name?Object.assign(Object.assign({},t),{filter:Object.assign(Object.assign({},null==t?void 0:t.filter),{values:[s.id]})}):t):[...i,{name:r.name,filter:{type:"or",values:[s.id]}}];return Object.assign(Object.assign({},t),{facet:Object.assign(Object.assign({},null==t?void 0:t.facet),{types:o})})})},tZ=M().createElement("div",{className:"search-bar__input-box"},M().createElement("label",{htmlFor:"program search",className:"sr-only"},null!==(l=null==_?void 0:_.searchPlaceholderText)&&void 0!==l?l:"Search Keywords"),M().createElement("input",{id:"program search",type:"text","data-gtm-key":"program search textbox",ref:tO,onChange:t=>{if("Enter"===t.key)return void t.preventDefault();let{target:e}=t,n=e.value;""!==n?(((null==n?void 0:n.length)>=3||(null==n?void 0:n.length)<(null==tb?void 0:tb.length))&&(Q?tR(n):tL(t=>Object.assign(Object.assign({},t),{query:{keyphrase:n}}))),tS(n),tC||tE(!0)):Q?tD():(tL(t=>{let e=Object.assign({},t);return delete e.query,e}),tS(""))},onKeyDown:t=>{"Enter"===(null==t?void 0:t.key)&&(null==t||t.preventDefault(),tI(tb))},autoComplete:"off",placeholder:null!==(p=null==_?void 0:_.searchPlaceholderText)&&void 0!==p?p:"Search Keywords",value:tb,className:"search-bar__input"}),tb?M().createElement("button",{type:"button","aria-label":"clear search",onClick:()=>{tS(""),te()},className:"search-bar__cross-button"},M().createElement(s_.Icon,{name:"cross"})):M().createElement("button",{type:"button","aria-label":"search",className:"search-bar__search-icon"},M().createElement(s_.Icon,{name:"search_white"}))),t0=()=>{if(tD(),tt(!1),tr(),tN(),"undefined"!=typeof window){let t=new URL(window.location.href);null==tn||tn.forEach(e=>{t.searchParams.delete(e.name)}),t.searchParams.delete("search"),window.history.replaceState({},"",t.toString())}},t1=M().createElement("div",{className:"search-results__filter-group"},M().createElement("div",{className:"search-results__filter"},M().createElement("span",{className:"search-results__filter--text"},null!==(d=null==_?void 0:_.filtersLabel)&&void 0!==d?d:"Filter",":"),null==tn?void 0:tn.map(t=>{var e;return M().createElement("div",{key:t.name,className:"search-results__dropdown "+(tf[t.name]?"search-results__dropdown--selected":"")},M().createElement("select",{id:t.name,"data-gtm-key":"program filter dropdown",className:"search-results__dropdown-select","aria-label":`Filter by ${t.label}`,value:tf[t.name]||"",onChange:t=>{(t=>{var e,n,i,r,s,o;let{value:a,id:c}=t.target;tl({[c]:a});let u=null==tn?void 0:tn.find(t=>t.name===c),h=null===(e=null==u?void 0:u.value)||void 0===e?void 0:e.find(t=>t.id===a);if((null===(i=null===(n=null==ty?void 0:ty.facet)||void 0===n?void 0:n.types)||void 0===i?void 0:i.some(t=>t.name===(null==u?void 0:u.name)))&&tv(null===(s=null===(r=null==ty?void 0:ty.facet)||void 0===r?void 0:r.types)||void 0===s?void 0:s.filter(t=>t.name!==(null==u?void 0:u.name))),u&&h&&tg({name:u.name,filter:{type:"or",values:[h.id]}}),"undefined"!=typeof window&&h){let t=new URL(null===(o=null==window?void 0:window.location)||void 0===o?void 0:o.href);t.searchParams.set(c,null==h?void 0:h.text),window.history.replaceState({},"",t.toString())}})(t)}},M().createElement("option",{value:"",disabled:!0},t.label),null===(e=null==t?void 0:t.value)||void 0===e?void 0:e.map(t=>{var e;return(null===(e=null==t?void 0:t.text)||void 0===e?void 0:e.length)>0&&M().createElement("option",{key:t.id,value:t.id},t.text.replace(/^\[|\]$/g,"")," ")})))}),M().createElement("button",{type:"button",className:"search-results__clear-filters",onKeyDown:t=>{"Enter"===t.key&&t0()},onClick:t0,disabled:!t$},null!==(f=null==_?void 0:_.clearLabel)&&void 0!==f?f:"Clear")),(null==tn?void 0:tn.some(t=>tf[t.name]))&&M().createElement("div",{className:"search-results__filter-pills"},null==tn?void 0:tn.map(t=>{var e;return tf[t.name]&&M().createElement("div",{className:"search-results__pill",key:t.name},`${t.label}: `,null===(e=t.value.find(e=>e.id===tf[null==t?void 0:t.name]))||void 0===e?void 0:e.text,M().createElement("button",{type:"button",className:"search-results__pill-clear","aria-label":`Clear ${t.label} filter`,onClick:()=>{var e;if(tp([t.name]),z(t),"undefined"!=typeof window){let n=new URL(null===(e=null==window?void 0:window.location)||void 0===e?void 0:e.href);n.searchParams.delete(t.name),window.history.replaceState({},"",null==n?void 0:n.toString())}}},M().createElement(s_.Icon,{name:"cross"})))}))),t2=M().createElement("div",{className:"search-results__alphabet-facets"}
1,["All",..."ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("")].map(t=>{var e,n;let i="All"!==t&&!(null===(n=null===(e=null==tV?void 0:tV.find(t=>"groupalphabet"===t.name))||void 0===e?void 0:e.value)||void 0===n?void 0:n.some(e=>{var n;return(null===(n=null==e?void 0:e.text)||void 0===n?void 0:n.toUpperCase())===t}));return M().createElement("button",{key:t,type:"button",className:`search-results__alphabet ${tu===t?"active":""} ${i?"disabled":""}`,onClick:()=>(t=>{var e,n,i,r,s,o,a,c;if(tc(t),"all"===t.toLowerCase()){let t=null===(n=null===(e=null==ty?void 0:ty.facet)||void 0===e?void 0:e.types)||void 0===n?void 0:n.filter(t=>"groupalphabet"!==t.name);tv(t),(null==t?void 0:t.length)&&tx({facetId:"groupalphabet",facetIndex:t.length,type:"valueId"})}else{let e=null==tV?void 0:tV.find(t=>"groupalphabet"===t.name);if((null===(r=null===(i=null==ty?void 0:ty.facet)||void 0===i?void 0:i.types)||void 0===r?void 0:r.some(t=>t.name===(null==e?void 0:e.name)))&&tv(null===(o=null===(s=null==ty?void 0:ty.facet)||void 0===s?void 0:s.types)||void 0===o?void 0:o.filter(t=>t.name!==(null==e?void 0:e.name))),e){let n=null===(a=e.value)||void 0===a?void 0:a.filter(e=>{var n;return(null===(n=null==e?void 0:e.text)||void 0===n?void 0:n.toLowerCase())===(null==t?void 0:t.toLowerCase())});(null==n?void 0:n.length)&&(tg({name:e.name,filter:{type:"or",values:[null===(c=n[0])||void 0===c?void 0:c.id]}}),tx({facetId:e.name,facetIndex:ty.facet.types.length,type:"valueId"}))}}})(t),disabled:i},t)})),t4=(0,V.useMemo)(()=>M().createElement(sV,{rfkId:null==_?void 0:_.sitecoreWidgetId,key:`flyout-${null==_?void 0:_.sitecoreWidgetId}`,props:{cardApplyLabel:B,cardOverviewLabel:K,fields:_}}),[null==_?void 0:_.sitecoreWidgetId,B,K,_]);return M().createElement("div",Object.assign({id:null==D?void 0:D.identifier,className:"search-results"},(null==D?void 0:D.searchIgnore)?{"data-attribute-search-ignore":!0}:{}),M().createElement("div",{ref:t_,className:"search-bar__content-wrapper"},M().createElement("form",{onSubmit:t=>{t.preventDefault(),tb.length>0&&tI(tb)},className:"search-results__form"},M().createElement("button",{type:"submit",style:{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"}},"Submit"),Q?M().createElement("div",{className:"search-results__wrapper"},tZ,t1):M().createElement("button",{className:"search-results__open-filters",type:"button",onClick:tY,disabled:tF||tU},null!==(m=null==_?void 0:_.searchAndRefineLabel)&&void 0!==m?m:"Search and Refine"),M().createElement("div",{className:"search-results__action"},M().createElement("div",{className:"search-results__count","data-is-fetching":tU},!!tB&&!tU&&(0,ss.replaceStr)(null==_?void 0:_.programsTopCount,{"{PageStart}":1,"{PageSize}":null==ta?void 0:ta.length,"{total}":M().createElement("span",{id:"total-items"},tB)})),M().createElement("div",{className:"search-results__view"},Q&&W&&M().createElement("div",{className:"search-results__checkbox search-results__checkbox--desktop"},M().createElement("label",{htmlFor:"popup-online-only"},M().createElement("input",{type:"checkbox",id:"popup-online-only",checked:Z,onChange:tJ,disabled:!(null==tA?void 0:tA.id)}),null!==(y=null===(w=null===(g=null===(v=null==_?void 0:_.checkboxFacet)||void 0===v?void 0:v.fields)||void 0===g?void 0:g.FacetLabel)||void 0===w?void 0:w.value)&&void 0!==y?y:"Online Only")),M().createElement("button",{type:"button","data-gtm-key":"program view option","data-gtm-value":"grid view",className:"search-results__view-toggle "+("grid-view"===Y?"active":""),"aria-label":"Program Cards View",onClick:()=>tz("grid-view")},M().createElement(s_.Icon,{name:"gridView"})),M().createElement("button",{type:"button","data-gtm-key":"program view option","data-gtm-value":"list view",className:"search-results__view-toggle-two "+("list-view"===Y?"active":""),"aria-label":"Program List View",onClick:()=>tz("list-view")},M().createElement(s_.Icon,{name:"hamburger"})))),Q&&t2,M().createElement("div",{className:"search-results__separator"}))),!Q&&G&&(0,so.createPortal)(M().createElement("div",{className:"popup-backdrop"}),document.body),!Q&&M().createElement("div",{className:"popup "+(G?"popup--open":"popup--closed")},M().createElement("div",{className:"popup-title"},M().createElement("span",{className:"popup-title-text"},null!==(b=null==_?void 0:_.searchAndRefineLabel)&&void 0!==b?b:"Search and Refine"),M().createElement("button",{type:"button",className:"popup-title-close",onClick:tY},M().createElement(s_.Icon,{name:"crossCircle"}))),tZ,M().createElement("span",{className:"search-results__filter--text"},null!==(S=null==_?void 0:_.filtersLabel)&&void 0!==S?S:"Filter",":"),M().createElement("div",{className:"search-results__filter"},null==tn?void 0:tn.map(t=>{var e;return M().createElement("div",{key:t.name,className:"search-results__dropdown"},M().createElement("select",{id:t.name,className:"search-results__dropdown-select","aria-label":`Filter by ${t.label}`,value:tf[t.name]||"",onChange:tX},M().createElement("option",{value:"",disabled:!0},t.label),null===(e=null==t?void 0:t.value)||void 0===e?void 0:e.map(t=>{var e;return(null===(e=null==t?void 0:t.text)||void 0===e?void 0:e.length)>0&&M().createElement("option",{key:t.id,value:t.id},t.text.replace(/^\[|\]$/g,"")," ")})))}),(null==tn?void 0:tn.some(t=>tf[t.name]))&&M().createElement("div",{className:"search-results__filter-pills"},null==tn?void 0:tn.map(t=>{var e;return tf[t.name]&&M().createElement("div",{className:"search-results__pill",key:t.name},`${t.label}: `,null===(e=t.value.find(e=>e.id===tf[t.name]))||void 0===e?void 0:e.text,M().createElement("button",{type:"button",className:"search-results__pill-clear","aria-label":`Clear ${null==t?void 0:t.label} filter`,onClick:()=>{tp([t.name]),tL(e=>{var n,i;return Object.assign(Object.assign({},e),{facet:Object.assign(Object.assign({},null==e?void 0:e.facet),{types:null===(i=null===(n=null==e?void 0:e.facet)||void 0===n?void 0:n.types)||void 0===i?void 0:i.filter(e=>e.name!==t.name)})})})}},M().createElement(s_.Icon,{name:"cross"})))})),W&&M().createElement("div",{className:"search-results__checkbox"},M().createElement("label",{htmlFor:"popup-online-only"},M().createElement("input",{type:"checkbox",id:"popup-online-only",checked:Z,onChange:tJ,disabled:!(null==tA?void 0:tA.id)}),null!==(P=null===(A=null===(E=null===(C=null==_?void 0:_.checkboxFacet)||void 0===C?void 0:C.fields)||void 0===E?void 0:E.FacetLabel)||void 0===A?void 0:A.value)&&void 0!==P?P:"Online Only"))),M().createElement("button",{className:"search-results__clear-filters",type:"button","aria-hidden":!G,onClick:t0,disabled:!t$},null!==(T=null==_?void 0:_.clearAllFiltersLabel)&&void 0!==T?T:"Clear All Filters"),M().createElement("div",null,M().createElement("div",{className:"search-results__alphabet-facets"},null===(L="ABCDEFGHIJKLMNOPQRSTUVWXYZ".split(""))||void 0===L?void 0:L.map(t=>{var e,n;let i="All"!==t&&!(null===(n=null===(e=null==tV?void 0:tV.find(t=>"groupalphabet"===t.name))||void 0===e?void 0:e.value)||void 0===n?void 0:n.some(e=>e.text.toUpperCase()===t));return M().createElement("button",{key:t,type:"button",className:`search-results__alphabet ${tu===t?"active":""} ${i?"disabled":""}`,onClick:()=>(t=>{var e,n,i;if(!Q){if("all"===t.toLowerCase())tv(null===(n=null===(e=null==ty?void 0:ty.facet)||void 0===e?void 0:e.types)||void 0===n?void 0:n.filter(t=>"groupalphabet"!==(null==t?void 0:t.name)));else{let e=null==tV?void 0:tV.find(t=>"groupalphabet"===(null==t?void 0:t.name));if(e){let n=null===(i=e.value)||void 0===i?void 0:i.find(e=>{var n;return(null===(n=null==e?void 0:e.text)||void 0===n?void 0:n.toLowerCase())===(null==t?void 0:t.toLowerCase())});if(n){let t={name:e.name,filter:{type:"or",values:[n.id]}};tv([...ty.facet.types.filter(t=>"groupalphabet"!==t.name),t])}}}}tc(t)})(t),disabled:i},t)})),M().createElement("div",{className:"search-results__separator"})),M().createElement("div",{className:"search-results__footer"},M().createElement("button",{className:"search-results__filter-button",onClick:()=>{var t,e,n,i,r;let s=new URL(null===(t=null==window?void 0:window.location)||void 0===t?void 0:t.href),o=new URLSearchParams;if(tw(tT),x&&(null===(e=Object.keys(x))||void 0===e?void 0:e.length)>0)tg(x),o.set(x.name,"true");else{let t=null===(i=null===(n=null==ty?void 0:ty.facet)||void 0===n?void 0:n.types)||void 0===i?void 0:i.find(t=>{var e,n,i;return t.name===(null===(i=null===(n=null===(e=null==_?void 0:_.checkboxFacet)||void 0===e?void 0:e.fields)||void 0===n?void 0:n.FacetN
1ame)||void 0===i?void 0:i.value)});t&&!Z&&(z(t),s.searchParams.delete(x.name))}null===(r=Object.entries(tf))||void 0===r||r.forEach(([t,e])=>{var n;let i=null==tn?void 0:tn.find(e=>e.name===t),r=null===(n=null==i?void 0:i.value)||void 0===n?void 0:n.find(t=>t.id===e);(null==r?void 0:r.text)&&o.set(t,r.text)});let a=`${s.origin}${s.pathname}${(null==o?void 0:o.toString())?`?${o.toString()}`:""}`;window.history.replaceState({},"",a),tY()},type:"button"},null!==(O=null==_?void 0:_.filterCTALabel)&&void 0!==O?O:"Filter"))),M().createElement(sU,{onItemClick:tk,widgetRef:t_,onFacetClick:tx,onClearFilters:tN,isLoading:tF,isFetching:tU,isError:tj,content:ta,totalItems:tB,facets:tV,searchInput:tb,resultsFoundLabel:_.resultsFoundLabel,groupPills:tH,listStyle:Y,noResultsText:null==_?void 0:_.noResultsText,groupCTALabel:q,cardApplyLabel:B,cardOverviewLabel:K,fields:_,offset:tM,pageLimit:tK,onLoadMore:tG,flyoutWidget:t4}),M().createElement("div",{className:"search__load-more-container"},tU&&(null!==(I=null==tq?void 0:tq.length)&&void 0!==I?I:0)>0?M().createElement(sI,{present:!0},M().createElement("div",{className:"load-more__loader"},M().createElement(sD.Loader,{params:{identifier:"Loader01",styles:""},fields:{content:""}}))):M().createElement("button",{type:"button",className:"search-results__load-more "+(tM+tK>=tB?"hidden":""),onClick:()=>(j(!0),void tG({page:Math.floor(Number(tM)/Number(tK)+1)+1}))},null!==(R=null==_?void 0:_.loadMoreLabel)&&void 0!==R?R:"Load more"," ",M().createElement(s_.Icon,{name:"arrowDownTriangle"}))))},E.SEARCH_RESULTS,"content"),sK=function({params:t,fields:e}){iu.getContext().setLocaleLanguage("en"),iu.getContext().setLocaleCountry("us");let n=(0,ss.useSearchStore)(t=>t.programSourceInitial),i=(0,ss.useSearchStore)(t=>t.programSource),r=(0,ss.useSearchStore)(t=>t.setProgramSource),s=(0,ss.useSearchStore)(t=>t.setProgramSourceInitial),o=(0,ss.useSearchStore)(t=>
1t.setFlyoutSource),a=(0,ss.useSearchStore)(t=>t.setFlyoutSourceInitial);return(0,V.useEffect)(()=>{var t,n,i,c,u,h,l,p,d,f,m,v;r(JSON.parse(null===(i=null===(n=null===(t=null==e?void 0:e.groupSource)||void 0===t?void 0:t.fields)||void 0===n?void 0:n.SourceBody)||void 0===i?void 0:i.value)),s(JSON.parse(null===(h=null===(u=null===(c=null==e?void 0:e.groupSource)||void 0===c?void 0:c.fields)||void 0===u?void 0:u.SourceBody)||void 0===h?void 0:h.value)),o(JSON.parse(null===(d=null===(p=null===(l=null==e?void 0:e.cardSource)||void 0===l?void 0:l.fields)||void 0===p?void 0:p.SourceBody)||void 0===d?void 0:d.value)),a(JSON.parse(null===(v=null===(m=null===(f=null==e?void 0:e.cardSource)||void 0===f?void 0:f.fields)||void 0===m?void 0:m.SourceBody)||void 0===v?void 0:v.value))},[]),n&&i?M().createElement(sr,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(sM,{key:H(),rfkId:null==e?void 0:e.sitecoreWidgetId,props:{params:t,fields:e}})):null}})(),v})(),t.exports=i(n(7356),n(1136),n(2905),n(5951),n(5430),n(9614),n(4529),n(6664),n(7294),n(3935))}}]);
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.