commerce-sdk-isomorphic 3.3.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -7
- package/lib/index.cjs.d.ts +51486 -28523
- package/lib/index.cjs.js +1 -1
- package/lib/index.esm.d.ts +51486 -28523
- package/lib/index.esm.js +1 -1
- package/package.json +11 -9
package/lib/index.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{customRandom as e,urlAlphabet as t}from"nanoid";import r from"seedrandom";var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(e,t,r){return e(r={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&r.path)}},r.exports),r.exports}var a,o,s=function(e){return e&&e.Math==Math&&e},d=s("object"==typeof globalThis&&globalThis)||s("object"==typeof window&&window)||s("object"==typeof self&&self)||s("object"==typeof n&&n)||function(){return this}()||Function("return this")(),c=function(e){try{return!!e()}catch(e){return!0}},u=!c((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),l=!c((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),h=Function.prototype.call,f=l?h.bind(h):function(){return h.apply(h,arguments)},p={}.propertyIsEnumerable,g=Object.getOwnPropertyDescriptor,I={f:g&&!p.call({1:2},1)?function(e){var t=g(this,e);return!!t&&t.enumerable}:p},m=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},v=Function.prototype,b=v.bind,k=v.call,y=l&&b.bind(k,k),x=l?function(e){return e&&y(e)}:function(e){return e&&function(){return k.apply(e,arguments)}},w=x({}.toString),z=x("".slice),C=function(e){return z(w(e),8,-1)},P=Object,O=x("".split),E=c((function(){return!P("z").propertyIsEnumerable(0)}))?function(e){return"String"==C(e)?O(e,""):P(e)}:P,q=TypeError,j=function(e){if(null==e)throw q("Can't call method on "+e);return e},S=function(e){return E(j(e))},T=function(e){return"function"==typeof e},M=function(e){return"object"==typeof e?null!==e:T(e)},A=function(e){return T(e)?e:void 0},_=function(e,t){return arguments.length<2?A(d[e]):d[e]&&d[e][t]},R=x({}.isPrototypeOf),U=_("navigator","userAgent")||"",B=d.process,L=d.Deno,F=B&&B.versions||L&&L.version,N=F&&F.v8;N&&(o=(a=N.split("."))[0]>0&&a[0]<4?1:+(a[0]+a[1])),!o&&U&&(!(a=U.match(/Edge\/(\d+)/))||a[1]>=74)&&(a=U.match(/Chrome\/(\d+)/))&&(o=+a[1]);var W=o,D=!!Object.getOwnPropertySymbols&&!c((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&W&&W<41})),G=D&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,H=Object,V=G?function(e){return"symbol"==typeof e}:function(e){var t=_("Symbol");return T(t)&&R(t.prototype,H(e))},$=String,Y=function(e){try{return $(e)}catch(e){return"Object"}},K=TypeError,J=function(e){if(T(e))return e;throw K(Y(e)+" is not a function")},Q=function(e,t){var r=e[t];return null==r?void 0:J(r)},X=TypeError,Z=Object.defineProperty,ee=function(e,t){try{Z(d,e,{value:t,configurable:!0,writable:!0})}catch(r){d[e]=t}return t},te=d["__core-js_shared__"]||ee("__core-js_shared__",{}),re=i((function(e){(e.exports=function(e,t){return te[e]||(te[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.23.4",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.23.4/LICENSE",source:"https://github.com/zloirock/core-js"})})),ne=Object,ie=function(e){return ne(j(e))},ae=x({}.hasOwnProperty),oe=Object.hasOwn||function(e,t){return ae(ie(e),t)},se=0,de=Math.random(),ce=x(1..toString),ue=function(e){return"Symbol("+(void 0===e?"":e)+")_"+ce(++se+de,36)},le=re("wks"),he=d.Symbol,fe=he&&he.for,pe=G?he:he&&he.withoutSetter||ue,ge=function(e){if(!oe(le,e)||!D&&"string"!=typeof le[e]){var t="Symbol."+e;D&&oe(he,e)?le[e]=he[e]:le[e]=G&&fe?fe(t):pe(t)}return le[e]},Ie=TypeError,me=ge("toPrimitive"),ve=function(e,t){if(!M(e)||V(e))return e;var r,n=Q(e,me);if(n){if(void 0===t&&(t="default"),r=f(n,e,t),!M(r)||V(r))return r;throw Ie("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var r,n;if("string"===t&&T(r=e.toString)&&!M(n=f(r,e)))return n;if(T(r=e.valueOf)&&!M(n=f(r,e)))return n;if("string"!==t&&T(r=e.toString)&&!M(n=f(r,e)))return n;throw X("Can't convert object to primitive value")}(e,t)},be=function(e){var t=ve(e,"string");return V(t)?t:t+""},ke=d.document,ye=M(ke)&&M(ke.createElement),xe=function(e){return ye?ke.createElement(e):{}},we=!u&&!c((function(){return 7!=Object.defineProperty(xe("div"),"a",{get:function(){return 7}}).a})),ze=Object.getOwnPropertyDescriptor,Ce={f:u?ze:function(e,t){if(e=S(e),t=be(t),we)try{return ze(e,t)}catch(e){}if(oe(e,t))return m(!f(I.f,e,t),e[t])}},Pe=u&&c((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Oe=String,Ee=TypeError,qe=function(e){if(M(e))return e;throw Ee(Oe(e)+" is not an object")},je=TypeError,Se=Object.defineProperty,Te=Object.getOwnPropertyDescriptor,Me={f:u?Pe?function(e,t,r){if(qe(e),t=be(t),qe(r),"function"==typeof e&&"prototype"===t&&"value"in r&&"writable"in r&&!r.writable){var n=Te(e,t);n&&n.writable&&(e[t]=r.value,r={configurable:"configurable"in r?r.configurable:n.configurable,enumerable:"enumerable"in r?r.enumerable:n.enumerable,writable:!1})}return Se(e,t,r)}:Se:function(e,t,r){if(qe(e),t=be(t),qe(r),we)try{return Se(e,t,r)}catch(e){}if("get"in r||"set"in r)throw je("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},Ae=u?function(e,t,r){return Me.f(e,t,m(1,r))}:function(e,t,r){return e[t]=r,e},_e=Function.prototype,Re=u&&Object.getOwnPropertyDescriptor,Ue=oe(_e,"name"),Be={EXISTS:Ue,PROPER:Ue&&"something"===function(){}.name,CONFIGURABLE:Ue&&(!u||u&&Re(_e,"name").configurable)},Le=x(Function.toString);T(te.inspectSource)||(te.inspectSource=function(e){return Le(e)});var Fe,Ne,We,De=te.inspectSource,Ge=d.WeakMap,He=T(Ge)&&/native code/.test(De(Ge)),Ve=re("keys"),$e=function(e){return Ve[e]||(Ve[e]=ue(e))},Ye={},Ke=d.TypeError,Je=d.WeakMap;if(He||te.state){var Qe=te.state||(te.state=new Je),Xe=x(Qe.get),Ze=x(Qe.has),et=x(Qe.set);Fe=function(e,t){if(Ze(Qe,e))throw new Ke("Object already initialized");return t.facade=e,et(Qe,e,t),t},Ne=function(e){return Xe(Qe,e)||{}},We=function(e){return Ze(Qe,e)}}else{var tt=$e("state");Ye[tt]=!0,Fe=function(e,t){if(oe(e,tt))throw new Ke("Object already initialized");return t.facade=e,Ae(e,tt,t),t},Ne=function(e){return oe(e,tt)?e[tt]:{}},We=function(e){return oe(e,tt)}}var rt={set:Fe,get:Ne,has:We,enforce:function(e){return We(e)?Ne(e):Fe(e,{})},getterFor:function(e){return function(t){var r;if(!M(t)||(r=Ne(t)).type!==e)throw Ke("Incompatible receiver, "+e+" required");return r}}},nt=i((function(e){var t=Be.CONFIGURABLE,r=rt.enforce,n=rt.get,i=Object.defineProperty,a=u&&!c((function(){return 8!==i((function(){}),"length",{value:8}).length})),o=String(String).split("String"),s=e.exports=function(e,n,s){"Symbol("===String(n).slice(0,7)&&(n="["+String(n).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),s&&s.getter&&(n="get "+n),s&&s.setter&&(n="set "+n),(!oe(e,"name")||t&&e.name!==n)&&(u?i(e,"name",{value:n,configurable:!0}):e.name=n),a&&s&&oe(s,"arity")&&e.length!==s.arity&&i(e,"length",{value:s.arity});try{s&&oe(s,"constructor")&&s.constructor?u&&i(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var d=r(e);return oe(d,"source")||(d.source=o.join("string"==typeof n?n:"")),e};Function.prototype.toString=s((function(){return T(this)&&n(this).source||De(this)}),"toString")})),it=function(e,t,r,n){n||(n={});var i=n.enumerable,a=void 0!==n.name?n.name:t;if(T(r)&&nt(r,a,n),n.global)i?e[t]=r:ee(t,r);else{try{n.unsafe?e[t]&&(i=!0):delete e[t]}catch(e){}i?e[t]=r:Me.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},at=Math.ceil,ot=Math.floor,st=Math.trunc||function(e){var t=+e;return(t>0?ot:at)(t)},dt=function(e){var t=+e;return t!=t||0===t?0:st(t)},ct=Math.max,ut=Math.min,lt=function(e,t){var r=dt(e);return r<0?ct(r+t,0):ut(r,t)},ht=Math.min,ft=function(e){return e>0?ht(dt(e),9007199254740991):0},pt=function(e){return ft(e.length)},gt=function(e){return function(t,r,n){var i,a=S(t),o=pt(a),s=lt(n,o);if(e&&r!=r){for(;o>s;)if((i=a[s++])!=i)return!0}else for(;o>s;s++)if((e||s in a)&&a[s]===r)return e||s||0;return!e&&-1}},It={includes:gt(!0),indexOf:gt(!1)},mt=It.indexOf,vt=x([].push),bt=function(e,t){var r,n=S(e),i=0,a=[];for(r in n)!oe(Ye,r)&&oe(n,r)&&vt(a,r);for(;t.length>i;)oe(n,r=t[i++])&&(~mt(a,r)||vt(a,r));return a},kt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],yt=kt.concat("length","prototype"),xt={f:Object.getOwnPropertyNames||function(e){return bt(e,yt)}},wt={f:Object.getOwnPropertySymbols},zt=x([].concat),Ct=_("Reflect","ownKeys")||function(e){var t=xt.f(qe(e)),r=wt.f;return r?zt(t,r(e)):t},Pt=function(e,t,r){for(var n=Ct(t),i=Me.f,a=Ce.f,o=0;o<n.length;o++){var s=n[o];oe(e,s)||r&&oe(r,s)||i(e,s,a(t,s))}},Ot=/#|\.prototype\./,Et=function(e,t){var r=jt[qt(e)];return r==Tt||r!=St&&(T(t)?c(t):!!t)},qt=Et.normalize=function(e){return String(e).replace(Ot,".").toLowerCase()},jt=Et.data={},St=Et.NATIVE="N",Tt=Et.POLYFILL="P",Mt=Et,At=Ce.f,_t=function(e,t){var r,n,i,a,o,s=e.target,c=e.global,u=e.stat;if(r=c?d:u?d[s]||ee(s,{}):(d[s]||{}).prototype)for(n in t){if(a=t[n],i=e.dontCallGetSet?(o=At(r,n))&&o.value:r[n],!Mt(c?n:s+(u?".":"#")+n,e.forced)&&void 0!==i){if(typeof a==typeof i)continue;Pt(a,i)}(e.sham||i&&i.sham)&&Ae(a,"sham",!0),it(r,n,a,e)}},Rt=Object.keys||function(e){return bt(e,kt)},Ut=c((function(){Rt(1)}));_t({target:"Object",stat:!0,forced:Ut},{keys:function(e){return Rt(ie(e))}});var Bt={};Bt[ge("toStringTag")]="z";var Lt,Ft="[object z]"===String(Bt),Nt=ge("toStringTag"),Wt=Object,Dt="Arguments"==C(function(){return arguments}()),Gt=Ft?C:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=Wt(e),Nt))?r:Dt?C(t):"Object"==(n=C(t))&&T(t.callee)?"Arguments":n},Ht=String,Vt=function(e){if("Symbol"===Gt(e))throw TypeError("Cannot convert a Symbol value to a string");return Ht(e)},$t={f:u&&!Pe?Object.defineProperties:function(e,t){qe(e);for(var r,n=S(t),i=Rt(t),a=i.length,o=0;a>o;)Me.f(e,r=i[o++],n[r]);return e}},Yt=_("document","documentElement"),Kt=$e("IE_PROTO"),Jt=function(){},Qt=function(e){return"<script>"+e+"<\/script>"},Xt=function(e){e.write(Qt("")),e.close();var t=e.parentWindow.Object;return e=null,t},Zt=function(){try{Lt=new ActiveXObject("htmlfile")}catch(e){}var e,t;Zt="undefined"!=typeof document?document.domain&&Lt?Xt(Lt):((t=xe("iframe")).style.display="none",Yt.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(Qt("document.F=Object")),e.close(),e.F):Xt(Lt);for(var r=kt.length;r--;)delete Zt.prototype[kt[r]];return Zt()};Ye[Kt]=!0;var er=Object.create||function(e,t){var r;return null!==e?(Jt.prototype=qe(e),r=new Jt,Jt.prototype=null,r[Kt]=e):r=Zt(),void 0===t?r:$t.f(r,t)},tr=function(e,t,r){var n=be(t);n in e?Me.f(e,n,m(0,r)):e[n]=r},rr=Array,nr=Math.max,ir=function(e,t,r){for(var n=pt(e),i=lt(t,n),a=lt(void 0===r?n:r,n),o=rr(nr(a-i,0)),s=0;i<a;i++,s++)tr(o,s,e[i]);return o.length=s,o},ar=xt.f,or="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],sr={f:function(e){return or&&"Window"==C(e)?function(e){try{return ar(e)}catch(e){return ir(or)}}(e):ar(S(e))}},dr={f:ge},cr=d,ur=Me.f,lr=Me.f,hr=ge("toStringTag"),fr=function(e,t,r){e&&!r&&(e=e.prototype),e&&!oe(e,hr)&&lr(e,hr,{configurable:!0,value:t})},pr=x(x.bind),gr=function(e,t){return J(e),void 0===t?e:l?pr(e,t):function(){return e.apply(t,arguments)}},Ir=Array.isArray||function(e){return"Array"==C(e)},mr=function(){},vr=[],br=_("Reflect","construct"),kr=/^\s*(?:class|function)\b/,yr=x(kr.exec),xr=!kr.exec(mr),wr=function(e){if(!T(e))return!1;try{return br(mr,vr,e),!0}catch(e){return!1}},zr=function(e){if(!T(e))return!1;switch(Gt(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return xr||!!yr(kr,De(e))}catch(e){return!0}};zr.sham=!0;var Cr=!br||c((function(){var e;return wr(wr.call)||!wr(Object)||!wr((function(){e=!0}))||e}))?zr:wr,Pr=ge("species"),Or=Array,Er=function(e,t){return new(function(e){var t;return Ir(e)&&(t=e.constructor,(Cr(t)&&(t===Or||Ir(t.prototype))||M(t)&&null===(t=t[Pr]))&&(t=void 0)),void 0===t?Or:t}(e))(0===t?0:t)},qr=x([].push),jr=function(e){var t=1==e,r=2==e,n=3==e,i=4==e,a=6==e,o=7==e,s=5==e||a;return function(d,c,u,l){for(var h,f,p=ie(d),g=E(p),I=gr(c,u),m=pt(g),v=0,b=l||Er,k=t?b(d,m):r||o?b(d,0):void 0;m>v;v++)if((s||v in g)&&(f=I(h=g[v],v,p),e))if(t)k[v]=f;else if(f)switch(e){case 3:return!0;case 5:return h;case 6:return v;case 2:qr(k,h)}else switch(e){case 4:return!1;case 7:qr(k,h)}return a?-1:n||i?i:k}},Sr={forEach:jr(0),map:jr(1),filter:jr(2),some:jr(3),every:jr(4),find:jr(5),findIndex:jr(6),filterReject:jr(7)},Tr=Sr.forEach,Mr=$e("hidden"),Ar=rt.set,_r=rt.getterFor("Symbol"),Rr=Object.prototype,Ur=d.Symbol,Br=Ur&&Ur.prototype,Lr=d.TypeError,Fr=d.QObject,Nr=Ce.f,Wr=Me.f,Dr=sr.f,Gr=I.f,Hr=x([].push),Vr=re("symbols"),$r=re("op-symbols"),Yr=re("wks"),Kr=!Fr||!Fr.prototype||!Fr.prototype.findChild,Jr=u&&c((function(){return 7!=er(Wr({},"a",{get:function(){return Wr(this,"a",{value:7}).a}})).a}))?function(e,t,r){var n=Nr(Rr,t);n&&delete Rr[t],Wr(e,t,r),n&&e!==Rr&&Wr(Rr,t,n)}:Wr,Qr=function(e,t){var r=Vr[e]=er(Br);return Ar(r,{type:"Symbol",tag:e,description:t}),u||(r.description=t),r},Xr=function(e,t,r){e===Rr&&Xr($r,t,r),qe(e);var n=be(t);return qe(r),oe(Vr,n)?(r.enumerable?(oe(e,Mr)&&e[Mr][n]&&(e[Mr][n]=!1),r=er(r,{enumerable:m(0,!1)})):(oe(e,Mr)||Wr(e,Mr,m(1,{})),e[Mr][n]=!0),Jr(e,n,r)):Wr(e,n,r)},Zr=function(e,t){qe(e);var r=S(t),n=Rt(r).concat(nn(r));return Tr(n,(function(t){u&&!f(en,r,t)||Xr(e,t,r[t])})),e},en=function(e){var t=be(e),r=f(Gr,this,t);return!(this===Rr&&oe(Vr,t)&&!oe($r,t))&&(!(r||!oe(this,t)||!oe(Vr,t)||oe(this,Mr)&&this[Mr][t])||r)},tn=function(e,t){var r=S(e),n=be(t);if(r!==Rr||!oe(Vr,n)||oe($r,n)){var i=Nr(r,n);return!i||!oe(Vr,n)||oe(r,Mr)&&r[Mr][n]||(i.enumerable=!0),i}},rn=function(e){var t=Dr(S(e)),r=[];return Tr(t,(function(e){oe(Vr,e)||oe(Ye,e)||Hr(r,e)})),r},nn=function(e){var t=e===Rr,r=Dr(t?$r:S(e)),n=[];return Tr(r,(function(e){!oe(Vr,e)||t&&!oe(Rr,e)||Hr(n,Vr[e])})),n};D||(Br=(Ur=function(){if(R(Br,this))throw Lr("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?Vt(arguments[0]):void 0,t=ue(e),r=function(e){this===Rr&&f(r,$r,e),oe(this,Mr)&&oe(this[Mr],t)&&(this[Mr][t]=!1),Jr(this,t,m(1,e))};return u&&Kr&&Jr(Rr,t,{configurable:!0,set:r}),Qr(t,e)}).prototype,it(Br,"toString",(function(){return _r(this).tag})),it(Ur,"withoutSetter",(function(e){return Qr(ue(e),e)})),I.f=en,Me.f=Xr,$t.f=Zr,Ce.f=tn,xt.f=sr.f=rn,wt.f=nn,dr.f=function(e){return Qr(ge(e),e)},u&&(Wr(Br,"description",{configurable:!0,get:function(){return _r(this).description}}),it(Rr,"propertyIsEnumerable",en,{unsafe:!0}))),_t({global:!0,constructor:!0,wrap:!0,forced:!D,sham:!D},{Symbol:Ur}),Tr(Rt(Yr),(function(e){!function(e){var t=cr.Symbol||(cr.Symbol={});oe(t,e)||ur(t,e,{value:dr.f(e)})}(e)})),_t({target:"Symbol",stat:!0,forced:!D},{useSetter:function(){Kr=!0},useSimple:function(){Kr=!1}}),_t({target:"Object",stat:!0,forced:!D,sham:!u},{create:function(e,t){return void 0===t?er(e):Zr(er(e),t)},defineProperty:Xr,defineProperties:Zr,getOwnPropertyDescriptor:tn}),_t({target:"Object",stat:!0,forced:!D},{getOwnPropertyNames:rn}),function(){var e=_("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,n=ge("toPrimitive");t&&!t[n]&&it(t,n,(function(e){return f(r,this)}),{arity:1})}(),fr(Ur,"Symbol"),Ye[Mr]=!0;var an=D&&!!Symbol.for&&!!Symbol.keyFor,on=re("string-to-symbol-registry"),sn=re("symbol-to-string-registry");_t({target:"Symbol",stat:!0,forced:!an},{for:function(e){var t=Vt(e);if(oe(on,t))return on[t];var r=_("Symbol")(t);return on[t]=r,sn[r]=t,r}});var dn=re("symbol-to-string-registry");_t({target:"Symbol",stat:!0,forced:!an},{keyFor:function(e){if(!V(e))throw TypeError(Y(e)+" is not a symbol");if(oe(dn,e))return dn[e]}});var cn=Function.prototype,un=cn.apply,ln=cn.call,hn="object"==typeof Reflect&&Reflect.apply||(l?ln.bind(un):function(){return ln.apply(un,arguments)}),fn=x([].slice),pn=_("JSON","stringify"),gn=x(/./.exec),In=x("".charAt),mn=x("".charCodeAt),vn=x("".replace),bn=x(1..toString),kn=/[\uD800-\uDFFF]/g,yn=/^[\uD800-\uDBFF]$/,xn=/^[\uDC00-\uDFFF]$/,wn=!D||c((function(){var e=_("Symbol")();return"[null]"!=pn([e])||"{}"!=pn({a:e})||"{}"!=pn(Object(e))})),zn=c((function(){return'"\\udf06\\ud834"'!==pn("\udf06\ud834")||'"\\udead"'!==pn("\udead")})),Cn=function(e,t){var r=fn(arguments),n=t;if((M(t)||void 0!==e)&&!V(e))return Ir(t)||(t=function(e,t){if(T(n)&&(t=f(n,this,e,t)),!V(t))return t}),r[1]=t,hn(pn,null,r)},Pn=function(e,t,r){var n=In(r,t-1),i=In(r,t+1);return gn(yn,e)&&!gn(xn,i)||gn(xn,e)&&!gn(yn,n)?"\\u"+bn(mn(e,0),16):e};pn&&_t({target:"JSON",stat:!0,arity:3,forced:wn||zn},{stringify:function(e,t,r){var n=fn(arguments),i=hn(wn?Cn:pn,null,n);return zn&&"string"==typeof i?vn(i,kn,Pn):i}});var On=!D||c((function(){wt.f(1)}));_t({target:"Object",stat:!0,forced:On},{getOwnPropertySymbols:function(e){var t=wt.f;return t?t(ie(e)):[]}});var En=ge("species"),qn=function(e){return W>=51||!c((function(){var t=[];return(t.constructor={})[En]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},jn=Sr.filter,Sn=qn("filter");_t({target:"Array",proto:!0,forced:!Sn},{filter:function(e){return jn(this,e,arguments.length>1?arguments[1]:void 0)}});var Tn=Ft?{}.toString:function(){return"[object "+Gt(this)+"]"};Ft||it(Object.prototype,"toString",Tn,{unsafe:!0});var Mn=Ce.f,An=c((function(){Mn(1)}));_t({target:"Object",stat:!0,forced:!u||An,sham:!u},{getOwnPropertyDescriptor:function(e,t){return Mn(S(e),t)}});var _n={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Rn=xe("span").classList,Un=Rn&&Rn.constructor&&Rn.constructor.prototype,Bn=Un===Object.prototype?void 0:Un,Ln=function(e,t){var r=[][e];return!!r&&c((function(){r.call(null,t||function(){return 1},1)}))},Fn=Sr.forEach,Nn=Ln("forEach")?[].forEach:function(e){return Fn(this,e,arguments.length>1?arguments[1]:void 0)},Wn=function(e){if(e&&e.forEach!==Nn)try{Ae(e,"forEach",Nn)}catch(t){e.forEach=Nn}};for(var Dn in _n)_n[Dn]&&Wn(d[Dn]&&d[Dn].prototype);Wn(Bn),_t({target:"Object",stat:!0,sham:!u},{getOwnPropertyDescriptors:function(e){for(var t,r,n=S(e),i=Ce.f,a=Ct(n),o={},s=0;a.length>s;)void 0!==(r=i(n,t=a[s++]))&&tr(o,t,r);return o}});var Gn=$t.f;_t({target:"Object",stat:!0,forced:Object.defineProperties!==Gn,sham:!u},{defineProperties:Gn});var Hn=Me.f;_t({target:"Object",stat:!0,forced:Object.defineProperty!==Hn,sham:!u},{defineProperty:Hn});var Vn,$n=ge("match"),Yn=TypeError,Kn=function(e){if(function(e){var t;return M(e)&&(void 0!==(t=e[$n])?!!t:"RegExp"==C(e))}(e))throw Yn("The method doesn't accept regular expressions");return e},Jn=ge("match"),Qn=Ce.f,Xn=x("".startsWith),Zn=x("".slice),ei=Math.min,ti=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[Jn]=!1,"/./"[e](t)}catch(e){}}return!1}("startsWith"),ri=!(ti||(Vn=Qn(String.prototype,"startsWith"),!Vn||Vn.writable));_t({target:"String",proto:!0,forced:!ri&&!ti},{startsWith:function(e){var t=Vt(j(this));Kn(e);var r=ft(ei(arguments.length>1?arguments[1]:void 0,t.length)),n=Vt(e);return Xn?Xn(t,n,r):Zn(t,r,r+n.length)===n}});var ni=function(){var e=qe(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},ii=RegExp.prototype,ai=Be.PROPER,oi=RegExp.prototype.toString,si=c((function(){return"/a/b"!=oi.call({source:"a",flags:"b"})})),di=ai&&"toString"!=oi.name;function ci(e,t,r,n,i,a,o){try{var s=e[a](o),d=s.value}catch(e){return void r(e)}s.done?t(d):Promise.resolve(d).then(n,i)}function ui(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function o(e){ci(a,n,i,o,s,"next",e)}function s(e){ci(a,n,i,o,s,"throw",e)}o(void 0)}))}}function li(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hi(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function fi(e,t,r){return t&&hi(e.prototype,t),r&&hi(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function pi(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}(si||di)&&it(RegExp.prototype,"toString",(function(){var e=qe(this);return"/"+Vt(e.source)+"/"+Vt(function(e){var t=e.flags;return void 0!==t||"flags"in ii||oe(e,"flags")||!R(ii,e)?t:f(ni,e)}(e))}),{unsafe:!0});var gi=Object.prototype,Ii=gi.hasOwnProperty,mi="function"==typeof Symbol?Symbol:{},vi=mi.iterator||"@@iterator",bi=mi.asyncIterator||"@@asyncIterator",ki=mi.toStringTag||"@@toStringTag";function yi(e,t,r,n){var i=t&&t.prototype instanceof zi?t:zi,a=Object.create(i.prototype),o=new Ui(n||[]);return a._invoke=function(e,t,r){var n="suspendedStart";return function(i,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw a;return Li()}for(r.method=i,r.arg=a;;){var o=r.delegate;if(o){var s=Ai(o,r);if(s){if(s===wi)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var d=xi(e,t,r);if("normal"===d.type){if(n=r.done?"completed":"suspendedYield",d.arg===wi)continue;return{value:d.arg,done:r.done}}"throw"===d.type&&(n="completed",r.method="throw",r.arg=d.arg)}}}(e,r,o),a}function xi(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}var wi={};function zi(){}function Ci(){}function Pi(){}var Oi={};Oi[vi]=function(){return this};var Ei=Object.getPrototypeOf,qi=Ei&&Ei(Ei(Bi([])));qi&&qi!==gi&&Ii.call(qi,vi)&&(Oi=qi);var ji=Pi.prototype=zi.prototype=Object.create(Oi);function Si(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function Ti(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===Ci||"GeneratorFunction"===(t.displayName||t.name))}function Mi(e,t){var r;this._invoke=function(n,i){function a(){return new t((function(r,a){!function r(n,i,a,o){var s=xi(e[n],e,i);if("throw"!==s.type){var d=s.arg,c=d.value;return c&&"object"==typeof c&&Ii.call(c,"__await")?t.resolve(c.__await).then((function(e){r("next",e,a,o)}),(function(e){r("throw",e,a,o)})):t.resolve(c).then((function(e){d.value=e,a(d)}),(function(e){return r("throw",e,a,o)}))}o(s.arg)}(n,i,r,a)}))}return r=r?r.then(a,a):a()}}function Ai(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,Ai(e,t),"throw"===t.method))return wi;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return wi}var n=xi(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,wi;var i=n.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,wi):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,wi)}function _i(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function Ri(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function Ui(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_i,this),this.reset(!0)}function Bi(e){if(e){var t=e[vi];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function t(){for(;++r<e.length;)if(Ii.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return n.next=n}}return{next:Li}}function Li(){return{value:void 0,done:!0}}Ci.prototype=ji.constructor=Pi,Pi.constructor=Ci,Pi[ki]=Ci.displayName="GeneratorFunction",Si(Mi.prototype),Mi.prototype[bi]=function(){return this},Si(ji),ji[ki]="Generator",ji[vi]=function(){return this},ji.toString=function(){return"[object Generator]"},Ui.prototype={constructor:Ui,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(Ri),!e)for(var t in this)"t"===t.charAt(0)&&Ii.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var o=Ii.call(i,"catchLoc"),s=Ii.call(i,"finallyLoc");if(o&&s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&Ii.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,wi):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),wi},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),Ri(r),wi}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;Ri(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:Bi(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),wi}};var Fi={wrap:yi,isGeneratorFunction:Ti,AsyncIterator:Mi,mark:function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,Pi):(e.__proto__=Pi,ki in e||(e[ki]="GeneratorFunction")),e.prototype=Object.create(ji),e},awrap:function(e){return{__await:e}},async:function(e,t,r,n,i){void 0===i&&(i=Promise);var a=new Mi(yi(e,t,r,n),i);return Ti(t)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},keys:function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},values:Bi},Ni=Me.f,Wi=ge("unscopables"),Di=Array.prototype;null==Di[Wi]&&Ni(Di,Wi,{configurable:!0,value:er(null)});var Gi,Hi,Vi,$i=function(e){Di[Wi][e]=!0},Yi={},Ki=!c((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Ji=$e("IE_PROTO"),Qi=Object,Xi=Qi.prototype,Zi=Ki?Qi.getPrototypeOf:function(e){var t=ie(e);if(oe(t,Ji))return t[Ji];var r=t.constructor;return T(r)&&t instanceof r?r.prototype:t instanceof Qi?Xi:null},ea=ge("iterator"),ta=!1;[].keys&&("next"in(Vi=[].keys())?(Hi=Zi(Zi(Vi)))!==Object.prototype&&(Gi=Hi):ta=!0),(null==Gi||c((function(){var e={};return Gi[ea].call(e)!==e})))&&(Gi={}),T(Gi[ea])||it(Gi,ea,(function(){return this}));var ra={IteratorPrototype:Gi,BUGGY_SAFARI_ITERATORS:ta},na=ra.IteratorPrototype,ia=function(){return this},aa=function(e,t,r,n){var i=t+" Iterator";return e.prototype=er(na,{next:m(+!n,r)}),fr(e,i,!1),Yi[i]=ia,e},oa=String,sa=TypeError,da=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=x(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),t=r instanceof Array}catch(e){}return function(r,n){return qe(r),function(e){if("object"==typeof e||T(e))return e;throw sa("Can't set "+oa(e)+" as a prototype")}(n),t?e(r,n):r.__proto__=n,r}}():void 0),ca=Be.PROPER,ua=Be.CONFIGURABLE,la=ra.IteratorPrototype,ha=ra.BUGGY_SAFARI_ITERATORS,fa=ge("iterator"),pa=function(){return this},ga=function(e,t,r,n,i,a,o){aa(r,t,n);var s,d,c,u=function(e){if(e===i&&I)return I;if(!ha&&e in p)return p[e];switch(e){case"keys":case"values":case"entries":return function(){return new r(this,e)}}return function(){return new r(this)}},l=t+" Iterator",h=!1,p=e.prototype,g=p[fa]||p["@@iterator"]||i&&p[i],I=!ha&&g||u(i),m="Array"==t&&p.entries||g;if(m&&(s=Zi(m.call(new e)))!==Object.prototype&&s.next&&(Zi(s)!==la&&(da?da(s,la):T(s[fa])||it(s,fa,pa)),fr(s,l,!0)),ca&&"values"==i&&g&&"values"!==g.name&&(ua?Ae(p,"name","values"):(h=!0,I=function(){return f(g,this)})),i)if(d={values:u("values"),keys:a?I:u("keys"),entries:u("entries")},o)for(c in d)(ha||h||!(c in p))&&it(p,c,d[c]);else _t({target:t,proto:!0,forced:ha||h},d);return p[fa]!==I&&it(p,fa,I,{name:i}),Yi[t]=I,d},Ia=Me.f,ma=rt.set,va=rt.getterFor("Array Iterator"),ba=ga(Array,"Array",(function(e,t){ma(this,{type:"Array Iterator",target:S(e),index:0,kind:t})}),(function(){var e=va(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:t[n],done:!1}:{value:[n,t[n]],done:!1}}),"values"),ka=Yi.Arguments=Yi.Array;if($i("keys"),$i("values"),$i("entries"),u&&"values"!==ka.name)try{Ia(ka,"name",{value:"values"})}catch(e){}var ya=x("".charAt),xa=x("".charCodeAt),wa=x("".slice),za=function(e){return function(t,r){var n,i,a=Vt(j(t)),o=dt(r),s=a.length;return o<0||o>=s?e?"":void 0:(n=xa(a,o))<55296||n>56319||o+1===s||(i=xa(a,o+1))<56320||i>57343?e?ya(a,o):n:e?wa(a,o,o+2):i-56320+(n-55296<<10)+65536}},Ca={codeAt:za(!1),charAt:za(!0)},Pa=Ca.charAt,Oa=rt.set,Ea=rt.getterFor("String Iterator");ga(String,"String",(function(e){Oa(this,{type:"String Iterator",string:Vt(e),index:0})}),(function(){var e,t=Ea(this),r=t.string,n=t.index;return n>=r.length?{value:void 0,done:!0}:(e=Pa(r,n),t.index+=e.length,{value:e,done:!1})}));var qa=ge("iterator"),ja=ge("toStringTag"),Sa=ba.values,Ta=function(e,t){if(e){if(e[qa]!==Sa)try{Ae(e,qa,Sa)}catch(t){e[qa]=Sa}if(e[ja]||Ae(e,ja,t),_n[t])for(var r in ba)if(e[r]!==ba[r])try{Ae(e,r,ba[r])}catch(t){e[r]=ba[r]}}};for(var Ma in _n)Ta(d[Ma]&&d[Ma].prototype,Ma);Ta(Bn,"DOMTokenList");var Aa=ge("iterator"),_a=!c((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,r="";return e.pathname="c%20d",t.forEach((function(e,n){t.delete("b"),r+=n+e})),!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[Aa]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==r||"x"!==new URL("http://x",void 0).host})),Ra=function(e,t,r){for(var n in t)it(e,n,t[n],r);return e},Ua=TypeError,Ba=function(e,t){if(R(t,e))return e;throw Ua("Incorrect invocation")},La=ge("iterator"),Fa=function(e){if(null!=e)return Q(e,La)||Q(e,"@@iterator")||Yi[Gt(e)]},Na=TypeError,Wa=function(e,t){var r=arguments.length<2?Fa(e):t;if(J(r))return qe(f(r,e));throw Na(Y(e)+" is not iterable")},Da=TypeError,Ga=function(e,t){if(e<t)throw Da("Not enough arguments");return e},Ha=Math.floor,Va=function(e,t){var r=e.length,n=Ha(r/2);return r<8?$a(e,t):Ya(e,Va(ir(e,0,n),t),Va(ir(e,n),t),t)},$a=function(e,t){for(var r,n,i=e.length,a=1;a<i;){for(n=a,r=e[a];n&&t(e[n-1],r)>0;)e[n]=e[--n];n!==a++&&(e[n]=r)}return e},Ya=function(e,t,r,n){for(var i=t.length,a=r.length,o=0,s=0;o<i||s<a;)e[o+s]=o<i&&s<a?n(t[o],r[s])<=0?t[o++]:r[s++]:o<i?t[o++]:r[s++];return e},Ka=Va,Ja=ge("iterator"),Qa=rt.set,Xa=rt.getterFor("URLSearchParams"),Za=rt.getterFor("URLSearchParamsIterator"),eo=Object.getOwnPropertyDescriptor,to=function(e){if(!u)return d[e];var t=eo(d,e);return t&&t.value},ro=to("fetch"),no=to("Request"),io=to("Headers"),ao=no&&no.prototype,oo=io&&io.prototype,so=d.RegExp,co=d.TypeError,uo=d.decodeURIComponent,lo=d.encodeURIComponent,ho=x("".charAt),fo=x([].join),po=x([].push),go=x("".replace),Io=x([].shift),mo=x([].splice),vo=x("".split),bo=x("".slice),ko=/\+/g,yo=Array(4),xo=function(e){return yo[e-1]||(yo[e-1]=so("((?:%[\\da-f]{2}){"+e+"})","gi"))},wo=function(e){try{return uo(e)}catch(t){return e}},zo=function(e){var t=go(e,ko," "),r=4;try{return uo(t)}catch(e){for(;r;)t=go(t,xo(r--),wo);return t}},Co=/[!'()~]|%20/g,Po={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},Oo=function(e){return Po[e]},Eo=function(e){return go(lo(e),Co,Oo)},qo=aa((function(e,t){Qa(this,{type:"URLSearchParamsIterator",iterator:Wa(Xa(e).entries),kind:t})}),"Iterator",(function(){var e=Za(this),t=e.kind,r=e.iterator.next(),n=r.value;return r.done||(r.value="keys"===t?n.key:"values"===t?n.value:[n.key,n.value]),r}),!0),jo=function(e){this.entries=[],this.url=null,void 0!==e&&(M(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===ho(e,0)?bo(e,1):e:Vt(e)))};jo.prototype={type:"URLSearchParams",bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,r,n,i,a,o,s,d=Fa(e);if(d)for(r=(t=Wa(e,d)).next;!(n=f(r,t)).done;){if(a=(i=Wa(qe(n.value))).next,(o=f(a,i)).done||(s=f(a,i)).done||!f(a,i).done)throw co("Expected sequence with length 2");po(this.entries,{key:Vt(o.value),value:Vt(s.value)})}else for(var c in e)oe(e,c)&&po(this.entries,{key:c,value:Vt(e[c])})},parseQuery:function(e){if(e)for(var t,r,n=vo(e,"&"),i=0;i<n.length;)(t=n[i++]).length&&(r=vo(t,"="),po(this.entries,{key:zo(Io(r)),value:zo(fo(r,"="))}))},serialize:function(){for(var e,t=this.entries,r=[],n=0;n<t.length;)e=t[n++],po(r,Eo(e.key)+"="+Eo(e.value));return fo(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var So=function(){Ba(this,To);var e=arguments.length>0?arguments[0]:void 0;Qa(this,new jo(e))},To=So.prototype;if(Ra(To,{append:function(e,t){Ga(arguments.length,2);var r=Xa(this);po(r.entries,{key:Vt(e),value:Vt(t)}),r.updateURL()},delete:function(e){Ga(arguments.length,1);for(var t=Xa(this),r=t.entries,n=Vt(e),i=0;i<r.length;)r[i].key===n?mo(r,i,1):i++;t.updateURL()},get:function(e){Ga(arguments.length,1);for(var t=Xa(this).entries,r=Vt(e),n=0;n<t.length;n++)if(t[n].key===r)return t[n].value;return null},getAll:function(e){Ga(arguments.length,1);for(var t=Xa(this).entries,r=Vt(e),n=[],i=0;i<t.length;i++)t[i].key===r&&po(n,t[i].value);return n},has:function(e){Ga(arguments.length,1);for(var t=Xa(this).entries,r=Vt(e),n=0;n<t.length;)if(t[n++].key===r)return!0;return!1},set:function(e,t){Ga(arguments.length,1);for(var r,n=Xa(this),i=n.entries,a=!1,o=Vt(e),s=Vt(t),d=0;d<i.length;d++)(r=i[d]).key===o&&(a?mo(i,d--,1):(a=!0,r.value=s));a||po(i,{key:o,value:s}),n.updateURL()},sort:function(){var e=Xa(this);Ka(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,r=Xa(this).entries,n=gr(e,arguments.length>1?arguments[1]:void 0),i=0;i<r.length;)n((t=r[i++]).value,t.key,this)},keys:function(){return new qo(this,"keys")},values:function(){return new qo(this,"values")},entries:function(){return new qo(this,"entries")}},{enumerable:!0}),it(To,Ja,To.entries,{name:"entries"}),it(To,"toString",(function(){return Xa(this).serialize()}),{enumerable:!0}),fr(So,"URLSearchParams"),_t({global:!0,constructor:!0,forced:!_a},{URLSearchParams:So}),!_a&&T(io)){var Mo=x(oo.has),Ao=x(oo.set),_o=function(e){if(M(e)){var t,r=e.body;if("URLSearchParams"===Gt(r))return t=e.headers?new io(e.headers):new io,Mo(t,"content-type")||Ao(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),er(e,{body:m(0,Vt(r)),headers:m(0,t)})}return e};if(T(ro)&&_t({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return ro(e,arguments.length>1?_o(arguments[1]):{})}}),T(no)){var Ro=function(e){return Ba(this,ao),new no(e,arguments.length>1?_o(arguments[1]):{})};ao.constructor=Ro,Ro.prototype=ao,_t({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Ro})}}var Uo={URLSearchParams:So,getState:Xa};function Bo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Lo(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Bo(Object(r),!0).forEach((function(t){pi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bo(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Fo=fi((function e(t){if(li(this,e),pi(this,"baseUri",void 0),pi(this,"proxy",void 0),pi(this,"headers",void 0),pi(this,"parameters",void 0),pi(this,"fetchOptions",void 0),pi(this,"transformRequest",void 0),pi(this,"throwOnBadResponse",void 0),this.headers=Lo({},t.headers),this.parameters=Lo({},t.parameters),!this.parameters.shortCode)throw new Error("Missing required parameter: shortCode");this.fetchOptions=Lo({credentials:"omit"},t.fetchOptions),this.transformRequest=t.transformRequest||e.defaults.transformRequest,t.baseUri&&(this.baseUri=t.baseUri),t.proxy&&(this.proxy=t.proxy),this.throwOnBadResponse=!!t.throwOnBadResponse}));function No(e){return(No="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}pi(Fo,"defaults",{transformRequest:function(e,t){switch(t["Content-Type"]){case"application/json":return JSON.stringify(e);case"application/x-www-form-urlencoded":return new URLSearchParams(e);default:return e}}}),_t({global:!0},{globalThis:d});var Wo,Do,Go="object"===("undefined"==typeof window?"undefined":No(window))&&"object"===No(window.document),Ho="object"===("undefined"==typeof process?"undefined":No(process))&&"object"===No(process.versions)&&"string"==typeof process.versions.node,Vo=Go?window:globalThis,$o="function"==typeof Vo.fetch,Yo=function(){if(Ho)return require("node-fetch").default;if(!$o)throw new Error("Bad environment: it is not a node environment but fetch is not defined");return Vo.fetch}(),Ko=d.RegExp,Jo=c((function(){var e=Ko("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),Qo=Jo||c((function(){return!Ko("a","y").sticky})),Xo={BROKEN_CARET:Jo||c((function(){var e=Ko("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:Qo,UNSUPPORTED_Y:Jo},Zo=d.RegExp,es=c((function(){var e=Zo(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),ts=d.RegExp,rs=c((function(){var e=ts("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),ns=rt.get,is=re("native-string-replace",String.prototype.replace),as=RegExp.prototype.exec,os=as,ss=x("".charAt),ds=x("".indexOf),cs=x("".replace),us=x("".slice),ls=(Do=/b*/g,f(as,Wo=/a/,"a"),f(as,Do,"a"),0!==Wo.lastIndex||0!==Do.lastIndex),hs=Xo.BROKEN_CARET,fs=void 0!==/()??/.exec("")[1];(ls||fs||hs||es||rs)&&(os=function(e){var t,r,n,i,a,o,s,d=this,c=ns(d),u=Vt(e),l=c.raw;if(l)return l.lastIndex=d.lastIndex,t=f(os,l,u),d.lastIndex=l.lastIndex,t;var h=c.groups,p=hs&&d.sticky,g=f(ni,d),I=d.source,m=0,v=u;if(p&&(g=cs(g,"y",""),-1===ds(g,"g")&&(g+="g"),v=us(u,d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&"\n"!==ss(u,d.lastIndex-1))&&(I="(?: "+I+")",v=" "+v,m++),r=new RegExp("^(?:"+I+")",g)),fs&&(r=new RegExp("^"+I+"$(?!\\s)",g)),ls&&(n=d.lastIndex),i=f(as,p?r:d,v),p?i?(i.input=us(i.input,m),i[0]=us(i[0],m),i.index=d.lastIndex,d.lastIndex+=i[0].length):d.lastIndex=0:ls&&i&&(d.lastIndex=d.global?i.index+i[0].length:n),fs&&i&&i.length>1&&f(is,i[0],r,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(i[a]=void 0)})),i&&h)for(i.groups=o=er(null),a=0;a<h.length;a++)o[(s=h[a])[0]]=i[s[1]];return i});var ps=os;_t({target:"RegExp",proto:!0,forced:/./.exec!==ps},{exec:ps});var gs=ge("species"),Is=RegExp.prototype,ms=function(e,t,r,n){var i=ge(e),a=!c((function(){var t={};return t[i]=function(){return 7},7!=""[e](t)})),o=a&&!c((function(){var t=!1,r=/a/;return"split"===e&&((r={}).constructor={},r.constructor[gs]=function(){return r},r.flags="",r[i]=/./[i]),r.exec=function(){return t=!0,null},r[i](""),!t}));if(!a||!o||r){var s=x(/./[i]),d=t(i,""[e],(function(e,t,r,n,i){var o=x(e),d=t.exec;return d===ps||d===Is.exec?a&&!i?{done:!0,value:s(t,r,n)}:{done:!0,value:o(r,t,n)}:{done:!1}}));it(String.prototype,e,d[0]),it(Is,i,d[1])}n&&Ae(Is[i],"sham",!0)},vs=Ca.charAt,bs=function(e,t,r){return t+(r?vs(e,t).length:1)},ks=Math.floor,ys=x("".charAt),xs=x("".replace),ws=x("".slice),zs=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Cs=/\$([$&'`]|\d{1,2})/g,Ps=function(e,t,r,n,i,a){var o=r+e.length,s=n.length,d=Cs;return void 0!==i&&(i=ie(i),d=zs),xs(a,d,(function(a,d){var c;switch(ys(d,0)){case"$":return"$";case"&":return e;case"`":return ws(t,0,r);case"'":return ws(t,o);case"<":c=i[ws(d,1,-1)];break;default:var u=+d;if(0===u)return a;if(u>s){var l=ks(u/10);return 0===l?a:l<=s?void 0===n[l-1]?ys(d,1):n[l-1]+ys(d,1):a}c=n[u-1]}return void 0===c?"":c}))},Os=TypeError,Es=function(e,t){var r=e.exec;if(T(r)){var n=f(r,e,t);return null!==n&&qe(n),n}if("RegExp"===C(e))return f(ps,e,t);throw Os("RegExp#exec called on incompatible receiver")},qs=ge("replace"),js=Math.max,Ss=Math.min,Ts=x([].concat),Ms=x([].push),As=x("".indexOf),_s=x("".slice),Rs="$0"==="a".replace(/./,"$0"),Us=!!/./[qs]&&""===/./[qs]("a","$0");ms("replace",(function(e,t,r){var n=Us?"$":"$0";return[function(e,r){var n=j(this),i=null==e?void 0:Q(e,qs);return i?f(i,e,n,r):f(t,Vt(n),e,r)},function(e,i){var a=qe(this),o=Vt(e);if("string"==typeof i&&-1===As(i,n)&&-1===As(i,"$<")){var s=r(t,a,o,i);if(s.done)return s.value}var d=T(i);d||(i=Vt(i));var c=a.global;if(c){var u=a.unicode;a.lastIndex=0}for(var l=[];;){var h=Es(a,o);if(null===h)break;if(Ms(l,h),!c)break;""===Vt(h[0])&&(a.lastIndex=bs(o,ft(a.lastIndex),u))}for(var f,p="",g=0,I=0;I<l.length;I++){for(var m=Vt((h=l[I])[0]),v=js(Ss(dt(h.index),o.length),0),b=[],k=1;k<h.length;k++)Ms(b,void 0===(f=h[k])?f:String(f));var y=h.groups;if(d){var x=Ts([m],b,v,o);void 0!==y&&Ms(x,y);var w=Vt(hn(i,void 0,x))}else w=Ps(m,o,v,b,y,i);v>=g&&(p+=_s(o,g,v)+w,g=v+m.length)}return p+_s(o,g)}]}),!!c((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!Rs||Us);var Bs=Function,Ls=x([].concat),Fs=x([].join),Ns={},Ws=function(e,t,r){if(!oe(Ns,t)){for(var n=[],i=0;i<t;i++)n[i]="a["+i+"]";Ns[t]=Bs("C,a","return new C("+Fs(n,",")+")")}return Ns[t](e,r)},Ds=l?Bs.bind:function(e){var t=J(this),r=t.prototype,n=fn(arguments,1),i=function(){var r=Ls(n,fn(arguments));return this instanceof i?Ws(t,r.length,r):t.apply(e,r)};return M(r)&&(i.prototype=r),i},Gs=TypeError,Hs=function(e){if(Cr(e))return e;throw Gs(Y(e)+" is not a constructor")},Vs=_("Reflect","construct"),$s=Object.prototype,Ys=[].push,Ks=c((function(){function e(){}return!(Vs((function(){}),[],e)instanceof e)})),Js=!c((function(){Vs((function(){}))})),Qs=Ks||Js;_t({target:"Reflect",stat:!0,forced:Qs,sham:Qs},{construct:function(e,t){Hs(e),qe(t);var r=arguments.length<3?e:Hs(arguments[2]);if(Js&&!Ks)return Vs(e,t,r);if(e==r){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var n=[null];return hn(Ys,n,t),new(hn(Ds,e,n))}var i=r.prototype,a=er(M(i)?i:$s),o=hn(e,a,t);return M(o)?o:a}});var Xs=TypeError,Zs=function(e){if(e>9007199254740991)throw Xs("Maximum allowed index exceeded");return e},ed=ge("isConcatSpreadable"),td=W>=51||!c((function(){var e=[];return e[ed]=!1,e.concat()[0]!==e})),rd=qn("concat"),nd=function(e){if(!M(e))return!1;var t=e[ed];return void 0!==t?!!t:Ir(e)};function id(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ad(e,t){return(ad=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function od(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ad(e,t)}function sd(e,t){if(t&&("object"===No(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return id(e)}function dd(e){return(dd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function cd(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function ud(e,t,r){return(ud=cd()?Reflect.construct.bind():function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Function.bind.apply(e,n));return r&&ad(i,r.prototype),i}).apply(null,arguments)}function ld(e){var t="function"==typeof Map?new Map:void 0;return(ld=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return ud(e,arguments,dd(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),ad(n,e)})(e)}function hd(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=dd(e);if(t){var i=dd(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return sd(this,r)}}_t({target:"Array",proto:!0,arity:1,forced:!td||!rd},{concat:function(e){var t,r,n,i,a,o=ie(this),s=Er(o,0),d=0;for(t=-1,n=arguments.length;t<n;t++)if(nd(a=-1===t?o:arguments[t]))for(i=pt(a),Zs(d+i),r=0;r<i;r++,d++)r in a&&tr(s,d,a[r]);else Zs(d+1),tr(s,d++,a);return s.length=d,s}});var fd=function(e){od(r,ld(Error));var t=hd(r);function r(e){var n;return li(this,r),pi(id(n=t.call(this,"".concat(e.status," ").concat(e.statusText))),"response",void 0),n.response=e,n}return fi(r)}();function pd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function gd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?pd(Object(r),!0).forEach((function(t){pi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pd(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Id,md=function(){var e=ui(Fi.mark((function e(t,r,n,i){var a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=gd(gd({},null==n?void 0:n.headers),null==r?void 0:r.headers),s=gd(gd({},null==n?void 0:n.fetchOptions),{},{headers:o,body:null==r?void 0:r.body,method:null!==(a=null==r?void 0:r.method)&&void 0!==a?a:"GET"}),e.next=4,Yo(t,s);case 4:if(d=e.sent,!i){e.next=7;break}return e.abrupt("return",d);case 7:if(null==n||!n.throwOnBadResponse||d.ok||304===d.status){e.next=11;break}throw new fd(d);case 11:return e.next=13,d.text();case 13:return c=e.sent,e.abrupt("return",c?JSON.parse(c):{});case 15:case"end":return e.stop()}}),e)})));return function(t,r,n,i){return e.apply(this,arguments)}}(),vd=function(e,t,r){return r.get&&nt(r.get,t,{getter:!0}),r.set&&nt(r.set,t,{setter:!0}),Me.f(e,t,r)},bd=Object.assign,kd=Object.defineProperty,yd=x([].concat),xd=!bd||c((function(){if(u&&1!==bd({b:1},bd(kd({},"a",{enumerable:!0,get:function(){kd(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol();return e[r]=7,"abcdefghijklmnopqrst".split("").forEach((function(e){t[e]=e})),7!=bd({},e)[r]||"abcdefghijklmnopqrst"!=Rt(bd({},t)).join("")}))?function(e,t){for(var r=ie(e),n=arguments.length,i=1,a=wt.f,o=I.f;n>i;)for(var s,d=E(arguments[i++]),c=a?yd(Rt(d),a(d)):Rt(d),l=c.length,h=0;l>h;)s=c[h++],u&&!f(o,d,s)||(r[s]=d[s]);return r}:bd,wd=function(e,t,r){var n,i;qe(e);try{if(!(n=Q(e,"return"))){if("throw"===t)throw r;return r}n=f(n,e)}catch(e){i=!0,n=e}if("throw"===t)throw r;if(i)throw n;return qe(n),r},zd=function(e,t,r,n){try{return n?t(qe(r)[0],r[1]):t(r)}catch(t){wd(e,"throw",t)}},Cd=ge("iterator"),Pd=Array.prototype,Od=function(e){return void 0!==e&&(Yi.Array===e||Pd[Cd]===e)},Ed=Array,qd=function(e){var t=ie(e),r=Cr(this),n=arguments.length,i=n>1?arguments[1]:void 0,a=void 0!==i;a&&(i=gr(i,n>2?arguments[2]:void 0));var o,s,d,c,u,l,h=Fa(t),p=0;if(!h||this===Ed&&Od(h))for(o=pt(t),s=r?new this(o):Ed(o);o>p;p++)l=a?i(t[p],p):t[p],tr(s,p,l);else for(u=(c=Wa(t,h)).next,s=r?new this:[];!(d=f(u,c)).done;p++)l=a?zd(c,i,[d.value,p],!0):d.value,tr(s,p,l);return s.length=p,s},jd=/[^\0-\u007E]/,Sd=/[.\u3002\uFF0E\uFF61]/g,Td="Overflow: input needs wider integers to process",Md=RangeError,Ad=x(Sd.exec),_d=Math.floor,Rd=String.fromCharCode,Ud=x("".charCodeAt),Bd=x([].join),Ld=x([].push),Fd=x("".replace),Nd=x("".split),Wd=x("".toLowerCase),Dd=function(e){return e+22+75*(e<26)},Gd=function(e,t,r){var n=0;for(e=r?_d(e/700):e>>1,e+=_d(e/t);e>455;)e=_d(e/35),n+=36;return _d(n+36*e/(e+38))},Hd=function(e){var t,r,n=[],i=(e=function(e){for(var t=[],r=0,n=e.length;r<n;){var i=Ud(e,r++);if(i>=55296&&i<=56319&&r<n){var a=Ud(e,r++);56320==(64512&a)?Ld(t,((1023&i)<<10)+(1023&a)+65536):(Ld(t,i),r--)}else Ld(t,i)}return t}(e)).length,a=128,o=0,s=72;for(t=0;t<e.length;t++)(r=e[t])<128&&Ld(n,Rd(r));var d=n.length,c=d;for(d&&Ld(n,"-");c<i;){var u=2147483647;for(t=0;t<e.length;t++)(r=e[t])>=a&&r<u&&(u=r);var l=c+1;if(u-a>_d((2147483647-o)/l))throw Md(Td);for(o+=(u-a)*l,a=u,t=0;t<e.length;t++){if((r=e[t])<a&&++o>2147483647)throw Md(Td);if(r==a){for(var h=o,f=36;;){var p=f<=s?1:f>=s+26?26:f-s;if(h<p)break;var g=h-p,I=36-p;Ld(n,Rd(Dd(p+g%I))),h=_d(g/I),f+=36}Ld(n,Rd(Dd(h))),s=Gd(o,l,c==d),o=0,c++}}o++,a++}return Bd(n,"")},Vd=Ca.codeAt,$d=rt.set,Yd=rt.getterFor("URL"),Kd=Uo.URLSearchParams,Jd=Uo.getState,Qd=d.URL,Xd=d.TypeError,Zd=d.parseInt,ec=Math.floor,tc=Math.pow,rc=x("".charAt),nc=x(/./.exec),ic=x([].join),ac=x(1..toString),oc=x([].pop),sc=x([].push),dc=x("".replace),cc=x([].shift),uc=x("".split),lc=x("".slice),hc=x("".toLowerCase),fc=x([].unshift),pc=/[a-z]/i,gc=/[\d+-.a-z]/i,Ic=/\d/,mc=/^0x/i,vc=/^[0-7]+$/,bc=/^\d+$/,kc=/^[\da-f]+$/i,yc=/[\0\t\n\r #%/:<>?@[\\\]^|]/,xc=/[\0\t\n\r #/:<>?@[\\\]^|]/,wc=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,zc=/[\t\n\r]/g,Cc=function(e){var t,r,n,i;if("number"==typeof e){for(t=[],r=0;r<4;r++)fc(t,e%256),e=ec(e/256);return ic(t,".")}if("object"==typeof e){for(t="",n=function(e){for(var t=null,r=1,n=null,i=0,a=0;a<8;a++)0!==e[a]?(i>r&&(t=n,r=i),n=null,i=0):(null===n&&(n=a),++i);return i>r&&(t=n,r=i),t}(e),r=0;r<8;r++)i&&0===e[r]||(i&&(i=!1),n===r?(t+=r?":":"::",i=!0):(t+=ac(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},Pc={},Oc=xd({},Pc,{" ":1,'"':1,"<":1,">":1,"`":1}),Ec=xd({},Oc,{"#":1,"?":1,"{":1,"}":1}),qc=xd({},Ec,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),jc=function(e,t){var r=Vd(e,0);return r>32&&r<127&&!oe(t,e)?e:encodeURIComponent(e)},Sc={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Tc=function(e,t){var r;return 2==e.length&&nc(pc,rc(e,0))&&(":"==(r=rc(e,1))||!t&&"|"==r)},Mc=function(e){var t;return e.length>1&&Tc(lc(e,0,2))&&(2==e.length||"/"===(t=rc(e,2))||"\\"===t||"?"===t||"#"===t)},Ac=function(e){return"."===e||"%2e"===hc(e)},_c={},Rc={},Uc={},Bc={},Lc={},Fc={},Nc={},Wc={},Dc={},Gc={},Hc={},Vc={},$c={},Yc={},Kc={},Jc={},Qc={},Xc={},Zc={},eu={},tu={},ru=function(e,t,r){var n,i,a,o=Vt(e);if(t){if(i=this.parse(o))throw Xd(i);this.searchParams=null}else{if(void 0!==r&&(n=new ru(r,!0)),i=this.parse(o,null,n))throw Xd(i);(a=Jd(new Kd)).bindURL(this),this.searchParams=a}};ru.prototype={type:"URL",parse:function(e,t,r){var n,i,a,o,s,d=this,c=t||_c,u=0,l="",h=!1,f=!1,p=!1;for(e=Vt(e),t||(d.scheme="",d.username="",d.password="",d.host=null,d.port=null,d.path=[],d.query=null,d.fragment=null,d.cannotBeABaseURL=!1,e=dc(e,wc,"")),e=dc(e,zc,""),n=qd(e);u<=n.length;){switch(i=n[u],c){case _c:if(!i||!nc(pc,i)){if(t)return"Invalid scheme";c=Uc;continue}l+=hc(i),c=Rc;break;case Rc:if(i&&(nc(gc,i)||"+"==i||"-"==i||"."==i))l+=hc(i);else{if(":"!=i){if(t)return"Invalid scheme";l="",c=Uc,u=0;continue}if(t&&(d.isSpecial()!=oe(Sc,l)||"file"==l&&(d.includesCredentials()||null!==d.port)||"file"==d.scheme&&!d.host))return;if(d.scheme=l,t)return void(d.isSpecial()&&Sc[d.scheme]==d.port&&(d.port=null));l="","file"==d.scheme?c=Yc:d.isSpecial()&&r&&r.scheme==d.scheme?c=Bc:d.isSpecial()?c=Wc:"/"==n[u+1]?(c=Lc,u++):(d.cannotBeABaseURL=!0,sc(d.path,""),c=Zc)}break;case Uc:if(!r||r.cannotBeABaseURL&&"#"!=i)return"Invalid scheme";if(r.cannotBeABaseURL&&"#"==i){d.scheme=r.scheme,d.path=ir(r.path),d.query=r.query,d.fragment="",d.cannotBeABaseURL=!0,c=tu;break}c="file"==r.scheme?Yc:Fc;continue;case Bc:if("/"!=i||"/"!=n[u+1]){c=Fc;continue}c=Dc,u++;break;case Lc:if("/"==i){c=Gc;break}c=Xc;continue;case Fc:if(d.scheme=r.scheme,i==Id)d.username=r.username,d.password=r.password,d.host=r.host,d.port=r.port,d.path=ir(r.path),d.query=r.query;else if("/"==i||"\\"==i&&d.isSpecial())c=Nc;else if("?"==i)d.username=r.username,d.password=r.password,d.host=r.host,d.port=r.port,d.path=ir(r.path),d.query="",c=eu;else{if("#"!=i){d.username=r.username,d.password=r.password,d.host=r.host,d.port=r.port,d.path=ir(r.path),d.path.length--,c=Xc;continue}d.username=r.username,d.password=r.password,d.host=r.host,d.port=r.port,d.path=ir(r.path),d.query=r.query,d.fragment="",c=tu}break;case Nc:if(!d.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){d.username=r.username,d.password=r.password,d.host=r.host,d.port=r.port,c=Xc;continue}c=Gc}else c=Dc;break;case Wc:if(c=Dc,"/"!=i||"/"!=rc(l,u+1))continue;u++;break;case Dc:if("/"!=i&&"\\"!=i){c=Gc;continue}break;case Gc:if("@"==i){h&&(l="%40"+l),h=!0,a=qd(l);for(var g=0;g<a.length;g++){var I=a[g];if(":"!=I||p){var m=jc(I,qc);p?d.password+=m:d.username+=m}else p=!0}l=""}else if(i==Id||"/"==i||"?"==i||"#"==i||"\\"==i&&d.isSpecial()){if(h&&""==l)return"Invalid authority";u-=qd(l).length+1,l="",c=Hc}else l+=i;break;case Hc:case Vc:if(t&&"file"==d.scheme){c=Jc;continue}if(":"!=i||f){if(i==Id||"/"==i||"?"==i||"#"==i||"\\"==i&&d.isSpecial()){if(d.isSpecial()&&""==l)return"Invalid host";if(t&&""==l&&(d.includesCredentials()||null!==d.port))return;if(o=d.parseHost(l))return o;if(l="",c=Qc,t)return;continue}"["==i?f=!0:"]"==i&&(f=!1),l+=i}else{if(""==l)return"Invalid host";if(o=d.parseHost(l))return o;if(l="",c=$c,t==Vc)return}break;case $c:if(!nc(Ic,i)){if(i==Id||"/"==i||"?"==i||"#"==i||"\\"==i&&d.isSpecial()||t){if(""!=l){var v=Zd(l,10);if(v>65535)return"Invalid port";d.port=d.isSpecial()&&v===Sc[d.scheme]?null:v,l=""}if(t)return;c=Qc;continue}return"Invalid port"}l+=i;break;case Yc:if(d.scheme="file","/"==i||"\\"==i)c=Kc;else{if(!r||"file"!=r.scheme){c=Xc;continue}if(i==Id)d.host=r.host,d.path=ir(r.path),d.query=r.query;else if("?"==i)d.host=r.host,d.path=ir(r.path),d.query="",c=eu;else{if("#"!=i){Mc(ic(ir(n,u),""))||(d.host=r.host,d.path=ir(r.path),d.shortenPath()),c=Xc;continue}d.host=r.host,d.path=ir(r.path),d.query=r.query,d.fragment="",c=tu}}break;case Kc:if("/"==i||"\\"==i){c=Jc;break}r&&"file"==r.scheme&&!Mc(ic(ir(n,u),""))&&(Tc(r.path[0],!0)?sc(d.path,r.path[0]):d.host=r.host),c=Xc;continue;case Jc:if(i==Id||"/"==i||"\\"==i||"?"==i||"#"==i){if(!t&&Tc(l))c=Xc;else if(""==l){if(d.host="",t)return;c=Qc}else{if(o=d.parseHost(l))return o;if("localhost"==d.host&&(d.host=""),t)return;l="",c=Qc}continue}l+=i;break;case Qc:if(d.isSpecial()){if(c=Xc,"/"!=i&&"\\"!=i)continue}else if(t||"?"!=i)if(t||"#"!=i){if(i!=Id&&(c=Xc,"/"!=i))continue}else d.fragment="",c=tu;else d.query="",c=eu;break;case Xc:if(i==Id||"/"==i||"\\"==i&&d.isSpecial()||!t&&("?"==i||"#"==i)){if(".."===(s=hc(s=l))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(d.shortenPath(),"/"==i||"\\"==i&&d.isSpecial()||sc(d.path,"")):Ac(l)?"/"==i||"\\"==i&&d.isSpecial()||sc(d.path,""):("file"==d.scheme&&!d.path.length&&Tc(l)&&(d.host&&(d.host=""),l=rc(l,0)+":"),sc(d.path,l)),l="","file"==d.scheme&&(i==Id||"?"==i||"#"==i))for(;d.path.length>1&&""===d.path[0];)cc(d.path);"?"==i?(d.query="",c=eu):"#"==i&&(d.fragment="",c=tu)}else l+=jc(i,Ec);break;case Zc:"?"==i?(d.query="",c=eu):"#"==i?(d.fragment="",c=tu):i!=Id&&(d.path[0]+=jc(i,Pc));break;case eu:t||"#"!=i?i!=Id&&("'"==i&&d.isSpecial()?d.query+="%27":d.query+="#"==i?"%23":jc(i,Pc)):(d.fragment="",c=tu);break;case tu:i!=Id&&(d.fragment+=jc(i,Oc))}u++}},parseHost:function(e){var t,r,n;if("["==rc(e,0)){if("]"!=rc(e,e.length-1))return"Invalid host";if(!(t=function(e){var t,r,n,i,a,o,s,d=[0,0,0,0,0,0,0,0],c=0,u=null,l=0,h=function(){return rc(e,l)};if(":"==h()){if(":"!=rc(e,1))return;l+=2,u=++c}for(;h();){if(8==c)return;if(":"!=h()){for(t=r=0;r<4&&nc(kc,h());)t=16*t+Zd(h(),16),l++,r++;if("."==h()){if(0==r)return;if(l-=r,c>6)return;for(n=0;h();){if(i=null,n>0){if(!("."==h()&&n<4))return;l++}if(!nc(Ic,h()))return;for(;nc(Ic,h());){if(a=Zd(h(),10),null===i)i=a;else{if(0==i)return;i=10*i+a}if(i>255)return;l++}d[c]=256*d[c]+i,2!=++n&&4!=n||c++}if(4!=n)return;break}if(":"==h()){if(l++,!h())return}else if(h())return;d[c++]=t}else{if(null!==u)return;l++,u=++c}}if(null!==u)for(o=c-u,c=7;0!=c&&o>0;)s=d[c],d[c--]=d[u+o-1],d[u+--o]=s;else if(8!=c)return;return d}(lc(e,1,-1))))return"Invalid host";this.host=t}else if(this.isSpecial()){if(e=function(e){var t,r,n=[],i=Nd(Fd(Wd(e),Sd,"."),".");for(t=0;t<i.length;t++)r=i[t],Ld(n,Ad(jd,r)?"xn--"+Hd(r):r);return Bd(n,".")}(e),nc(yc,e))return"Invalid host";if(null===(t=function(e){var t,r,n,i,a,o,s,d=uc(e,".");if(d.length&&""==d[d.length-1]&&d.length--,(t=d.length)>4)return e;for(r=[],n=0;n<t;n++){if(""==(i=d[n]))return e;if(a=10,i.length>1&&"0"==rc(i,0)&&(a=nc(mc,i)?16:8,i=lc(i,8==a?1:2)),""===i)o=0;else{if(!nc(10==a?bc:8==a?vc:kc,i))return e;o=Zd(i,a)}sc(r,o)}for(n=0;n<t;n++)if(o=r[n],n==t-1){if(o>=tc(256,5-t))return null}else if(o>255)return null;for(s=oc(r),n=0;n<r.length;n++)s+=r[n]*tc(256,3-n);return s}(e)))return"Invalid host";this.host=t}else{if(nc(xc,e))return"Invalid host";for(t="",r=qd(e),n=0;n<r.length;n++)t+=jc(r[n],Pc);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return oe(Sc,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&Tc(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,r=e.username,n=e.password,i=e.host,a=e.port,o=e.path,s=e.query,d=e.fragment,c=t+":";return null!==i?(c+="//",e.includesCredentials()&&(c+=r+(n?":"+n:"")+"@"),c+=Cc(i),null!==a&&(c+=":"+a)):"file"==t&&(c+="//"),c+=e.cannotBeABaseURL?o[0]:o.length?"/"+ic(o,"/"):"",null!==s&&(c+="?"+s),null!==d&&(c+="#"+d),c},setHref:function(e){var t=this.parse(e);if(t)throw Xd(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new nu(e.path[0]).origin}catch(e){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+Cc(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(Vt(e)+":",_c)},getUsername:function(){return this.username},setUsername:function(e){var t=qd(Vt(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<t.length;r++)this.username+=jc(t[r],qc)}},getPassword:function(){return this.password},setPassword:function(e){var t=qd(Vt(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<t.length;r++)this.password+=jc(t[r],qc)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?Cc(e):Cc(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,Hc)},getHostname:function(){var e=this.host;return null===e?"":Cc(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,Vc)},getPort:function(){var e=this.port;return null===e?"":Vt(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=Vt(e))?this.port=null:this.parse(e,$c))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+ic(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,Qc))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=Vt(e))?this.query=null:("?"==rc(e,0)&&(e=lc(e,1)),this.query="",this.parse(e,eu)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=Vt(e))?("#"==rc(e,0)&&(e=lc(e,1)),this.fragment="",this.parse(e,tu)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var nu=function(e){var t=Ba(this,iu),r=Ga(arguments.length,1)>1?arguments[1]:void 0,n=$d(t,new ru(e,!1,r));u||(t.href=n.serialize(),t.origin=n.getOrigin(),t.protocol=n.getProtocol(),t.username=n.getUsername(),t.password=n.getPassword(),t.host=n.getHost(),t.hostname=n.getHostname(),t.port=n.getPort(),t.pathname=n.getPathname(),t.search=n.getSearch(),t.searchParams=n.getSearchParams(),t.hash=n.getHash())},iu=nu.prototype,au=function(e,t){return{get:function(){return Yd(this)[e]()},set:t&&function(e){return Yd(this)[t](e)},configurable:!0,enumerable:!0}};if(u&&(vd(iu,"href",au("serialize","setHref")),vd(iu,"origin",au("getOrigin")),vd(iu,"protocol",au("getProtocol","setProtocol")),vd(iu,"username",au("getUsername","setUsername")),vd(iu,"password",au("getPassword","setPassword")),vd(iu,"host",au("getHost","setHost")),vd(iu,"hostname",au("getHostname","setHostname")),vd(iu,"port",au("getPort","setPort")),vd(iu,"pathname",au("getPathname","setPathname")),vd(iu,"search",au("getSearch","setSearch")),vd(iu,"searchParams",au("getSearchParams")),vd(iu,"hash",au("getHash","setHash"))),it(iu,"toJSON",(function(){return Yd(this).serialize()}),{enumerable:!0}),it(iu,"toString",(function(){return Yd(this).serialize()}),{enumerable:!0}),Qd){var ou=Qd.createObjectURL,su=Qd.revokeObjectURL;ou&&it(nu,"createObjectURL",gr(ou,Qd)),su&&it(nu,"revokeObjectURL",gr(su,Qd))}function du(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=dd(e);if(t){var i=dd(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return sd(this,r)}}fr(nu,"URL"),_t({global:!0,constructor:!0,forced:!_a,sham:!u},{URL:nu}),ms("match",(function(e,t,r){return[function(t){var r=j(this),n=null==t?void 0:Q(t,e);return n?f(n,t,r):new RegExp(t)[e](Vt(r))},function(e){var n=qe(this),i=Vt(e),a=r(t,n,i);if(a.done)return a.value;if(!n.global)return Es(n,i);var o=n.unicode;n.lastIndex=0;for(var s,d=[],c=0;null!==(s=Es(n,i));){var u=Vt(s[0]);d[c]=u,""===u&&(n.lastIndex=bs(i,ft(n.lastIndex),o)),c++}return 0===c?null:d}]}));var cu=function(e){od(r,ld(URL));var t=du(r);function r(e,n,i){var a;return li(this,r),(a=t.call(this,r.renderTemplateUri("".concat(n,"/").concat(e).replace(/\/\/+/g,"/"),null==i?void 0:i.pathParams))).addQueryParams(null==i?void 0:i.queryParams),null!=i&&i.origin&&a.replaceOrigin(null==i?void 0:i.origin),a}return fi(r,[{key:"replaceOrigin",value:function(e){var t=new URL(e);this.protocol=t.protocol,this.host=t.host,this.pathname="".concat(t.pathname,"/").concat(this.pathname).replace(/\/\/+/g,"/")}},{key:"addQueryParams",value:function(e){var t=this;e&&Object.keys(e).forEach((function(r){var n=e[r];if(Array.isArray(n))if("refine"===r)for(var i=0;i<n.length;i+=1)t.searchParams.append(r,String(n[i]));else t.searchParams.append(r,n.join());else t.searchParams.append(r,String(n))}))}}],[{key:"renderTemplateUri",value:function(e,t){var r=t?e.replace(/\{([^\}]+)\}/g,(function(e,r){return String(t[r])})):e,n=/(\.|%2e|%2E|%252e|%252E)+(\/|%2f|%2F|%252f|%252F)+/g;return r.match(n)&&(console.warn("Path traversal attempt detected. Normalizing url"),r=r.replace(n,"")),r}}]),r}(),uu="commerce-sdk-isomorphic@3.3.0";function lu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function hu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?lu(Object(r),!0).forEach((function(t){pi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var fu=function(){function e(t){li(this,e),pi(this,"clientConfig",void 0);var r=hu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Fo(r)}var t,r,n,i,a,o,s,d,c,u,l,h,f,p,g,I,m,v,b,k,y,x,w,z,C,P,O,E,q,j,S,T,M,A,_,R,U;return fi(e,[{key:"createBasket",value:(U=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.taxMode?o.taxMode=n.taxMode:void 0!==i.taxMode&&(o.taxMode=i.taxMode),void 0!==n.temporary?o.temporary=n.temporary:void 0!==i.temporary&&(o.temporary=i.temporary),void 0===n.siteId){e.next=19;break}o.siteId=n.siteId,e.next=24;break;case 19:if(void 0===i.siteId){e.next=23;break}o.siteId=i.siteId,e.next=24;break;case 23:throw new Error("Missing required query parameter: siteId");case 24:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for createBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=hu(hu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=31,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 31:return c=e.sent,e.abrupt("return",c);case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return U.apply(this,arguments)})},{key:"transferBasket",value:(R=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.overrideExisting?o.overrideExisting=n.overrideExisting:void 0!==i.overrideExisting&&(o.overrideExisting=i.overrideExisting),void 0===n.siteId){e.next=18;break}o.siteId=n.siteId,e.next=23;break;case 18:if(void 0===i.siteId){e.next=22;break}o.siteId=i.siteId,e.next=23;break;case 22:throw new Error("Missing required query parameter: siteId");case 23:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for transferBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/actions/transfer",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=hu(hu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=30,md(s.toString(),{method:"POST",headers:d},this.clientConfig,r);case 30:return c=e.sent,e.abrupt("return",c);case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return R.apply(this,arguments)})},{key:"mergeBasket",value:(_=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.createDestinationBasket?o.createDestinationBasket=n.createDestinationBasket:void 0!==i.createDestinationBasket&&(o.createDestinationBasket=i.createDestinationBasket),void 0!==n.productItemMergeMode?o.productItemMergeMode=n.productItemMergeMode:void 0!==i.productItemMergeMode&&(o.productItemMergeMode=i.productItemMergeMode),void 0===n.siteId){e.next=19;break}o.siteId=n.siteId,e.next=24;break;case 19:if(void 0===i.siteId){e.next=23;break}o.siteId=i.siteId,e.next=24;break;case 23:throw new Error("Missing required query parameter: siteId");case 24:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for mergeBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/actions/merge",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=hu(hu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=31,md(s.toString(),{method:"POST",headers:d},this.clientConfig,r);case 31:return c=e.sent,e.abrupt("return",c);case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return _.apply(this,arguments)})},{key:"deleteBasket",value:(A=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for deleteBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=hu(hu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=37,md(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 37:if(c=e.sent,!r){e.next=40;break}return e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return A.apply(this,arguments)})},{key:"getBasket",value:(M=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=hu(hu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=38,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return M.apply(this,arguments)})},{key:"updateBasket",value:(T=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0!==n.removeExternalTax?o.removeExternalTax=n.removeExternalTax:void 0!==i.removeExternalTax&&(o.removeExternalTax=i.removeExternalTax),void 0===n.siteId){e.next=27;break}o.siteId=n.siteId,e.next=32;break;case 27:if(void 0===i.siteId){e.next=31;break}o.siteId=i.siteId,e.next=32;break;case 31:throw new Error("Missing required query parameter: siteId");case 32:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=hu(hu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=39,md(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 39:return c=e.sent,e.abrupt("return",c);case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return T.apply(this,arguments)})},{key:"updateAsAgentBasket",value:(S=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateAsAgentBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/agent",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=hu(hu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=38,md(s.toString(),{method:"PUT",headers:d},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return S.apply(this,arguments)})},{key:"updateBillingAddressForBasket",value:(j=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0!==n.useAsShipping?o.useAsShipping=n.useAsShipping:void 0!==i.useAsShipping&&(o.useAsShipping=i.useAsShipping),void 0!==n.removeExternalTax?o.removeExternalTax=n.removeExternalTax:void 0!==i.removeExternalTax&&(o.removeExternalTax=i.removeExternalTax),void 0===n.siteId){e.next=28;break}o.siteId=n.siteId,e.next=33;break;case 28:if(void 0===i.siteId){e.next=32;break}o.siteId=i.siteId,e.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateBillingAddressForBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/billing-address",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=hu(hu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=40,md(s.toString(),{method:"PUT",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 40:return c=e.sent,e.abrupt("return",c);case 42:case"end":return e.stop()}}),e,this)}))),function(e,t){return j.apply(this,arguments)})},{key:"addCouponToBasket",value:(q=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for addCouponToBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/coupons",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=hu(hu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=38,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return q.apply(this,arguments)})},{key:"removeCouponFromBasket",value:(E=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.couponItemId){e.next=25;break}a.couponItemId=n.couponItemId,e.next=30;break;case 25:if(void 0===i.couponItemId){e.next=29;break}a.couponItemId=i.couponItemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: couponItemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for removeCouponFromBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/coupons/{couponItemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=hu(hu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=47,md(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return E.apply(this,arguments)})},{key:"updateCustomerForBasket",value:(O=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateCustomerForBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/customer",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=hu(hu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=38,md(s.toString(),{method:"PUT",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return O.apply(this,arguments)})},{key:"addGiftCertificateItemToBasket",value:(P=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for addGiftCertificateItemToBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=hu(hu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=38,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return P.apply(this,arguments)})},{key:"removeGiftCertificateItemFromBasket",value:(C=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.giftCertificateItemId){e.next=25;break}a.giftCertificateItemId=n.giftCertificateItemId,e.next=30;break;case 25:if(void 0===i.giftCertificateItemId){e.next=29;break}a.giftCertificateItemId=i.giftCertificateItemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: giftCertificateItemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for removeGiftCertificateItemFromBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=hu(hu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=47,md(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return C.apply(this,arguments)})},{key:"updateGiftCertificateItemInBasket",value:(z=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.giftCertificateItemId){e.next=25;break}a.giftCertificateItemId=n.giftCertificateItemId,e.next=30;break;case 25:if(void 0===i.giftCertificateItemId){e.next=29;break}a.giftCertificateItemId=i.giftCertificateItemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: giftCertificateItemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateGiftCertificateItemInBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=hu(hu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=47,md(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return z.apply(this,arguments)})},{key:"addItemToBasket",value:(w=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for addItemToBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/items",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=hu(hu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=38,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return w.apply(this,arguments)})},{key:"updateItemsInBasket",value:(x=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0!==n.removeExternalTax?o.removeExternalTax=n.removeExternalTax:void 0!==i.removeExternalTax&&(o.removeExternalTax=i.removeExternalTax),void 0===n.siteId){e.next=27;break}o.siteId=n.siteId,e.next=32;break;case 27:if(void 0===i.siteId){e.next=31;break}o.siteId=i.siteId,e.next=32;break;case 31:throw new Error("Missing required query parameter: siteId");case 32:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateItemsInBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/items",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=hu(hu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=39,md(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 39:return c=e.sent,e.abrupt("return",c);case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return x.apply(this,arguments)})},{key:"removeItemFromBasket",value:(y=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.itemId){e.next=25;break}a.itemId=n.itemId,e.next=30;break;case 25:if(void 0===i.itemId){e.next=29;break}a.itemId=i.itemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: itemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for removeItemFromBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=hu(hu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=47,md(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return y.apply(this,arguments)})},{key:"updateItemInBasket",value:(k=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.itemId){e.next=25;break}a.itemId=n.itemId,e.next=30;break;case 25:if(void 0===i.itemId){e.next=29;break}a.itemId=i.itemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: itemId");case 30:if(o={},void 0!==n.removeExternalTax?o.removeExternalTax=n.removeExternalTax:void 0!==i.removeExternalTax&&(o.removeExternalTax=i.removeExternalTax),void 0===n.siteId){e.next=36;break}o.siteId=n.siteId,e.next=41;break;case 36:if(void 0===i.siteId){e.next=40;break}o.siteId=i.siteId,e.next=41;break;case 40:throw new Error("Missing required query parameter: siteId");case 41:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateItemInBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=hu(hu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=48,md(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 48:return c=e.sent,e.abrupt("return",c);case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return k.apply(this,arguments)})},{key:"addTaxesForBasketItem",value:(b=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.itemId){e.next=25;break}a.itemId=n.itemId,e.next=30;break;case 25:if(void 0===i.itemId){e.next=29;break}a.itemId=i.itemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: itemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for addTaxesForBasketItem: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}/taxes",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=hu(hu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=46,md(s.toString(),{method:"PUT",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 46:if(c=e.sent,!r){e.next=49;break}return e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"addPaymentInstrumentToBasket",value:(v=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for addPaymentInstrumentToBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/payment-instruments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=hu(hu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=38,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return v.apply(this,arguments)})},{key:"removePaymentInstrumentFromBasket",value:(m=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}a.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===i.paymentInstrumentId){e.next=29;break}a.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for removePaymentInstrumentFromBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=hu(hu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=47,md(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return m.apply(this,arguments)})},{key:"updatePaymentInstrumentInBasket",value:(I=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}a.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===i.paymentInstrumentId){e.next=29;break}a.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(o={},void 0!==n.removeExternalTax?o.removeExternalTax=n.removeExternalTax:void 0!==i.removeExternalTax&&(o.removeExternalTax=i.removeExternalTax),void 0===n.siteId){e.next=36;break}o.siteId=n.siteId,e.next=41;break;case 36:if(void 0===i.siteId){e.next=40;break}o.siteId=i.siteId,e.next=41;break;case 40:throw new Error("Missing required query parameter: siteId");case 41:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updatePaymentInstrumentInBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=hu(hu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=48,md(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 48:return c=e.sent,e.abrupt("return",c);case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return I.apply(this,arguments)})},{key:"getPaymentMethodsForBasket",value:(g=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPaymentMethodsForBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/payment-methods",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=hu(hu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=38,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"addPriceAdjustmentToBasket",value:(p=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for addPriceAdjustmentToBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/price-adjustments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=hu(hu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=38,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"removePriceAdjustmentFromBasket",value:(f=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.priceAdjustmentId){e.next=25;break}a.priceAdjustmentId=n.priceAdjustmentId,e.next=30;break;case 25:if(void 0===i.priceAdjustmentId){e.next=29;break}a.priceAdjustmentId=i.priceAdjustmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: priceAdjustmentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for removePriceAdjustmentFromBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/price-adjustments/{priceAdjustmentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=hu(hu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=47,md(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"updatePriceAdjustmentInBasket",value:(h=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.priceAdjustmentId){e.next=25;break}a.priceAdjustmentId=n.priceAdjustmentId,e.next=30;break;case 25:if(void 0===i.priceAdjustmentId){e.next=29;break}a.priceAdjustmentId=i.priceAdjustmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: priceAdjustmentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updatePriceAdjustmentInBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/price-adjustments/{priceAdjustmentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=hu(hu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=46,md(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 46:return c=e.sent,e.abrupt("return",c);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"getPriceBooksForBasket",value:(l=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPriceBooksForBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/price-books",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=hu(hu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=37,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 37:return c=e.sent,e.abrupt("return",c);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"addPriceBooksToBasket",value:(u=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for addPriceBooksToBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/price-books",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=hu(hu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=37,md(s.toString(),{method:"PUT",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 37:if(c=e.sent,!r){e.next=40;break}return e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"createShipmentForBasket",value:(c=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for createShipmentForBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/shipments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=hu(hu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=38,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"removeShipmentFromBasket",value:(d=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.shipmentId){e.next=25;break}a.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===i.shipmentId){e.next=29;break}a.shipmentId=i.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for removeShipmentFromBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=hu(hu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=47,md(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"updateShipmentForBasket",value:(s=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.shipmentId){e.next=25;break}a.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===i.shipmentId){e.next=29;break}a.shipmentId=i.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateShipmentForBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=hu(hu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=47,md(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"updateShippingAddressForShipment",value:(o=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.shipmentId){e.next=25;break}a.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===i.shipmentId){e.next=29;break}a.shipmentId=i.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(o={},void 0!==n.useAsBilling?o.useAsBilling=n.useAsBilling:void 0!==i.useAsBilling&&(o.useAsBilling=i.useAsBilling),void 0!==n.removeExternalTax?o.removeExternalTax=n.removeExternalTax:void 0!==i.removeExternalTax&&(o.removeExternalTax=i.removeExternalTax),void 0===n.siteId){e.next=37;break}o.siteId=n.siteId,e.next=42;break;case 37:if(void 0===i.siteId){e.next=41;break}o.siteId=i.siteId,e.next=42;break;case 41:throw new Error("Missing required query parameter: siteId");case 42:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateShippingAddressForShipment: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-address",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=hu(hu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=49,md(s.toString(),{method:"PUT",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 49:return c=e.sent,e.abrupt("return",c);case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"updateShippingMethodForShipment",value:(a=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.shipmentId){e.next=25;break}a.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===i.shipmentId){e.next=29;break}a.shipmentId=i.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateShippingMethodForShipment: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-method",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=hu(hu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=47,md(s.toString(),{method:"PUT",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"getShippingMethodsForShipment",value:(i=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.shipmentId){e.next=25;break}a.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===i.shipmentId){e.next=29;break}a.shipmentId=i.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getShippingMethodsForShipment: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-methods",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=hu(hu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=47,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"updateAsStorefrontBasket",value:(n=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0!==n.exchange?o.exchange=n.exchange:void 0!==i.exchange&&(o.exchange=i.exchange),void 0===n.siteId){e.next=27;break}o.siteId=n.siteId,e.next=32;break;case 27:if(void 0===i.siteId){e.next=31;break}o.siteId=i.siteId,e.next=32;break;case 31:throw new Error("Missing required query parameter: siteId");case 32:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateAsStorefrontBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/storefront",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=hu(hu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=39,md(s.toString(),{method:"PUT",headers:d},this.clientConfig,r);case 39:return c=e.sent,e.abrupt("return",c);case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getTaxesFromBasket",value:(r=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getTaxesFromBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/taxes",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=hu(hu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=37,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 37:return c=e.sent,e.abrupt("return",c);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"addTaxesForBasket",value:(t=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for addTaxesForBasket: ".concat(e))})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/taxes",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=hu(hu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=37,md(s.toString(),{method:"PUT",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 37:if(c=e.sent,!r){e.next=40;break}return e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function pu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function gu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?pu(Object(r),!0).forEach((function(t){pi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}pi(fu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-baskets/{version}"),pi(fu,"apiPaths",{createBasket:"/organizations/{organizationId}/baskets",transferBasket:"/organizations/{organizationId}/baskets/actions/transfer",mergeBasket:"/organizations/{organizationId}/baskets/actions/merge",deleteBasket:"/organizations/{organizationId}/baskets/{basketId}",getBasket:"/organizations/{organizationId}/baskets/{basketId}",updateBasket:"/organizations/{organizationId}/baskets/{basketId}",updateAsAgentBasket:"/organizations/{organizationId}/baskets/{basketId}/agent",updateBillingAddressForBasket:"/organizations/{organizationId}/baskets/{basketId}/billing-address",addCouponToBasket:"/organizations/{organizationId}/baskets/{basketId}/coupons",removeCouponFromBasket:"/organizations/{organizationId}/baskets/{basketId}/coupons/{couponItemId}",updateCustomerForBasket:"/organizations/{organizationId}/baskets/{basketId}/customer",addGiftCertificateItemToBasket:"/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items",removeGiftCertificateItemFromBasket:"/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}",updateGiftCertificateItemInBasket:"/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}",addItemToBasket:"/organizations/{organizationId}/baskets/{basketId}/items",updateItemsInBasket:"/organizations/{organizationId}/baskets/{basketId}/items",removeItemFromBasket:"/organizations/{organizationId}/baskets/{basketId}/items/{itemId}",updateItemInBasket:"/organizations/{organizationId}/baskets/{basketId}/items/{itemId}",addTaxesForBasketItem:"/organizations/{organizationId}/baskets/{basketId}/items/{itemId}/taxes",addPaymentInstrumentToBasket:"/organizations/{organizationId}/baskets/{basketId}/payment-instruments",removePaymentInstrumentFromBasket:"/organizations/{organizationId}/baskets/{basketId}/payment-instruments/{paymentInstrumentId}",updatePaymentInstrumentInBasket:"/organizations/{organizationId}/baskets/{basketId}/payment-instruments/{paymentInstrumentId}",getPaymentMethodsForBasket:"/organizations/{organizationId}/baskets/{basketId}/payment-methods",addPriceAdjustmentToBasket:"/organizations/{organizationId}/baskets/{basketId}/price-adjustments",removePriceAdjustmentFromBasket:"/organizations/{organizationId}/baskets/{basketId}/price-adjustments/{priceAdjustmentId}",updatePriceAdjustmentInBasket:"/organizations/{organizationId}/baskets/{basketId}/price-adjustments/{priceAdjustmentId}",getPriceBooksForBasket:"/organizations/{organizationId}/baskets/{basketId}/price-books",addPriceBooksToBasket:"/organizations/{organizationId}/baskets/{basketId}/price-books",createShipmentForBasket:"/organizations/{organizationId}/baskets/{basketId}/shipments",removeShipmentFromBasket:"/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}",updateShipmentForBasket:"/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}",updateShippingAddressForShipment:"/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-address",updateShippingMethodForShipment:"/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-method",getShippingMethodsForShipment:"/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-methods",updateAsStorefrontBasket:"/organizations/{organizationId}/baskets/{basketId}/storefront",getTaxesFromBasket:"/organizations/{organizationId}/baskets/{basketId}/taxes",addTaxesForBasket:"/organizations/{organizationId}/baskets/{basketId}/taxes"}),pi(fu,"paramKeys",{createBasket:["organizationId","taxMode","temporary","siteId","locale"],createBasketRequired:["organizationId","siteId"],transferBasket:["organizationId","overrideExisting","siteId","locale"],transferBasketRequired:["organizationId","siteId"],mergeBasket:["organizationId","createDestinationBasket","productItemMergeMode","siteId","locale"],mergeBasketRequired:["organizationId","siteId"],deleteBasket:["organizationId","basketId","siteId"],deleteBasketRequired:["organizationId","basketId","siteId"],getBasket:["organizationId","basketId","siteId","locale"],getBasketRequired:["organizationId","basketId","siteId"],updateBasket:["organizationId","basketId","removeExternalTax","siteId","locale"],updateBasketRequired:["organizationId","basketId","siteId"],updateAsAgentBasket:["organizationId","basketId","siteId","locale"],updateAsAgentBasketRequired:["organizationId","basketId","siteId"],updateBillingAddressForBasket:["organizationId","basketId","useAsShipping","removeExternalTax","siteId","locale"],updateBillingAddressForBasketRequired:["organizationId","basketId","siteId"],addCouponToBasket:["organizationId","basketId","siteId","locale"],addCouponToBasketRequired:["organizationId","basketId","siteId"],removeCouponFromBasket:["organizationId","basketId","couponItemId","siteId","locale"],removeCouponFromBasketRequired:["organizationId","basketId","couponItemId","siteId"],updateCustomerForBasket:["organizationId","basketId","siteId","locale"],updateCustomerForBasketRequired:["organizationId","basketId","siteId"],addGiftCertificateItemToBasket:["organizationId","basketId","siteId","locale"],addGiftCertificateItemToBasketRequired:["organizationId","basketId","siteId"],removeGiftCertificateItemFromBasket:["organizationId","basketId","giftCertificateItemId","siteId","locale"],removeGiftCertificateItemFromBasketRequired:["organizationId","basketId","giftCertificateItemId","siteId"],updateGiftCertificateItemInBasket:["organizationId","basketId","giftCertificateItemId","siteId","locale"],updateGiftCertificateItemInBasketRequired:["organizationId","basketId","giftCertificateItemId","siteId"],addItemToBasket:["organizationId","basketId","siteId","locale"],addItemToBasketRequired:["organizationId","basketId","siteId"],updateItemsInBasket:["organizationId","basketId","removeExternalTax","siteId","locale"],updateItemsInBasketRequired:["organizationId","basketId","siteId"],removeItemFromBasket:["organizationId","basketId","itemId","siteId","locale"],removeItemFromBasketRequired:["organizationId","basketId","itemId","siteId"],updateItemInBasket:["organizationId","basketId","itemId","removeExternalTax","siteId","locale"],updateItemInBasketRequired:["organizationId","basketId","itemId","siteId"],addTaxesForBasketItem:["organizationId","basketId","itemId","siteId"],addTaxesForBasketItemRequired:["organizationId","basketId","itemId","siteId"],addPaymentInstrumentToBasket:["organizationId","basketId","siteId","locale"],addPaymentInstrumentToBasketRequired:["organizationId","basketId","siteId"],removePaymentInstrumentFromBasket:["organizationId","basketId","paymentInstrumentId","siteId","locale"],removePaymentInstrumentFromBasketRequired:["organizationId","basketId","paymentInstrumentId","siteId"],updatePaymentInstrumentInBasket:["organizationId","basketId","paymentInstrumentId","removeExternalTax","siteId","locale"],updatePaymentInstrumentInBasketRequired:["organizationId","basketId","paymentInstrumentId","siteId"],getPaymentMethodsForBasket:["organizationId","basketId","siteId","locale"],getPaymentMethodsForBasketRequired:["organizationId","basketId","siteId"],addPriceAdjustmentToBasket:["organizationId","basketId","siteId","locale"],addPriceAdjustmentToBasketRequired:["organizationId","basketId","siteId"],removePriceAdjustmentFromBasket:["organizationId","basketId","priceAdjustmentId","siteId","locale"],removePriceAdjustmentFromBasketRequired:["organizationId","basketId","priceAdjustmentId","siteId"],updatePriceAdjustmentInBasket:["organizationId","basketId","priceAdjustmentId","siteId"],updatePriceAdjustmentInBasketRequired:["organizationId","basketId","priceAdjustmentId","siteId"],getPriceBooksForBasket:["organizationId","basketId","siteId"],getPriceBooksForBasketRequired:["organizationId","basketId","siteId"],addPriceBooksToBasket:["organizationId","basketId","siteId"],addPriceBooksToBasketRequired:["organizationId","basketId","siteId"],createShipmentForBasket:["organizationId","basketId","siteId","locale"],createShipmentForBasketRequired:["organizationId","basketId","siteId"],removeShipmentFromBasket:["organizationId","basketId","shipmentId","siteId","locale"],removeShipmentFromBasketRequired:["organizationId","basketId","shipmentId","siteId"],updateShipmentForBasket:["organizationId","basketId","shipmentId","siteId","locale"],updateShipmentForBasketRequired:["organizationId","basketId","shipmentId","siteId"],updateShippingAddressForShipment:["organizationId","basketId","shipmentId","useAsBilling","removeExternalTax","siteId","locale"],updateShippingAddressForShipmentRequired:["organizationId","basketId","shipmentId","siteId"],updateShippingMethodForShipment:["organizationId","basketId","shipmentId","siteId","locale"],updateShippingMethodForShipmentRequired:["organizationId","basketId","shipmentId","siteId"],getShippingMethodsForShipment:["organizationId","basketId","shipmentId","siteId","locale"],getShippingMethodsForShipmentRequired:["organizationId","basketId","shipmentId","siteId"],updateAsStorefrontBasket:["organizationId","basketId","exchange","siteId","locale"],updateAsStorefrontBasketRequired:["organizationId","basketId","siteId"],getTaxesFromBasket:["organizationId","basketId","siteId"],getTaxesFromBasketRequired:["organizationId","basketId","siteId"],addTaxesForBasket:["organizationId","basketId","siteId"],addTaxesForBasketRequired:["organizationId","basketId","siteId"]});var Iu=function(){function e(t){li(this,e),pi(this,"clientConfig",void 0);var r=gu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Fo(r)}var t,r,n,i;return fi(e,[{key:"getShopperContext",value:(i=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.usid){e.next=16;break}a.usid=n.usid,e.next=21;break;case 16:if(void 0===i.usid){e.next=20;break}a.usid=i.usid,e.next=21;break;case 20:throw new Error("Missing required path parameter: usid");case 21:return o={},void 0!==n.siteId?o.siteId=n.siteId:void 0!==i.siteId&&(o.siteId=i.siteId),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getShopperContext: ".concat(e))})),s=new cu("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=gu(gu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=29,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 29:return c=e.sent,e.abrupt("return",c);case 31:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"createShopperContext",value:(n=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.usid){e.next=16;break}a.usid=n.usid,e.next=21;break;case 16:if(void 0===i.usid){e.next=20;break}a.usid=i.usid,e.next=21;break;case 20:throw new Error("Missing required path parameter: usid");case 21:return o={},void 0!==n.siteId?o.siteId=n.siteId:void 0!==i.siteId&&(o.siteId=i.siteId),void 0!==n.evaluateContextWithClientIp?o.evaluateContextWithClientIp=n.evaluateContextWithClientIp:void 0!==i.evaluateContextWithClientIp&&(o.evaluateContextWithClientIp=i.evaluateContextWithClientIp),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for createShopperContext: ".concat(e))})),s=new cu("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=gu(gu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=30,md(s.toString(),{method:"PUT",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 30:return c=e.sent,e.abrupt("return",c);case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"deleteShopperContext",value:(r=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.usid){e.next=16;break}a.usid=n.usid,e.next=21;break;case 16:if(void 0===i.usid){e.next=20;break}a.usid=i.usid,e.next=21;break;case 20:throw new Error("Missing required path parameter: usid");case 21:return o={},void 0!==n.siteId?o.siteId=n.siteId:void 0!==i.siteId&&(o.siteId=i.siteId),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for deleteShopperContext: ".concat(e))})),s=new cu("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=gu(gu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=29,md(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 29:if(c=e.sent,!r){e.next=32;break}return e.abrupt("return",c);case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"updateShopperContext",value:(t=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.usid){e.next=16;break}a.usid=n.usid,e.next=21;break;case 16:if(void 0===i.usid){e.next=20;break}a.usid=i.usid,e.next=21;break;case 20:throw new Error("Missing required path parameter: usid");case 21:return o={},void 0!==n.siteId?o.siteId=n.siteId:void 0!==i.siteId&&(o.siteId=i.siteId),void 0!==n.evaluateContextWithClientIp?o.evaluateContextWithClientIp=n.evaluateContextWithClientIp:void 0!==i.evaluateContextWithClientIp&&(o.evaluateContextWithClientIp=i.evaluateContextWithClientIp),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateShopperContext: ".concat(e))})),s=new cu("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=gu(gu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=30,md(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 30:return c=e.sent,e.abrupt("return",c);case 32:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function mu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function vu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?mu(Object(r),!0).forEach((function(t){pi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}pi(Iu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/shopper/shopper-context/{version}"),pi(Iu,"apiPaths",{getShopperContext:"/organizations/{organizationId}/shopper-context/{usid}",createShopperContext:"/organizations/{organizationId}/shopper-context/{usid}",deleteShopperContext:"/organizations/{organizationId}/shopper-context/{usid}",updateShopperContext:"/organizations/{organizationId}/shopper-context/{usid}"}),pi(Iu,"paramKeys",{getShopperContext:["organizationId","usid","siteId"],getShopperContextRequired:["organizationId","usid"],createShopperContext:["organizationId","usid","siteId","evaluateContextWithClientIp"],createShopperContextRequired:["organizationId","usid"],deleteShopperContext:["organizationId","usid","siteId"],deleteShopperContextRequired:["organizationId","usid"],updateShopperContext:["organizationId","usid","siteId","evaluateContextWithClientIp"],updateShopperContextRequired:["organizationId","usid"]});var bu=function(){function e(t){li(this,e),pi(this,"clientConfig",void 0);var r=vu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Fo(r)}var t,r,n,i,a,o,s,d,c,u,l,h,f,p,g,I,m,v,b,k,y,x,w,z,C,P,O,E,q;return fi(e,[{key:"registerCustomer",value:(q=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for registerCustomer: ".concat(e))})),s=new cu("/organizations/{organizationId}/customers",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=vu(vu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=28,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 28:return c=e.sent,e.abrupt("return",c);case 30:case"end":return e.stop()}}),e,this)}))),function(e,t){return q.apply(this,arguments)})},{key:"resetPassword",value:(E=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for resetPassword: ".concat(e))})),s=new cu("/organizations/{organizationId}/customers/password/actions/reset",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=vu(vu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=28,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 28:if(c=e.sent,!r){e.next=31;break}return e.abrupt("return",c);case 31:case"end":return e.stop()}}),e,this)}))),function(e,t){return E.apply(this,arguments)})},{key:"getResetPasswordToken",value:(O=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getResetPasswordToken: ".concat(e))})),s=new cu("/organizations/{organizationId}/customers/password/actions/create-reset-token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=vu(vu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=28,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 28:return c=e.sent,e.abrupt("return",c);case 30:case"end":return e.stop()}}),e,this)}))),function(e,t){return O.apply(this,arguments)})},{key:"registerExternalProfile",value:(P=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for registerExternalProfile: ".concat(e))})),s=new cu("/organizations/{organizationId}/customers/external-profile",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=vu(vu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=28,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 28:return c=e.sent,e.abrupt("return",c);case 30:case"end":return e.stop()}}),e,this)}))),function(e,t){return P.apply(this,arguments)})},{key:"getExternalProfile",value:(C=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.externalId){e.next=17;break}o.externalId=n.externalId,e.next=22;break;case 17:if(void 0===i.externalId){e.next=21;break}o.externalId=i.externalId,e.next=22;break;case 21:throw new Error("Missing required query parameter: externalId");case 22:if(void 0===n.authenticationProviderId){e.next=26;break}o.authenticationProviderId=n.authenticationProviderId,e.next=31;break;case 26:if(void 0===i.authenticationProviderId){e.next=30;break}o.authenticationProviderId=i.authenticationProviderId,e.next=31;break;case 30:throw new Error("Missing required query parameter: authenticationProviderId");case 31:if(void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getExternalProfile: ".concat(e))})),s=new cu("/organizations/{organizationId}/customers/external-profile",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=vu(vu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=46,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 46:return c=e.sent,e.abrupt("return",c);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return C.apply(this,arguments)})},{key:"getCustomer",value:(z=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomer: ".concat(e))})),s=new cu("/organizations/{organizationId}/customers/{customerId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=vu(vu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=37,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 37:return c=e.sent,e.abrupt("return",c);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return z.apply(this,arguments)})},{key:"updateCustomer",value:(w=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateCustomer: ".concat(e))})),s=new cu("/organizations/{organizationId}/customers/{customerId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=vu(vu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=37,md(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 37:return c=e.sent,e.abrupt("return",c);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return w.apply(this,arguments)})},{key:"createCustomerAddress",value:(x=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for createCustomerAddress: ".concat(e))})),s=new cu("/organizations/{organizationId}/customers/{customerId}/addresses",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=vu(vu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=37,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 37:return c=e.sent,e.abrupt("return",c);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return x.apply(this,arguments)})},{key:"getCustomerAddress",value:(y=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.addressName){e.next=25;break}a.addressName=n.addressName,e.next=30;break;case 25:if(void 0===i.addressName){e.next=29;break}a.addressName=i.addressName,e.next=30;break;case 29:throw new Error("Missing required path parameter: addressName");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerAddress: ".concat(e))})),s=new cu("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=vu(vu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=46,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 46:return c=e.sent,e.abrupt("return",c);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return y.apply(this,arguments)})},{key:"removeCustomerAddress",value:(k=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.addressName){e.next=25;break}a.addressName=n.addressName,e.next=30;break;case 25:if(void 0===i.addressName){e.next=29;break}a.addressName=i.addressName,e.next=30;break;case 29:throw new Error("Missing required path parameter: addressName");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for removeCustomerAddress: ".concat(e))})),s=new cu("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=vu(vu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=46,md(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 46:if(c=e.sent,!r){e.next=49;break}return e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return k.apply(this,arguments)})},{key:"updateCustomerAddress",value:(b=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.addressName){e.next=25;break}a.addressName=n.addressName,e.next=30;break;case 25:if(void 0===i.addressName){e.next=29;break}a.addressName=i.addressName,e.next=30;break;case 29:throw new Error("Missing required path parameter: addressName");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateCustomerAddress: ".concat(e))})),s=new cu("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=vu(vu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=46,md(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 46:return c=e.sent,e.abrupt("return",c);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"getCustomerBaskets",value:(v=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerBaskets: ".concat(e))})),s=new cu("/organizations/{organizationId}/customers/{customerId}/baskets",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=vu(vu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=37,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 37:return c=e.sent,e.abrupt("return",c);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return v.apply(this,arguments)})},{key:"getCustomerOrders",value:(m=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0!==n.crossSites?o.crossSites=n.crossSites:void 0!==i.crossSites&&(o.crossSites=i.crossSites),void 0!==n.from?o.from=n.from:void 0!==i.from&&(o.from=i.from),void 0!==n.until?o.until=n.until:void 0!==i.until&&(o.until=i.until),void 0!==n.status?o.status=n.status:void 0!==i.status&&(o.status=i.status),void 0===n.siteId){e.next=30;break}o.siteId=n.siteId,e.next=35;break;case 30:if(void 0===i.siteId){e.next=34;break}o.siteId=i.siteId,e.next=35;break;case 34:throw new Error("Missing required query parameter: siteId");case 35:return void 0!==n.offset?o.offset=n.offset:void 0!==i.offset&&(o.offset=i.offset),void 0!==n.limit?o.limit=n.limit:void 0!==i.limit&&(o.limit=i.limit),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerOrders: ".concat(e))})),s=new cu("/organizations/{organizationId}/customers/{customerId}/orders",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=vu(vu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=43,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 43:return c=e.sent,e.abrupt("return",c);case 45:case"end":return e.stop()}}),e,this)}))),function(e,t){return m.apply(this,arguments)})},{key:"updateCustomerPassword",value:(I=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateCustomerPassword: ".concat(e))})),s=new cu("/organizations/{organizationId}/customers/{customerId}/password",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=vu(vu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=37,md(s.toString(),{method:"PUT",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 37:if(c=e.sent,!r){e.next=40;break}return e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return I.apply(this,arguments)})},{key:"createCustomerPaymentInstrument",value:(g=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for createCustomerPaymentInstrument: ".concat(e))})),s=new cu("/organizations/{organizationId}/customers/{customerId}/payment-instruments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=vu(vu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=37,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 37:return c=e.sent,e.abrupt("return",c);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"deleteCustomerPaymentInstrument",value:(p=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}a.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===i.paymentInstrumentId){e.next=29;break}a.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for deleteCustomerPaymentInstrument: ".concat(e))})),s=new cu("/organizations/{organizationId}/customers/{customerId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=vu(vu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=46,md(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 46:if(c=e.sent,!r){e.next=49;break}return e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"getCustomerPaymentInstrument",value:(f=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}a.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===i.paymentInstrumentId){e.next=29;break}a.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerPaymentInstrument: ".concat(e))})),s=new cu("/organizations/{organizationId}/customers/{customerId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=vu(vu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=46,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 46:return c=e.sent,e.abrupt("return",c);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"getCustomerProductLists",value:(h=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerProductLists: ".concat(e))})),s=new cu("/organizations/{organizationId}/customers/{customerId}/product-lists",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=vu(vu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=37,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 37:return c=e.sent,e.abrupt("return",c);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"createCustomerProductList",value:(l=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for createCustomerProductList: ".concat(e))})),s=new cu("/organizations/{organizationId}/customers/{customerId}/product-lists",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=vu(vu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=37,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 37:return c=e.sent,e.abrupt("return",c);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"deleteCustomerProductList",value:(u=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}a.listId=n.listId,e.next=30;break;case 25:if(void 0===i.listId){e.next=29;break}a.listId=i.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for deleteCustomerProductList: ".concat(e))})),s=new cu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=vu(vu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=46,md(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 46:if(c=e.sent,!r){e.next=49;break}return e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"getCustomerProductList",value:(c=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}a.listId=n.listId,e.next=30;break;case 25:if(void 0===i.listId){e.next=29;break}a.listId=i.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerProductList: ".concat(e))})),s=new cu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=vu(vu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=46,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 46:return c=e.sent,e.abrupt("return",c);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"updateCustomerProductList",value:(d=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}a.listId=n.listId,e.next=30;break;case 25:if(void 0===i.listId){e.next=29;break}a.listId=i.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateCustomerProductList: ".concat(e))})),s=new cu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=vu(vu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=46,md(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 46:return c=e.sent,e.abrupt("return",c);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"createCustomerProductListItem",value:(s=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}a.listId=n.listId,e.next=30;break;case 25:if(void 0===i.listId){e.next=29;break}a.listId=i.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for createCustomerProductListItem: ".concat(e))})),s=new cu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=vu(vu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=46,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 46:return c=e.sent,e.abrupt("return",c);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"deleteCustomerProductListItem",value:(o=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}a.listId=n.listId,e.next=30;break;case 25:if(void 0===i.listId){e.next=29;break}a.listId=i.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(void 0===n.itemId){e.next=34;break}a.itemId=n.itemId,e.next=39;break;case 34:if(void 0===i.itemId){e.next=38;break}a.itemId=i.itemId,e.next=39;break;case 38:throw new Error("Missing required path parameter: itemId");case 39:if(o={},void 0===n.siteId){e.next=44;break}o.siteId=n.siteId,e.next=49;break;case 44:if(void 0===i.siteId){e.next=48;break}o.siteId=i.siteId,e.next=49;break;case 48:throw new Error("Missing required query parameter: siteId");case 49:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for deleteCustomerProductListItem: ".concat(e))})),s=new cu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=vu(vu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=55,md(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 55:if(c=e.sent,!r){e.next=58;break}return e.abrupt("return",c);case 58:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"getCustomerProductListItem",value:(a=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}a.listId=n.listId,e.next=30;break;case 25:if(void 0===i.listId){e.next=29;break}a.listId=i.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(void 0===n.itemId){e.next=34;break}a.itemId=n.itemId,e.next=39;break;case 34:if(void 0===i.itemId){e.next=38;break}a.itemId=i.itemId,e.next=39;break;case 38:throw new Error("Missing required path parameter: itemId");case 39:if(o={},void 0===n.siteId){e.next=44;break}o.siteId=n.siteId,e.next=49;break;case 44:if(void 0===i.siteId){e.next=48;break}o.siteId=i.siteId,e.next=49;break;case 48:throw new Error("Missing required query parameter: siteId");case 49:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerProductListItem: ".concat(e))})),s=new cu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=vu(vu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=55,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 55:return c=e.sent,e.abrupt("return",c);case 57:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"updateCustomerProductListItem",value:(i=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}a.listId=n.listId,e.next=30;break;case 25:if(void 0===i.listId){e.next=29;break}a.listId=i.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(void 0===n.itemId){e.next=34;break}a.itemId=n.itemId,e.next=39;break;case 34:if(void 0===i.itemId){e.next=38;break}a.itemId=i.itemId,e.next=39;break;case 38:throw new Error("Missing required path parameter: itemId");case 39:if(o={},void 0===n.siteId){e.next=44;break}o.siteId=n.siteId,e.next=49;break;case 44:if(void 0===i.siteId){e.next=48;break}o.siteId=i.siteId,e.next=49;break;case 48:throw new Error("Missing required query parameter: siteId");case 49:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateCustomerProductListItem: ".concat(e))})),s=new cu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=vu(vu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=55,md(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 55:return c=e.sent,e.abrupt("return",c);case 57:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getPublicProductListsBySearchTerm",value:(n=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.email?o.email=n.email:void 0!==i.email&&(o.email=i.email),void 0!==n.firstName?o.firstName=n.firstName:void 0!==i.firstName&&(o.firstName=i.firstName),void 0!==n.lastName?o.lastName=n.lastName:void 0!==i.lastName&&(o.lastName=i.lastName),void 0===n.siteId){e.next=20;break}o.siteId=n.siteId,e.next=25;break;case 20:if(void 0===i.siteId){e.next=24;break}o.siteId=i.siteId,e.next=25;break;case 24:throw new Error("Missing required query parameter: siteId");case 25:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPublicProductListsBySearchTerm: ".concat(e))})),s=new cu("/organizations/{organizationId}/product-lists",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=vu(vu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=31,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 31:return c=e.sent,e.abrupt("return",c);case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getPublicProductList",value:(r=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.listId){e.next=16;break}a.listId=n.listId,e.next=21;break;case 16:if(void 0===i.listId){e.next=20;break}a.listId=i.listId,e.next=21;break;case 20:throw new Error("Missing required path parameter: listId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPublicProductList: ".concat(e))})),s=new cu("/organizations/{organizationId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=vu(vu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=37,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 37:return c=e.sent,e.abrupt("return",c);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getProductListItem",value:(t=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.listId){e.next=16;break}a.listId=n.listId,e.next=21;break;case 16:if(void 0===i.listId){e.next=20;break}a.listId=i.listId,e.next=21;break;case 20:throw new Error("Missing required path parameter: listId");case 21:if(void 0===n.itemId){e.next=25;break}a.itemId=n.itemId,e.next=30;break;case 25:if(void 0===i.itemId){e.next=29;break}a.itemId=i.itemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: itemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getProductListItem: ".concat(e))})),s=new cu("/organizations/{organizationId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=vu(vu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=46,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 46:return c=e.sent,e.abrupt("return",c);case 48:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function ku(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function yu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ku(Object(r),!0).forEach((function(t){pi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ku(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}pi(bu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/customer/shopper-customers/{version}"),pi(bu,"apiPaths",{registerCustomer:"/organizations/{organizationId}/customers",resetPassword:"/organizations/{organizationId}/customers/password/actions/reset",getResetPasswordToken:"/organizations/{organizationId}/customers/password/actions/create-reset-token",registerExternalProfile:"/organizations/{organizationId}/customers/external-profile",getExternalProfile:"/organizations/{organizationId}/customers/external-profile",getCustomer:"/organizations/{organizationId}/customers/{customerId}",updateCustomer:"/organizations/{organizationId}/customers/{customerId}",createCustomerAddress:"/organizations/{organizationId}/customers/{customerId}/addresses",getCustomerAddress:"/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",removeCustomerAddress:"/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",updateCustomerAddress:"/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",getCustomerBaskets:"/organizations/{organizationId}/customers/{customerId}/baskets",getCustomerOrders:"/organizations/{organizationId}/customers/{customerId}/orders",updateCustomerPassword:"/organizations/{organizationId}/customers/{customerId}/password",createCustomerPaymentInstrument:"/organizations/{organizationId}/customers/{customerId}/payment-instruments",deleteCustomerPaymentInstrument:"/organizations/{organizationId}/customers/{customerId}/payment-instruments/{paymentInstrumentId}",getCustomerPaymentInstrument:"/organizations/{organizationId}/customers/{customerId}/payment-instruments/{paymentInstrumentId}",getCustomerProductLists:"/organizations/{organizationId}/customers/{customerId}/product-lists",createCustomerProductList:"/organizations/{organizationId}/customers/{customerId}/product-lists",deleteCustomerProductList:"/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",getCustomerProductList:"/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",updateCustomerProductList:"/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",createCustomerProductListItem:"/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items",deleteCustomerProductListItem:"/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",getCustomerProductListItem:"/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",updateCustomerProductListItem:"/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",getPublicProductListsBySearchTerm:"/organizations/{organizationId}/product-lists",getPublicProductList:"/organizations/{organizationId}/product-lists/{listId}",getProductListItem:"/organizations/{organizationId}/product-lists/{listId}/items/{itemId}"}),pi(bu,"paramKeys",{registerCustomer:["organizationId","siteId"],registerCustomerRequired:["organizationId","siteId"],resetPassword:["organizationId","siteId"],resetPasswordRequired:["organizationId","siteId"],getResetPasswordToken:["organizationId","siteId"],getResetPasswordTokenRequired:["organizationId","siteId"],registerExternalProfile:["organizationId","siteId"],registerExternalProfileRequired:["organizationId","siteId"],getExternalProfile:["organizationId","externalId","authenticationProviderId","siteId"],getExternalProfileRequired:["organizationId","externalId","authenticationProviderId","siteId"],getCustomer:["organizationId","customerId","siteId"],getCustomerRequired:["organizationId","customerId","siteId"],updateCustomer:["organizationId","customerId","siteId"],updateCustomerRequired:["organizationId","customerId","siteId"],createCustomerAddress:["organizationId","customerId","siteId"],createCustomerAddressRequired:["organizationId","customerId","siteId"],getCustomerAddress:["organizationId","customerId","addressName","siteId"],getCustomerAddressRequired:["organizationId","customerId","addressName","siteId"],removeCustomerAddress:["organizationId","customerId","addressName","siteId"],removeCustomerAddressRequired:["organizationId","customerId","addressName","siteId"],updateCustomerAddress:["organizationId","customerId","addressName","siteId"],updateCustomerAddressRequired:["organizationId","customerId","addressName","siteId"],getCustomerBaskets:["organizationId","customerId","siteId"],getCustomerBasketsRequired:["organizationId","customerId","siteId"],getCustomerOrders:["organizationId","customerId","crossSites","from","until","status","siteId","offset","limit"],getCustomerOrdersRequired:["organizationId","customerId","siteId"],updateCustomerPassword:["organizationId","customerId","siteId"],updateCustomerPasswordRequired:["organizationId","customerId","siteId"],createCustomerPaymentInstrument:["organizationId","customerId","siteId"],createCustomerPaymentInstrumentRequired:["organizationId","customerId","siteId"],deleteCustomerPaymentInstrument:["organizationId","customerId","paymentInstrumentId","siteId"],deleteCustomerPaymentInstrumentRequired:["organizationId","customerId","paymentInstrumentId","siteId"],getCustomerPaymentInstrument:["organizationId","customerId","paymentInstrumentId","siteId"],getCustomerPaymentInstrumentRequired:["organizationId","customerId","paymentInstrumentId","siteId"],getCustomerProductLists:["organizationId","customerId","siteId"],getCustomerProductListsRequired:["organizationId","customerId","siteId"],createCustomerProductList:["organizationId","customerId","siteId"],createCustomerProductListRequired:["organizationId","customerId","siteId"],deleteCustomerProductList:["organizationId","customerId","listId","siteId"],deleteCustomerProductListRequired:["organizationId","customerId","listId","siteId"],getCustomerProductList:["organizationId","customerId","listId","siteId"],getCustomerProductListRequired:["organizationId","customerId","listId","siteId"],updateCustomerProductList:["organizationId","customerId","listId","siteId"],updateCustomerProductListRequired:["organizationId","customerId","listId","siteId"],createCustomerProductListItem:["organizationId","customerId","listId","siteId"],createCustomerProductListItemRequired:["organizationId","customerId","listId","siteId"],deleteCustomerProductListItem:["organizationId","customerId","listId","itemId","siteId"],deleteCustomerProductListItemRequired:["organizationId","customerId","listId","itemId","siteId"],getCustomerProductListItem:["organizationId","customerId","listId","itemId","siteId"],getCustomerProductListItemRequired:["organizationId","customerId","listId","itemId","siteId"],updateCustomerProductListItem:["organizationId","customerId","listId","itemId","siteId"],updateCustomerProductListItemRequired:["organizationId","customerId","listId","itemId","siteId"],getPublicProductListsBySearchTerm:["organizationId","email","firstName","lastName","siteId"],getPublicProductListsBySearchTermRequired:["organizationId","siteId"],getPublicProductList:["organizationId","listId","siteId"],getPublicProductListRequired:["organizationId","listId","siteId"],getProductListItem:["organizationId","listId","itemId","siteId"],getProductListItemRequired:["organizationId","listId","itemId","siteId"]});var xu=function(){function e(t){li(this,e),pi(this,"clientConfig",void 0);var r=yu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Fo(r)}var t,r;return fi(e,[{key:"retrieveResults",value:(r=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.channelId){e.next=16;break}a.channelId=n.channelId,e.next=21;break;case 16:if(void 0===i.channelId){e.next=20;break}a.channelId=i.channelId,e.next=21;break;case 20:throw new Error("Missing required path parameter: channelId");case 21:if(o={},void 0===n.locale){e.next=26;break}o.locale=n.locale,e.next=31;break;case 26:if(void 0===i.locale){e.next=30;break}o.locale=i.locale,e.next=31;break;case 30:throw new Error("Missing required query parameter: locale");case 31:return void 0!==n.offset?o.offset=n.offset:void 0!==i.offset&&(o.offset=i.offset),void 0!==n.limit?o.limit=n.limit:void 0!==i.limit&&(o.limit=i.limit),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for retrieveResults: ".concat(e))})),s=new cu("/organizations/{organizationId}/channels/{channelId}/results",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=yu(yu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=39,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 39:return c=e.sent,e.abrupt("return",c);case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getSuggestions",value:(t=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.channelId){e.next=16;break}a.channelId=n.channelId,e.next=21;break;case 16:if(void 0===i.channelId){e.next=20;break}a.channelId=i.channelId,e.next=21;break;case 20:throw new Error("Missing required path parameter: channelId");case 21:if(o={},void 0===n.suggestionTypes){e.next=26;break}o.suggestionTypes=n.suggestionTypes,e.next=31;break;case 26:if(void 0===i.suggestionTypes){e.next=30;break}o.suggestionTypes=i.suggestionTypes,e.next=31;break;case 30:throw new Error("Missing required query parameter: suggestionTypes");case 31:if(void 0!==n.searchText?o.searchText=n.searchText:void 0!==i.searchText&&(o.searchText=i.searchText),void 0===n.locale){e.next=36;break}o.locale=n.locale,e.next=41;break;case 36:if(void 0===i.locale){e.next=40;break}o.locale=i.locale,e.next=41;break;case 40:throw new Error("Missing required query parameter: locale");case 41:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getSuggestions: ".concat(e))})),s=new cu("/organizations/{organizationId}/channels/{channelId}/suggestions",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=yu(yu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=47,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function wu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function zu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?wu(Object(r),!0).forEach((function(t){pi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}pi(xu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/discovery/query/{version}"),pi(xu,"apiPaths",{retrieveResults:"/organizations/{organizationId}/channels/{channelId}/results",getSuggestions:"/organizations/{organizationId}/channels/{channelId}/suggestions"}),pi(xu,"paramKeys",{retrieveResults:["organizationId","channelId","locale","offset","limit"],retrieveResultsRequired:["organizationId","channelId","locale"],getSuggestions:["organizationId","channelId","suggestionTypes","searchText","locale"],getSuggestionsRequired:["organizationId","channelId","suggestionTypes","locale"]});var Cu=function(){function e(t){li(this,e),pi(this,"clientConfig",void 0);var r=zu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Fo(r)}var t,r;return fi(e,[{key:"getPages",value:(r=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.categoryId?o.categoryId=n.categoryId:void 0!==i.categoryId&&(o.categoryId=i.categoryId),void 0!==n.productId?o.productId=n.productId:void 0!==i.productId&&(o.productId=i.productId),void 0===n.aspectTypeId){e.next=19;break}o.aspectTypeId=n.aspectTypeId,e.next=24;break;case 19:if(void 0===i.aspectTypeId){e.next=23;break}o.aspectTypeId=i.aspectTypeId,e.next=24;break;case 23:throw new Error("Missing required query parameter: aspectTypeId");case 24:if(void 0!==n.aspectAttributes?o.aspectAttributes=n.aspectAttributes:void 0!==i.aspectAttributes&&(o.aspectAttributes=i.aspectAttributes),void 0!==n.parameters?o.parameters=n.parameters:void 0!==i.parameters&&(o.parameters=i.parameters),void 0===n.siteId){e.next=30;break}o.siteId=n.siteId,e.next=35;break;case 30:if(void 0===i.siteId){e.next=34;break}o.siteId=i.siteId,e.next=35;break;case 34:throw new Error("Missing required query parameter: siteId");case 35:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPages: ".concat(e))})),s=new cu("/organizations/{organizationId}/pages",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=zu(zu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=42,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 42:return c=e.sent,e.abrupt("return",c);case 44:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getPage",value:(t=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.pageId){e.next=16;break}a.pageId=n.pageId,e.next=21;break;case 16:if(void 0===i.pageId){e.next=20;break}a.pageId=i.pageId,e.next=21;break;case 20:throw new Error("Missing required path parameter: pageId");case 21:if(o={},void 0!==n.aspectAttributes?o.aspectAttributes=n.aspectAttributes:void 0!==i.aspectAttributes&&(o.aspectAttributes=i.aspectAttributes),void 0!==n.parameters?o.parameters=n.parameters:void 0!==i.parameters&&(o.parameters=i.parameters),void 0===n.siteId){e.next=28;break}o.siteId=n.siteId,e.next=33;break;case 28:if(void 0===i.siteId){e.next=32;break}o.siteId=i.siteId,e.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPage: ".concat(e))})),s=new cu("/organizations/{organizationId}/pages/{pageId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=zu(zu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=40,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 40:return c=e.sent,e.abrupt("return",c);case 42:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function Pu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ou(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Pu(Object(r),!0).forEach((function(t){pi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}pi(Cu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/experience/shopper-experience/{version}"),pi(Cu,"apiPaths",{getPages:"/organizations/{organizationId}/pages",getPage:"/organizations/{organizationId}/pages/{pageId}"}),pi(Cu,"paramKeys",{getPages:["organizationId","categoryId","productId","aspectTypeId","aspectAttributes","parameters","siteId","locale"],getPagesRequired:["organizationId","aspectTypeId","siteId"],getPage:["organizationId","pageId","aspectAttributes","parameters","siteId","locale"],getPageRequired:["organizationId","pageId","siteId"]});var Eu=function(){function e(t){li(this,e),pi(this,"clientConfig",void 0);var r=Ou({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Fo(r)}var t;return fi(e,[{key:"getGiftCertificate",value:(t=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getGiftCertificate: ".concat(e))})),s=new cu("/organizations/{organizationId}/gift-certificate",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Ou(Ou({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=28,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 28:return c=e.sent,e.abrupt("return",c);case 30:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function qu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ju(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?qu(Object(r),!0).forEach((function(t){pi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}pi(Eu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/pricing/shopper-gift-certificates/{version}"),pi(Eu,"apiPaths",{getGiftCertificate:"/organizations/{organizationId}/gift-certificate"}),pi(Eu,"paramKeys",{getGiftCertificate:["organizationId","siteId"],getGiftCertificateRequired:["organizationId","siteId"]});var Su=function(){function e(t){li(this,e),pi(this,"clientConfig",void 0);var r=ju({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Fo(r)}var t,r,n,i,a,o,s,d;return fi(e,[{key:"createOrder",value:(d=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for createOrder: ".concat(e))})),s=new cu("/organizations/{organizationId}/orders",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ju(ju({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=29,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 29:return c=e.sent,e.abrupt("return",c);case 31:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"getOrder",value:(s=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}a.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===i.orderNo){e.next=20;break}a.orderNo=i.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getOrder: ".concat(e))})),s=new cu("/organizations/{organizationId}/orders/{orderNo}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ju(ju({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=38,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"guestOrderLookup",value:(o=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}a.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===i.orderNo){e.next=20;break}a.orderNo=i.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for guestOrderLookup: ".concat(e))})),s=new cu("/organizations/{organizationId}/orders/{orderNo}/lookup",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ju(ju({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=38,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"createPaymentInstrumentForOrder",value:(a=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}a.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===i.orderNo){e.next=20;break}a.orderNo=i.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for createPaymentInstrumentForOrder: ".concat(e))})),s=new cu("/organizations/{organizationId}/orders/{orderNo}/payment-instruments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ju(ju({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=38,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"removePaymentInstrumentFromOrder",value:(i=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}a.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===i.orderNo){e.next=20;break}a.orderNo=i.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}a.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===i.paymentInstrumentId){e.next=29;break}a.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for removePaymentInstrumentFromOrder: ".concat(e))})),s=new cu("/organizations/{organizationId}/orders/{orderNo}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ju(ju({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=47,md(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"updatePaymentInstrumentForOrder",value:(n=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}a.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===i.orderNo){e.next=20;break}a.orderNo=i.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}a.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===i.paymentInstrumentId){e.next=29;break}a.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updatePaymentInstrumentForOrder: ".concat(e))})),s=new cu("/organizations/{organizationId}/orders/{orderNo}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ju(ju({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=47,md(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getPaymentMethodsForOrder",value:(r=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}a.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===i.orderNo){e.next=20;break}a.orderNo=i.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPaymentMethodsForOrder: ".concat(e))})),s=new cu("/organizations/{organizationId}/orders/{orderNo}/payment-methods",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ju(ju({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=38,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getTaxesFromOrder",value:(t=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}a.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===i.orderNo){e.next=20;break}a.orderNo=i.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getTaxesFromOrder: ".concat(e))})),s=new cu("/organizations/{organizationId}/orders/{orderNo}/taxes",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ju(ju({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=37,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 37:return c=e.sent,e.abrupt("return",c);case 39:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function Tu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Mu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Tu(Object(r),!0).forEach((function(t){pi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Tu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}pi(Su,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-orders/{version}"),pi(Su,"apiPaths",{createOrder:"/organizations/{organizationId}/orders",getOrder:"/organizations/{organizationId}/orders/{orderNo}",guestOrderLookup:"/organizations/{organizationId}/orders/{orderNo}/lookup",createPaymentInstrumentForOrder:"/organizations/{organizationId}/orders/{orderNo}/payment-instruments",removePaymentInstrumentFromOrder:"/organizations/{organizationId}/orders/{orderNo}/payment-instruments/{paymentInstrumentId}",updatePaymentInstrumentForOrder:"/organizations/{organizationId}/orders/{orderNo}/payment-instruments/{paymentInstrumentId}",getPaymentMethodsForOrder:"/organizations/{organizationId}/orders/{orderNo}/payment-methods",getTaxesFromOrder:"/organizations/{organizationId}/orders/{orderNo}/taxes"}),pi(Su,"paramKeys",{createOrder:["organizationId","siteId","locale"],createOrderRequired:["organizationId","siteId"],getOrder:["organizationId","orderNo","siteId","locale"],getOrderRequired:["organizationId","orderNo","siteId"],guestOrderLookup:["organizationId","orderNo","siteId","locale"],guestOrderLookupRequired:["organizationId","orderNo","siteId"],createPaymentInstrumentForOrder:["organizationId","orderNo","siteId","locale"],createPaymentInstrumentForOrderRequired:["organizationId","orderNo","siteId"],removePaymentInstrumentFromOrder:["organizationId","orderNo","paymentInstrumentId","siteId","locale"],removePaymentInstrumentFromOrderRequired:["organizationId","orderNo","paymentInstrumentId","siteId"],updatePaymentInstrumentForOrder:["organizationId","orderNo","paymentInstrumentId","siteId","locale"],updatePaymentInstrumentForOrderRequired:["organizationId","orderNo","paymentInstrumentId","siteId"],getPaymentMethodsForOrder:["organizationId","orderNo","siteId","locale"],getPaymentMethodsForOrderRequired:["organizationId","orderNo","siteId"],getTaxesFromOrder:["organizationId","orderNo","siteId"],getTaxesFromOrderRequired:["organizationId","orderNo","siteId"]});var Au=function(){function e(t){li(this,e),pi(this,"clientConfig",void 0);var r=Mu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Fo(r)}var t,r,n,i;return fi(e,[{key:"getProducts",value:(i=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.select?o.select=n.select:void 0!==i.select&&(o.select=i.select),void 0===n.ids){e.next=18;break}o.ids=n.ids,e.next=23;break;case 18:if(void 0===i.ids){e.next=22;break}o.ids=i.ids,e.next=23;break;case 22:throw new Error("Missing required query parameter: ids");case 23:if(void 0!==n.inventoryIds?o.inventoryIds=n.inventoryIds:void 0!==i.inventoryIds&&(o.inventoryIds=i.inventoryIds),void 0!==n.currency?o.currency=n.currency:void 0!==i.currency&&(o.currency=i.currency),void 0!==n.expand?o.expand=n.expand:void 0!==i.expand&&(o.expand=i.expand),void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),void 0!==n.allImages?o.allImages=n.allImages:void 0!==i.allImages&&(o.allImages=i.allImages),void 0!==n.perPricebook?o.perPricebook=n.perPricebook:void 0!==i.perPricebook&&(o.perPricebook=i.perPricebook),void 0===n.siteId){e.next=33;break}o.siteId=n.siteId,e.next=38;break;case 33:if(void 0===i.siteId){e.next=37;break}o.siteId=i.siteId,e.next=38;break;case 37:throw new Error("Missing required query parameter: siteId");case 38:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getProducts: ".concat(e))})),s=new cu("/organizations/{organizationId}/products",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Mu(Mu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=44,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 44:return c=e.sent,e.abrupt("return",c);case 46:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getProduct",value:(n=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.id){e.next=16;break}a.id=n.id,e.next=21;break;case 16:if(void 0===i.id){e.next=20;break}a.id=i.id,e.next=21;break;case 20:throw new Error("Missing required path parameter: id");case 21:if(o={},void 0!==n.select?o.select=n.select:void 0!==i.select&&(o.select=i.select),void 0!==n.inventoryIds?o.inventoryIds=n.inventoryIds:void 0!==i.inventoryIds&&(o.inventoryIds=i.inventoryIds),void 0!==n.currency?o.currency=n.currency:void 0!==i.currency&&(o.currency=i.currency),void 0!==n.expand?o.expand=n.expand:void 0!==i.expand&&(o.expand=i.expand),void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),void 0!==n.allImages?o.allImages=n.allImages:void 0!==i.allImages&&(o.allImages=i.allImages),void 0!==n.perPricebook?o.perPricebook=n.perPricebook:void 0!==i.perPricebook&&(o.perPricebook=i.perPricebook),void 0===n.siteId){e.next=33;break}o.siteId=n.siteId,e.next=38;break;case 33:if(void 0===i.siteId){e.next=37;break}o.siteId=i.siteId,e.next=38;break;case 37:throw new Error("Missing required query parameter: siteId");case 38:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getProduct: ".concat(e))})),s=new cu("/organizations/{organizationId}/products/{id}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Mu(Mu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=44,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 44:return c=e.sent,e.abrupt("return",c);case 46:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getCategories",value:(r=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.ids){e.next=17;break}o.ids=n.ids,e.next=22;break;case 17:if(void 0===i.ids){e.next=21;break}o.ids=i.ids,e.next=22;break;case 21:throw new Error("Missing required query parameter: ids");case 22:if(void 0!==n.levels?o.levels=n.levels:void 0!==i.levels&&(o.levels=i.levels),void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),void 0===n.siteId){e.next=28;break}o.siteId=n.siteId,e.next=33;break;case 28:if(void 0===i.siteId){e.next=32;break}o.siteId=i.siteId,e.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getCategories: ".concat(e))})),s=new cu("/organizations/{organizationId}/categories",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Mu(Mu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=39,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 39:return c=e.sent,e.abrupt("return",c);case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getCategory",value:(t=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.id){e.next=16;break}a.id=n.id,e.next=21;break;case 16:if(void 0===i.id){e.next=20;break}a.id=i.id,e.next=21;break;case 20:throw new Error("Missing required path parameter: id");case 21:if(o={},void 0!==n.levels?o.levels=n.levels:void 0!==i.levels&&(o.levels=i.levels),void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),void 0===n.siteId){e.next=28;break}o.siteId=n.siteId,e.next=33;break;case 28:if(void 0===i.siteId){e.next=32;break}o.siteId=i.siteId,e.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getCategory: ".concat(e))})),s=new cu("/organizations/{organizationId}/categories/{id}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Mu(Mu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=39,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 39:return c=e.sent,e.abrupt("return",c);case 41:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function _u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ru(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_u(Object(r),!0).forEach((function(t){pi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}pi(Au,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/product/shopper-products/{version}"),pi(Au,"apiPaths",{getProducts:"/organizations/{organizationId}/products",getProduct:"/organizations/{organizationId}/products/{id}",getCategories:"/organizations/{organizationId}/categories",getCategory:"/organizations/{organizationId}/categories/{id}"}),pi(Au,"paramKeys",{getProducts:["organizationId","select","ids","inventoryIds","currency","expand","locale","allImages","perPricebook","siteId"],getProductsRequired:["organizationId","ids","siteId"],getProduct:["organizationId","id","select","inventoryIds","currency","expand","locale","allImages","perPricebook","siteId"],getProductRequired:["organizationId","id","siteId"],getCategories:["organizationId","ids","levels","locale","siteId"],getCategoriesRequired:["organizationId","ids","siteId"],getCategory:["organizationId","id","levels","locale","siteId"],getCategoryRequired:["organizationId","id","siteId"]});var Uu=function(){function e(t){li(this,e),pi(this,"clientConfig",void 0);var r=Ru({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Fo(r)}var t,r;return fi(e,[{key:"getPromotions",value:(r=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:if(void 0===n.ids){e.next=26;break}o.ids=n.ids,e.next=31;break;case 26:if(void 0===i.ids){e.next=30;break}o.ids=i.ids,e.next=31;break;case 30:throw new Error("Missing required query parameter: ids");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPromotions: ".concat(e))})),s=new cu("/organizations/{organizationId}/promotions",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Ru(Ru({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=38,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getPromotionsForCampaign",value:(t=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.campaignId){e.next=16;break}a.campaignId=n.campaignId,e.next=21;break;case 16:if(void 0===i.campaignId){e.next=20;break}a.campaignId=i.campaignId,e.next=21;break;case 20:throw new Error("Missing required path parameter: campaignId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.startDate?o.startDate=n.startDate:void 0!==i.startDate&&(o.startDate=i.startDate),void 0!==n.endDate?o.endDate=n.endDate:void 0!==i.endDate&&(o.endDate=i.endDate),void 0!==n.currency?o.currency=n.currency:void 0!==i.currency&&(o.currency=i.currency),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPromotionsForCampaign: ".concat(e))})),s=new cu("/organizations/{organizationId}/promotions/campaigns/{campaignId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Ru(Ru({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=40,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 40:return c=e.sent,e.abrupt("return",c);case 42:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();pi(Uu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/pricing/shopper-promotions/{version}"),pi(Uu,"apiPaths",{getPromotions:"/organizations/{organizationId}/promotions",getPromotionsForCampaign:"/organizations/{organizationId}/promotions/campaigns/{campaignId}"}),pi(Uu,"paramKeys",{getPromotions:["organizationId","siteId","ids","locale"],getPromotionsRequired:["organizationId","siteId","ids"],getPromotionsForCampaign:["organizationId","campaignId","siteId","startDate","endDate","currency"],getPromotionsForCampaignRequired:["organizationId","campaignId","siteId"]});var Bu=TypeError,Lu=function(e,t){if(!delete e[t])throw Bu("Cannot delete property "+Y(t)+" of "+Y(e))},Fu=U.match(/firefox\/(\d+)/i),Nu=!!Fu&&+Fu[1],Wu=/MSIE|Trident/.test(U),Du=U.match(/AppleWebKit\/(\d+)\./),Gu=!!Du&&+Du[1],Hu=[],Vu=x(Hu.sort),$u=x(Hu.push),Yu=c((function(){Hu.sort(void 0)})),Ku=c((function(){Hu.sort(null)})),Ju=Ln("sort"),Qu=!c((function(){if(W)return W<70;if(!(Nu&&Nu>3)){if(Wu)return!0;if(Gu)return Gu<603;var e,t,r,n,i="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(n=0;n<47;n++)Hu.push({k:t+n,v:r})}for(Hu.sort((function(e,t){return t.v-e.v})),n=0;n<Hu.length;n++)t=Hu[n].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}}));function Xu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Zu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Xu(Object(r),!0).forEach((function(t){pi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}_t({target:"Array",proto:!0,forced:Yu||!Ku||!Ju||!Qu},{sort:function(e){void 0!==e&&J(e);var t=ie(this);if(Qu)return void 0===e?Vu(t):Vu(t,e);var r,n,i=[],a=pt(t);for(n=0;n<a;n++)n in t&&$u(i,t[n]);for(Ka(i,function(e){return function(t,r){return void 0===r?-1:void 0===t?1:void 0!==e?+e(t,r)||0:Vt(t)>Vt(r)?1:-1}}(e)),r=i.length,n=0;n<r;)t[n]=i[n++];for(;n<a;)Lu(t,n++);return t}});var el=function(){function e(t){li(this,e),pi(this,"clientConfig",void 0);var r=Zu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Fo(r)}var t,r;return fi(e,[{key:"productSearch",value:(r=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.select?o.select=n.select:void 0!==i.select&&(o.select=i.select),void 0===n.siteId){e.next=18;break}o.siteId=n.siteId,e.next=23;break;case 18:if(void 0===i.siteId){e.next=22;break}o.siteId=i.siteId,e.next=23;break;case 22:throw new Error("Missing required query parameter: siteId");case 23:return void 0!==n.q?o.q=n.q:void 0!==i.q&&(o.q=i.q),void 0!==n.refine?o.refine=n.refine:void 0!==i.refine&&(o.refine=i.refine),void 0!==n.sort?o.sort=n.sort:void 0!==i.sort&&(o.sort=i.sort),void 0!==n.currency?o.currency=n.currency:void 0!==i.currency&&(o.currency=i.currency),void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),void 0!==n.expand?o.expand=n.expand:void 0!==i.expand&&(o.expand=i.expand),void 0!==n.allImages?o.allImages=n.allImages:void 0!==i.allImages&&(o.allImages=i.allImages),void 0!==n.perPricebook?o.perPricebook=n.perPricebook:void 0!==i.perPricebook&&(o.perPricebook=i.perPricebook),void 0!==n.allVariationProperties?o.allVariationProperties=n.allVariationProperties:void 0!==i.allVariationProperties&&(o.allVariationProperties=i.allVariationProperties),void 0!==n.offset?o.offset=n.offset:void 0!==i.offset&&(o.offset=i.offset),void 0!==n.limit?o.limit=n.limit:void 0!==i.limit&&(o.limit=i.limit),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for productSearch: ".concat(e))})),s=new cu("/organizations/{organizationId}/product-search",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Zu(Zu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=40,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 40:return c=e.sent,e.abrupt("return",c);case 42:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getSearchSuggestions",value:(t=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:if(void 0===n.q){e.next=26;break}o.q=n.q,e.next=31;break;case 26:if(void 0===i.q){e.next=30;break}o.q=i.q,e.next=31;break;case 30:throw new Error("Missing required query parameter: q");case 31:return void 0!==n.limit?o.limit=n.limit:void 0!==i.limit&&(o.limit=i.limit),void 0!==n.currency?o.currency=n.currency:void 0!==i.currency&&(o.currency=i.currency),void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getSearchSuggestions: ".concat(e))})),s=new cu("/organizations/{organizationId}/search-suggestions",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Zu(Zu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=40,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 40:return c=e.sent,e.abrupt("return",c);case 42:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function tl(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function rl(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?tl(Object(r),!0).forEach((function(t){pi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tl(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}pi(el,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/search/shopper-search/{version}/"),pi(el,"apiPaths",{productSearch:"/organizations/{organizationId}/product-search",getSearchSuggestions:"/organizations/{organizationId}/search-suggestions"}),pi(el,"paramKeys",{productSearch:["organizationId","select","siteId","q","refine","sort","currency","locale","expand","allImages","perPricebook","allVariationProperties","offset","limit"],productSearchRequired:["organizationId","siteId"],getSearchSuggestions:["organizationId","siteId","q","limit","currency","locale"],getSearchSuggestionsRequired:["organizationId","siteId","q"]});var nl=function(){function e(t){li(this,e),pi(this,"clientConfig",void 0);var r=rl({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Fo(r)}var t;return fi(e,[{key:"getUrlMapping",value:(t=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.urlSegment){e.next=17;break}o.urlSegment=n.urlSegment,e.next=22;break;case 17:if(void 0===i.urlSegment){e.next=21;break}o.urlSegment=i.urlSegment,e.next=22;break;case 21:throw new Error("Missing required query parameter: urlSegment");case 22:if(void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getUrlMapping: ".concat(e))})),s=new cu("/organizations/{organizationId}/url-mapping",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=rl(rl({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=38,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function il(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function al(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?il(Object(r),!0).forEach((function(t){pi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):il(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}pi(nl,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/site/shopper-seo/{version}"),pi(nl,"apiPaths",{getUrlMapping:"/organizations/{organizationId}/url-mapping"}),pi(nl,"paramKeys",{getUrlMapping:["organizationId","urlSegment","siteId","locale"],getUrlMappingRequired:["organizationId","urlSegment","siteId"]});var ol=function(){function e(t){li(this,e),pi(this,"clientConfig",void 0);var r=al({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Fo(r)}var t,r;return fi(e,[{key:"searchStores",value:(r=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.countryCode?o.countryCode=n.countryCode:void 0!==i.countryCode&&(o.countryCode=i.countryCode),void 0!==n.distanceUnit?o.distanceUnit=n.distanceUnit:void 0!==i.distanceUnit&&(o.distanceUnit=i.distanceUnit),void 0!==n.latitude?o.latitude=n.latitude:void 0!==i.latitude&&(o.latitude=i.latitude),void 0!==n.longitude?o.longitude=n.longitude:void 0!==i.longitude&&(o.longitude=i.longitude),void 0!==n.maxDistance?o.maxDistance=n.maxDistance:void 0!==i.maxDistance&&(o.maxDistance=i.maxDistance),void 0!==n.postalCode?o.postalCode=n.postalCode:void 0!==i.postalCode&&(o.postalCode=i.postalCode),void 0===n.siteId){e.next=23;break}o.siteId=n.siteId,e.next=28;break;case 23:if(void 0===i.siteId){e.next=27;break}o.siteId=i.siteId,e.next=28;break;case 27:throw new Error("Missing required query parameter: siteId");case 28:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),void 0!==n.offset?o.offset=n.offset:void 0!==i.offset&&(o.offset=i.offset),void 0!==n.limit?o.limit=n.limit:void 0!==i.limit&&(o.limit=i.limit),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for searchStores: ".concat(e))})),s=new cu("/organizations/{organizationId}/store-search",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=al(al({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=37,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 37:return c=e.sent,e.abrupt("return",c);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getStores",value:(t=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:if(void 0===n.ids){e.next=26;break}o.ids=n.ids,e.next=31;break;case 26:if(void 0===i.ids){e.next=30;break}o.ids=i.ids,e.next=31;break;case 30:throw new Error("Missing required query parameter: ids");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getStores: ".concat(e))})),s=new cu("/organizations/{organizationId}/stores",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=al(al({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=38,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function sl(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function dl(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?sl(Object(r),!0).forEach((function(t){pi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sl(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}pi(ol,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/store/shopper-stores/{version}"),pi(ol,"apiPaths",{searchStores:"/organizations/{organizationId}/store-search",getStores:"/organizations/{organizationId}/stores"}),pi(ol,"paramKeys",{searchStores:["organizationId","countryCode","distanceUnit","latitude","longitude","maxDistance","postalCode","siteId","locale","offset","limit"],searchStoresRequired:["organizationId","siteId"],getStores:["organizationId","siteId","ids","locale"],getStoresRequired:["organizationId","siteId","ids"]});var cl=function(){function e(t){li(this,e),pi(this,"clientConfig",void 0);var r=dl({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Fo(r)}var t,r,n,i,a,o,s,d,c,u,l,h,f,p,g,I;return fi(e,[{key:"authenticateCustomer",value:(I=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for authenticateCustomer: ".concat(e))})),s=new cu("/organizations/{organizationId}/oauth2/login",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=dl(dl({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=19,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 19:if(c=e.sent,!r){e.next=22;break}return e.abrupt("return",c);case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return I.apply(this,arguments)})},{key:"authorizePasswordlessCustomer",value:(g=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for authorizePasswordlessCustomer: ".concat(e))})),s=new cu("/organizations/{organizationId}/oauth2/passwordless/login",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=dl(dl({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=19,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 19:return c=e.sent,e.abrupt("return",c);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"logoutCustomer",value:(p=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.client_id){e.next=17;break}o.client_id=n.client_id,e.next=22;break;case 17:if(void 0===i.client_id){e.next=21;break}o.client_id=i.client_id,e.next=22;break;case 21:throw new Error("Missing required query parameter: client_id");case 22:if(void 0===n.refresh_token){e.next=26;break}o.refresh_token=n.refresh_token,e.next=31;break;case 26:if(void 0===i.refresh_token){e.next=30;break}o.refresh_token=i.refresh_token,e.next=31;break;case 30:throw new Error("Missing required query parameter: refresh_token");case 31:return void 0!==n.channel_id?o.channel_id=n.channel_id:void 0!==i.channel_id&&(o.channel_id=i.channel_id),void 0!==n.hint?o.hint=n.hint:void 0!==i.hint&&(o.hint=i.hint),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for logoutCustomer: ".concat(e))})),s=new cu("/organizations/{organizationId}/oauth2/logout",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=dl(dl({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=39,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 39:return c=e.sent,e.abrupt("return",c);case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"authorizeCustomer",value:(f=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.redirect_uri){e.next=17;break}o.redirect_uri=n.redirect_uri,e.next=22;break;case 17:if(void 0===i.redirect_uri){e.next=21;break}o.redirect_uri=i.redirect_uri,e.next=22;break;case 21:throw new Error("Missing required query parameter: redirect_uri");case 22:if(void 0===n.response_type){e.next=26;break}o.response_type=n.response_type,e.next=31;break;case 26:if(void 0===i.response_type){e.next=30;break}o.response_type=i.response_type,e.next=31;break;case 30:throw new Error("Missing required query parameter: response_type");case 31:if(void 0===n.client_id){e.next=35;break}o.client_id=n.client_id,e.next=40;break;case 35:if(void 0===i.client_id){e.next=39;break}o.client_id=i.client_id,e.next=40;break;case 39:throw new Error("Missing required query parameter: client_id");case 40:return void 0!==n.scope?o.scope=n.scope:void 0!==i.scope&&(o.scope=i.scope),void 0!==n.state?o.state=n.state:void 0!==i.state&&(o.state=i.state),void 0!==n.usid?o.usid=n.usid:void 0!==i.usid&&(o.usid=i.usid),void 0!==n.hint?o.hint=n.hint:void 0!==i.hint&&(o.hint=i.hint),void 0!==n.channel_id?o.channel_id=n.channel_id:void 0!==i.channel_id&&(o.channel_id=i.channel_id),void 0!==n.code_challenge?o.code_challenge=n.code_challenge:void 0!==i.code_challenge&&(o.code_challenge=i.code_challenge),void 0!==n.ui_locales?o.ui_locales=n.ui_locales:void 0!==i.ui_locales&&(o.ui_locales=i.ui_locales),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for authorizeCustomer: ".concat(e))})),s=new cu("/organizations/{organizationId}/oauth2/authorize",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=dl(dl({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=53,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 53:if(c=e.sent,!r){e.next=56;break}return e.abrupt("return",c);case 56:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"getAccessToken",value:(h=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getAccessToken: ".concat(e))})),s=new cu("/organizations/{organizationId}/oauth2/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=dl(dl({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=19,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 19:return c=e.sent,e.abrupt("return",c);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"getSessionBridgeAccessToken",value:(l=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getSessionBridgeAccessToken: ".concat(e))})),s=new cu("/organizations/{organizationId}/oauth2/session-bridge/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=dl(dl({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=19,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 19:return c=e.sent,e.abrupt("return",c);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"getTrustedSystemAccessToken",value:(u=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getTrustedSystemAccessToken: ".concat(e))})),s=new cu("/organizations/{organizationId}/oauth2/trusted-system/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=dl(dl({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=19,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 19:return c=e.sent,e.abrupt("return",c);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"getTrustedAgentAuthorizationToken",value:(c=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.client_id){e.next=17;break}o.client_id=n.client_id,e.next=22;break;case 17:if(void 0===i.client_id){e.next=21;break}o.client_id=i.client_id,e.next=22;break;case 21:throw new Error("Missing required query parameter: client_id");case 22:if(void 0===n.channel_id){e.next=26;break}o.channel_id=n.channel_id,e.next=31;break;case 26:if(void 0===i.channel_id){e.next=30;break}o.channel_id=i.channel_id,e.next=31;break;case 30:throw new Error("Missing required query parameter: channel_id");case 31:if(void 0===n.code_challenge){e.next=35;break}o.code_challenge=n.code_challenge,e.next=40;break;case 35:if(void 0===i.code_challenge){e.next=39;break}o.code_challenge=i.code_challenge,e.next=40;break;case 39:throw new Error("Missing required query parameter: code_challenge");case 40:if(void 0===n.login_id){e.next=44;break}o.login_id=n.login_id,e.next=49;break;case 44:if(void 0===i.login_id){e.next=48;break}o.login_id=i.login_id,e.next=49;break;case 48:throw new Error("Missing required query parameter: login_id");case 49:if(void 0===n.idp_origin){e.next=53;break}o.idp_origin=n.idp_origin,e.next=58;break;case 53:if(void 0===i.idp_origin){e.next=57;break}o.idp_origin=i.idp_origin,e.next=58;break;case 57:throw new Error("Missing required query parameter: idp_origin");case 58:if(void 0===n.redirect_uri){e.next=62;break}o.redirect_uri=n.redirect_uri,e.next=67;break;case 62:if(void 0===i.redirect_uri){e.next=66;break}o.redirect_uri=i.redirect_uri,e.next=67;break;case 66:throw new Error("Missing required query parameter: redirect_uri");case 67:if(void 0===n.response_type){e.next=71;break}o.response_type=n.response_type,e.next=76;break;case 71:if(void 0===i.response_type){e.next=75;break}o.response_type=i.response_type,e.next=76;break;case 75:throw new Error("Missing required query parameter: response_type");case 76:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getTrustedAgentAuthorizationToken: ".concat(e))})),s=new cu("/organizations/{organizationId}/oauth2/trusted-agent/authorize",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=dl(dl({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=82,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 82:if(c=e.sent,!r){e.next=85;break}return e.abrupt("return",c);case 85:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"getTrustedAgentAccessToken",value:(d=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getTrustedAgentAccessToken: ".concat(e))})),s=new cu("/organizations/{organizationId}/oauth2/trusted-agent/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=dl(dl({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=19,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 19:return c=e.sent,e.abrupt("return",c);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"getPasswordResetToken",value:(s=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPasswordResetToken: ".concat(e))})),s=new cu("/organizations/{organizationId}/oauth2/password/reset",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=dl(dl({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=19,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 19:if(c=e.sent,!r){e.next=22;break}return e.abrupt("return",c);case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"resetPassword",value:(o=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for resetPassword: ".concat(e))})),s=new cu("/organizations/{organizationId}/oauth2/password/action",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=dl(dl({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=19,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 19:if(c=e.sent,!r){e.next=22;break}return e.abrupt("return",c);case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"getPasswordLessAccessToken",value:function(){var e=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPasswordLessAccessToken: ".concat(e))})),s=new cu("/organizations/{organizationId}/oauth2/passwordless/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=dl(dl({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=19,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 19:return c=e.sent,e.abrupt("return",c);case 21:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()},{key:"revokeToken",value:(a=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for revokeToken: ".concat(e))})),s=new cu("/organizations/{organizationId}/oauth2/revoke",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=dl(dl({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=19,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 19:return c=e.sent,e.abrupt("return",c);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"introspectToken",value:(i=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for introspectToken: ".concat(e))})),s=new cu("/organizations/{organizationId}/oauth2/introspect",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=dl(dl({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=19,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 19:return c=e.sent,e.abrupt("return",c);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getUserInfo",value:(n=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},void 0!==n.channel_id?o.channel_id=n.channel_id:void 0!==i.channel_id&&(o.channel_id=i.channel_id),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getUserInfo: ".concat(e))})),s=new cu("/organizations/{organizationId}/oauth2/userinfo",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=dl(dl({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=20,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 20:return c=e.sent,e.abrupt("return",c);case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getWellknownOpenidConfiguration",value:(r=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getWellknownOpenidConfiguration: ".concat(e))})),s=new cu("/organizations/{organizationId}/oauth2/.well-known/openid-configuration",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=dl(dl({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=19,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 19:return c=e.sent,e.abrupt("return",c);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getJwksUri",value:(t=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getJwksUri: ".concat(e))})),s=new cu("/organizations/{organizationId}/oauth2/jwks",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=dl(dl({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=19,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 19:return c=e.sent,e.abrupt("return",c);case 21:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();pi(cl,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/{version}"),pi(cl,"apiPaths",{authenticateCustomer:"/organizations/{organizationId}/oauth2/login",authorizePasswordlessCustomer:"/organizations/{organizationId}/oauth2/passwordless/login",logoutCustomer:"/organizations/{organizationId}/oauth2/logout",authorizeCustomer:"/organizations/{organizationId}/oauth2/authorize",getAccessToken:"/organizations/{organizationId}/oauth2/token",getSessionBridgeAccessToken:"/organizations/{organizationId}/oauth2/session-bridge/token",getTrustedSystemAccessToken:"/organizations/{organizationId}/oauth2/trusted-system/token",getTrustedAgentAuthorizationToken:"/organizations/{organizationId}/oauth2/trusted-agent/authorize",getTrustedAgentAccessToken:"/organizations/{organizationId}/oauth2/trusted-agent/token",getPasswordResetToken:"/organizations/{organizationId}/oauth2/password/reset",resetPassword:"/organizations/{organizationId}/oauth2/password/action",getPasswordLessAccessToken:"/organizations/{organizationId}/oauth2/passwordless/token",revokeToken:"/organizations/{organizationId}/oauth2/revoke",introspectToken:"/organizations/{organizationId}/oauth2/introspect",getUserInfo:"/organizations/{organizationId}/oauth2/userinfo",getWellknownOpenidConfiguration:"/organizations/{organizationId}/oauth2/.well-known/openid-configuration",getJwksUri:"/organizations/{organizationId}/oauth2/jwks"}),pi(cl,"paramKeys",{authenticateCustomer:["organizationId"],authenticateCustomerRequired:["organizationId"],authorizePasswordlessCustomer:["organizationId"],authorizePasswordlessCustomerRequired:["organizationId"],logoutCustomer:["organizationId","client_id","refresh_token","channel_id","hint"],logoutCustomerRequired:["organizationId","client_id","refresh_token"],authorizeCustomer:["organizationId","redirect_uri","response_type","client_id","scope","state","usid","hint","channel_id","code_challenge","ui_locales"],authorizeCustomerRequired:["organizationId","redirect_uri","response_type","client_id"],getAccessToken:["organizationId"],getAccessTokenRequired:["organizationId"],getSessionBridgeAccessToken:["organizationId"],getSessionBridgeAccessTokenRequired:["organizationId"],getTrustedSystemAccessToken:["organizationId"],getTrustedSystemAccessTokenRequired:["organizationId"],getTrustedAgentAuthorizationToken:["organizationId","client_id","channel_id","code_challenge","login_id","idp_origin","redirect_uri","response_type"],getTrustedAgentAuthorizationTokenRequired:["organizationId","client_id","channel_id","code_challenge","login_id","idp_origin","redirect_uri","response_type"],getTrustedAgentAccessToken:["organizationId"],getTrustedAgentAccessTokenRequired:["organizationId"],getPasswordResetToken:["organizationId"],getPasswordResetTokenRequired:["organizationId"],resetPassword:["organizationId"],resetPasswordRequired:["organizationId"],getPasswordLessAccessToken:["organizationId"],getPasswordLessAccessTokenRequired:["organizationId"],revokeToken:["organizationId"],revokeTokenRequired:["organizationId"],introspectToken:["organizationId"],introspectTokenRequired:["organizationId"],getUserInfo:["organizationId","channel_id"],getUserInfoRequired:["organizationId"],getWellknownOpenidConfiguration:["organizationId"],getWellknownOpenidConfigurationRequired:["organizationId"],getJwksUri:["organizationId"],getJwksUriRequired:["organizationId"]});var ul=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};ms("search",(function(e,t,r){return[function(t){var r=j(this),n=null==t?void 0:Q(t,e);return n?f(n,t,r):new RegExp(t)[e](Vt(r))},function(e){var n=qe(this),i=Vt(e),a=r(t,n,i);if(a.done)return a.value;var o=n.lastIndex;ul(o,0)||(n.lastIndex=0);var s=Es(n,i);return ul(n.lastIndex,o)||(n.lastIndex=o),null===s?-1:s.index}]}));var ll=Sr.map,hl=qn("map");_t({target:"Array",proto:!0,forced:!hl},{map:function(e){return ll(this,e,arguments.length>1?arguments[1]:void 0)}});var fl=ge("iterator"),pl=!1;try{var gl=0,Il={next:function(){return{done:!!gl++}},return:function(){pl=!0}};Il[fl]=function(){return this},Array.from(Il,(function(){throw 2}))}catch(e){}var ml,vl,bl,kl=function(e,t){if(!t&&!pl)return!1;var r=!1;try{var n={};n[fl]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r},yl="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView,xl=Me.f,wl=rt.enforce,zl=rt.get,Cl=d.Int8Array,Pl=Cl&&Cl.prototype,Ol=d.Uint8ClampedArray,El=Ol&&Ol.prototype,ql=Cl&&Zi(Cl),jl=Pl&&Zi(Pl),Sl=Object.prototype,Tl=d.TypeError,Ml=ge("toStringTag"),Al=ue("TYPED_ARRAY_TAG"),_l=yl&&!!da&&"Opera"!==Gt(d.opera),Rl=!1,Ul={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},Bl={BigInt64Array:8,BigUint64Array:8},Ll=function(e){var t=Zi(e);if(M(t)){var r=zl(t);return r&&oe(r,"TypedArrayConstructor")?r.TypedArrayConstructor:Ll(t)}},Fl=function(e){if(!M(e))return!1;var t=Gt(e);return oe(Ul,t)||oe(Bl,t)};for(ml in Ul)(bl=(vl=d[ml])&&vl.prototype)?wl(bl).TypedArrayConstructor=vl:_l=!1;for(ml in Bl)(bl=(vl=d[ml])&&vl.prototype)&&(wl(bl).TypedArrayConstructor=vl);if((!_l||!T(ql)||ql===Function.prototype)&&(ql=function(){throw Tl("Incorrect invocation")},_l))for(ml in Ul)d[ml]&&da(d[ml],ql);if((!_l||!jl||jl===Sl)&&(jl=ql.prototype,_l))for(ml in Ul)d[ml]&&da(d[ml].prototype,jl);if(_l&&Zi(El)!==jl&&da(El,jl),u&&!oe(jl,Ml))for(ml in Rl=!0,xl(jl,Ml,{get:function(){return M(this)?this[Al]:void 0}}),Ul)d[ml]&&Ae(d[ml],Al,ml);var Nl={NATIVE_ARRAY_BUFFER_VIEWS:_l,TYPED_ARRAY_TAG:Rl&&Al,aTypedArray:function(e){if(Fl(e))return e;throw Tl("Target is not a typed array")},aTypedArrayConstructor:function(e){if(T(e)&&(!da||R(ql,e)))return e;throw Tl(Y(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,r,n){if(u){if(r)for(var i in Ul){var a=d[i];if(a&&oe(a.prototype,e))try{delete a.prototype[e]}catch(r){try{a.prototype[e]=t}catch(e){}}}jl[e]&&!r||it(jl,e,r?t:_l&&Pl[e]||t,n)}},exportTypedArrayStaticMethod:function(e,t,r){var n,i;if(u){if(da){if(r)for(n in Ul)if((i=d[n])&&oe(i,e))try{delete i[e]}catch(e){}if(ql[e]&&!r)return;try{return it(ql,e,r?t:_l&&ql[e]||t)}catch(e){}}for(n in Ul)!(i=d[n])||i[e]&&!r||it(i,e,t)}},getTypedArrayConstructor:Ll,isView:function(e){if(!M(e))return!1;var t=Gt(e);return"DataView"===t||oe(Ul,t)||oe(Bl,t)},isTypedArray:Fl,TypedArray:ql,TypedArrayPrototype:jl},Wl=Nl.NATIVE_ARRAY_BUFFER_VIEWS,Dl=d.ArrayBuffer,Gl=d.Int8Array,Hl=!Wl||!c((function(){Gl(1)}))||!c((function(){new Gl(-1)}))||!kl((function(e){new Gl,new Gl(null),new Gl(1.5),new Gl(e)}),!0)||c((function(){return 1!==new Gl(new Dl(2),1,void 0).length})),Vl=RangeError,$l=function(e){if(void 0===e)return 0;var t=dt(e),r=ft(t);if(t!==r)throw Vl("Wrong length or index");return r},Yl=Array,Kl=Math.abs,Jl=Math.pow,Ql=Math.floor,Xl=Math.log,Zl=Math.LN2,eh=function(e,t,r){var n,i,a,o=Yl(r),s=8*r-t-1,d=(1<<s)-1,c=d>>1,u=23===t?Jl(2,-24)-Jl(2,-77):0,l=e<0||0===e&&1/e<0?1:0,h=0;for((e=Kl(e))!=e||e===1/0?(i=e!=e?1:0,n=d):(n=Ql(Xl(e)/Zl),e*(a=Jl(2,-n))<1&&(n--,a*=2),(e+=n+c>=1?u/a:u*Jl(2,1-c))*a>=2&&(n++,a/=2),n+c>=d?(i=0,n=d):n+c>=1?(i=(e*a-1)*Jl(2,t),n+=c):(i=e*Jl(2,c-1)*Jl(2,t),n=0));t>=8;)o[h++]=255&i,i/=256,t-=8;for(n=n<<t|i,s+=t;s>0;)o[h++]=255&n,n/=256,s-=8;return o[--h]|=128*l,o},th=function(e,t){var r,n=e.length,i=8*n-t-1,a=(1<<i)-1,o=a>>1,s=i-7,d=n-1,c=e[d--],u=127&c;for(c>>=7;s>0;)u=256*u+e[d--],s-=8;for(r=u&(1<<-s)-1,u>>=-s,s+=t;s>0;)r=256*r+e[d--],s-=8;if(0===u)u=1-o;else{if(u===a)return r?NaN:c?-1/0:1/0;r+=Jl(2,t),u-=o}return(c?-1:1)*r*Jl(2,u-t)},rh=function(e){for(var t=ie(this),r=pt(t),n=arguments.length,i=lt(n>1?arguments[1]:void 0,r),a=n>2?arguments[2]:void 0,o=void 0===a?r:lt(a,r);o>i;)t[i++]=e;return t},nh=xt.f,ih=Me.f,ah=Be.PROPER,oh=Be.CONFIGURABLE,sh=rt.get,dh=rt.set,ch=d.ArrayBuffer,uh=ch,lh=uh&&uh.prototype,hh=d.DataView,fh=hh&&hh.prototype,ph=Object.prototype,gh=d.Array,Ih=d.RangeError,mh=x(rh),vh=x([].reverse),bh=eh,kh=th,yh=function(e){return[255&e]},xh=function(e){return[255&e,e>>8&255]},wh=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},zh=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},Ch=function(e){return bh(e,23,4)},Ph=function(e){return bh(e,52,8)},Oh=function(e,t){ih(e.prototype,t,{get:function(){return sh(this)[t]}})},Eh=function(e,t,r,n){var i=$l(r),a=sh(e);if(i+t>a.byteLength)throw Ih("Wrong index");var o=sh(a.buffer).bytes,s=i+a.byteOffset,d=ir(o,s,s+t);return n?d:vh(d)},qh=function(e,t,r,n,i,a){var o=$l(r),s=sh(e);if(o+t>s.byteLength)throw Ih("Wrong index");for(var d=sh(s.buffer).bytes,c=o+s.byteOffset,u=n(+i),l=0;l<t;l++)d[c+l]=u[a?l:t-l-1]};if(yl){var jh=ah&&"ArrayBuffer"!==ch.name;if(c((function(){ch(1)}))&&c((function(){new ch(-1)}))&&!c((function(){return new ch,new ch(1.5),new ch(NaN),jh&&!oh})))jh&&oh&&Ae(ch,"name","ArrayBuffer");else{(uh=function(e){return Ba(this,lh),new ch($l(e))}).prototype=lh;for(var Sh,Th=nh(ch),Mh=0;Th.length>Mh;)(Sh=Th[Mh++])in uh||Ae(uh,Sh,ch[Sh]);lh.constructor=uh}da&&Zi(fh)!==ph&&da(fh,ph);var Ah=new hh(new uh(2)),_h=x(fh.setInt8);Ah.setInt8(0,2147483648),Ah.setInt8(1,2147483649),!Ah.getInt8(0)&&Ah.getInt8(1)||Ra(fh,{setInt8:function(e,t){_h(this,e,t<<24>>24)},setUint8:function(e,t){_h(this,e,t<<24>>24)}},{unsafe:!0})}else lh=(uh=function(e){Ba(this,lh);var t=$l(e);dh(this,{bytes:mh(gh(t),0),byteLength:t}),u||(this.byteLength=t)}).prototype,fh=(hh=function(e,t,r){Ba(this,fh),Ba(e,lh);var n=sh(e).byteLength,i=dt(t);if(i<0||i>n)throw Ih("Wrong offset");if(i+(r=void 0===r?n-i:ft(r))>n)throw Ih("Wrong length");dh(this,{buffer:e,byteLength:r,byteOffset:i}),u||(this.buffer=e,this.byteLength=r,this.byteOffset=i)}).prototype,u&&(Oh(uh,"byteLength"),Oh(hh,"buffer"),Oh(hh,"byteLength"),Oh(hh,"byteOffset")),Ra(fh,{getInt8:function(e){return Eh(this,1,e)[0]<<24>>24},getUint8:function(e){return Eh(this,1,e)[0]},getInt16:function(e){var t=Eh(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=Eh(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return zh(Eh(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return zh(Eh(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return kh(Eh(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return kh(Eh(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){qh(this,1,e,yh,t)},setUint8:function(e,t){qh(this,1,e,yh,t)},setInt16:function(e,t){qh(this,2,e,xh,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){qh(this,2,e,xh,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){qh(this,4,e,wh,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){qh(this,4,e,wh,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){qh(this,4,e,Ch,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){qh(this,8,e,Ph,t,arguments.length>2?arguments[2]:void 0)}});fr(uh,"ArrayBuffer"),fr(hh,"DataView");var Rh={ArrayBuffer:uh,DataView:hh},Uh=Math.floor,Bh=Number.isInteger||function(e){return!M(e)&&isFinite(e)&&Uh(e)===e},Lh=RangeError,Fh=RangeError,Nh=function(e,t){var r=function(e){var t=dt(e);if(t<0)throw Lh("The argument can't be less than 0");return t}(e);if(r%t)throw Fh("Wrong offset");return r},Wh=Nl.aTypedArrayConstructor,Dh=function(e){var t,r,n,i,a,o,s=Hs(this),d=ie(e),c=arguments.length,u=c>1?arguments[1]:void 0,l=void 0!==u,h=Fa(d);if(h&&!Od(h))for(o=(a=Wa(d,h)).next,d=[];!(i=f(o,a)).done;)d.push(i.value);for(l&&c>2&&(u=gr(u,arguments[2])),r=pt(d),n=new(Wh(s))(r),t=0;r>t;t++)n[t]=l?u(d[t],t):d[t];return n},Gh=ge("species"),Hh=function(e){var t=_(e),r=Me.f;u&&t&&!t[Gh]&&r(t,Gh,{configurable:!0,get:function(){return this}})};i((function(e){var t=xt.f,r=Sr.forEach,n=rt.get,i=rt.set,a=rt.enforce,o=Me.f,s=Ce.f,c=Math.round,l=d.RangeError,h=Rh.ArrayBuffer,p=h.prototype,g=Rh.DataView,I=Nl.NATIVE_ARRAY_BUFFER_VIEWS,v=Nl.TYPED_ARRAY_TAG,b=Nl.TypedArray,k=Nl.TypedArrayPrototype,y=Nl.aTypedArrayConstructor,x=Nl.isTypedArray,w=function(e,t){y(e);for(var r=0,n=t.length,i=new e(n);n>r;)i[r]=t[r++];return i},z=function(e,t){o(e,t,{get:function(){return n(this)[t]}})},C=function(e){var t;return R(p,e)||"ArrayBuffer"==(t=Gt(e))||"SharedArrayBuffer"==t},P=function(e,t){return x(e)&&!V(t)&&t in e&&Bh(+t)&&t>=0},O=function(e,t){return t=be(t),P(e,t)?m(2,e[t]):s(e,t)},E=function(e,t,r){return t=be(t),!(P(e,t)&&M(r)&&oe(r,"value"))||oe(r,"get")||oe(r,"set")||r.configurable||oe(r,"writable")&&!r.writable||oe(r,"enumerable")&&!r.enumerable?o(e,t,r):(e[t]=r.value,e)};u?(I||(Ce.f=O,Me.f=E,z(k,"buffer"),z(k,"byteOffset"),z(k,"byteLength"),z(k,"length")),_t({target:"Object",stat:!0,forced:!I},{getOwnPropertyDescriptor:O,defineProperty:E}),e.exports=function(e,s,u){var p=e.match(/\d+$/)[0]/8,m=e+(u?"Clamped":"")+"Array",y="get"+e,z="set"+e,P=d[m],O=P,E=O&&O.prototype,q={},j=function(e,t){o(e,t,{get:function(){return function(e,t){var r=n(e);return r.view[y](t*p+r.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,r){var i=n(e);u&&(r=(r=c(r))<0?0:r>255?255:255&r),i.view[z](t*p+i.byteOffset,r,!0)}(this,t,e)},enumerable:!0})};I?Hl&&(O=s((function(e,t,r,n){return Ba(e,E),function(e,t,r){var n,i;return da&&T(n=t.constructor)&&n!==r&&M(i=n.prototype)&&i!==r.prototype&&da(e,i),e}(M(t)?C(t)?void 0!==n?new P(t,Nh(r,p),n):void 0!==r?new P(t,Nh(r,p)):new P(t):x(t)?w(O,t):f(Dh,O,t):new P($l(t)),e,O)})),da&&da(O,b),r(t(P),(function(e){e in O||Ae(O,e,P[e])})),O.prototype=E):(O=s((function(e,t,r,n){Ba(e,E);var a,o,s,d=0,c=0;if(M(t)){if(!C(t))return x(t)?w(O,t):f(Dh,O,t);a=t,c=Nh(r,p);var u=t.byteLength;if(void 0===n){if(u%p)throw l("Wrong length");if((o=u-c)<0)throw l("Wrong length")}else if((o=ft(n)*p)+c>u)throw l("Wrong length");s=o/p}else s=$l(t),a=new h(o=s*p);for(i(e,{buffer:a,byteOffset:c,byteLength:o,length:s,view:new g(a)});d<s;)j(e,d++)})),da&&da(O,b),E=O.prototype=er(k)),E.constructor!==O&&Ae(E,"constructor",O),a(E).TypedArrayConstructor=O,v&&Ae(E,v,m);var S=O!=P;q[m]=O,_t({global:!0,constructor:!0,forced:S,sham:!I},q),"BYTES_PER_ELEMENT"in O||Ae(O,"BYTES_PER_ELEMENT",p),"BYTES_PER_ELEMENT"in E||Ae(E,"BYTES_PER_ELEMENT",p),Hh(m)}):e.exports=function(){}}))("Uint8",(function(e){return function(t,r,n){return e(this,t,r,n)}}));var Vh=Math.min,$h=x([].copyWithin||function(e,t){var r=ie(this),n=pt(r),i=lt(e,n),a=lt(t,n),o=arguments.length>2?arguments[2]:void 0,s=Vh((void 0===o?n:lt(o,n))-a,n-i),d=1;for(a<i&&i<a+s&&(d=-1,a+=s-1,i+=s-1);s-- >0;)a in r?r[i]=r[a]:Lu(r,i),i+=d,a+=d;return r}),Yh=Nl.aTypedArray;(0,Nl.exportTypedArrayMethod)("copyWithin",(function(e,t){return $h(Yh(this),e,t,arguments.length>2?arguments[2]:void 0)}));var Kh=Sr.every,Jh=Nl.aTypedArray;(0,Nl.exportTypedArrayMethod)("every",(function(e){return Kh(Jh(this),e,arguments.length>1?arguments[1]:void 0)}));var Qh=TypeError,Xh=function(e){var t=ve(e,"number");if("number"==typeof t)throw Qh("Can't convert number to bigint");return BigInt(t)},Zh=Nl.aTypedArray,ef=Nl.exportTypedArrayMethod,tf=x("".slice);ef("fill",(function(e){var t=arguments.length;Zh(this);var r="Big"===tf(Gt(this),0,3)?Xh(e):+e;return f(rh,this,r,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}),c((function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e})));var rf=ge("species"),nf=function(e,t){var r,n=qe(e).constructor;return void 0===n||null==(r=qe(n)[rf])?t:Hs(r)},af=Nl.aTypedArrayConstructor,of=Nl.getTypedArrayConstructor,sf=function(e){return af(nf(e,of(e)))},df=function(e,t){return function(e,t){for(var r=0,n=pt(t),i=new e(n);n>r;)i[r]=t[r++];return i}(sf(e),t)},cf=Sr.filter,uf=Nl.aTypedArray;(0,Nl.exportTypedArrayMethod)("filter",(function(e){var t=cf(uf(this),e,arguments.length>1?arguments[1]:void 0);return df(this,t)}));var lf=Sr.find,hf=Nl.aTypedArray;(0,Nl.exportTypedArrayMethod)("find",(function(e){return lf(hf(this),e,arguments.length>1?arguments[1]:void 0)}));var ff=Sr.findIndex,pf=Nl.aTypedArray;(0,Nl.exportTypedArrayMethod)("findIndex",(function(e){return ff(pf(this),e,arguments.length>1?arguments[1]:void 0)}));var gf=Sr.forEach,If=Nl.aTypedArray;(0,Nl.exportTypedArrayMethod)("forEach",(function(e){gf(If(this),e,arguments.length>1?arguments[1]:void 0)}));var mf=It.includes,vf=Nl.aTypedArray;(0,Nl.exportTypedArrayMethod)("includes",(function(e){return mf(vf(this),e,arguments.length>1?arguments[1]:void 0)}));var bf=It.indexOf,kf=Nl.aTypedArray;(0,Nl.exportTypedArrayMethod)("indexOf",(function(e){return bf(kf(this),e,arguments.length>1?arguments[1]:void 0)}));var yf=ge("iterator"),xf=d.Uint8Array,wf=x(ba.values),zf=x(ba.keys),Cf=x(ba.entries),Pf=Nl.aTypedArray,Of=Nl.exportTypedArrayMethod,Ef=xf&&xf.prototype,qf=!c((function(){Ef[yf].call([1])})),jf=!!Ef&&Ef.values&&Ef[yf]===Ef.values&&"values"===Ef.values.name,Sf=function(){return wf(Pf(this))};Of("entries",(function(){return Cf(Pf(this))}),qf),Of("keys",(function(){return zf(Pf(this))}),qf),Of("values",Sf,qf||!jf,{name:"values"}),Of(yf,Sf,qf||!jf,{name:"values"});var Tf=Nl.aTypedArray,Mf=Nl.exportTypedArrayMethod,Af=x([].join);Mf("join",(function(e){return Af(Tf(this),e)}));var _f=Math.min,Rf=[].lastIndexOf,Uf=!!Rf&&1/[1].lastIndexOf(1,-0)<0,Bf=Ln("lastIndexOf"),Lf=Uf||!Bf?function(e){if(Uf)return hn(Rf,this,arguments)||0;var t=S(this),r=pt(t),n=r-1;for(arguments.length>1&&(n=_f(n,dt(arguments[1]))),n<0&&(n=r+n);n>=0;n--)if(n in t&&t[n]===e)return n||0;return-1}:Rf,Ff=Nl.aTypedArray;(0,Nl.exportTypedArrayMethod)("lastIndexOf",(function(e){var t=arguments.length;return hn(Lf,Ff(this),t>1?[e,arguments[1]]:[e])}));var Nf=Sr.map,Wf=Nl.aTypedArray;(0,Nl.exportTypedArrayMethod)("map",(function(e){return Nf(Wf(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new(sf(e))(t)}))}));var Df=TypeError,Gf=function(e){return function(t,r,n,i){J(r);var a=ie(t),o=E(a),s=pt(a),d=e?s-1:0,c=e?-1:1;if(n<2)for(;;){if(d in o){i=o[d],d+=c;break}if(d+=c,e?d<0:s<=d)throw Df("Reduce of empty array with no initial value")}for(;e?d>=0:s>d;d+=c)d in o&&(i=r(i,o[d],d,a));return i}},Hf={left:Gf(!1),right:Gf(!0)},Vf=Hf.left,$f=Nl.aTypedArray;(0,Nl.exportTypedArrayMethod)("reduce",(function(e){var t=arguments.length;return Vf($f(this),e,t,t>1?arguments[1]:void 0)}));var Yf=Hf.right,Kf=Nl.aTypedArray;(0,Nl.exportTypedArrayMethod)("reduceRight",(function(e){var t=arguments.length;return Yf(Kf(this),e,t,t>1?arguments[1]:void 0)}));var Jf=Nl.aTypedArray,Qf=Nl.exportTypedArrayMethod,Xf=Math.floor;Qf("reverse",(function(){for(var e,t=Jf(this).length,r=Xf(t/2),n=0;n<r;)e=this[n],this[n++]=this[--t],this[t]=e;return this}));var Zf=d.RangeError,ep=d.Int8Array,tp=ep&&ep.prototype,rp=tp&&tp.set,np=Nl.aTypedArray,ip=Nl.exportTypedArrayMethod,ap=!c((function(){var e=new Uint8ClampedArray(2);return f(rp,e,{length:1,0:3},1),3!==e[1]})),op=ap&&Nl.NATIVE_ARRAY_BUFFER_VIEWS&&c((function(){var e=new ep(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}));ip("set",(function(e){np(this);var t=Nh(arguments.length>1?arguments[1]:void 0,1),r=ie(e);if(ap)return f(rp,this,r,t);var n=this.length,i=pt(r),a=0;if(i+t>n)throw Zf("Wrong length");for(;a<i;)this[t+a]=r[a++]}),!ap||op);var sp=Nl.aTypedArray;(0,Nl.exportTypedArrayMethod)("slice",(function(e,t){for(var r=fn(sp(this),e,t),n=sf(this),i=0,a=r.length,o=new n(a);a>i;)o[i]=r[i++];return o}),c((function(){new Int8Array(1).slice()})));var dp=Sr.some,cp=Nl.aTypedArray;(0,Nl.exportTypedArrayMethod)("some",(function(e){return dp(cp(this),e,arguments.length>1?arguments[1]:void 0)}));var up=Nl.aTypedArray,lp=Nl.exportTypedArrayMethod,hp=d.Uint16Array,fp=hp&&x(hp.prototype.sort),pp=!(!fp||c((function(){fp(new hp(2),null)}))&&c((function(){fp(new hp(2),{})}))),gp=!!fp&&!c((function(){if(W)return W<74;if(Nu)return Nu<67;if(Wu)return!0;if(Gu)return Gu<602;var e,t,r=new hp(516),n=Array(516);for(e=0;e<516;e++)t=e%4,r[e]=515-e,n[e]=e-2*t+3;for(fp(r,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(r[e]!==n[e])return!0}));lp("sort",(function(e){return void 0!==e&&J(e),gp?fp(this,e):Ka(up(this),function(e){return function(t,r){return void 0!==e?+e(t,r)||0:r!=r?-1:t!=t?1:0===t&&0===r?1/t>0&&1/r<0?1:-1:t>r}}(e))}),!gp||pp);var Ip=d.Int8Array,mp=Nl.aTypedArray,vp=Nl.exportTypedArrayMethod,bp=[].toLocaleString,kp=!!Ip&&c((function(){bp.call(new Ip(1))}));vp("toLocaleString",(function(){return hn(bp,kp?fn(mp(this)):mp(this),fn(arguments))}),c((function(){return[1,2].toLocaleString()!=new Ip([1,2]).toLocaleString()}))||!c((function(){Ip.prototype.toLocaleString.call([1,2])})));var yp=Nl.exportTypedArrayMethod,xp=d.Uint8Array,wp=xp&&xp.prototype||{},zp=[].toString,Cp=x([].join);c((function(){zp.call({})}))&&(zp=function(){return Cp(this)});var Pp=wp.toString!=zp;yp("toString",zp,Pp);var Op,Ep,qp,jp,Sp="process"==C(d.process),Tp=/(?:ipad|iphone|ipod).*applewebkit/i.test(U),Mp=d.setImmediate,Ap=d.clearImmediate,_p=d.process,Rp=d.Dispatch,Up=d.Function,Bp=d.MessageChannel,Lp=d.String,Fp=0,Np={};try{Op=d.location}catch(e){}var Wp=function(e){if(oe(Np,e)){var t=Np[e];delete Np[e],t()}},Dp=function(e){return function(){Wp(e)}},Gp=function(e){Wp(e.data)},Hp=function(e){d.postMessage(Lp(e),Op.protocol+"//"+Op.host)};Mp&&Ap||(Mp=function(e){Ga(arguments.length,1);var t=T(e)?e:Up(e),r=fn(arguments,1);return Np[++Fp]=function(){hn(t,void 0,r)},Ep(Fp),Fp},Ap=function(e){delete Np[e]},Sp?Ep=function(e){_p.nextTick(Dp(e))}:Rp&&Rp.now?Ep=function(e){Rp.now(Dp(e))}:Bp&&!Tp?(jp=(qp=new Bp).port2,qp.port1.onmessage=Gp,Ep=gr(jp.postMessage,jp)):d.addEventListener&&T(d.postMessage)&&!d.importScripts&&Op&&"file:"!==Op.protocol&&!c(Hp)?(Ep=Hp,d.addEventListener("message",Gp,!1)):Ep="onreadystatechange"in xe("script")?function(e){Yt.appendChild(xe("script")).onreadystatechange=function(){Yt.removeChild(this),Wp(e)}}:function(e){setTimeout(Dp(e),0)});var Vp,$p,Yp,Kp,Jp,Qp,Xp,Zp,eg={set:Mp,clear:Ap},tg=/ipad|iphone|ipod/i.test(U)&&void 0!==d.Pebble,rg=/web0s(?!.*chrome)/i.test(U),ng=Ce.f,ig=eg.set,ag=d.MutationObserver||d.WebKitMutationObserver,og=d.document,sg=d.process,dg=d.Promise,cg=ng(d,"queueMicrotask"),ug=cg&&cg.value;ug||(Vp=function(){var e,t;for(Sp&&(e=sg.domain)&&e.exit();$p;){t=$p.fn,$p=$p.next;try{t()}catch(e){throw $p?Kp():Yp=void 0,e}}Yp=void 0,e&&e.enter()},Tp||Sp||rg||!ag||!og?!tg&&dg&&dg.resolve?((Xp=dg.resolve(void 0)).constructor=dg,Zp=gr(Xp.then,Xp),Kp=function(){Zp(Vp)}):Sp?Kp=function(){sg.nextTick(Vp)}:(ig=gr(ig,d),Kp=function(){ig(Vp)}):(Jp=!0,Qp=og.createTextNode(""),new ag(Vp).observe(Qp,{characterData:!0}),Kp=function(){Qp.data=Jp=!Jp}));var lg=ug||function(e){var t={fn:e,next:void 0};Yp&&(Yp.next=t),$p||($p=t,Kp()),Yp=t},hg=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},fg=function(){this.head=null,this.tail=null};fg.prototype={add:function(e){var t={item:e,next:null};this.head?this.tail.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return this.head=e.next,this.tail===e&&(this.tail=null),e.item}};var pg=fg,gg=d.Promise,Ig="object"==typeof window&&"object"!=typeof Deno;gg&&gg.prototype;var mg,vg,bg,kg=ge("species"),yg=!1,xg=T(d.PromiseRejectionEvent),wg={CONSTRUCTOR:Mt("Promise",(function(){var e=De(gg),t=e!==String(gg);if(!t&&66===W)return!0;if(W>=51&&/native code/.test(e))return!1;var r=new gg((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};return(r.constructor={})[kg]=n,!(yg=r.then((function(){}))instanceof n)||!t&&Ig&&!xg})),REJECTION_EVENT:xg,SUBCLASSING:yg},zg=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw TypeError("Bad Promise constructor");t=e,r=n})),this.resolve=J(t),this.reject=J(r)},Cg={f:function(e){return new zg(e)}},Pg=eg.set,Og=wg.CONSTRUCTOR,Eg=wg.REJECTION_EVENT,qg=wg.SUBCLASSING,jg=rt.getterFor("Promise"),Sg=rt.set,Tg=gg&&gg.prototype,Mg=gg,Ag=Tg,_g=d.TypeError,Rg=d.document,Ug=d.process,Bg=Cg.f,Lg=Bg,Fg=!!(Rg&&Rg.createEvent&&d.dispatchEvent),Ng=function(e){var t;return!(!M(e)||!T(t=e.then))&&t},Wg=function(e,t){var r,n,i,a=t.value,o=1==t.state,s=o?e.ok:e.fail,d=e.resolve,c=e.reject,u=e.domain;try{s?(o||(2===t.rejection&&$g(t),t.rejection=1),!0===s?r=a:(u&&u.enter(),r=s(a),u&&(u.exit(),i=!0)),r===e.promise?c(_g("Promise-chain cycle")):(n=Ng(r))?f(n,r,d,c):d(r)):c(a)}catch(e){u&&!i&&u.exit(),c(e)}},Dg=function(e,t){e.notified||(e.notified=!0,lg((function(){for(var r,n=e.reactions;r=n.get();)Wg(r,e);e.notified=!1,t&&!e.rejection&&Hg(e)})))},Gg=function(e,t,r){var n,i;Fg?((n=Rg.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),d.dispatchEvent(n)):n={promise:t,reason:r},!Eg&&(i=d["on"+e])?i(n):"unhandledrejection"===e&&function(e,t){var r=d.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))}("Unhandled promise rejection",r)},Hg=function(e){f(Pg,d,(function(){var t,r=e.facade,n=e.value;if(Vg(e)&&(t=hg((function(){Sp?Ug.emit("unhandledRejection",n,r):Gg("unhandledrejection",r,n)})),e.rejection=Sp||Vg(e)?2:1,t.error))throw t.value}))},Vg=function(e){return 1!==e.rejection&&!e.parent},$g=function(e){f(Pg,d,(function(){var t=e.facade;Sp?Ug.emit("rejectionHandled",t):Gg("rejectionhandled",t,e.value)}))},Yg=function(e,t,r){return function(n){e(t,n,r)}},Kg=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,Dg(e,!0))},Jg=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw _g("Promise can't be resolved itself");var n=Ng(t);n?lg((function(){var r={done:!1};try{f(n,t,Yg(Jg,r,e),Yg(Kg,r,e))}catch(t){Kg(r,t,e)}})):(e.value=t,e.state=1,Dg(e,!1))}catch(t){Kg({done:!1},t,e)}}};if(Og&&(Ag=(Mg=function(e){Ba(this,Ag),J(e),f(mg,this);var t=jg(this);try{e(Yg(Jg,t),Yg(Kg,t))}catch(e){Kg(t,e)}}).prototype,(mg=function(e){Sg(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:new pg,rejection:!1,state:0,value:void 0})}).prototype=it(Ag,"then",(function(e,t){var r=jg(this),n=Bg(nf(this,Mg));return r.parent=!0,n.ok=!T(e)||e,n.fail=T(t)&&t,n.domain=Sp?Ug.domain:void 0,0==r.state?r.reactions.add(n):lg((function(){Wg(n,r)})),n.promise})),vg=function(){var e=new mg,t=jg(e);this.promise=e,this.resolve=Yg(Jg,t),this.reject=Yg(Kg,t)},Cg.f=Bg=function(e){return e===Mg||void 0===e?new vg(e):Lg(e)},T(gg)&&Tg!==Object.prototype)){bg=Tg.then,qg||it(Tg,"then",(function(e,t){var r=this;return new Mg((function(e,t){f(bg,r,e,t)})).then(e,t)}),{unsafe:!0});try{delete Tg.constructor}catch(e){}da&&da(Tg,Ag)}_t({global:!0,constructor:!0,wrap:!0,forced:Og},{Promise:Mg}),fr(Mg,"Promise",!1),Hh("Promise");var Qg=TypeError,Xg=function(e,t){this.stopped=e,this.result=t},Zg=Xg.prototype,eI=function(e,t,r){var n,i,a,o,s,d,c,u=r&&r.that,l=!(!r||!r.AS_ENTRIES),h=!(!r||!r.IS_RECORD),p=!(!r||!r.IS_ITERATOR),g=!(!r||!r.INTERRUPTED),I=gr(t,u),m=function(e){return n&&wd(n,"normal",e),new Xg(!0,e)},v=function(e){return l?(qe(e),g?I(e[0],e[1],m):I(e[0],e[1])):g?I(e,m):I(e)};if(h)n=e.iterator;else if(p)n=e;else{if(!(i=Fa(e)))throw Qg(Y(e)+" is not iterable");if(Od(i)){for(a=0,o=pt(e);o>a;a++)if((s=v(e[a]))&&R(Zg,s))return s;return new Xg(!1)}n=Wa(e,i)}for(d=h?e.next:n.next;!(c=f(d,n)).done;){try{s=v(c.value)}catch(e){wd(n,"throw",e)}if("object"==typeof s&&s&&R(Zg,s))return s}return new Xg(!1)},tI=wg.CONSTRUCTOR||!kl((function(e){gg.all(e).then(void 0,(function(){}))}));_t({target:"Promise",stat:!0,forced:tI},{all:function(e){var t=this,r=Cg.f(t),n=r.resolve,i=r.reject,a=hg((function(){var r=J(t.resolve),a=[],o=0,s=1;eI(e,(function(e){var d=o++,c=!1;s++,f(r,t,e).then((function(e){c||(c=!0,a[d]=e,--s||n(a))}),i)})),--s||n(a)}));return a.error&&i(a.value),r.promise}});var rI=wg.CONSTRUCTOR,nI=gg&&gg.prototype;if(_t({target:"Promise",proto:!0,forced:rI,real:!0},{catch:function(e){return this.then(void 0,e)}}),T(gg)){var iI=_("Promise").prototype.catch;nI.catch!==iI&&it(nI,"catch",iI,{unsafe:!0})}_t({target:"Promise",stat:!0,forced:tI},{race:function(e){var t=this,r=Cg.f(t),n=r.reject,i=hg((function(){var i=J(t.resolve);eI(e,(function(e){f(i,t,e).then(r.resolve,n)}))}));return i.error&&n(i.value),r.promise}}),_t({target:"Promise",stat:!0,forced:wg.CONSTRUCTOR},{reject:function(e){var t=Cg.f(this);return f(t.reject,void 0,e),t.promise}});var aI=wg.CONSTRUCTOR;function oI(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function sI(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function dI(e){return function(e){if(Array.isArray(e))return sI(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return sI(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?sI(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}_("Promise"),_t({target:"Promise",stat:!0,forced:aI},{resolve:function(e){return function(e,t){if(qe(e),M(t)&&t.constructor===e)return t;var r=Cg.f(e);return(0,r.resolve)(t),r.promise}(this,e)}}),_t({target:"Object",stat:!0},{fromEntries:function(e){var t={};return eI(e,(function(e,r){tr(t,e,r)}),{AS_ENTRIES:!0}),t}});var cI=["hint","redirectURI","usid"],uI=["hint","redirectURI","usid"],lI=["dnt","redirectURI","usid"];function hI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function fI(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?hI(Object(r),!0).forEach((function(t){pi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hI(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var pI=Go?btoa:function(e){return Buffer.from(e).toString("base64")},gI=function(e){var t,r,n=new URL(e),i=new URLSearchParams(n.search),a=null!==(t=i.get("usid"))&&void 0!==t?t:"";return{code:null!==(r=i.get("code"))&&void 0!==r?r:"",usid:a}},II=function(){return n=r(String(+new Date),{entropy:!0}),e(t,128,(function(e){return new Uint8Array(e).map((function(){return 256*n()}))}))();var n},mI=function(){var e=ui(Fi.mark((function e(t){var r,n,i,a,o,s,d;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=function(e){return e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")},n="",!Go||!window.crypto){e.next=12;break}return i=new TextEncoder,a=i.encode(t),e.next=7,window.crypto.subtle.digest("SHA-256",a);case 7:o=e.sent,s=btoa(String.fromCharCode.apply(String,dI(new Uint8Array(o)))),n=r(s),e.next=16;break;case 12:return e.next=14,import("crypto");case 14:d=e.sent,n=r(d.default.createHash("sha256").update(t).digest("base64"));case 16:if(0!==n.length){e.next=18;break}throw new Error("Problem generating code challenge");case 18:return e.abrupt("return",n);case 19:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();function vI(e,t,r){return bI.apply(this,arguments)}function bI(){return(bI=ui(Fi.mark((function e(t,r,n){var i,a,o,s,d,c,u,l,h,f,p,g,I,m=arguments;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=m.length>3&&void 0!==m[3]&&m[3],o={},a){e.next=6;break}return e.next=5,mI(r);case 5:o.codeChallenge=e.sent;case 6:return(s=new cl(t.clientConfig)).clientConfig.fetchOptions=fI(fI({},t.clientConfig.fetchOptions),{},{redirect:Go?"follow":"manual"}),d=n.hint,c=n.redirectURI,u=n.usid,l=oI(n,cI),h={parameters:fI(fI(fI(fI({},l),{},{client_id:t.clientConfig.parameters.clientId,channel_id:t.clientConfig.parameters.siteId},o.codeChallenge&&{code_challenge:o.codeChallenge}),d&&{hint:d}),{},{organizationId:t.clientConfig.parameters.organizationId,redirect_uri:c,response_type:"code"},u&&{usid:u})},e.next=12,s.authorizeCustomer(h,!0);case 12:if(f=e.sent,p=(null===(i=f.headers)||void 0===i?void 0:i.get("location"))||f.url,g=new URL(p),I=Object.fromEntries(g.searchParams.entries()),!(f.status>=400||I.error)){e.next=18;break}throw new fd(f);case 18:return e.abrupt("return",fI({url:p},gI(p)));case 19:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function kI(){return(kI=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c,u,l,h,f,p=arguments;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=p.length>2&&void 0!==p[2]&&p[2],i=r.hint,a=r.redirectURI,o=r.usid,s=oI(r,uI),d=II(),c={},n){e.next=8;break}return e.next=7,mI(d);case 7:c.codeChallenge=e.sent;case 8:return u=cl.apiPaths.authorizeCustomer,l={organizationId:t.clientConfig.parameters.organizationId,shortCode:t.clientConfig.parameters.shortCode,version:t.clientConfig.parameters.version||"v1"},h=fI(fI(fI({},s),{},{client_id:t.clientConfig.parameters.clientId,channel_id:t.clientConfig.parameters.siteId},c.codeChallenge&&{code_challenge:c.codeChallenge}),{},{hint:i,redirect_uri:a,response_type:"code"},o&&{usid:o}),f=new cu(u,t.clientConfig.baseUri,{pathParams:l,queryParams:h,origin:t.clientConfig.proxy}),e.abrupt("return",{url:f.toString(),codeVerifier:d});case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function yI(){return(yI=ui(Fi.mark((function e(t,r,n){var i,a,o,s;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=!!r.clientSecret,a=fI(fI(fI({client_id:t.clientConfig.parameters.clientId,channel_id:t.clientConfig.parameters.siteId,code:n.code,organizationId:t.clientConfig.parameters.organizationId},!i&&r.codeVerifier&&{code_verifier:r.codeVerifier}),{},{grant_type:i?"authorization_code":"authorization_code_pkce",redirect_uri:n.redirectURI},void 0!==n.dnt&&{dnt:n.dnt.toString()}),n.usid&&{usid:n.usid}),!r.clientSecret){e.next=6;break}return o="Basic ".concat(pI("".concat(t.clientConfig.parameters.clientId,":").concat(r.clientSecret))),s={headers:{Authorization:o},body:a},e.abrupt("return",t.getAccessToken(s));case 6:return e.abrupt("return",t.getAccessToken({body:a}));case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function xI(){return(xI=ui(Fi.mark((function e(t,r,n){var i,a;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.clientConfig.parameters.siteId){e.next=2;break}throw new Error("Required argument channel_id is not provided through clientConfig.parameters.siteId");case 2:return i="Basic ".concat(pI("".concat(t.clientConfig.parameters.clientId,":").concat(n.clientSecret))),a={headers:{Authorization:i},body:fI(fI({grant_type:"client_credentials",channel_id:t.clientConfig.parameters.siteId},r.usid&&{usid:r.usid}),void 0!==r.dnt&&{dnt:r.dnt.toString()})},e.abrupt("return",t.getAccessToken(a));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function wI(){return(wI=ui(Fi.mark((function e(t,r){var n,i,a,o,s,d,c;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=II(),i=r.dnt,a=r.redirectURI,o=r.usid,s=oI(r,lI),e.next=4,vI(t,n,fI(fI({},s),{},{redirectURI:a,hint:"guest"},o&&{usid:o}),!1);case 4:return d=e.sent,c=fI({client_id:t.clientConfig.parameters.clientId,channel_id:t.clientConfig.parameters.siteId,code:d.code,code_verifier:n,grant_type:"authorization_code_pkce",redirect_uri:a,usid:d.usid},void 0!==i&&{dnt:i.toString()}),e.abrupt("return",t.getAccessToken({body:c}));case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function zI(){return(zI=ui(Fi.mark((function e(t,r,n,i){var a,o,s,d,c,u,l,h,f,p,g,I,m,v,b,k,y;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=II(),e.next=3,mI(o);case 3:return s=e.sent,(d=new cl(t.clientConfig)).clientConfig.fetchOptions=fI(fI({},t.clientConfig.fetchOptions),{},{redirect:Go?"follow":"manual"}),c="Basic ".concat(pI("".concat(r.username,":").concat(r.password))),u=n.dnt,l=n.usid,h=n.redirectURI,f={headers:{Authorization:c},parameters:{organizationId:t.clientConfig.parameters.organizationId},body:fI(fI({},(null==i?void 0:i.body)||{}),{},{redirect_uri:h,client_id:t.clientConfig.parameters.clientId,code_challenge:s,channel_id:t.clientConfig.parameters.siteId},l&&{usid:l})},e.next=11,d.authenticateCustomer(f,!0);case 11:if(p=e.sent,g=(null===(a=p.headers)||void 0===a?void 0:a.get("location"))||p.url,I=new URL(g),m=Object.fromEntries(I.searchParams.entries()),!(p.status>=400||m.error)){e.next=17;break}throw new fd(p);case 17:if(v=gI(g),b=fI({client_id:t.clientConfig.parameters.clientId,channel_id:t.clientConfig.parameters.siteId,code:v.code,code_verifier:o,grant_type:"authorization_code_pkce",organizationId:t.clientConfig.parameters.organizationId,redirect_uri:n.redirectURI,usid:v.usid},void 0!==u&&{dnt:u.toString()}),!r.clientSecret){e.next=23;break}return k="Basic ".concat(pI("".concat(t.clientConfig.parameters.clientId,":").concat(r.clientSecret))),y={headers:{Authorization:k},body:b},e.abrupt("return",t.getAccessToken(y));case 23:return e.abrupt("return",t.getAccessToken({body:b}));case 24:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function CI(){return(CI=ui(Fi.mark((function e(t,r,n){var i,a;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r.clientSecret){e.next=2;break}throw new Error("Required argument client secret is not provided");case 2:if(t.clientConfig.parameters.siteId){e.next=4;break}throw new Error("Required argument channel_id is not provided through clientConfig.parameters.siteId");case 4:if(n.mode){e.next=6;break}throw new Error("Required argument mode is not provided through parameters");case 6:if(n.userid){e.next=8;break}throw new Error("Required argument userid is not provided through parameters");case 8:return i="Basic ".concat(pI("".concat(t.clientConfig.parameters.clientId,":").concat(r.clientSecret))),a=fI(fI(fI({user_id:n.userid,mode:n.mode},n.locale&&{locale:n.locale}),n.usid&&{usid:n.usid}),{},{channel_id:t.clientConfig.parameters.siteId},n.callbackURI&&{callback_uri:n.callbackURI}),e.abrupt("return",t.authorizePasswordlessCustomer({headers:{Authorization:i},parameters:{organizationId:t.clientConfig.parameters.organizationId},body:a},!0));case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function PI(){return(PI=ui(Fi.mark((function e(t,r,n){var i,a,o;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r.clientSecret){e.next=2;break}throw new Error("Required argument client secret is not provided");case 2:if(t.clientConfig.parameters.organizationId){e.next=4;break}throw new Error("Required argument organizationId is not provided through clientConfig.parameters.organizationId");case 4:if(n.pwdlessLoginToken){e.next=6;break}throw new Error("Required argument pwdlessLoginToken is not provided through parameters");case 6:return i=II(),a="Basic ".concat(pI("".concat(t.clientConfig.parameters.clientId,":").concat(r.clientSecret))),o=fI({grant_type:"client_credentials",hint:"pwdless_login",pwdless_login_token:n.pwdlessLoginToken,code_verifier:i},n.dnt&&{dnt:n.dnt}),e.abrupt("return",t.getPasswordLessAccessToken({headers:{Authorization:a},parameters:{organizationId:t.clientConfig.parameters.organizationId},body:o}));case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var OI=Sr.find,EI=!0;"find"in[]&&Array(1).find((function(){EI=!1})),_t({target:"Array",proto:!0,forced:EI},{find:function(e){return OI(this,e,arguments.length>1?arguments[1]:void 0)}}),$i("find");function qI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function jI(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?qI(Object(r),!0).forEach((function(t){pi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qI(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var SI=function(e){var t=!1;return e&&(t=Boolean(Object.keys(e).find((function(e){return"content-type"===e.toLowerCase()})))),t},TI=function(){var e=ui(Fi.mark((function e(t){var r,n,i,a,o,s,d,c,u,l,h,f;return Fi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.options,a=t.clientConfig,o=t.rawResponse,s=["apiName","endpointPath","organizationId","shortCode"],d=jI(jI({},a.parameters),null==i?void 0:i.customApiPathParameters),s.forEach((function(e){if(!d[e])throw new Error("Missing required property needed in options.customApiPathParameters or clientConfig.parameters: ".concat(e))})),d.apiVersion||(d.apiVersion="v1"),c=a,a.baseUri||(c=jI(jI({},a),{},{baseUri:"https://{shortCode}.api.commercecloud.salesforce.com/custom/{apiName}/{apiVersion}"})),u=Boolean(!(null!==(r=i.parameters)&&void 0!==r&&r.siteId)&&(null==a||null===(n=a.parameters)||void 0===n?void 0:n.siteId)),l=SI(i.headers)||SI(c.headers),h=i,l&&!u||(h=jI(jI({},i),{},{headers:jI(jI({},i.headers),!l&&{"Content-Type":"application/json"}),parameters:jI(jI({},i.parameters),u&&{siteId:a.parameters.siteId})})),f=new cu("/organizations/{organizationId}/{endpointPath}",c.baseUri,{pathParams:d,queryParams:h.parameters,origin:c.proxy}),e.abrupt("return",md(f.toString(),h,c,o));case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),MI=Object.freeze({__proto__:null,isBrowser:Go,isNode:Ho,globalObject:Vo,hasFetchAvailable:$o,fetch:Yo,stringToBase64:pI,getCodeAndUsidFromUrl:gI,createCodeVerifier:II,generateCodeChallenge:mI,authorize:vI,authorizeIDP:function(e,t){return kI.apply(this,arguments)},loginIDPUser:function(e,t,r){return yI.apply(this,arguments)},loginGuestUserPrivate:function(e,t,r){return xI.apply(this,arguments)},loginGuestUser:function(e,t){return wI.apply(this,arguments)},loginRegisteredUserB2C:function(e,t,r,n){return zI.apply(this,arguments)},authorizePasswordless:function(e,t,r){return CI.apply(this,arguments)},getPasswordLessAccessToken:function(e,t,r){return PI.apply(this,arguments)},refreshAccessToken:function(e,t,r){var n=fI({grant_type:"refresh_token",refresh_token:t.refreshToken,client_id:e.clientConfig.parameters.clientId,channel_id:e.clientConfig.parameters.siteId},void 0!==t.dnt&&{dnt:t.dnt.toString()});if(r&&r.clientSecret){var i={headers:{Authorization:"Basic ".concat(pI("".concat(e.clientConfig.parameters.clientId,":").concat(r.clientSecret)))},body:n};return e.getAccessToken(i)}return e.getAccessToken({body:n})},logout:function(e,t){return e.logoutCustomer({headers:{Authorization:"Bearer ".concat(t.accessToken)},parameters:{refresh_token:t.refreshToken,client_id:e.clientConfig.parameters.clientId,channel_id:e.clientConfig.parameters.siteId}})},callCustomEndpoint:TI,doFetch:md,encodeSCAPISpecialCharacters:function(e){return e.replace(/%/g,"%25").replace(/,/g,"%2C")}});export{Fo as ClientConfig,fu as ShopperBaskets,Iu as ShopperContexts,bu as ShopperCustomers,xu as ShopperDiscoverySearch,Cu as ShopperExperience,Eu as ShopperGiftCertificates,cl as ShopperLogin,Su as ShopperOrders,Au as ShopperProducts,Uu as ShopperPromotions,el as ShopperSearch,nl as ShopperSeo,ol as ShopperStores,cu as TemplateURL,MI as helpers};
|
|
1
|
+
import{customRandom as e,urlAlphabet as t}from"nanoid";import r from"seedrandom";var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function a(e,t,r){return e(r={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&r.path)}},r.exports),r.exports}var i,o,s=function(e){return e&&e.Math==Math&&e},d=s("object"==typeof globalThis&&globalThis)||s("object"==typeof window&&window)||s("object"==typeof self&&self)||s("object"==typeof n&&n)||function(){return this}()||Function("return this")(),c=function(e){try{return!!e()}catch(e){return!0}},u=!c((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),l=!c((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),g=Function.prototype.call,h=l?g.bind(g):function(){return g.apply(g,arguments)},p={}.propertyIsEnumerable,f=Object.getOwnPropertyDescriptor,I={f:f&&!p.call({1:2},1)?function(e){var t=f(this,e);return!!t&&t.enumerable}:p},m=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},b=Function.prototype,k=b.bind,v=b.call,y=l&&k.bind(v,v),x=l?function(e){return e&&y(e)}:function(e){return e&&function(){return v.apply(e,arguments)}},w=x({}.toString),z=x("".slice),C=function(e){return z(w(e),8,-1)},q=Object,E=x("".split),P=c((function(){return!q("z").propertyIsEnumerable(0)}))?function(e){return"String"==C(e)?E(e,""):q(e)}:q,j=TypeError,O=function(e){if(null==e)throw j("Can't call method on "+e);return e},S=function(e){return P(O(e))},T=function(e){return"function"==typeof e},_=function(e){return"object"==typeof e?null!==e:T(e)},M=function(e){return T(e)?e:void 0},B=function(e,t){return arguments.length<2?M(d[e]):d[e]&&d[e][t]},A=x({}.isPrototypeOf),R=B("navigator","userAgent")||"",F=d.process,U=d.Deno,W=F&&F.versions||U&&U.version,L=W&&W.v8;L&&(o=(i=L.split("."))[0]>0&&i[0]<4?1:+(i[0]+i[1])),!o&&R&&(!(i=R.match(/Edge\/(\d+)/))||i[1]>=74)&&(i=R.match(/Chrome\/(\d+)/))&&(o=+i[1]);var N=o,D=!!Object.getOwnPropertySymbols&&!c((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&N&&N<41})),G=D&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,H=Object,V=G?function(e){return"symbol"==typeof e}:function(e){var t=B("Symbol");return T(t)&&A(t.prototype,H(e))},$=String,K=function(e){try{return $(e)}catch(e){return"Object"}},Y=TypeError,J=function(e){if(T(e))return e;throw Y(K(e)+" is not a function")},Q=function(e,t){var r=e[t];return null==r?void 0:J(r)},X=TypeError,Z=Object.defineProperty,ee=function(e,t){try{Z(d,e,{value:t,configurable:!0,writable:!0})}catch(r){d[e]=t}return t},te=d["__core-js_shared__"]||ee("__core-js_shared__",{}),re=a((function(e){(e.exports=function(e,t){return te[e]||(te[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.23.4",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.23.4/LICENSE",source:"https://github.com/zloirock/core-js"})})),ne=Object,ae=function(e){return ne(O(e))},ie=x({}.hasOwnProperty),oe=Object.hasOwn||function(e,t){return ie(ae(e),t)},se=0,de=Math.random(),ce=x(1..toString),ue=function(e){return"Symbol("+(void 0===e?"":e)+")_"+ce(++se+de,36)},le=re("wks"),ge=d.Symbol,he=ge&&ge.for,pe=G?ge:ge&&ge.withoutSetter||ue,fe=function(e){if(!oe(le,e)||!D&&"string"!=typeof le[e]){var t="Symbol."+e;D&&oe(ge,e)?le[e]=ge[e]:le[e]=G&&he?he(t):pe(t)}return le[e]},Ie=TypeError,me=fe("toPrimitive"),be=function(e,t){if(!_(e)||V(e))return e;var r,n=Q(e,me);if(n){if(void 0===t&&(t="default"),r=h(n,e,t),!_(r)||V(r))return r;throw Ie("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var r,n;if("string"===t&&T(r=e.toString)&&!_(n=h(r,e)))return n;if(T(r=e.valueOf)&&!_(n=h(r,e)))return n;if("string"!==t&&T(r=e.toString)&&!_(n=h(r,e)))return n;throw X("Can't convert object to primitive value")}(e,t)},ke=function(e){var t=be(e,"string");return V(t)?t:t+""},ve=d.document,ye=_(ve)&&_(ve.createElement),xe=function(e){return ye?ve.createElement(e):{}},we=!u&&!c((function(){return 7!=Object.defineProperty(xe("div"),"a",{get:function(){return 7}}).a})),ze=Object.getOwnPropertyDescriptor,Ce={f:u?ze:function(e,t){if(e=S(e),t=ke(t),we)try{return ze(e,t)}catch(e){}if(oe(e,t))return m(!h(I.f,e,t),e[t])}},qe=u&&c((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Ee=String,Pe=TypeError,je=function(e){if(_(e))return e;throw Pe(Ee(e)+" is not an object")},Oe=TypeError,Se=Object.defineProperty,Te=Object.getOwnPropertyDescriptor,_e={f:u?qe?function(e,t,r){if(je(e),t=ke(t),je(r),"function"==typeof e&&"prototype"===t&&"value"in r&&"writable"in r&&!r.writable){var n=Te(e,t);n&&n.writable&&(e[t]=r.value,r={configurable:"configurable"in r?r.configurable:n.configurable,enumerable:"enumerable"in r?r.enumerable:n.enumerable,writable:!1})}return Se(e,t,r)}:Se:function(e,t,r){if(je(e),t=ke(t),je(r),we)try{return Se(e,t,r)}catch(e){}if("get"in r||"set"in r)throw Oe("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},Me=u?function(e,t,r){return _e.f(e,t,m(1,r))}:function(e,t,r){return e[t]=r,e},Be=Function.prototype,Ae=u&&Object.getOwnPropertyDescriptor,Re=oe(Be,"name"),Fe={EXISTS:Re,PROPER:Re&&"something"===function(){}.name,CONFIGURABLE:Re&&(!u||u&&Ae(Be,"name").configurable)},Ue=x(Function.toString);T(te.inspectSource)||(te.inspectSource=function(e){return Ue(e)});var We,Le,Ne,De=te.inspectSource,Ge=d.WeakMap,He=T(Ge)&&/native code/.test(De(Ge)),Ve=re("keys"),$e=function(e){return Ve[e]||(Ve[e]=ue(e))},Ke={},Ye=d.TypeError,Je=d.WeakMap;if(He||te.state){var Qe=te.state||(te.state=new Je),Xe=x(Qe.get),Ze=x(Qe.has),et=x(Qe.set);We=function(e,t){if(Ze(Qe,e))throw new Ye("Object already initialized");return t.facade=e,et(Qe,e,t),t},Le=function(e){return Xe(Qe,e)||{}},Ne=function(e){return Ze(Qe,e)}}else{var tt=$e("state");Ke[tt]=!0,We=function(e,t){if(oe(e,tt))throw new Ye("Object already initialized");return t.facade=e,Me(e,tt,t),t},Le=function(e){return oe(e,tt)?e[tt]:{}},Ne=function(e){return oe(e,tt)}}var rt={set:We,get:Le,has:Ne,enforce:function(e){return Ne(e)?Le(e):We(e,{})},getterFor:function(e){return function(t){var r;if(!_(t)||(r=Le(t)).type!==e)throw Ye("Incompatible receiver, "+e+" required");return r}}},nt=a((function(e){var t=Fe.CONFIGURABLE,r=rt.enforce,n=rt.get,a=Object.defineProperty,i=u&&!c((function(){return 8!==a((function(){}),"length",{value:8}).length})),o=String(String).split("String"),s=e.exports=function(e,n,s){"Symbol("===String(n).slice(0,7)&&(n="["+String(n).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),s&&s.getter&&(n="get "+n),s&&s.setter&&(n="set "+n),(!oe(e,"name")||t&&e.name!==n)&&(u?a(e,"name",{value:n,configurable:!0}):e.name=n),i&&s&&oe(s,"arity")&&e.length!==s.arity&&a(e,"length",{value:s.arity});try{s&&oe(s,"constructor")&&s.constructor?u&&a(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var d=r(e);return oe(d,"source")||(d.source=o.join("string"==typeof n?n:"")),e};Function.prototype.toString=s((function(){return T(this)&&n(this).source||De(this)}),"toString")})),at=function(e,t,r,n){n||(n={});var a=n.enumerable,i=void 0!==n.name?n.name:t;if(T(r)&&nt(r,i,n),n.global)a?e[t]=r:ee(t,r);else{try{n.unsafe?e[t]&&(a=!0):delete e[t]}catch(e){}a?e[t]=r:_e.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},it=Math.ceil,ot=Math.floor,st=Math.trunc||function(e){var t=+e;return(t>0?ot:it)(t)},dt=function(e){var t=+e;return t!=t||0===t?0:st(t)},ct=Math.max,ut=Math.min,lt=function(e,t){var r=dt(e);return r<0?ct(r+t,0):ut(r,t)},gt=Math.min,ht=function(e){return e>0?gt(dt(e),9007199254740991):0},pt=function(e){return ht(e.length)},ft=function(e){return function(t,r,n){var a,i=S(t),o=pt(i),s=lt(n,o);if(e&&r!=r){for(;o>s;)if((a=i[s++])!=a)return!0}else for(;o>s;s++)if((e||s in i)&&i[s]===r)return e||s||0;return!e&&-1}},It={includes:ft(!0),indexOf:ft(!1)},mt=It.indexOf,bt=x([].push),kt=function(e,t){var r,n=S(e),a=0,i=[];for(r in n)!oe(Ke,r)&&oe(n,r)&&bt(i,r);for(;t.length>a;)oe(n,r=t[a++])&&(~mt(i,r)||bt(i,r));return i},vt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],yt=vt.concat("length","prototype"),xt={f:Object.getOwnPropertyNames||function(e){return kt(e,yt)}},wt={f:Object.getOwnPropertySymbols},zt=x([].concat),Ct=B("Reflect","ownKeys")||function(e){var t=xt.f(je(e)),r=wt.f;return r?zt(t,r(e)):t},qt=function(e,t,r){for(var n=Ct(t),a=_e.f,i=Ce.f,o=0;o<n.length;o++){var s=n[o];oe(e,s)||r&&oe(r,s)||a(e,s,i(t,s))}},Et=/#|\.prototype\./,Pt=function(e,t){var r=Ot[jt(e)];return r==Tt||r!=St&&(T(t)?c(t):!!t)},jt=Pt.normalize=function(e){return String(e).replace(Et,".").toLowerCase()},Ot=Pt.data={},St=Pt.NATIVE="N",Tt=Pt.POLYFILL="P",_t=Pt,Mt=Ce.f,Bt=function(e,t){var r,n,a,i,o,s=e.target,c=e.global,u=e.stat;if(r=c?d:u?d[s]||ee(s,{}):(d[s]||{}).prototype)for(n in t){if(i=t[n],a=e.dontCallGetSet?(o=Mt(r,n))&&o.value:r[n],!_t(c?n:s+(u?".":"#")+n,e.forced)&&void 0!==a){if(typeof i==typeof a)continue;qt(i,a)}(e.sham||a&&a.sham)&&Me(i,"sham",!0),at(r,n,i,e)}},At=Object.keys||function(e){return kt(e,vt)},Rt=c((function(){At(1)}));Bt({target:"Object",stat:!0,forced:Rt},{keys:function(e){return At(ae(e))}});var Ft={};Ft[fe("toStringTag")]="z";var Ut,Wt="[object z]"===String(Ft),Lt=fe("toStringTag"),Nt=Object,Dt="Arguments"==C(function(){return arguments}()),Gt=Wt?C:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=Nt(e),Lt))?r:Dt?C(t):"Object"==(n=C(t))&&T(t.callee)?"Arguments":n},Ht=String,Vt=function(e){if("Symbol"===Gt(e))throw TypeError("Cannot convert a Symbol value to a string");return Ht(e)},$t={f:u&&!qe?Object.defineProperties:function(e,t){je(e);for(var r,n=S(t),a=At(t),i=a.length,o=0;i>o;)_e.f(e,r=a[o++],n[r]);return e}},Kt=B("document","documentElement"),Yt=$e("IE_PROTO"),Jt=function(){},Qt=function(e){return"<script>"+e+"<\/script>"},Xt=function(e){e.write(Qt("")),e.close();var t=e.parentWindow.Object;return e=null,t},Zt=function(){try{Ut=new ActiveXObject("htmlfile")}catch(e){}var e,t;Zt="undefined"!=typeof document?document.domain&&Ut?Xt(Ut):((t=xe("iframe")).style.display="none",Kt.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(Qt("document.F=Object")),e.close(),e.F):Xt(Ut);for(var r=vt.length;r--;)delete Zt.prototype[vt[r]];return Zt()};Ke[Yt]=!0;var er=Object.create||function(e,t){var r;return null!==e?(Jt.prototype=je(e),r=new Jt,Jt.prototype=null,r[Yt]=e):r=Zt(),void 0===t?r:$t.f(r,t)},tr=function(e,t,r){var n=ke(t);n in e?_e.f(e,n,m(0,r)):e[n]=r},rr=Array,nr=Math.max,ar=function(e,t,r){for(var n=pt(e),a=lt(t,n),i=lt(void 0===r?n:r,n),o=rr(nr(i-a,0)),s=0;a<i;a++,s++)tr(o,s,e[a]);return o.length=s,o},ir=xt.f,or="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],sr={f:function(e){return or&&"Window"==C(e)?function(e){try{return ir(e)}catch(e){return ar(or)}}(e):ir(S(e))}},dr={f:fe},cr=d,ur=_e.f,lr=_e.f,gr=fe("toStringTag"),hr=function(e,t,r){e&&!r&&(e=e.prototype),e&&!oe(e,gr)&&lr(e,gr,{configurable:!0,value:t})},pr=x(x.bind),fr=function(e,t){return J(e),void 0===t?e:l?pr(e,t):function(){return e.apply(t,arguments)}},Ir=Array.isArray||function(e){return"Array"==C(e)},mr=function(){},br=[],kr=B("Reflect","construct"),vr=/^\s*(?:class|function)\b/,yr=x(vr.exec),xr=!vr.exec(mr),wr=function(e){if(!T(e))return!1;try{return kr(mr,br,e),!0}catch(e){return!1}},zr=function(e){if(!T(e))return!1;switch(Gt(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return xr||!!yr(vr,De(e))}catch(e){return!0}};zr.sham=!0;var Cr=!kr||c((function(){var e;return wr(wr.call)||!wr(Object)||!wr((function(){e=!0}))||e}))?zr:wr,qr=fe("species"),Er=Array,Pr=function(e,t){return new(function(e){var t;return Ir(e)&&(t=e.constructor,(Cr(t)&&(t===Er||Ir(t.prototype))||_(t)&&null===(t=t[qr]))&&(t=void 0)),void 0===t?Er:t}(e))(0===t?0:t)},jr=x([].push),Or=function(e){var t=1==e,r=2==e,n=3==e,a=4==e,i=6==e,o=7==e,s=5==e||i;return function(d,c,u,l){for(var g,h,p=ae(d),f=P(p),I=fr(c,u),m=pt(f),b=0,k=l||Pr,v=t?k(d,m):r||o?k(d,0):void 0;m>b;b++)if((s||b in f)&&(h=I(g=f[b],b,p),e))if(t)v[b]=h;else if(h)switch(e){case 3:return!0;case 5:return g;case 6:return b;case 2:jr(v,g)}else switch(e){case 4:return!1;case 7:jr(v,g)}return i?-1:n||a?a:v}},Sr={forEach:Or(0),map:Or(1),filter:Or(2),some:Or(3),every:Or(4),find:Or(5),findIndex:Or(6),filterReject:Or(7)},Tr=Sr.forEach,_r=$e("hidden"),Mr=rt.set,Br=rt.getterFor("Symbol"),Ar=Object.prototype,Rr=d.Symbol,Fr=Rr&&Rr.prototype,Ur=d.TypeError,Wr=d.QObject,Lr=Ce.f,Nr=_e.f,Dr=sr.f,Gr=I.f,Hr=x([].push),Vr=re("symbols"),$r=re("op-symbols"),Kr=re("wks"),Yr=!Wr||!Wr.prototype||!Wr.prototype.findChild,Jr=u&&c((function(){return 7!=er(Nr({},"a",{get:function(){return Nr(this,"a",{value:7}).a}})).a}))?function(e,t,r){var n=Lr(Ar,t);n&&delete Ar[t],Nr(e,t,r),n&&e!==Ar&&Nr(Ar,t,n)}:Nr,Qr=function(e,t){var r=Vr[e]=er(Fr);return Mr(r,{type:"Symbol",tag:e,description:t}),u||(r.description=t),r},Xr=function(e,t,r){e===Ar&&Xr($r,t,r),je(e);var n=ke(t);return je(r),oe(Vr,n)?(r.enumerable?(oe(e,_r)&&e[_r][n]&&(e[_r][n]=!1),r=er(r,{enumerable:m(0,!1)})):(oe(e,_r)||Nr(e,_r,m(1,{})),e[_r][n]=!0),Jr(e,n,r)):Nr(e,n,r)},Zr=function(e,t){je(e);var r=S(t),n=At(r).concat(nn(r));return Tr(n,(function(t){u&&!h(en,r,t)||Xr(e,t,r[t])})),e},en=function(e){var t=ke(e),r=h(Gr,this,t);return!(this===Ar&&oe(Vr,t)&&!oe($r,t))&&(!(r||!oe(this,t)||!oe(Vr,t)||oe(this,_r)&&this[_r][t])||r)},tn=function(e,t){var r=S(e),n=ke(t);if(r!==Ar||!oe(Vr,n)||oe($r,n)){var a=Lr(r,n);return!a||!oe(Vr,n)||oe(r,_r)&&r[_r][n]||(a.enumerable=!0),a}},rn=function(e){var t=Dr(S(e)),r=[];return Tr(t,(function(e){oe(Vr,e)||oe(Ke,e)||Hr(r,e)})),r},nn=function(e){var t=e===Ar,r=Dr(t?$r:S(e)),n=[];return Tr(r,(function(e){!oe(Vr,e)||t&&!oe(Ar,e)||Hr(n,Vr[e])})),n};D||(Fr=(Rr=function(){if(A(Fr,this))throw Ur("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?Vt(arguments[0]):void 0,t=ue(e),r=function(e){this===Ar&&h(r,$r,e),oe(this,_r)&&oe(this[_r],t)&&(this[_r][t]=!1),Jr(this,t,m(1,e))};return u&&Yr&&Jr(Ar,t,{configurable:!0,set:r}),Qr(t,e)}).prototype,at(Fr,"toString",(function(){return Br(this).tag})),at(Rr,"withoutSetter",(function(e){return Qr(ue(e),e)})),I.f=en,_e.f=Xr,$t.f=Zr,Ce.f=tn,xt.f=sr.f=rn,wt.f=nn,dr.f=function(e){return Qr(fe(e),e)},u&&(Nr(Fr,"description",{configurable:!0,get:function(){return Br(this).description}}),at(Ar,"propertyIsEnumerable",en,{unsafe:!0}))),Bt({global:!0,constructor:!0,wrap:!0,forced:!D,sham:!D},{Symbol:Rr}),Tr(At(Kr),(function(e){!function(e){var t=cr.Symbol||(cr.Symbol={});oe(t,e)||ur(t,e,{value:dr.f(e)})}(e)})),Bt({target:"Symbol",stat:!0,forced:!D},{useSetter:function(){Yr=!0},useSimple:function(){Yr=!1}}),Bt({target:"Object",stat:!0,forced:!D,sham:!u},{create:function(e,t){return void 0===t?er(e):Zr(er(e),t)},defineProperty:Xr,defineProperties:Zr,getOwnPropertyDescriptor:tn}),Bt({target:"Object",stat:!0,forced:!D},{getOwnPropertyNames:rn}),function(){var e=B("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,n=fe("toPrimitive");t&&!t[n]&&at(t,n,(function(e){return h(r,this)}),{arity:1})}(),hr(Rr,"Symbol"),Ke[_r]=!0;var an=D&&!!Symbol.for&&!!Symbol.keyFor,on=re("string-to-symbol-registry"),sn=re("symbol-to-string-registry");Bt({target:"Symbol",stat:!0,forced:!an},{for:function(e){var t=Vt(e);if(oe(on,t))return on[t];var r=B("Symbol")(t);return on[t]=r,sn[r]=t,r}});var dn=re("symbol-to-string-registry");Bt({target:"Symbol",stat:!0,forced:!an},{keyFor:function(e){if(!V(e))throw TypeError(K(e)+" is not a symbol");if(oe(dn,e))return dn[e]}});var cn=Function.prototype,un=cn.apply,ln=cn.call,gn="object"==typeof Reflect&&Reflect.apply||(l?ln.bind(un):function(){return ln.apply(un,arguments)}),hn=x([].slice),pn=B("JSON","stringify"),fn=x(/./.exec),In=x("".charAt),mn=x("".charCodeAt),bn=x("".replace),kn=x(1..toString),vn=/[\uD800-\uDFFF]/g,yn=/^[\uD800-\uDBFF]$/,xn=/^[\uDC00-\uDFFF]$/,wn=!D||c((function(){var e=B("Symbol")();return"[null]"!=pn([e])||"{}"!=pn({a:e})||"{}"!=pn(Object(e))})),zn=c((function(){return'"\\udf06\\ud834"'!==pn("\udf06\ud834")||'"\\udead"'!==pn("\udead")})),Cn=function(e,t){var r=hn(arguments),n=t;if((_(t)||void 0!==e)&&!V(e))return Ir(t)||(t=function(e,t){if(T(n)&&(t=h(n,this,e,t)),!V(t))return t}),r[1]=t,gn(pn,null,r)},qn=function(e,t,r){var n=In(r,t-1),a=In(r,t+1);return fn(yn,e)&&!fn(xn,a)||fn(xn,e)&&!fn(yn,n)?"\\u"+kn(mn(e,0),16):e};pn&&Bt({target:"JSON",stat:!0,arity:3,forced:wn||zn},{stringify:function(e,t,r){var n=hn(arguments),a=gn(wn?Cn:pn,null,n);return zn&&"string"==typeof a?bn(a,vn,qn):a}});var En=!D||c((function(){wt.f(1)}));Bt({target:"Object",stat:!0,forced:En},{getOwnPropertySymbols:function(e){var t=wt.f;return t?t(ae(e)):[]}});var Pn=fe("species"),jn=function(e){return N>=51||!c((function(){var t=[];return(t.constructor={})[Pn]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},On=Sr.filter,Sn=jn("filter");Bt({target:"Array",proto:!0,forced:!Sn},{filter:function(e){return On(this,e,arguments.length>1?arguments[1]:void 0)}});var Tn=Wt?{}.toString:function(){return"[object "+Gt(this)+"]"};Wt||at(Object.prototype,"toString",Tn,{unsafe:!0});var _n=Ce.f,Mn=c((function(){_n(1)}));Bt({target:"Object",stat:!0,forced:!u||Mn,sham:!u},{getOwnPropertyDescriptor:function(e,t){return _n(S(e),t)}});var Bn={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},An=xe("span").classList,Rn=An&&An.constructor&&An.constructor.prototype,Fn=Rn===Object.prototype?void 0:Rn,Un=function(e,t){var r=[][e];return!!r&&c((function(){r.call(null,t||function(){return 1},1)}))},Wn=Sr.forEach,Ln=Un("forEach")?[].forEach:function(e){return Wn(this,e,arguments.length>1?arguments[1]:void 0)},Nn=function(e){if(e&&e.forEach!==Ln)try{Me(e,"forEach",Ln)}catch(t){e.forEach=Ln}};for(var Dn in Bn)Bn[Dn]&&Nn(d[Dn]&&d[Dn].prototype);Nn(Fn),Bt({target:"Object",stat:!0,sham:!u},{getOwnPropertyDescriptors:function(e){for(var t,r,n=S(e),a=Ce.f,i=Ct(n),o={},s=0;i.length>s;)void 0!==(r=a(n,t=i[s++]))&&tr(o,t,r);return o}});var Gn=$t.f;Bt({target:"Object",stat:!0,forced:Object.defineProperties!==Gn,sham:!u},{defineProperties:Gn});var Hn=_e.f;Bt({target:"Object",stat:!0,forced:Object.defineProperty!==Hn,sham:!u},{defineProperty:Hn});var Vn,$n=fe("match"),Kn=TypeError,Yn=function(e){if(function(e){var t;return _(e)&&(void 0!==(t=e[$n])?!!t:"RegExp"==C(e))}(e))throw Kn("The method doesn't accept regular expressions");return e},Jn=fe("match"),Qn=Ce.f,Xn=x("".startsWith),Zn=x("".slice),ea=Math.min,ta=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[Jn]=!1,"/./"[e](t)}catch(e){}}return!1}("startsWith"),ra=!(ta||(Vn=Qn(String.prototype,"startsWith"),!Vn||Vn.writable));Bt({target:"String",proto:!0,forced:!ra&&!ta},{startsWith:function(e){var t=Vt(O(this));Yn(e);var r=ht(ea(arguments.length>1?arguments[1]:void 0,t.length)),n=Vt(e);return Xn?Xn(t,n,r):Zn(t,r,r+n.length)===n}});var na=function(){var e=je(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},aa=RegExp.prototype,ia=Fe.PROPER,oa=RegExp.prototype.toString,sa=c((function(){return"/a/b"!=oa.call({source:"a",flags:"b"})})),da=ia&&"toString"!=oa.name;function ca(e,t,r,n,a,i,o){try{var s=e[i](o),d=s.value}catch(e){return void r(e)}s.done?t(d):Promise.resolve(d).then(n,a)}function ua(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var i=e.apply(t,r);function o(e){ca(i,n,a,o,s,"next",e)}function s(e){ca(i,n,a,o,s,"throw",e)}o(void 0)}))}}function la(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ga(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ha(e,t,r){return t&&ga(e.prototype,t),r&&ga(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function pa(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}(sa||da)&&at(RegExp.prototype,"toString",(function(){var e=je(this);return"/"+Vt(e.source)+"/"+Vt(function(e){var t=e.flags;return void 0!==t||"flags"in aa||oe(e,"flags")||!A(aa,e)?t:h(na,e)}(e))}),{unsafe:!0});var fa=Object.prototype,Ia=fa.hasOwnProperty,ma="function"==typeof Symbol?Symbol:{},ba=ma.iterator||"@@iterator",ka=ma.asyncIterator||"@@asyncIterator",va=ma.toStringTag||"@@toStringTag";function ya(e,t,r,n){var a=t&&t.prototype instanceof za?t:za,i=Object.create(a.prototype),o=new Ra(n||[]);return i._invoke=function(e,t,r){var n="suspendedStart";return function(a,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw i;return Ua()}for(r.method=a,r.arg=i;;){var o=r.delegate;if(o){var s=Ma(o,r);if(s){if(s===wa)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var d=xa(e,t,r);if("normal"===d.type){if(n=r.done?"completed":"suspendedYield",d.arg===wa)continue;return{value:d.arg,done:r.done}}"throw"===d.type&&(n="completed",r.method="throw",r.arg=d.arg)}}}(e,r,o),i}function xa(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}var wa={};function za(){}function Ca(){}function qa(){}var Ea={};Ea[ba]=function(){return this};var Pa=Object.getPrototypeOf,ja=Pa&&Pa(Pa(Fa([])));ja&&ja!==fa&&Ia.call(ja,ba)&&(Ea=ja);var Oa=qa.prototype=za.prototype=Object.create(Ea);function Sa(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function Ta(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===Ca||"GeneratorFunction"===(t.displayName||t.name))}function _a(e,t){var r;this._invoke=function(n,a){function i(){return new t((function(r,i){!function r(n,a,i,o){var s=xa(e[n],e,a);if("throw"!==s.type){var d=s.arg,c=d.value;return c&&"object"==typeof c&&Ia.call(c,"__await")?t.resolve(c.__await).then((function(e){r("next",e,i,o)}),(function(e){r("throw",e,i,o)})):t.resolve(c).then((function(e){d.value=e,i(d)}),(function(e){return r("throw",e,i,o)}))}o(s.arg)}(n,a,r,i)}))}return r=r?r.then(i,i):i()}}function Ma(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,Ma(e,t),"throw"===t.method))return wa;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return wa}var n=xa(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,wa;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,wa):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,wa)}function Ba(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function Aa(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function Ra(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(Ba,this),this.reset(!0)}function Fa(e){if(e){var t=e[ba];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function t(){for(;++r<e.length;)if(Ia.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return n.next=n}}return{next:Ua}}function Ua(){return{value:void 0,done:!0}}Ca.prototype=Oa.constructor=qa,qa.constructor=Ca,qa[va]=Ca.displayName="GeneratorFunction",Sa(_a.prototype),_a.prototype[ka]=function(){return this},Sa(Oa),Oa[va]="Generator",Oa[ba]=function(){return this},Oa.toString=function(){return"[object Generator]"},Ra.prototype={constructor:Ra,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(Aa),!e)for(var t in this)"t"===t.charAt(0)&&Ia.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n],i=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var o=Ia.call(a,"catchLoc"),s=Ia.call(a,"finallyLoc");if(o&&s){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(o){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&Ia.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,wa):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),wa},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),Aa(r),wa}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;Aa(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:Fa(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),wa}};var Wa={wrap:ya,isGeneratorFunction:Ta,AsyncIterator:_a,mark:function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,qa):(e.__proto__=qa,va in e||(e[va]="GeneratorFunction")),e.prototype=Object.create(Oa),e},awrap:function(e){return{__await:e}},async:function(e,t,r,n,a){void 0===a&&(a=Promise);var i=new _a(ya(e,t,r,n),a);return Ta(t)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},keys:function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},values:Fa},La=_e.f,Na=fe("unscopables"),Da=Array.prototype;null==Da[Na]&&La(Da,Na,{configurable:!0,value:er(null)});var Ga,Ha,Va,$a=function(e){Da[Na][e]=!0},Ka={},Ya=!c((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Ja=$e("IE_PROTO"),Qa=Object,Xa=Qa.prototype,Za=Ya?Qa.getPrototypeOf:function(e){var t=ae(e);if(oe(t,Ja))return t[Ja];var r=t.constructor;return T(r)&&t instanceof r?r.prototype:t instanceof Qa?Xa:null},ei=fe("iterator"),ti=!1;[].keys&&("next"in(Va=[].keys())?(Ha=Za(Za(Va)))!==Object.prototype&&(Ga=Ha):ti=!0),(null==Ga||c((function(){var e={};return Ga[ei].call(e)!==e})))&&(Ga={}),T(Ga[ei])||at(Ga,ei,(function(){return this}));var ri={IteratorPrototype:Ga,BUGGY_SAFARI_ITERATORS:ti},ni=ri.IteratorPrototype,ai=function(){return this},ii=function(e,t,r,n){var a=t+" Iterator";return e.prototype=er(ni,{next:m(+!n,r)}),hr(e,a,!1),Ka[a]=ai,e},oi=String,si=TypeError,di=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=x(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),t=r instanceof Array}catch(e){}return function(r,n){return je(r),function(e){if("object"==typeof e||T(e))return e;throw si("Can't set "+oi(e)+" as a prototype")}(n),t?e(r,n):r.__proto__=n,r}}():void 0),ci=Fe.PROPER,ui=Fe.CONFIGURABLE,li=ri.IteratorPrototype,gi=ri.BUGGY_SAFARI_ITERATORS,hi=fe("iterator"),pi=function(){return this},fi=function(e,t,r,n,a,i,o){ii(r,t,n);var s,d,c,u=function(e){if(e===a&&I)return I;if(!gi&&e in p)return p[e];switch(e){case"keys":case"values":case"entries":return function(){return new r(this,e)}}return function(){return new r(this)}},l=t+" Iterator",g=!1,p=e.prototype,f=p[hi]||p["@@iterator"]||a&&p[a],I=!gi&&f||u(a),m="Array"==t&&p.entries||f;if(m&&(s=Za(m.call(new e)))!==Object.prototype&&s.next&&(Za(s)!==li&&(di?di(s,li):T(s[hi])||at(s,hi,pi)),hr(s,l,!0)),ci&&"values"==a&&f&&"values"!==f.name&&(ui?Me(p,"name","values"):(g=!0,I=function(){return h(f,this)})),a)if(d={values:u("values"),keys:i?I:u("keys"),entries:u("entries")},o)for(c in d)(gi||g||!(c in p))&&at(p,c,d[c]);else Bt({target:t,proto:!0,forced:gi||g},d);return p[hi]!==I&&at(p,hi,I,{name:a}),Ka[t]=I,d},Ii=_e.f,mi=rt.set,bi=rt.getterFor("Array Iterator"),ki=fi(Array,"Array",(function(e,t){mi(this,{type:"Array Iterator",target:S(e),index:0,kind:t})}),(function(){var e=bi(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:t[n],done:!1}:{value:[n,t[n]],done:!1}}),"values"),vi=Ka.Arguments=Ka.Array;if($a("keys"),$a("values"),$a("entries"),u&&"values"!==vi.name)try{Ii(vi,"name",{value:"values"})}catch(e){}var yi=x("".charAt),xi=x("".charCodeAt),wi=x("".slice),zi=function(e){return function(t,r){var n,a,i=Vt(O(t)),o=dt(r),s=i.length;return o<0||o>=s?e?"":void 0:(n=xi(i,o))<55296||n>56319||o+1===s||(a=xi(i,o+1))<56320||a>57343?e?yi(i,o):n:e?wi(i,o,o+2):a-56320+(n-55296<<10)+65536}},Ci={codeAt:zi(!1),charAt:zi(!0)},qi=Ci.charAt,Ei=rt.set,Pi=rt.getterFor("String Iterator");fi(String,"String",(function(e){Ei(this,{type:"String Iterator",string:Vt(e),index:0})}),(function(){var e,t=Pi(this),r=t.string,n=t.index;return n>=r.length?{value:void 0,done:!0}:(e=qi(r,n),t.index+=e.length,{value:e,done:!1})}));var ji=fe("iterator"),Oi=fe("toStringTag"),Si=ki.values,Ti=function(e,t){if(e){if(e[ji]!==Si)try{Me(e,ji,Si)}catch(t){e[ji]=Si}if(e[Oi]||Me(e,Oi,t),Bn[t])for(var r in ki)if(e[r]!==ki[r])try{Me(e,r,ki[r])}catch(t){e[r]=ki[r]}}};for(var _i in Bn)Ti(d[_i]&&d[_i].prototype,_i);Ti(Fn,"DOMTokenList");var Mi=fe("iterator"),Bi=!c((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,r="";return e.pathname="c%20d",t.forEach((function(e,n){t.delete("b"),r+=n+e})),!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[Mi]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==r||"x"!==new URL("http://x",void 0).host})),Ai=function(e,t,r){for(var n in t)at(e,n,t[n],r);return e},Ri=TypeError,Fi=function(e,t){if(A(t,e))return e;throw Ri("Incorrect invocation")},Ui=fe("iterator"),Wi=function(e){if(null!=e)return Q(e,Ui)||Q(e,"@@iterator")||Ka[Gt(e)]},Li=TypeError,Ni=function(e,t){var r=arguments.length<2?Wi(e):t;if(J(r))return je(h(r,e));throw Li(K(e)+" is not iterable")},Di=TypeError,Gi=function(e,t){if(e<t)throw Di("Not enough arguments");return e},Hi=Math.floor,Vi=function(e,t){var r=e.length,n=Hi(r/2);return r<8?$i(e,t):Ki(e,Vi(ar(e,0,n),t),Vi(ar(e,n),t),t)},$i=function(e,t){for(var r,n,a=e.length,i=1;i<a;){for(n=i,r=e[i];n&&t(e[n-1],r)>0;)e[n]=e[--n];n!==i++&&(e[n]=r)}return e},Ki=function(e,t,r,n){for(var a=t.length,i=r.length,o=0,s=0;o<a||s<i;)e[o+s]=o<a&&s<i?n(t[o],r[s])<=0?t[o++]:r[s++]:o<a?t[o++]:r[s++];return e},Yi=Vi,Ji=fe("iterator"),Qi=rt.set,Xi=rt.getterFor("URLSearchParams"),Zi=rt.getterFor("URLSearchParamsIterator"),eo=Object.getOwnPropertyDescriptor,to=function(e){if(!u)return d[e];var t=eo(d,e);return t&&t.value},ro=to("fetch"),no=to("Request"),ao=to("Headers"),io=no&&no.prototype,oo=ao&&ao.prototype,so=d.RegExp,co=d.TypeError,uo=d.decodeURIComponent,lo=d.encodeURIComponent,go=x("".charAt),ho=x([].join),po=x([].push),fo=x("".replace),Io=x([].shift),mo=x([].splice),bo=x("".split),ko=x("".slice),vo=/\+/g,yo=Array(4),xo=function(e){return yo[e-1]||(yo[e-1]=so("((?:%[\\da-f]{2}){"+e+"})","gi"))},wo=function(e){try{return uo(e)}catch(t){return e}},zo=function(e){var t=fo(e,vo," "),r=4;try{return uo(t)}catch(e){for(;r;)t=fo(t,xo(r--),wo);return t}},Co=/[!'()~]|%20/g,qo={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},Eo=function(e){return qo[e]},Po=function(e){return fo(lo(e),Co,Eo)},jo=ii((function(e,t){Qi(this,{type:"URLSearchParamsIterator",iterator:Ni(Xi(e).entries),kind:t})}),"Iterator",(function(){var e=Zi(this),t=e.kind,r=e.iterator.next(),n=r.value;return r.done||(r.value="keys"===t?n.key:"values"===t?n.value:[n.key,n.value]),r}),!0),Oo=function(e){this.entries=[],this.url=null,void 0!==e&&(_(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===go(e,0)?ko(e,1):e:Vt(e)))};Oo.prototype={type:"URLSearchParams",bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,r,n,a,i,o,s,d=Wi(e);if(d)for(r=(t=Ni(e,d)).next;!(n=h(r,t)).done;){if(i=(a=Ni(je(n.value))).next,(o=h(i,a)).done||(s=h(i,a)).done||!h(i,a).done)throw co("Expected sequence with length 2");po(this.entries,{key:Vt(o.value),value:Vt(s.value)})}else for(var c in e)oe(e,c)&&po(this.entries,{key:c,value:Vt(e[c])})},parseQuery:function(e){if(e)for(var t,r,n=bo(e,"&"),a=0;a<n.length;)(t=n[a++]).length&&(r=bo(t,"="),po(this.entries,{key:zo(Io(r)),value:zo(ho(r,"="))}))},serialize:function(){for(var e,t=this.entries,r=[],n=0;n<t.length;)e=t[n++],po(r,Po(e.key)+"="+Po(e.value));return ho(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var So=function(){Fi(this,To);var e=arguments.length>0?arguments[0]:void 0;Qi(this,new Oo(e))},To=So.prototype;if(Ai(To,{append:function(e,t){Gi(arguments.length,2);var r=Xi(this);po(r.entries,{key:Vt(e),value:Vt(t)}),r.updateURL()},delete:function(e){Gi(arguments.length,1);for(var t=Xi(this),r=t.entries,n=Vt(e),a=0;a<r.length;)r[a].key===n?mo(r,a,1):a++;t.updateURL()},get:function(e){Gi(arguments.length,1);for(var t=Xi(this).entries,r=Vt(e),n=0;n<t.length;n++)if(t[n].key===r)return t[n].value;return null},getAll:function(e){Gi(arguments.length,1);for(var t=Xi(this).entries,r=Vt(e),n=[],a=0;a<t.length;a++)t[a].key===r&&po(n,t[a].value);return n},has:function(e){Gi(arguments.length,1);for(var t=Xi(this).entries,r=Vt(e),n=0;n<t.length;)if(t[n++].key===r)return!0;return!1},set:function(e,t){Gi(arguments.length,1);for(var r,n=Xi(this),a=n.entries,i=!1,o=Vt(e),s=Vt(t),d=0;d<a.length;d++)(r=a[d]).key===o&&(i?mo(a,d--,1):(i=!0,r.value=s));i||po(a,{key:o,value:s}),n.updateURL()},sort:function(){var e=Xi(this);Yi(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,r=Xi(this).entries,n=fr(e,arguments.length>1?arguments[1]:void 0),a=0;a<r.length;)n((t=r[a++]).value,t.key,this)},keys:function(){return new jo(this,"keys")},values:function(){return new jo(this,"values")},entries:function(){return new jo(this,"entries")}},{enumerable:!0}),at(To,Ji,To.entries,{name:"entries"}),at(To,"toString",(function(){return Xi(this).serialize()}),{enumerable:!0}),hr(So,"URLSearchParams"),Bt({global:!0,constructor:!0,forced:!Bi},{URLSearchParams:So}),!Bi&&T(ao)){var _o=x(oo.has),Mo=x(oo.set),Bo=function(e){if(_(e)){var t,r=e.body;if("URLSearchParams"===Gt(r))return t=e.headers?new ao(e.headers):new ao,_o(t,"content-type")||Mo(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),er(e,{body:m(0,Vt(r)),headers:m(0,t)})}return e};if(T(ro)&&Bt({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return ro(e,arguments.length>1?Bo(arguments[1]):{})}}),T(no)){var Ao=function(e){return Fi(this,io),new no(e,arguments.length>1?Bo(arguments[1]):{})};io.constructor=Ao,Ao.prototype=io,Bt({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Ao})}}var Ro={URLSearchParams:So,getState:Xi};function Fo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Uo(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Fo(Object(r),!0).forEach((function(t){pa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fo(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Wo=ha((function e(t){if(la(this,e),pa(this,"baseUri",void 0),pa(this,"proxy",void 0),pa(this,"headers",void 0),pa(this,"parameters",void 0),pa(this,"fetchOptions",void 0),pa(this,"transformRequest",void 0),pa(this,"throwOnBadResponse",void 0),this.headers=Uo({},t.headers),this.parameters=Uo({},t.parameters),!this.parameters.shortCode)throw new Error("Missing required parameter: shortCode");this.fetchOptions=Uo({credentials:"omit"},t.fetchOptions),this.transformRequest=t.transformRequest||e.defaults.transformRequest,t.baseUri&&(this.baseUri=t.baseUri),t.proxy&&(this.proxy=t.proxy),this.throwOnBadResponse=!!t.throwOnBadResponse}));function Lo(e){return(Lo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}pa(Wo,"defaults",{transformRequest:function(e,t){switch(t["Content-Type"]){case"application/json":return JSON.stringify(e);case"application/x-www-form-urlencoded":return new URLSearchParams(e);default:return e}}}),Bt({global:!0},{globalThis:d});var No,Do,Go="object"===("undefined"==typeof window?"undefined":Lo(window))&&"object"===Lo(window.document),Ho="object"===("undefined"==typeof process?"undefined":Lo(process))&&"object"===Lo(process.versions)&&"string"==typeof process.versions.node,Vo=Go?window:globalThis,$o="function"==typeof Vo.fetch,Ko=function(){if(Ho)return require("node-fetch").default;if(!$o)throw new Error("Bad environment: it is not a node environment but fetch is not defined");return Vo.fetch}(),Yo=d.RegExp,Jo=c((function(){var e=Yo("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),Qo=Jo||c((function(){return!Yo("a","y").sticky})),Xo={BROKEN_CARET:Jo||c((function(){var e=Yo("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:Qo,UNSUPPORTED_Y:Jo},Zo=d.RegExp,es=c((function(){var e=Zo(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),ts=d.RegExp,rs=c((function(){var e=ts("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),ns=rt.get,as=re("native-string-replace",String.prototype.replace),is=RegExp.prototype.exec,os=is,ss=x("".charAt),ds=x("".indexOf),cs=x("".replace),us=x("".slice),ls=(Do=/b*/g,h(is,No=/a/,"a"),h(is,Do,"a"),0!==No.lastIndex||0!==Do.lastIndex),gs=Xo.BROKEN_CARET,hs=void 0!==/()??/.exec("")[1];(ls||hs||gs||es||rs)&&(os=function(e){var t,r,n,a,i,o,s,d=this,c=ns(d),u=Vt(e),l=c.raw;if(l)return l.lastIndex=d.lastIndex,t=h(os,l,u),d.lastIndex=l.lastIndex,t;var g=c.groups,p=gs&&d.sticky,f=h(na,d),I=d.source,m=0,b=u;if(p&&(f=cs(f,"y",""),-1===ds(f,"g")&&(f+="g"),b=us(u,d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&"\n"!==ss(u,d.lastIndex-1))&&(I="(?: "+I+")",b=" "+b,m++),r=new RegExp("^(?:"+I+")",f)),hs&&(r=new RegExp("^"+I+"$(?!\\s)",f)),ls&&(n=d.lastIndex),a=h(is,p?r:d,b),p?a?(a.input=us(a.input,m),a[0]=us(a[0],m),a.index=d.lastIndex,d.lastIndex+=a[0].length):d.lastIndex=0:ls&&a&&(d.lastIndex=d.global?a.index+a[0].length:n),hs&&a&&a.length>1&&h(as,a[0],r,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(a[i]=void 0)})),a&&g)for(a.groups=o=er(null),i=0;i<g.length;i++)o[(s=g[i])[0]]=a[s[1]];return a});var ps=os;Bt({target:"RegExp",proto:!0,forced:/./.exec!==ps},{exec:ps});var fs=fe("species"),Is=RegExp.prototype,ms=function(e,t,r,n){var a=fe(e),i=!c((function(){var t={};return t[a]=function(){return 7},7!=""[e](t)})),o=i&&!c((function(){var t=!1,r=/a/;return"split"===e&&((r={}).constructor={},r.constructor[fs]=function(){return r},r.flags="",r[a]=/./[a]),r.exec=function(){return t=!0,null},r[a](""),!t}));if(!i||!o||r){var s=x(/./[a]),d=t(a,""[e],(function(e,t,r,n,a){var o=x(e),d=t.exec;return d===ps||d===Is.exec?i&&!a?{done:!0,value:s(t,r,n)}:{done:!0,value:o(r,t,n)}:{done:!1}}));at(String.prototype,e,d[0]),at(Is,a,d[1])}n&&Me(Is[a],"sham",!0)},bs=Ci.charAt,ks=function(e,t,r){return t+(r?bs(e,t).length:1)},vs=Math.floor,ys=x("".charAt),xs=x("".replace),ws=x("".slice),zs=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Cs=/\$([$&'`]|\d{1,2})/g,qs=function(e,t,r,n,a,i){var o=r+e.length,s=n.length,d=Cs;return void 0!==a&&(a=ae(a),d=zs),xs(i,d,(function(i,d){var c;switch(ys(d,0)){case"$":return"$";case"&":return e;case"`":return ws(t,0,r);case"'":return ws(t,o);case"<":c=a[ws(d,1,-1)];break;default:var u=+d;if(0===u)return i;if(u>s){var l=vs(u/10);return 0===l?i:l<=s?void 0===n[l-1]?ys(d,1):n[l-1]+ys(d,1):i}c=n[u-1]}return void 0===c?"":c}))},Es=TypeError,Ps=function(e,t){var r=e.exec;if(T(r)){var n=h(r,e,t);return null!==n&&je(n),n}if("RegExp"===C(e))return h(ps,e,t);throw Es("RegExp#exec called on incompatible receiver")},js=fe("replace"),Os=Math.max,Ss=Math.min,Ts=x([].concat),_s=x([].push),Ms=x("".indexOf),Bs=x("".slice),As="$0"==="a".replace(/./,"$0"),Rs=!!/./[js]&&""===/./[js]("a","$0");ms("replace",(function(e,t,r){var n=Rs?"$":"$0";return[function(e,r){var n=O(this),a=null==e?void 0:Q(e,js);return a?h(a,e,n,r):h(t,Vt(n),e,r)},function(e,a){var i=je(this),o=Vt(e);if("string"==typeof a&&-1===Ms(a,n)&&-1===Ms(a,"$<")){var s=r(t,i,o,a);if(s.done)return s.value}var d=T(a);d||(a=Vt(a));var c=i.global;if(c){var u=i.unicode;i.lastIndex=0}for(var l=[];;){var g=Ps(i,o);if(null===g)break;if(_s(l,g),!c)break;""===Vt(g[0])&&(i.lastIndex=ks(o,ht(i.lastIndex),u))}for(var h,p="",f=0,I=0;I<l.length;I++){for(var m=Vt((g=l[I])[0]),b=Os(Ss(dt(g.index),o.length),0),k=[],v=1;v<g.length;v++)_s(k,void 0===(h=g[v])?h:String(h));var y=g.groups;if(d){var x=Ts([m],k,b,o);void 0!==y&&_s(x,y);var w=Vt(gn(a,void 0,x))}else w=qs(m,o,b,k,y,a);b>=f&&(p+=Bs(o,f,b)+w,f=b+m.length)}return p+Bs(o,f)}]}),!!c((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!As||Rs);var Fs=Function,Us=x([].concat),Ws=x([].join),Ls={},Ns=function(e,t,r){if(!oe(Ls,t)){for(var n=[],a=0;a<t;a++)n[a]="a["+a+"]";Ls[t]=Fs("C,a","return new C("+Ws(n,",")+")")}return Ls[t](e,r)},Ds=l?Fs.bind:function(e){var t=J(this),r=t.prototype,n=hn(arguments,1),a=function(){var r=Us(n,hn(arguments));return this instanceof a?Ns(t,r.length,r):t.apply(e,r)};return _(r)&&(a.prototype=r),a},Gs=TypeError,Hs=function(e){if(Cr(e))return e;throw Gs(K(e)+" is not a constructor")},Vs=B("Reflect","construct"),$s=Object.prototype,Ks=[].push,Ys=c((function(){function e(){}return!(Vs((function(){}),[],e)instanceof e)})),Js=!c((function(){Vs((function(){}))})),Qs=Ys||Js;Bt({target:"Reflect",stat:!0,forced:Qs,sham:Qs},{construct:function(e,t){Hs(e),je(t);var r=arguments.length<3?e:Hs(arguments[2]);if(Js&&!Ys)return Vs(e,t,r);if(e==r){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var n=[null];return gn(Ks,n,t),new(gn(Ds,e,n))}var a=r.prototype,i=er(_(a)?a:$s),o=gn(e,i,t);return _(o)?o:i}});var Xs=TypeError,Zs=function(e){if(e>9007199254740991)throw Xs("Maximum allowed index exceeded");return e},ed=fe("isConcatSpreadable"),td=N>=51||!c((function(){var e=[];return e[ed]=!1,e.concat()[0]!==e})),rd=jn("concat"),nd=function(e){if(!_(e))return!1;var t=e[ed];return void 0!==t?!!t:Ir(e)};function ad(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function id(e,t){return(id=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function od(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&id(e,t)}function sd(e,t){if(t&&("object"===Lo(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return ad(e)}function dd(e){return(dd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function cd(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function ud(e,t,r){return(ud=cd()?Reflect.construct.bind():function(e,t,r){var n=[null];n.push.apply(n,t);var a=new(Function.bind.apply(e,n));return r&&id(a,r.prototype),a}).apply(null,arguments)}function ld(e){var t="function"==typeof Map?new Map:void 0;return(ld=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return ud(e,arguments,dd(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),id(n,e)})(e)}function gd(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=dd(e);if(t){var a=dd(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return sd(this,r)}}Bt({target:"Array",proto:!0,arity:1,forced:!td||!rd},{concat:function(e){var t,r,n,a,i,o=ae(this),s=Pr(o,0),d=0;for(t=-1,n=arguments.length;t<n;t++)if(nd(i=-1===t?o:arguments[t]))for(a=pt(i),Zs(d+a),r=0;r<a;r++,d++)r in i&&tr(s,d,i[r]);else Zs(d+1),tr(s,d++,i);return s.length=d,s}});var hd=function(e){od(r,ld(Error));var t=gd(r);function r(e){var n;return la(this,r),pa(ad(n=t.call(this,"".concat(e.status," ").concat(e.statusText))),"response",void 0),n.response=e,n}return ha(r)}();function pd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function fd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?pd(Object(r),!0).forEach((function(t){pa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pd(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Id,md=function(){var e=ua(Wa.mark((function e(t,r,n,a){var i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=fd(fd({},null==n?void 0:n.headers),null==r?void 0:r.headers),s=fd(fd({},null==n?void 0:n.fetchOptions),{},{headers:o,body:null==r?void 0:r.body,method:null!==(i=null==r?void 0:r.method)&&void 0!==i?i:"GET"}),e.next=4,Ko(t,s);case 4:if(d=e.sent,!a){e.next=7;break}return e.abrupt("return",d);case 7:if(null==n||!n.throwOnBadResponse||d.ok||304===d.status){e.next=11;break}throw new hd(d);case 11:return e.next=13,d.text();case 13:return c=e.sent,e.abrupt("return",c?JSON.parse(c):{});case 15:case"end":return e.stop()}}),e)})));return function(t,r,n,a){return e.apply(this,arguments)}}(),bd=function(e,t,r){return r.get&&nt(r.get,t,{getter:!0}),r.set&&nt(r.set,t,{setter:!0}),_e.f(e,t,r)},kd=Object.assign,vd=Object.defineProperty,yd=x([].concat),xd=!kd||c((function(){if(u&&1!==kd({b:1},kd(vd({},"a",{enumerable:!0,get:function(){vd(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol();return e[r]=7,"abcdefghijklmnopqrst".split("").forEach((function(e){t[e]=e})),7!=kd({},e)[r]||"abcdefghijklmnopqrst"!=At(kd({},t)).join("")}))?function(e,t){for(var r=ae(e),n=arguments.length,a=1,i=wt.f,o=I.f;n>a;)for(var s,d=P(arguments[a++]),c=i?yd(At(d),i(d)):At(d),l=c.length,g=0;l>g;)s=c[g++],u&&!h(o,d,s)||(r[s]=d[s]);return r}:kd,wd=function(e,t,r){var n,a;je(e);try{if(!(n=Q(e,"return"))){if("throw"===t)throw r;return r}n=h(n,e)}catch(e){a=!0,n=e}if("throw"===t)throw r;if(a)throw n;return je(n),r},zd=function(e,t,r,n){try{return n?t(je(r)[0],r[1]):t(r)}catch(t){wd(e,"throw",t)}},Cd=fe("iterator"),qd=Array.prototype,Ed=function(e){return void 0!==e&&(Ka.Array===e||qd[Cd]===e)},Pd=Array,jd=function(e){var t=ae(e),r=Cr(this),n=arguments.length,a=n>1?arguments[1]:void 0,i=void 0!==a;i&&(a=fr(a,n>2?arguments[2]:void 0));var o,s,d,c,u,l,g=Wi(t),p=0;if(!g||this===Pd&&Ed(g))for(o=pt(t),s=r?new this(o):Pd(o);o>p;p++)l=i?a(t[p],p):t[p],tr(s,p,l);else for(u=(c=Ni(t,g)).next,s=r?new this:[];!(d=h(u,c)).done;p++)l=i?zd(c,a,[d.value,p],!0):d.value,tr(s,p,l);return s.length=p,s},Od=/[^\0-\u007E]/,Sd=/[.\u3002\uFF0E\uFF61]/g,Td="Overflow: input needs wider integers to process",_d=RangeError,Md=x(Sd.exec),Bd=Math.floor,Ad=String.fromCharCode,Rd=x("".charCodeAt),Fd=x([].join),Ud=x([].push),Wd=x("".replace),Ld=x("".split),Nd=x("".toLowerCase),Dd=function(e){return e+22+75*(e<26)},Gd=function(e,t,r){var n=0;for(e=r?Bd(e/700):e>>1,e+=Bd(e/t);e>455;)e=Bd(e/35),n+=36;return Bd(n+36*e/(e+38))},Hd=function(e){var t,r,n=[],a=(e=function(e){for(var t=[],r=0,n=e.length;r<n;){var a=Rd(e,r++);if(a>=55296&&a<=56319&&r<n){var i=Rd(e,r++);56320==(64512&i)?Ud(t,((1023&a)<<10)+(1023&i)+65536):(Ud(t,a),r--)}else Ud(t,a)}return t}(e)).length,i=128,o=0,s=72;for(t=0;t<e.length;t++)(r=e[t])<128&&Ud(n,Ad(r));var d=n.length,c=d;for(d&&Ud(n,"-");c<a;){var u=2147483647;for(t=0;t<e.length;t++)(r=e[t])>=i&&r<u&&(u=r);var l=c+1;if(u-i>Bd((2147483647-o)/l))throw _d(Td);for(o+=(u-i)*l,i=u,t=0;t<e.length;t++){if((r=e[t])<i&&++o>2147483647)throw _d(Td);if(r==i){for(var g=o,h=36;;){var p=h<=s?1:h>=s+26?26:h-s;if(g<p)break;var f=g-p,I=36-p;Ud(n,Ad(Dd(p+f%I))),g=Bd(f/I),h+=36}Ud(n,Ad(Dd(g))),s=Gd(o,l,c==d),o=0,c++}}o++,i++}return Fd(n,"")},Vd=Ci.codeAt,$d=rt.set,Kd=rt.getterFor("URL"),Yd=Ro.URLSearchParams,Jd=Ro.getState,Qd=d.URL,Xd=d.TypeError,Zd=d.parseInt,ec=Math.floor,tc=Math.pow,rc=x("".charAt),nc=x(/./.exec),ac=x([].join),ic=x(1..toString),oc=x([].pop),sc=x([].push),dc=x("".replace),cc=x([].shift),uc=x("".split),lc=x("".slice),gc=x("".toLowerCase),hc=x([].unshift),pc=/[a-z]/i,fc=/[\d+-.a-z]/i,Ic=/\d/,mc=/^0x/i,bc=/^[0-7]+$/,kc=/^\d+$/,vc=/^[\da-f]+$/i,yc=/[\0\t\n\r #%/:<>?@[\\\]^|]/,xc=/[\0\t\n\r #/:<>?@[\\\]^|]/,wc=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,zc=/[\t\n\r]/g,Cc=function(e){var t,r,n,a;if("number"==typeof e){for(t=[],r=0;r<4;r++)hc(t,e%256),e=ec(e/256);return ac(t,".")}if("object"==typeof e){for(t="",n=function(e){for(var t=null,r=1,n=null,a=0,i=0;i<8;i++)0!==e[i]?(a>r&&(t=n,r=a),n=null,a=0):(null===n&&(n=i),++a);return a>r&&(t=n,r=a),t}(e),r=0;r<8;r++)a&&0===e[r]||(a&&(a=!1),n===r?(t+=r?":":"::",a=!0):(t+=ic(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},qc={},Ec=xd({},qc,{" ":1,'"':1,"<":1,">":1,"`":1}),Pc=xd({},Ec,{"#":1,"?":1,"{":1,"}":1}),jc=xd({},Pc,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Oc=function(e,t){var r=Vd(e,0);return r>32&&r<127&&!oe(t,e)?e:encodeURIComponent(e)},Sc={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Tc=function(e,t){var r;return 2==e.length&&nc(pc,rc(e,0))&&(":"==(r=rc(e,1))||!t&&"|"==r)},_c=function(e){var t;return e.length>1&&Tc(lc(e,0,2))&&(2==e.length||"/"===(t=rc(e,2))||"\\"===t||"?"===t||"#"===t)},Mc=function(e){return"."===e||"%2e"===gc(e)},Bc={},Ac={},Rc={},Fc={},Uc={},Wc={},Lc={},Nc={},Dc={},Gc={},Hc={},Vc={},$c={},Kc={},Yc={},Jc={},Qc={},Xc={},Zc={},eu={},tu={},ru=function(e,t,r){var n,a,i,o=Vt(e);if(t){if(a=this.parse(o))throw Xd(a);this.searchParams=null}else{if(void 0!==r&&(n=new ru(r,!0)),a=this.parse(o,null,n))throw Xd(a);(i=Jd(new Yd)).bindURL(this),this.searchParams=i}};ru.prototype={type:"URL",parse:function(e,t,r){var n,a,i,o,s,d=this,c=t||Bc,u=0,l="",g=!1,h=!1,p=!1;for(e=Vt(e),t||(d.scheme="",d.username="",d.password="",d.host=null,d.port=null,d.path=[],d.query=null,d.fragment=null,d.cannotBeABaseURL=!1,e=dc(e,wc,"")),e=dc(e,zc,""),n=jd(e);u<=n.length;){switch(a=n[u],c){case Bc:if(!a||!nc(pc,a)){if(t)return"Invalid scheme";c=Rc;continue}l+=gc(a),c=Ac;break;case Ac:if(a&&(nc(fc,a)||"+"==a||"-"==a||"."==a))l+=gc(a);else{if(":"!=a){if(t)return"Invalid scheme";l="",c=Rc,u=0;continue}if(t&&(d.isSpecial()!=oe(Sc,l)||"file"==l&&(d.includesCredentials()||null!==d.port)||"file"==d.scheme&&!d.host))return;if(d.scheme=l,t)return void(d.isSpecial()&&Sc[d.scheme]==d.port&&(d.port=null));l="","file"==d.scheme?c=Kc:d.isSpecial()&&r&&r.scheme==d.scheme?c=Fc:d.isSpecial()?c=Nc:"/"==n[u+1]?(c=Uc,u++):(d.cannotBeABaseURL=!0,sc(d.path,""),c=Zc)}break;case Rc:if(!r||r.cannotBeABaseURL&&"#"!=a)return"Invalid scheme";if(r.cannotBeABaseURL&&"#"==a){d.scheme=r.scheme,d.path=ar(r.path),d.query=r.query,d.fragment="",d.cannotBeABaseURL=!0,c=tu;break}c="file"==r.scheme?Kc:Wc;continue;case Fc:if("/"!=a||"/"!=n[u+1]){c=Wc;continue}c=Dc,u++;break;case Uc:if("/"==a){c=Gc;break}c=Xc;continue;case Wc:if(d.scheme=r.scheme,a==Id)d.username=r.username,d.password=r.password,d.host=r.host,d.port=r.port,d.path=ar(r.path),d.query=r.query;else if("/"==a||"\\"==a&&d.isSpecial())c=Lc;else if("?"==a)d.username=r.username,d.password=r.password,d.host=r.host,d.port=r.port,d.path=ar(r.path),d.query="",c=eu;else{if("#"!=a){d.username=r.username,d.password=r.password,d.host=r.host,d.port=r.port,d.path=ar(r.path),d.path.length--,c=Xc;continue}d.username=r.username,d.password=r.password,d.host=r.host,d.port=r.port,d.path=ar(r.path),d.query=r.query,d.fragment="",c=tu}break;case Lc:if(!d.isSpecial()||"/"!=a&&"\\"!=a){if("/"!=a){d.username=r.username,d.password=r.password,d.host=r.host,d.port=r.port,c=Xc;continue}c=Gc}else c=Dc;break;case Nc:if(c=Dc,"/"!=a||"/"!=rc(l,u+1))continue;u++;break;case Dc:if("/"!=a&&"\\"!=a){c=Gc;continue}break;case Gc:if("@"==a){g&&(l="%40"+l),g=!0,i=jd(l);for(var f=0;f<i.length;f++){var I=i[f];if(":"!=I||p){var m=Oc(I,jc);p?d.password+=m:d.username+=m}else p=!0}l=""}else if(a==Id||"/"==a||"?"==a||"#"==a||"\\"==a&&d.isSpecial()){if(g&&""==l)return"Invalid authority";u-=jd(l).length+1,l="",c=Hc}else l+=a;break;case Hc:case Vc:if(t&&"file"==d.scheme){c=Jc;continue}if(":"!=a||h){if(a==Id||"/"==a||"?"==a||"#"==a||"\\"==a&&d.isSpecial()){if(d.isSpecial()&&""==l)return"Invalid host";if(t&&""==l&&(d.includesCredentials()||null!==d.port))return;if(o=d.parseHost(l))return o;if(l="",c=Qc,t)return;continue}"["==a?h=!0:"]"==a&&(h=!1),l+=a}else{if(""==l)return"Invalid host";if(o=d.parseHost(l))return o;if(l="",c=$c,t==Vc)return}break;case $c:if(!nc(Ic,a)){if(a==Id||"/"==a||"?"==a||"#"==a||"\\"==a&&d.isSpecial()||t){if(""!=l){var b=Zd(l,10);if(b>65535)return"Invalid port";d.port=d.isSpecial()&&b===Sc[d.scheme]?null:b,l=""}if(t)return;c=Qc;continue}return"Invalid port"}l+=a;break;case Kc:if(d.scheme="file","/"==a||"\\"==a)c=Yc;else{if(!r||"file"!=r.scheme){c=Xc;continue}if(a==Id)d.host=r.host,d.path=ar(r.path),d.query=r.query;else if("?"==a)d.host=r.host,d.path=ar(r.path),d.query="",c=eu;else{if("#"!=a){_c(ac(ar(n,u),""))||(d.host=r.host,d.path=ar(r.path),d.shortenPath()),c=Xc;continue}d.host=r.host,d.path=ar(r.path),d.query=r.query,d.fragment="",c=tu}}break;case Yc:if("/"==a||"\\"==a){c=Jc;break}r&&"file"==r.scheme&&!_c(ac(ar(n,u),""))&&(Tc(r.path[0],!0)?sc(d.path,r.path[0]):d.host=r.host),c=Xc;continue;case Jc:if(a==Id||"/"==a||"\\"==a||"?"==a||"#"==a){if(!t&&Tc(l))c=Xc;else if(""==l){if(d.host="",t)return;c=Qc}else{if(o=d.parseHost(l))return o;if("localhost"==d.host&&(d.host=""),t)return;l="",c=Qc}continue}l+=a;break;case Qc:if(d.isSpecial()){if(c=Xc,"/"!=a&&"\\"!=a)continue}else if(t||"?"!=a)if(t||"#"!=a){if(a!=Id&&(c=Xc,"/"!=a))continue}else d.fragment="",c=tu;else d.query="",c=eu;break;case Xc:if(a==Id||"/"==a||"\\"==a&&d.isSpecial()||!t&&("?"==a||"#"==a)){if(".."===(s=gc(s=l))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(d.shortenPath(),"/"==a||"\\"==a&&d.isSpecial()||sc(d.path,"")):Mc(l)?"/"==a||"\\"==a&&d.isSpecial()||sc(d.path,""):("file"==d.scheme&&!d.path.length&&Tc(l)&&(d.host&&(d.host=""),l=rc(l,0)+":"),sc(d.path,l)),l="","file"==d.scheme&&(a==Id||"?"==a||"#"==a))for(;d.path.length>1&&""===d.path[0];)cc(d.path);"?"==a?(d.query="",c=eu):"#"==a&&(d.fragment="",c=tu)}else l+=Oc(a,Pc);break;case Zc:"?"==a?(d.query="",c=eu):"#"==a?(d.fragment="",c=tu):a!=Id&&(d.path[0]+=Oc(a,qc));break;case eu:t||"#"!=a?a!=Id&&("'"==a&&d.isSpecial()?d.query+="%27":d.query+="#"==a?"%23":Oc(a,qc)):(d.fragment="",c=tu);break;case tu:a!=Id&&(d.fragment+=Oc(a,Ec))}u++}},parseHost:function(e){var t,r,n;if("["==rc(e,0)){if("]"!=rc(e,e.length-1))return"Invalid host";if(!(t=function(e){var t,r,n,a,i,o,s,d=[0,0,0,0,0,0,0,0],c=0,u=null,l=0,g=function(){return rc(e,l)};if(":"==g()){if(":"!=rc(e,1))return;l+=2,u=++c}for(;g();){if(8==c)return;if(":"!=g()){for(t=r=0;r<4&&nc(vc,g());)t=16*t+Zd(g(),16),l++,r++;if("."==g()){if(0==r)return;if(l-=r,c>6)return;for(n=0;g();){if(a=null,n>0){if(!("."==g()&&n<4))return;l++}if(!nc(Ic,g()))return;for(;nc(Ic,g());){if(i=Zd(g(),10),null===a)a=i;else{if(0==a)return;a=10*a+i}if(a>255)return;l++}d[c]=256*d[c]+a,2!=++n&&4!=n||c++}if(4!=n)return;break}if(":"==g()){if(l++,!g())return}else if(g())return;d[c++]=t}else{if(null!==u)return;l++,u=++c}}if(null!==u)for(o=c-u,c=7;0!=c&&o>0;)s=d[c],d[c--]=d[u+o-1],d[u+--o]=s;else if(8!=c)return;return d}(lc(e,1,-1))))return"Invalid host";this.host=t}else if(this.isSpecial()){if(e=function(e){var t,r,n=[],a=Ld(Wd(Nd(e),Sd,"."),".");for(t=0;t<a.length;t++)r=a[t],Ud(n,Md(Od,r)?"xn--"+Hd(r):r);return Fd(n,".")}(e),nc(yc,e))return"Invalid host";if(null===(t=function(e){var t,r,n,a,i,o,s,d=uc(e,".");if(d.length&&""==d[d.length-1]&&d.length--,(t=d.length)>4)return e;for(r=[],n=0;n<t;n++){if(""==(a=d[n]))return e;if(i=10,a.length>1&&"0"==rc(a,0)&&(i=nc(mc,a)?16:8,a=lc(a,8==i?1:2)),""===a)o=0;else{if(!nc(10==i?kc:8==i?bc:vc,a))return e;o=Zd(a,i)}sc(r,o)}for(n=0;n<t;n++)if(o=r[n],n==t-1){if(o>=tc(256,5-t))return null}else if(o>255)return null;for(s=oc(r),n=0;n<r.length;n++)s+=r[n]*tc(256,3-n);return s}(e)))return"Invalid host";this.host=t}else{if(nc(xc,e))return"Invalid host";for(t="",r=jd(e),n=0;n<r.length;n++)t+=Oc(r[n],qc);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return oe(Sc,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&Tc(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,r=e.username,n=e.password,a=e.host,i=e.port,o=e.path,s=e.query,d=e.fragment,c=t+":";return null!==a?(c+="//",e.includesCredentials()&&(c+=r+(n?":"+n:"")+"@"),c+=Cc(a),null!==i&&(c+=":"+i)):"file"==t&&(c+="//"),c+=e.cannotBeABaseURL?o[0]:o.length?"/"+ac(o,"/"):"",null!==s&&(c+="?"+s),null!==d&&(c+="#"+d),c},setHref:function(e){var t=this.parse(e);if(t)throw Xd(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new nu(e.path[0]).origin}catch(e){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+Cc(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(Vt(e)+":",Bc)},getUsername:function(){return this.username},setUsername:function(e){var t=jd(Vt(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<t.length;r++)this.username+=Oc(t[r],jc)}},getPassword:function(){return this.password},setPassword:function(e){var t=jd(Vt(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<t.length;r++)this.password+=Oc(t[r],jc)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?Cc(e):Cc(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,Hc)},getHostname:function(){var e=this.host;return null===e?"":Cc(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,Vc)},getPort:function(){var e=this.port;return null===e?"":Vt(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=Vt(e))?this.port=null:this.parse(e,$c))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+ac(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,Qc))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=Vt(e))?this.query=null:("?"==rc(e,0)&&(e=lc(e,1)),this.query="",this.parse(e,eu)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=Vt(e))?("#"==rc(e,0)&&(e=lc(e,1)),this.fragment="",this.parse(e,tu)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var nu=function(e){var t=Fi(this,au),r=Gi(arguments.length,1)>1?arguments[1]:void 0,n=$d(t,new ru(e,!1,r));u||(t.href=n.serialize(),t.origin=n.getOrigin(),t.protocol=n.getProtocol(),t.username=n.getUsername(),t.password=n.getPassword(),t.host=n.getHost(),t.hostname=n.getHostname(),t.port=n.getPort(),t.pathname=n.getPathname(),t.search=n.getSearch(),t.searchParams=n.getSearchParams(),t.hash=n.getHash())},au=nu.prototype,iu=function(e,t){return{get:function(){return Kd(this)[e]()},set:t&&function(e){return Kd(this)[t](e)},configurable:!0,enumerable:!0}};if(u&&(bd(au,"href",iu("serialize","setHref")),bd(au,"origin",iu("getOrigin")),bd(au,"protocol",iu("getProtocol","setProtocol")),bd(au,"username",iu("getUsername","setUsername")),bd(au,"password",iu("getPassword","setPassword")),bd(au,"host",iu("getHost","setHost")),bd(au,"hostname",iu("getHostname","setHostname")),bd(au,"port",iu("getPort","setPort")),bd(au,"pathname",iu("getPathname","setPathname")),bd(au,"search",iu("getSearch","setSearch")),bd(au,"searchParams",iu("getSearchParams")),bd(au,"hash",iu("getHash","setHash"))),at(au,"toJSON",(function(){return Kd(this).serialize()}),{enumerable:!0}),at(au,"toString",(function(){return Kd(this).serialize()}),{enumerable:!0}),Qd){var ou=Qd.createObjectURL,su=Qd.revokeObjectURL;ou&&at(nu,"createObjectURL",fr(ou,Qd)),su&&at(nu,"revokeObjectURL",fr(su,Qd))}function du(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=dd(e);if(t){var a=dd(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return sd(this,r)}}hr(nu,"URL"),Bt({global:!0,constructor:!0,forced:!Bi,sham:!u},{URL:nu}),ms("match",(function(e,t,r){return[function(t){var r=O(this),n=null==t?void 0:Q(t,e);return n?h(n,t,r):new RegExp(t)[e](Vt(r))},function(e){var n=je(this),a=Vt(e),i=r(t,n,a);if(i.done)return i.value;if(!n.global)return Ps(n,a);var o=n.unicode;n.lastIndex=0;for(var s,d=[],c=0;null!==(s=Ps(n,a));){var u=Vt(s[0]);d[c]=u,""===u&&(n.lastIndex=ks(a,ht(n.lastIndex),o)),c++}return 0===c?null:d}]}));var cu=function(e){od(r,ld(URL));var t=du(r);function r(e,n,a){var i;la(this,r);var o={};return Object.keys((null==a?void 0:a.pathParams)||{}).forEach((function(e){var t,r=null==a||null===(t=a.pathParams)||void 0===t?void 0:t[e];r&&(o[e]=encodeURIComponent(r))})),(i=t.call(this,r.renderTemplateUri("".concat(n,"/").concat(e).replace(/\/\/+/g,"/"),o))).addQueryParams(null==a?void 0:a.queryParams),null!=a&&a.origin&&i.replaceOrigin(null==a?void 0:a.origin),i}return ha(r,[{key:"replaceOrigin",value:function(e){var t=new URL(e);this.protocol=t.protocol,this.host=t.host,this.pathname="".concat(t.pathname,"/").concat(this.pathname).replace(/\/\/+/g,"/")}},{key:"addQueryParams",value:function(e){var t=this;e&&Object.keys(e).forEach((function(r){var n=e[r];if(Array.isArray(n))if("refine"===r)for(var a=0;a<n.length;a+=1)t.searchParams.append(r,String(n[a]));else t.searchParams.append(r,n.join());else t.searchParams.append(r,String(n))}))}}],[{key:"renderTemplateUri",value:function(e,t){var r=t?e.replace(/\{([^\}]+)\}/g,(function(e,r){return String(t[r])})):e,n=/(\.|%2e|%2E|%252e|%252E)+(\/|%2f|%2F|%252f|%252F)+/g;return r.match(n)&&(console.warn("Path traversal attempt detected. Normalizing url"),r=r.replace(n,"")),r}}]),r}(),uu="commerce-sdk-isomorphic@4.0.0";function lu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function gu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?lu(Object(r),!0).forEach((function(t){pa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var hu=function(){function e(t){la(this,e),pa(this,"clientConfig",void 0);var r=gu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Wo(r)}var t,r,n,a,i,o,s,d,c,u,l,g,h,p,f,I,m,b,k,v,y,x,w,z,C,q,E,P,j,O,S,T,_,M,B,A,R;return ha(e,[{key:"addCouponToBasket",value:(R=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for addCouponToBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/coupons",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=gu(gu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=38,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return R.apply(this,arguments)})},{key:"addGiftCertificateItemToBasket",value:(A=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for addGiftCertificateItemToBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=gu(gu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=38,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return A.apply(this,arguments)})},{key:"addItemToBasket",value:(B=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for addItemToBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/items",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=gu(gu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=38,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return B.apply(this,arguments)})},{key:"addPaymentInstrumentToBasket",value:(M=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for addPaymentInstrumentToBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/payment-instruments",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=gu(gu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=38,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return M.apply(this,arguments)})},{key:"addPriceAdjustmentToBasket",value:(_=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for addPriceAdjustmentToBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/price-adjustments",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=gu(gu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=38,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return _.apply(this,arguments)})},{key:"addPriceBooksToBasket",value:(T=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for addPriceBooksToBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/price-books",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=gu(gu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=37,md(s.toString(),{method:"PUT",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 37:if(c=e.sent,!r){e.next=40;break}return e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return T.apply(this,arguments)})},{key:"addTaxesForBasket",value:(S=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for addTaxesForBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/taxes",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=gu(gu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=37,md(s.toString(),{method:"PUT",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 37:if(c=e.sent,!r){e.next=40;break}return e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return S.apply(this,arguments)})},{key:"addTaxesForBasketItem",value:(O=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.itemId){e.next=16;break}i.itemId=n.itemId,e.next=21;break;case 16:if(void 0===a.itemId){e.next=20;break}i.itemId=a.itemId,e.next=21;break;case 20:throw new Error("Missing required path parameter: itemId");case 21:if(void 0===n.basketId){e.next=25;break}i.basketId=n.basketId,e.next=30;break;case 25:if(void 0===a.basketId){e.next=29;break}i.basketId=a.basketId,e.next=30;break;case 29:throw new Error("Missing required path parameter: basketId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for addTaxesForBasketItem: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}/taxes",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=gu(gu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=46,md(s.toString(),{method:"PUT",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 46:if(c=e.sent,!r){e.next=49;break}return e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return O.apply(this,arguments)})},{key:"createBasket",value:(j=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}o.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return void 0!==n.taxMode?o.taxMode=n.taxMode:void 0!==a.taxMode&&(o.taxMode=a.taxMode),void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for createBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=gu(gu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=30,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 30:return c=e.sent,e.abrupt("return",c);case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return j.apply(this,arguments)})},{key:"createShipmentForBasket",value:(P=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for createShipmentForBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/shipments",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=gu(gu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=38,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return P.apply(this,arguments)})},{key:"deleteBasket",value:(E=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for deleteBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=gu(gu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=37,md(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 37:if(c=e.sent,!r){e.next=40;break}return e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return E.apply(this,arguments)})},{key:"getBasket",value:(q=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=gu(gu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=38,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return q.apply(this,arguments)})},{key:"getPaymentMethodsForBasket",value:(C=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getPaymentMethodsForBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/payment-methods",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=gu(gu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=38,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return C.apply(this,arguments)})},{key:"getPriceBooksForBasket",value:(z=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getPriceBooksForBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/price-books",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=gu(gu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=37,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 37:return c=e.sent,e.abrupt("return",c);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return z.apply(this,arguments)})},{key:"getShippingMethodsForShipment",value:(w=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.shipmentId){e.next=16;break}i.shipmentId=n.shipmentId,e.next=21;break;case 16:if(void 0===a.shipmentId){e.next=20;break}i.shipmentId=a.shipmentId,e.next=21;break;case 20:throw new Error("Missing required path parameter: shipmentId");case 21:if(void 0===n.basketId){e.next=25;break}i.basketId=n.basketId,e.next=30;break;case 25:if(void 0===a.basketId){e.next=29;break}i.basketId=a.basketId,e.next=30;break;case 29:throw new Error("Missing required path parameter: basketId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getShippingMethodsForShipment: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-methods",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=gu(gu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=47,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return w.apply(this,arguments)})},{key:"getTaxesFromBasket",value:(x=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getTaxesFromBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/taxes",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=gu(gu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=37,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 37:return c=e.sent,e.abrupt("return",c);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return x.apply(this,arguments)})},{key:"mergeBasket",value:(y=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}o.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return void 0!==n.createDestinationBasket?o.createDestinationBasket=n.createDestinationBasket:void 0!==a.createDestinationBasket&&(o.createDestinationBasket=a.createDestinationBasket),void 0!==n.productItemMergeMode?o.productItemMergeMode=n.productItemMergeMode:void 0!==a.productItemMergeMode&&(o.productItemMergeMode=a.productItemMergeMode),void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for mergeBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/actions/merge",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=gu(gu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=31,md(s.toString(),{method:"POST",headers:d},this.clientConfig,r);case 31:return c=e.sent,e.abrupt("return",c);case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return y.apply(this,arguments)})},{key:"removeCouponFromBasket",value:(v=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.couponItemId){e.next=25;break}i.couponItemId=n.couponItemId,e.next=30;break;case 25:if(void 0===a.couponItemId){e.next=29;break}i.couponItemId=a.couponItemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: couponItemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for removeCouponFromBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/coupons/{couponItemId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=gu(gu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=47,md(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return v.apply(this,arguments)})},{key:"removeGiftCertificateItemFromBasket",value:(k=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.giftCertificateItemId){e.next=25;break}i.giftCertificateItemId=n.giftCertificateItemId,e.next=30;break;case 25:if(void 0===a.giftCertificateItemId){e.next=29;break}i.giftCertificateItemId=a.giftCertificateItemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: giftCertificateItemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for removeGiftCertificateItemFromBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=gu(gu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=47,md(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return k.apply(this,arguments)})},{key:"removeItemFromBasket",value:(b=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.itemId){e.next=7;break}i.itemId=n.itemId,e.next=12;break;case 7:if(void 0===a.itemId){e.next=11;break}i.itemId=a.itemId,e.next=12;break;case 11:throw new Error("Missing required path parameter: itemId");case 12:if(void 0===n.organizationId){e.next=16;break}i.organizationId=n.organizationId,e.next=21;break;case 16:if(void 0===a.organizationId){e.next=20;break}i.organizationId=a.organizationId,e.next=21;break;case 20:throw new Error("Missing required path parameter: organizationId");case 21:if(void 0===n.basketId){e.next=25;break}i.basketId=n.basketId,e.next=30;break;case 25:if(void 0===a.basketId){e.next=29;break}i.basketId=a.basketId,e.next=30;break;case 29:throw new Error("Missing required path parameter: basketId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for removeItemFromBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=gu(gu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=47,md(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"removePaymentInstrumentFromBasket",value:(m=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.paymentInstrumentId){e.next=7;break}i.paymentInstrumentId=n.paymentInstrumentId,e.next=12;break;case 7:if(void 0===a.paymentInstrumentId){e.next=11;break}i.paymentInstrumentId=a.paymentInstrumentId,e.next=12;break;case 11:throw new Error("Missing required path parameter: paymentInstrumentId");case 12:if(void 0===n.organizationId){e.next=16;break}i.organizationId=n.organizationId,e.next=21;break;case 16:if(void 0===a.organizationId){e.next=20;break}i.organizationId=a.organizationId,e.next=21;break;case 20:throw new Error("Missing required path parameter: organizationId");case 21:if(void 0===n.basketId){e.next=25;break}i.basketId=n.basketId,e.next=30;break;case 25:if(void 0===a.basketId){e.next=29;break}i.basketId=a.basketId,e.next=30;break;case 29:throw new Error("Missing required path parameter: basketId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for removePaymentInstrumentFromBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=gu(gu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=47,md(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return m.apply(this,arguments)})},{key:"removePriceAdjustmentFromBasket",value:(I=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.priceAdjustmentId){e.next=7;break}i.priceAdjustmentId=n.priceAdjustmentId,e.next=12;break;case 7:if(void 0===a.priceAdjustmentId){e.next=11;break}i.priceAdjustmentId=a.priceAdjustmentId,e.next=12;break;case 11:throw new Error("Missing required path parameter: priceAdjustmentId");case 12:if(void 0===n.organizationId){e.next=16;break}i.organizationId=n.organizationId,e.next=21;break;case 16:if(void 0===a.organizationId){e.next=20;break}i.organizationId=a.organizationId,e.next=21;break;case 20:throw new Error("Missing required path parameter: organizationId");case 21:if(void 0===n.basketId){e.next=25;break}i.basketId=n.basketId,e.next=30;break;case 25:if(void 0===a.basketId){e.next=29;break}i.basketId=a.basketId,e.next=30;break;case 29:throw new Error("Missing required path parameter: basketId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for removePriceAdjustmentFromBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/price-adjustments/{priceAdjustmentId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=gu(gu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=47,md(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return I.apply(this,arguments)})},{key:"removeShipmentFromBasket",value:(f=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.shipmentId){e.next=7;break}i.shipmentId=n.shipmentId,e.next=12;break;case 7:if(void 0===a.shipmentId){e.next=11;break}i.shipmentId=a.shipmentId,e.next=12;break;case 11:throw new Error("Missing required path parameter: shipmentId");case 12:if(void 0===n.organizationId){e.next=16;break}i.organizationId=n.organizationId,e.next=21;break;case 16:if(void 0===a.organizationId){e.next=20;break}i.organizationId=a.organizationId,e.next=21;break;case 20:throw new Error("Missing required path parameter: organizationId");case 21:if(void 0===n.basketId){e.next=25;break}i.basketId=n.basketId,e.next=30;break;case 25:if(void 0===a.basketId){e.next=29;break}i.basketId=a.basketId,e.next=30;break;case 29:throw new Error("Missing required path parameter: basketId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for removeShipmentFromBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=gu(gu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=47,md(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"transferBasket",value:(p=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}o.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return void 0!==n.overrideExisting?o.overrideExisting=n.overrideExisting:void 0!==a.overrideExisting&&(o.overrideExisting=a.overrideExisting),void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for transferBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/actions/transfer",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=gu(gu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=30,md(s.toString(),{method:"POST",headers:d},this.clientConfig,r);case 30:return c=e.sent,e.abrupt("return",c);case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"updateAsAgentBasket",value:(h=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for updateAsAgentBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/agent",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=gu(gu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=38,md(s.toString(),{method:"PUT",headers:d},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"updateAsStorefrontBasket",value:(g=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.exchange?o.exchange=n.exchange:void 0!==a.exchange&&(o.exchange=a.exchange),void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for updateAsStorefrontBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/storefront",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=gu(gu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=39,md(s.toString(),{method:"PUT",headers:d},this.clientConfig,r);case 39:return c=e.sent,e.abrupt("return",c);case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"updateBasket",value:(l=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.removeExternalTax?o.removeExternalTax=n.removeExternalTax:void 0!==a.removeExternalTax&&(o.removeExternalTax=a.removeExternalTax),void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for updateBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=gu(gu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=39,md(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 39:return c=e.sent,e.abrupt("return",c);case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"updateBillingAddressForBasket",value:(u=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),void 0!==n.useAsShipping?o.useAsShipping=n.useAsShipping:void 0!==a.useAsShipping&&(o.useAsShipping=a.useAsShipping),void 0!==n.removeExternalTax?o.removeExternalTax=n.removeExternalTax:void 0!==a.removeExternalTax&&(o.removeExternalTax=a.removeExternalTax),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for updateBillingAddressForBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/billing-address",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=gu(gu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=40,md(s.toString(),{method:"PUT",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 40:return c=e.sent,e.abrupt("return",c);case 42:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"updateCustomerForBasket",value:(c=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for updateCustomerForBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/customer",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=gu(gu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=38,md(s.toString(),{method:"PUT",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"updateGiftCertificateItemInBasket",value:(d=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.giftCertificateItemId){e.next=25;break}i.giftCertificateItemId=n.giftCertificateItemId,e.next=30;break;case 25:if(void 0===a.giftCertificateItemId){e.next=29;break}i.giftCertificateItemId=a.giftCertificateItemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: giftCertificateItemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for updateGiftCertificateItemInBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=gu(gu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=47,md(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"updateItemInBasket",value:(s=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.itemId){e.next=7;break}i.itemId=n.itemId,e.next=12;break;case 7:if(void 0===a.itemId){e.next=11;break}i.itemId=a.itemId,e.next=12;break;case 11:throw new Error("Missing required path parameter: itemId");case 12:if(void 0===n.organizationId){e.next=16;break}i.organizationId=n.organizationId,e.next=21;break;case 16:if(void 0===a.organizationId){e.next=20;break}i.organizationId=a.organizationId,e.next=21;break;case 20:throw new Error("Missing required path parameter: organizationId");case 21:if(void 0===n.basketId){e.next=25;break}i.basketId=n.basketId,e.next=30;break;case 25:if(void 0===a.basketId){e.next=29;break}i.basketId=a.basketId,e.next=30;break;case 29:throw new Error("Missing required path parameter: basketId");case 30:if(o={},void 0!==n.removeExternalTax?o.removeExternalTax=n.removeExternalTax:void 0!==a.removeExternalTax&&(o.removeExternalTax=a.removeExternalTax),void 0===n.siteId){e.next=36;break}o.siteId=n.siteId,e.next=41;break;case 36:if(void 0===a.siteId){e.next=40;break}o.siteId=a.siteId,e.next=41;break;case 40:throw new Error("Missing required query parameter: siteId");case 41:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for updateItemInBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=gu(gu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=48,md(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 48:return c=e.sent,e.abrupt("return",c);case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"updateItemsInBasket",value:(o=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.removeExternalTax?o.removeExternalTax=n.removeExternalTax:void 0!==a.removeExternalTax&&(o.removeExternalTax=a.removeExternalTax),void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for updateItemsInBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/items",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=gu(gu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=39,md(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 39:return c=e.sent,e.abrupt("return",c);case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"updatePaymentInstrumentInBasket",value:(i=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.paymentInstrumentId){e.next=7;break}i.paymentInstrumentId=n.paymentInstrumentId,e.next=12;break;case 7:if(void 0===a.paymentInstrumentId){e.next=11;break}i.paymentInstrumentId=a.paymentInstrumentId,e.next=12;break;case 11:throw new Error("Missing required path parameter: paymentInstrumentId");case 12:if(void 0===n.organizationId){e.next=16;break}i.organizationId=n.organizationId,e.next=21;break;case 16:if(void 0===a.organizationId){e.next=20;break}i.organizationId=a.organizationId,e.next=21;break;case 20:throw new Error("Missing required path parameter: organizationId");case 21:if(void 0===n.basketId){e.next=25;break}i.basketId=n.basketId,e.next=30;break;case 25:if(void 0===a.basketId){e.next=29;break}i.basketId=a.basketId,e.next=30;break;case 29:throw new Error("Missing required path parameter: basketId");case 30:if(o={},void 0!==n.removeExternalTax?o.removeExternalTax=n.removeExternalTax:void 0!==a.removeExternalTax&&(o.removeExternalTax=a.removeExternalTax),void 0===n.siteId){e.next=36;break}o.siteId=n.siteId,e.next=41;break;case 36:if(void 0===a.siteId){e.next=40;break}o.siteId=a.siteId,e.next=41;break;case 40:throw new Error("Missing required query parameter: siteId");case 41:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for updatePaymentInstrumentInBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=gu(gu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=48,md(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 48:return c=e.sent,e.abrupt("return",c);case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"updatePriceAdjustmentInBasket",value:(a=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.priceAdjustmentId){e.next=7;break}i.priceAdjustmentId=n.priceAdjustmentId,e.next=12;break;case 7:if(void 0===a.priceAdjustmentId){e.next=11;break}i.priceAdjustmentId=a.priceAdjustmentId,e.next=12;break;case 11:throw new Error("Missing required path parameter: priceAdjustmentId");case 12:if(void 0===n.organizationId){e.next=16;break}i.organizationId=n.organizationId,e.next=21;break;case 16:if(void 0===a.organizationId){e.next=20;break}i.organizationId=a.organizationId,e.next=21;break;case 20:throw new Error("Missing required path parameter: organizationId");case 21:if(void 0===n.basketId){e.next=25;break}i.basketId=n.basketId,e.next=30;break;case 25:if(void 0===a.basketId){e.next=29;break}i.basketId=a.basketId,e.next=30;break;case 29:throw new Error("Missing required path parameter: basketId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for updatePriceAdjustmentInBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/price-adjustments/{priceAdjustmentId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=gu(gu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=46,md(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 46:return c=e.sent,e.abrupt("return",c);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"updateShipmentForBasket",value:(n=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.shipmentId){e.next=7;break}i.shipmentId=n.shipmentId,e.next=12;break;case 7:if(void 0===a.shipmentId){e.next=11;break}i.shipmentId=a.shipmentId,e.next=12;break;case 11:throw new Error("Missing required path parameter: shipmentId");case 12:if(void 0===n.organizationId){e.next=16;break}i.organizationId=n.organizationId,e.next=21;break;case 16:if(void 0===a.organizationId){e.next=20;break}i.organizationId=a.organizationId,e.next=21;break;case 20:throw new Error("Missing required path parameter: organizationId");case 21:if(void 0===n.basketId){e.next=25;break}i.basketId=n.basketId,e.next=30;break;case 25:if(void 0===a.basketId){e.next=29;break}i.basketId=a.basketId,e.next=30;break;case 29:throw new Error("Missing required path parameter: basketId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for updateShipmentForBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=gu(gu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=47,md(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"updateShippingAddressForShipment",value:(r=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.shipmentId){e.next=16;break}i.shipmentId=n.shipmentId,e.next=21;break;case 16:if(void 0===a.shipmentId){e.next=20;break}i.shipmentId=a.shipmentId,e.next=21;break;case 20:throw new Error("Missing required path parameter: shipmentId");case 21:if(void 0===n.basketId){e.next=25;break}i.basketId=n.basketId,e.next=30;break;case 25:if(void 0===a.basketId){e.next=29;break}i.basketId=a.basketId,e.next=30;break;case 29:throw new Error("Missing required path parameter: basketId");case 30:if(o={},void 0!==n.useAsBilling?o.useAsBilling=n.useAsBilling:void 0!==a.useAsBilling&&(o.useAsBilling=a.useAsBilling),void 0!==n.removeExternalTax?o.removeExternalTax=n.removeExternalTax:void 0!==a.removeExternalTax&&(o.removeExternalTax=a.removeExternalTax),void 0===n.siteId){e.next=37;break}o.siteId=n.siteId,e.next=42;break;case 37:if(void 0===a.siteId){e.next=41;break}o.siteId=a.siteId,e.next=42;break;case 41:throw new Error("Missing required query parameter: siteId");case 42:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for updateShippingAddressForShipment: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-address",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=gu(gu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=49,md(s.toString(),{method:"PUT",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 49:return c=e.sent,e.abrupt("return",c);case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"updateShippingMethodForShipment",value:(t=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.shipmentId){e.next=16;break}i.shipmentId=n.shipmentId,e.next=21;break;case 16:if(void 0===a.shipmentId){e.next=20;break}i.shipmentId=a.shipmentId,e.next=21;break;case 20:throw new Error("Missing required path parameter: shipmentId");case 21:if(void 0===n.basketId){e.next=25;break}i.basketId=n.basketId,e.next=30;break;case 25:if(void 0===a.basketId){e.next=29;break}i.basketId=a.basketId,e.next=30;break;case 29:throw new Error("Missing required path parameter: basketId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for updateShippingMethodForShipment: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-method",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=gu(gu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=47,md(s.toString(),{method:"PUT",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();pa(hu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-baskets/v1"),pa(hu,"apiPaths",{addCouponToBasket:"/organizations/{organizationId}/baskets/{basketId}/coupons",addGiftCertificateItemToBasket:"/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items",addItemToBasket:"/organizations/{organizationId}/baskets/{basketId}/items",addPaymentInstrumentToBasket:"/organizations/{organizationId}/baskets/{basketId}/payment-instruments",addPriceAdjustmentToBasket:"/organizations/{organizationId}/baskets/{basketId}/price-adjustments",addPriceBooksToBasket:"/organizations/{organizationId}/baskets/{basketId}/price-books",addTaxesForBasket:"/organizations/{organizationId}/baskets/{basketId}/taxes",addTaxesForBasketItem:"/organizations/{organizationId}/baskets/{basketId}/items/{itemId}/taxes",createBasket:"/organizations/{organizationId}/baskets",createShipmentForBasket:"/organizations/{organizationId}/baskets/{basketId}/shipments",deleteBasket:"/organizations/{organizationId}/baskets/{basketId}",getBasket:"/organizations/{organizationId}/baskets/{basketId}",getPaymentMethodsForBasket:"/organizations/{organizationId}/baskets/{basketId}/payment-methods",getPriceBooksForBasket:"/organizations/{organizationId}/baskets/{basketId}/price-books",getShippingMethodsForShipment:"/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-methods",getTaxesFromBasket:"/organizations/{organizationId}/baskets/{basketId}/taxes",mergeBasket:"/organizations/{organizationId}/baskets/actions/merge",removeCouponFromBasket:"/organizations/{organizationId}/baskets/{basketId}/coupons/{couponItemId}",removeGiftCertificateItemFromBasket:"/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}",removeItemFromBasket:"/organizations/{organizationId}/baskets/{basketId}/items/{itemId}",removePaymentInstrumentFromBasket:"/organizations/{organizationId}/baskets/{basketId}/payment-instruments/{paymentInstrumentId}",removePriceAdjustmentFromBasket:"/organizations/{organizationId}/baskets/{basketId}/price-adjustments/{priceAdjustmentId}",removeShipmentFromBasket:"/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}",transferBasket:"/organizations/{organizationId}/baskets/actions/transfer",updateAsAgentBasket:"/organizations/{organizationId}/baskets/{basketId}/agent",updateAsStorefrontBasket:"/organizations/{organizationId}/baskets/{basketId}/storefront",updateBasket:"/organizations/{organizationId}/baskets/{basketId}",updateBillingAddressForBasket:"/organizations/{organizationId}/baskets/{basketId}/billing-address",updateCustomerForBasket:"/organizations/{organizationId}/baskets/{basketId}/customer",updateGiftCertificateItemInBasket:"/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}",updateItemInBasket:"/organizations/{organizationId}/baskets/{basketId}/items/{itemId}",updateItemsInBasket:"/organizations/{organizationId}/baskets/{basketId}/items",updatePaymentInstrumentInBasket:"/organizations/{organizationId}/baskets/{basketId}/payment-instruments/{paymentInstrumentId}",updatePriceAdjustmentInBasket:"/organizations/{organizationId}/baskets/{basketId}/price-adjustments/{priceAdjustmentId}",updateShipmentForBasket:"/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}",updateShippingAddressForShipment:"/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-address",updateShippingMethodForShipment:"/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-method"}),pa(hu,"paramKeys",{addCouponToBasket:["siteId","organizationId","basketId","locale"],addCouponToBasketRequired:["siteId","organizationId","basketId"],addGiftCertificateItemToBasket:["siteId","organizationId","basketId","locale"],addGiftCertificateItemToBasketRequired:["siteId","organizationId","basketId"],addItemToBasket:["organizationId","basketId","siteId","locale"],addItemToBasketRequired:["organizationId","basketId","siteId"],addPaymentInstrumentToBasket:["organizationId","basketId","siteId","locale"],addPaymentInstrumentToBasketRequired:["organizationId","basketId","siteId"],addPriceAdjustmentToBasket:["organizationId","basketId","siteId","locale"],addPriceAdjustmentToBasketRequired:["organizationId","basketId","siteId"],addPriceBooksToBasket:["organizationId","basketId","siteId"],addPriceBooksToBasketRequired:["organizationId","basketId","siteId"],addTaxesForBasket:["organizationId","basketId","siteId"],addTaxesForBasketRequired:["organizationId","basketId","siteId"],addTaxesForBasketItem:["organizationId","itemId","basketId","siteId"],addTaxesForBasketItemRequired:["organizationId","itemId","basketId","siteId"],createBasket:["siteId","organizationId","taxMode","locale"],createBasketRequired:["siteId","organizationId"],createShipmentForBasket:["organizationId","basketId","siteId","locale"],createShipmentForBasketRequired:["organizationId","basketId","siteId"],deleteBasket:["siteId","organizationId","basketId"],deleteBasketRequired:["siteId","organizationId","basketId"],getBasket:["siteId","organizationId","basketId","locale"],getBasketRequired:["siteId","organizationId","basketId"],getPaymentMethodsForBasket:["organizationId","basketId","siteId","locale"],getPaymentMethodsForBasketRequired:["organizationId","basketId","siteId"],getPriceBooksForBasket:["organizationId","basketId","siteId"],getPriceBooksForBasketRequired:["organizationId","basketId","siteId"],getShippingMethodsForShipment:["organizationId","shipmentId","basketId","siteId","locale"],getShippingMethodsForShipmentRequired:["organizationId","shipmentId","basketId","siteId"],getTaxesFromBasket:["organizationId","basketId","siteId"],getTaxesFromBasketRequired:["organizationId","basketId","siteId"],mergeBasket:["siteId","organizationId","createDestinationBasket","productItemMergeMode","locale"],mergeBasketRequired:["siteId","organizationId"],removeCouponFromBasket:["siteId","organizationId","basketId","couponItemId","locale"],removeCouponFromBasketRequired:["siteId","organizationId","basketId","couponItemId"],removeGiftCertificateItemFromBasket:["siteId","organizationId","basketId","giftCertificateItemId","locale"],removeGiftCertificateItemFromBasketRequired:["siteId","organizationId","basketId","giftCertificateItemId"],removeItemFromBasket:["itemId","organizationId","basketId","siteId","locale"],removeItemFromBasketRequired:["itemId","organizationId","basketId","siteId"],removePaymentInstrumentFromBasket:["paymentInstrumentId","organizationId","basketId","siteId","locale"],removePaymentInstrumentFromBasketRequired:["paymentInstrumentId","organizationId","basketId","siteId"],removePriceAdjustmentFromBasket:["priceAdjustmentId","organizationId","basketId","siteId","locale"],removePriceAdjustmentFromBasketRequired:["priceAdjustmentId","organizationId","basketId","siteId"],removeShipmentFromBasket:["shipmentId","organizationId","basketId","siteId","locale"],removeShipmentFromBasketRequired:["shipmentId","organizationId","basketId","siteId"],transferBasket:["siteId","organizationId","overrideExisting","locale"],transferBasketRequired:["siteId","organizationId"],updateAsAgentBasket:["siteId","organizationId","basketId","locale"],updateAsAgentBasketRequired:["siteId","organizationId","basketId"],updateAsStorefrontBasket:["organizationId","basketId","siteId","exchange","locale"],updateAsStorefrontBasketRequired:["organizationId","basketId","siteId"],updateBasket:["siteId","organizationId","basketId","removeExternalTax","locale"],updateBasketRequired:["siteId","organizationId","basketId"],updateBillingAddressForBasket:["siteId","organizationId","basketId","locale","useAsShipping","removeExternalTax"],updateBillingAddressForBasketRequired:["siteId","organizationId","basketId"],updateCustomerForBasket:["siteId","organizationId","basketId","locale"],updateCustomerForBasketRequired:["siteId","organizationId","basketId"],updateGiftCertificateItemInBasket:["siteId","organizationId","basketId","giftCertificateItemId","locale"],updateGiftCertificateItemInBasketRequired:["siteId","organizationId","basketId","giftCertificateItemId"],updateItemInBasket:["itemId","organizationId","basketId","siteId","removeExternalTax","locale"],updateItemInBasketRequired:["itemId","organizationId","basketId","siteId"],updateItemsInBasket:["organizationId","basketId","siteId","removeExternalTax","locale"],updateItemsInBasketRequired:["organizationId","basketId","siteId"],updatePaymentInstrumentInBasket:["paymentInstrumentId","organizationId","basketId","siteId","removeExternalTax","locale"],updatePaymentInstrumentInBasketRequired:["paymentInstrumentId","organizationId","basketId","siteId"],updatePriceAdjustmentInBasket:["priceAdjustmentId","organizationId","basketId","siteId"],updatePriceAdjustmentInBasketRequired:["priceAdjustmentId","organizationId","basketId","siteId"],updateShipmentForBasket:["shipmentId","organizationId","basketId","siteId","locale"],updateShipmentForBasketRequired:["shipmentId","organizationId","basketId","siteId"],updateShippingAddressForShipment:["organizationId","shipmentId","basketId","siteId","useAsBilling","removeExternalTax","locale"],updateShippingAddressForShipmentRequired:["organizationId","shipmentId","basketId","siteId"],updateShippingMethodForShipment:["organizationId","shipmentId","basketId","siteId","locale"],updateShippingMethodForShipmentRequired:["organizationId","shipmentId","basketId","siteId"]});function pu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function fu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?pu(Object(r),!0).forEach((function(t){pa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Iu=function(){function e(t){la(this,e),pa(this,"clientConfig",void 0);var r=fu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Wo(r)}var t,r,n,a,i,o,s,d,c,u,l,g,h,p,f,I,m,b,k,v,y,x,w,z,C,q,E,P,j,O,S,T,_,M,B,A,R;return ha(e,[{key:"addCouponToBasket",value:(R=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for addCouponToBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/coupons",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=fu(fu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=38,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return R.apply(this,arguments)})},{key:"addGiftCertificateItemToBasket",value:(A=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for addGiftCertificateItemToBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=fu(fu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=38,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return A.apply(this,arguments)})},{key:"addItemToBasket",value:(B=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for addItemToBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/items",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=fu(fu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=38,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return B.apply(this,arguments)})},{key:"addPaymentInstrumentToBasket",value:(M=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for addPaymentInstrumentToBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/payment-instruments",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=fu(fu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=38,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return M.apply(this,arguments)})},{key:"addPriceAdjustmentToBasket",value:(_=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for addPriceAdjustmentToBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/price-adjustments",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=fu(fu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=38,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return _.apply(this,arguments)})},{key:"addPriceBooksToBasket",value:(T=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for addPriceBooksToBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/price-books",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=fu(fu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=37,md(s.toString(),{method:"PUT",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 37:if(c=e.sent,!r){e.next=40;break}return e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return T.apply(this,arguments)})},{key:"addTaxesForBasket",value:(S=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for addTaxesForBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/taxes",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=fu(fu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=37,md(s.toString(),{method:"PUT",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 37:if(c=e.sent,!r){e.next=40;break}return e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return S.apply(this,arguments)})},{key:"addTaxesForBasketItem",value:(O=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.itemId){e.next=16;break}i.itemId=n.itemId,e.next=21;break;case 16:if(void 0===a.itemId){e.next=20;break}i.itemId=a.itemId,e.next=21;break;case 20:throw new Error("Missing required path parameter: itemId");case 21:if(void 0===n.basketId){e.next=25;break}i.basketId=n.basketId,e.next=30;break;case 25:if(void 0===a.basketId){e.next=29;break}i.basketId=a.basketId,e.next=30;break;case 29:throw new Error("Missing required path parameter: basketId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for addTaxesForBasketItem: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}/taxes",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=fu(fu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=46,md(s.toString(),{method:"PUT",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 46:if(c=e.sent,!r){e.next=49;break}return e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return O.apply(this,arguments)})},{key:"createBasket",value:(j=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}o.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return void 0!==n.taxMode?o.taxMode=n.taxMode:void 0!==a.taxMode&&(o.taxMode=a.taxMode),void 0!==n.temporary?o.temporary=n.temporary:void 0!==a.temporary&&(o.temporary=a.temporary),void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for createBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=fu(fu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=31,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 31:return c=e.sent,e.abrupt("return",c);case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return j.apply(this,arguments)})},{key:"createShipmentForBasket",value:(P=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for createShipmentForBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/shipments",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=fu(fu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=38,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return P.apply(this,arguments)})},{key:"deleteBasket",value:(E=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for deleteBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=fu(fu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=37,md(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 37:if(c=e.sent,!r){e.next=40;break}return e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return E.apply(this,arguments)})},{key:"getBasket",value:(q=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=fu(fu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=38,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return q.apply(this,arguments)})},{key:"getPaymentMethodsForBasket",value:(C=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getPaymentMethodsForBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/payment-methods",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=fu(fu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=38,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return C.apply(this,arguments)})},{key:"getPriceBooksForBasket",value:(z=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getPriceBooksForBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/price-books",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=fu(fu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=37,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 37:return c=e.sent,e.abrupt("return",c);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return z.apply(this,arguments)})},{key:"getShippingMethodsForShipment",value:(w=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.shipmentId){e.next=16;break}i.shipmentId=n.shipmentId,e.next=21;break;case 16:if(void 0===a.shipmentId){e.next=20;break}i.shipmentId=a.shipmentId,e.next=21;break;case 20:throw new Error("Missing required path parameter: shipmentId");case 21:if(void 0===n.basketId){e.next=25;break}i.basketId=n.basketId,e.next=30;break;case 25:if(void 0===a.basketId){e.next=29;break}i.basketId=a.basketId,e.next=30;break;case 29:throw new Error("Missing required path parameter: basketId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getShippingMethodsForShipment: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-methods",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=fu(fu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=47,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return w.apply(this,arguments)})},{key:"getTaxesFromBasket",value:(x=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getTaxesFromBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/taxes",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=fu(fu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=37,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 37:return c=e.sent,e.abrupt("return",c);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return x.apply(this,arguments)})},{key:"mergeBasket",value:(y=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}o.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return void 0!==n.createDestinationBasket?o.createDestinationBasket=n.createDestinationBasket:void 0!==a.createDestinationBasket&&(o.createDestinationBasket=a.createDestinationBasket),void 0!==n.productItemMergeMode?o.productItemMergeMode=n.productItemMergeMode:void 0!==a.productItemMergeMode&&(o.productItemMergeMode=a.productItemMergeMode),void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for mergeBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/actions/merge",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=fu(fu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=31,md(s.toString(),{method:"POST",headers:d},this.clientConfig,r);case 31:return c=e.sent,e.abrupt("return",c);case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return y.apply(this,arguments)})},{key:"removeCouponFromBasket",value:(v=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.couponItemId){e.next=25;break}i.couponItemId=n.couponItemId,e.next=30;break;case 25:if(void 0===a.couponItemId){e.next=29;break}i.couponItemId=a.couponItemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: couponItemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for removeCouponFromBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/coupons/{couponItemId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=fu(fu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=47,md(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return v.apply(this,arguments)})},{key:"removeGiftCertificateItemFromBasket",value:(k=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.giftCertificateItemId){e.next=25;break}i.giftCertificateItemId=n.giftCertificateItemId,e.next=30;break;case 25:if(void 0===a.giftCertificateItemId){e.next=29;break}i.giftCertificateItemId=a.giftCertificateItemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: giftCertificateItemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for removeGiftCertificateItemFromBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=fu(fu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=47,md(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return k.apply(this,arguments)})},{key:"removeItemFromBasket",value:(b=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.itemId){e.next=7;break}i.itemId=n.itemId,e.next=12;break;case 7:if(void 0===a.itemId){e.next=11;break}i.itemId=a.itemId,e.next=12;break;case 11:throw new Error("Missing required path parameter: itemId");case 12:if(void 0===n.organizationId){e.next=16;break}i.organizationId=n.organizationId,e.next=21;break;case 16:if(void 0===a.organizationId){e.next=20;break}i.organizationId=a.organizationId,e.next=21;break;case 20:throw new Error("Missing required path parameter: organizationId");case 21:if(void 0===n.basketId){e.next=25;break}i.basketId=n.basketId,e.next=30;break;case 25:if(void 0===a.basketId){e.next=29;break}i.basketId=a.basketId,e.next=30;break;case 29:throw new Error("Missing required path parameter: basketId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for removeItemFromBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=fu(fu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=47,md(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"removePaymentInstrumentFromBasket",value:(m=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.paymentInstrumentId){e.next=7;break}i.paymentInstrumentId=n.paymentInstrumentId,e.next=12;break;case 7:if(void 0===a.paymentInstrumentId){e.next=11;break}i.paymentInstrumentId=a.paymentInstrumentId,e.next=12;break;case 11:throw new Error("Missing required path parameter: paymentInstrumentId");case 12:if(void 0===n.organizationId){e.next=16;break}i.organizationId=n.organizationId,e.next=21;break;case 16:if(void 0===a.organizationId){e.next=20;break}i.organizationId=a.organizationId,e.next=21;break;case 20:throw new Error("Missing required path parameter: organizationId");case 21:if(void 0===n.basketId){e.next=25;break}i.basketId=n.basketId,e.next=30;break;case 25:if(void 0===a.basketId){e.next=29;break}i.basketId=a.basketId,e.next=30;break;case 29:throw new Error("Missing required path parameter: basketId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for removePaymentInstrumentFromBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=fu(fu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=47,md(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return m.apply(this,arguments)})},{key:"removePriceAdjustmentFromBasket",value:(I=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.priceAdjustmentId){e.next=7;break}i.priceAdjustmentId=n.priceAdjustmentId,e.next=12;break;case 7:if(void 0===a.priceAdjustmentId){e.next=11;break}i.priceAdjustmentId=a.priceAdjustmentId,e.next=12;break;case 11:throw new Error("Missing required path parameter: priceAdjustmentId");case 12:if(void 0===n.organizationId){e.next=16;break}i.organizationId=n.organizationId,e.next=21;break;case 16:if(void 0===a.organizationId){e.next=20;break}i.organizationId=a.organizationId,e.next=21;break;case 20:throw new Error("Missing required path parameter: organizationId");case 21:if(void 0===n.basketId){e.next=25;break}i.basketId=n.basketId,e.next=30;break;case 25:if(void 0===a.basketId){e.next=29;break}i.basketId=a.basketId,e.next=30;break;case 29:throw new Error("Missing required path parameter: basketId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for removePriceAdjustmentFromBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/price-adjustments/{priceAdjustmentId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=fu(fu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=47,md(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return I.apply(this,arguments)})},{key:"removeShipmentFromBasket",value:(f=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.shipmentId){e.next=7;break}i.shipmentId=n.shipmentId,e.next=12;break;case 7:if(void 0===a.shipmentId){e.next=11;break}i.shipmentId=a.shipmentId,e.next=12;break;case 11:throw new Error("Missing required path parameter: shipmentId");case 12:if(void 0===n.organizationId){e.next=16;break}i.organizationId=n.organizationId,e.next=21;break;case 16:if(void 0===a.organizationId){e.next=20;break}i.organizationId=a.organizationId,e.next=21;break;case 20:throw new Error("Missing required path parameter: organizationId");case 21:if(void 0===n.basketId){e.next=25;break}i.basketId=n.basketId,e.next=30;break;case 25:if(void 0===a.basketId){e.next=29;break}i.basketId=a.basketId,e.next=30;break;case 29:throw new Error("Missing required path parameter: basketId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for removeShipmentFromBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=fu(fu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=47,md(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"transferBasket",value:(p=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}o.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return void 0!==n.overrideExisting?o.overrideExisting=n.overrideExisting:void 0!==a.overrideExisting&&(o.overrideExisting=a.overrideExisting),void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for transferBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/actions/transfer",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=fu(fu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=30,md(s.toString(),{method:"POST",headers:d},this.clientConfig,r);case 30:return c=e.sent,e.abrupt("return",c);case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"updateAsAgentBasket",value:(h=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for updateAsAgentBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/agent",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=fu(fu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=38,md(s.toString(),{method:"PUT",headers:d},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"updateAsStorefrontBasket",value:(g=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.exchange?o.exchange=n.exchange:void 0!==a.exchange&&(o.exchange=a.exchange),void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for updateAsStorefrontBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/storefront",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=fu(fu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=39,md(s.toString(),{method:"PUT",headers:d},this.clientConfig,r);case 39:return c=e.sent,e.abrupt("return",c);case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"updateBasket",value:(l=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.removeExternalTax?o.removeExternalTax=n.removeExternalTax:void 0!==a.removeExternalTax&&(o.removeExternalTax=a.removeExternalTax),void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for updateBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=fu(fu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=39,md(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 39:return c=e.sent,e.abrupt("return",c);case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"updateBillingAddressForBasket",value:(u=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),void 0!==n.useAsShipping?o.useAsShipping=n.useAsShipping:void 0!==a.useAsShipping&&(o.useAsShipping=a.useAsShipping),void 0!==n.removeExternalTax?o.removeExternalTax=n.removeExternalTax:void 0!==a.removeExternalTax&&(o.removeExternalTax=a.removeExternalTax),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for updateBillingAddressForBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/billing-address",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=fu(fu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=40,md(s.toString(),{method:"PUT",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 40:return c=e.sent,e.abrupt("return",c);case 42:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"updateCustomerForBasket",value:(c=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for updateCustomerForBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/customer",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=fu(fu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=38,md(s.toString(),{method:"PUT",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"updateGiftCertificateItemInBasket",value:(d=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.giftCertificateItemId){e.next=25;break}i.giftCertificateItemId=n.giftCertificateItemId,e.next=30;break;case 25:if(void 0===a.giftCertificateItemId){e.next=29;break}i.giftCertificateItemId=a.giftCertificateItemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: giftCertificateItemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for updateGiftCertificateItemInBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=fu(fu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=47,md(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"updateItemInBasket",value:(s=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.itemId){e.next=7;break}i.itemId=n.itemId,e.next=12;break;case 7:if(void 0===a.itemId){e.next=11;break}i.itemId=a.itemId,e.next=12;break;case 11:throw new Error("Missing required path parameter: itemId");case 12:if(void 0===n.organizationId){e.next=16;break}i.organizationId=n.organizationId,e.next=21;break;case 16:if(void 0===a.organizationId){e.next=20;break}i.organizationId=a.organizationId,e.next=21;break;case 20:throw new Error("Missing required path parameter: organizationId");case 21:if(void 0===n.basketId){e.next=25;break}i.basketId=n.basketId,e.next=30;break;case 25:if(void 0===a.basketId){e.next=29;break}i.basketId=a.basketId,e.next=30;break;case 29:throw new Error("Missing required path parameter: basketId");case 30:if(o={},void 0!==n.removeExternalTax?o.removeExternalTax=n.removeExternalTax:void 0!==a.removeExternalTax&&(o.removeExternalTax=a.removeExternalTax),void 0===n.siteId){e.next=36;break}o.siteId=n.siteId,e.next=41;break;case 36:if(void 0===a.siteId){e.next=40;break}o.siteId=a.siteId,e.next=41;break;case 40:throw new Error("Missing required query parameter: siteId");case 41:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for updateItemInBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=fu(fu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=48,md(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 48:return c=e.sent,e.abrupt("return",c);case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"updateItemsInBasket",value:(o=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.removeExternalTax?o.removeExternalTax=n.removeExternalTax:void 0!==a.removeExternalTax&&(o.removeExternalTax=a.removeExternalTax),void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for updateItemsInBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/items",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=fu(fu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=39,md(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 39:return c=e.sent,e.abrupt("return",c);case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"updatePaymentInstrumentInBasket",value:(i=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.paymentInstrumentId){e.next=7;break}i.paymentInstrumentId=n.paymentInstrumentId,e.next=12;break;case 7:if(void 0===a.paymentInstrumentId){e.next=11;break}i.paymentInstrumentId=a.paymentInstrumentId,e.next=12;break;case 11:throw new Error("Missing required path parameter: paymentInstrumentId");case 12:if(void 0===n.organizationId){e.next=16;break}i.organizationId=n.organizationId,e.next=21;break;case 16:if(void 0===a.organizationId){e.next=20;break}i.organizationId=a.organizationId,e.next=21;break;case 20:throw new Error("Missing required path parameter: organizationId");case 21:if(void 0===n.basketId){e.next=25;break}i.basketId=n.basketId,e.next=30;break;case 25:if(void 0===a.basketId){e.next=29;break}i.basketId=a.basketId,e.next=30;break;case 29:throw new Error("Missing required path parameter: basketId");case 30:if(o={},void 0!==n.removeExternalTax?o.removeExternalTax=n.removeExternalTax:void 0!==a.removeExternalTax&&(o.removeExternalTax=a.removeExternalTax),void 0===n.siteId){e.next=36;break}o.siteId=n.siteId,e.next=41;break;case 36:if(void 0===a.siteId){e.next=40;break}o.siteId=a.siteId,e.next=41;break;case 40:throw new Error("Missing required query parameter: siteId");case 41:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for updatePaymentInstrumentInBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=fu(fu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=48,md(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 48:return c=e.sent,e.abrupt("return",c);case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"updatePriceAdjustmentInBasket",value:(a=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.priceAdjustmentId){e.next=7;break}i.priceAdjustmentId=n.priceAdjustmentId,e.next=12;break;case 7:if(void 0===a.priceAdjustmentId){e.next=11;break}i.priceAdjustmentId=a.priceAdjustmentId,e.next=12;break;case 11:throw new Error("Missing required path parameter: priceAdjustmentId");case 12:if(void 0===n.organizationId){e.next=16;break}i.organizationId=n.organizationId,e.next=21;break;case 16:if(void 0===a.organizationId){e.next=20;break}i.organizationId=a.organizationId,e.next=21;break;case 20:throw new Error("Missing required path parameter: organizationId");case 21:if(void 0===n.basketId){e.next=25;break}i.basketId=n.basketId,e.next=30;break;case 25:if(void 0===a.basketId){e.next=29;break}i.basketId=a.basketId,e.next=30;break;case 29:throw new Error("Missing required path parameter: basketId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for updatePriceAdjustmentInBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/price-adjustments/{priceAdjustmentId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=fu(fu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=46,md(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 46:return c=e.sent,e.abrupt("return",c);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"updateShipmentForBasket",value:(n=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.shipmentId){e.next=7;break}i.shipmentId=n.shipmentId,e.next=12;break;case 7:if(void 0===a.shipmentId){e.next=11;break}i.shipmentId=a.shipmentId,e.next=12;break;case 11:throw new Error("Missing required path parameter: shipmentId");case 12:if(void 0===n.organizationId){e.next=16;break}i.organizationId=n.organizationId,e.next=21;break;case 16:if(void 0===a.organizationId){e.next=20;break}i.organizationId=a.organizationId,e.next=21;break;case 20:throw new Error("Missing required path parameter: organizationId");case 21:if(void 0===n.basketId){e.next=25;break}i.basketId=n.basketId,e.next=30;break;case 25:if(void 0===a.basketId){e.next=29;break}i.basketId=a.basketId,e.next=30;break;case 29:throw new Error("Missing required path parameter: basketId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for updateShipmentForBasket: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=fu(fu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=47,md(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"updateShippingAddressForShipment",value:(r=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.shipmentId){e.next=16;break}i.shipmentId=n.shipmentId,e.next=21;break;case 16:if(void 0===a.shipmentId){e.next=20;break}i.shipmentId=a.shipmentId,e.next=21;break;case 20:throw new Error("Missing required path parameter: shipmentId");case 21:if(void 0===n.basketId){e.next=25;break}i.basketId=n.basketId,e.next=30;break;case 25:if(void 0===a.basketId){e.next=29;break}i.basketId=a.basketId,e.next=30;break;case 29:throw new Error("Missing required path parameter: basketId");case 30:if(o={},void 0!==n.useAsBilling?o.useAsBilling=n.useAsBilling:void 0!==a.useAsBilling&&(o.useAsBilling=a.useAsBilling),void 0!==n.removeExternalTax?o.removeExternalTax=n.removeExternalTax:void 0!==a.removeExternalTax&&(o.removeExternalTax=a.removeExternalTax),void 0===n.siteId){e.next=37;break}o.siteId=n.siteId,e.next=42;break;case 37:if(void 0===a.siteId){e.next=41;break}o.siteId=a.siteId,e.next=42;break;case 41:throw new Error("Missing required query parameter: siteId");case 42:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for updateShippingAddressForShipment: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-address",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=fu(fu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=49,md(s.toString(),{method:"PUT",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 49:return c=e.sent,e.abrupt("return",c);case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"updateShippingMethodForShipment",value:(t=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.shipmentId){e.next=16;break}i.shipmentId=n.shipmentId,e.next=21;break;case 16:if(void 0===a.shipmentId){e.next=20;break}i.shipmentId=a.shipmentId,e.next=21;break;case 20:throw new Error("Missing required path parameter: shipmentId");case 21:if(void 0===n.basketId){e.next=25;break}i.basketId=n.basketId,e.next=30;break;case 25:if(void 0===a.basketId){e.next=29;break}i.basketId=a.basketId,e.next=30;break;case 29:throw new Error("Missing required path parameter: basketId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for updateShippingMethodForShipment: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-method",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=fu(fu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=47,md(s.toString(),{method:"PUT",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();pa(Iu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-baskets/v2"),pa(Iu,"apiPaths",{addCouponToBasket:"/organizations/{organizationId}/baskets/{basketId}/coupons",addGiftCertificateItemToBasket:"/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items",addItemToBasket:"/organizations/{organizationId}/baskets/{basketId}/items",addPaymentInstrumentToBasket:"/organizations/{organizationId}/baskets/{basketId}/payment-instruments",addPriceAdjustmentToBasket:"/organizations/{organizationId}/baskets/{basketId}/price-adjustments",addPriceBooksToBasket:"/organizations/{organizationId}/baskets/{basketId}/price-books",addTaxesForBasket:"/organizations/{organizationId}/baskets/{basketId}/taxes",addTaxesForBasketItem:"/organizations/{organizationId}/baskets/{basketId}/items/{itemId}/taxes",createBasket:"/organizations/{organizationId}/baskets",createShipmentForBasket:"/organizations/{organizationId}/baskets/{basketId}/shipments",deleteBasket:"/organizations/{organizationId}/baskets/{basketId}",getBasket:"/organizations/{organizationId}/baskets/{basketId}",getPaymentMethodsForBasket:"/organizations/{organizationId}/baskets/{basketId}/payment-methods",getPriceBooksForBasket:"/organizations/{organizationId}/baskets/{basketId}/price-books",getShippingMethodsForShipment:"/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-methods",getTaxesFromBasket:"/organizations/{organizationId}/baskets/{basketId}/taxes",mergeBasket:"/organizations/{organizationId}/baskets/actions/merge",removeCouponFromBasket:"/organizations/{organizationId}/baskets/{basketId}/coupons/{couponItemId}",removeGiftCertificateItemFromBasket:"/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}",removeItemFromBasket:"/organizations/{organizationId}/baskets/{basketId}/items/{itemId}",removePaymentInstrumentFromBasket:"/organizations/{organizationId}/baskets/{basketId}/payment-instruments/{paymentInstrumentId}",removePriceAdjustmentFromBasket:"/organizations/{organizationId}/baskets/{basketId}/price-adjustments/{priceAdjustmentId}",removeShipmentFromBasket:"/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}",transferBasket:"/organizations/{organizationId}/baskets/actions/transfer",updateAsAgentBasket:"/organizations/{organizationId}/baskets/{basketId}/agent",updateAsStorefrontBasket:"/organizations/{organizationId}/baskets/{basketId}/storefront",updateBasket:"/organizations/{organizationId}/baskets/{basketId}",updateBillingAddressForBasket:"/organizations/{organizationId}/baskets/{basketId}/billing-address",updateCustomerForBasket:"/organizations/{organizationId}/baskets/{basketId}/customer",updateGiftCertificateItemInBasket:"/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}",updateItemInBasket:"/organizations/{organizationId}/baskets/{basketId}/items/{itemId}",updateItemsInBasket:"/organizations/{organizationId}/baskets/{basketId}/items",updatePaymentInstrumentInBasket:"/organizations/{organizationId}/baskets/{basketId}/payment-instruments/{paymentInstrumentId}",updatePriceAdjustmentInBasket:"/organizations/{organizationId}/baskets/{basketId}/price-adjustments/{priceAdjustmentId}",updateShipmentForBasket:"/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}",updateShippingAddressForShipment:"/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-address",updateShippingMethodForShipment:"/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-method"}),pa(Iu,"paramKeys",{addCouponToBasket:["siteId","organizationId","basketId","locale"],addCouponToBasketRequired:["siteId","organizationId","basketId"],addGiftCertificateItemToBasket:["siteId","organizationId","basketId","locale"],addGiftCertificateItemToBasketRequired:["siteId","organizationId","basketId"],addItemToBasket:["organizationId","basketId","siteId","locale"],addItemToBasketRequired:["organizationId","basketId","siteId"],addPaymentInstrumentToBasket:["organizationId","basketId","siteId","locale"],addPaymentInstrumentToBasketRequired:["organizationId","basketId","siteId"],addPriceAdjustmentToBasket:["organizationId","basketId","siteId","locale"],addPriceAdjustmentToBasketRequired:["organizationId","basketId","siteId"],addPriceBooksToBasket:["organizationId","basketId","siteId"],addPriceBooksToBasketRequired:["organizationId","basketId","siteId"],addTaxesForBasket:["organizationId","basketId","siteId"],addTaxesForBasketRequired:["organizationId","basketId","siteId"],addTaxesForBasketItem:["organizationId","itemId","basketId","siteId"],addTaxesForBasketItemRequired:["organizationId","itemId","basketId","siteId"],createBasket:["siteId","organizationId","taxMode","temporary","locale"],createBasketRequired:["siteId","organizationId"],createShipmentForBasket:["organizationId","basketId","siteId","locale"],createShipmentForBasketRequired:["organizationId","basketId","siteId"],deleteBasket:["siteId","organizationId","basketId"],deleteBasketRequired:["siteId","organizationId","basketId"],getBasket:["siteId","organizationId","basketId","locale"],getBasketRequired:["siteId","organizationId","basketId"],getPaymentMethodsForBasket:["organizationId","basketId","siteId","locale"],getPaymentMethodsForBasketRequired:["organizationId","basketId","siteId"],getPriceBooksForBasket:["organizationId","basketId","siteId"],getPriceBooksForBasketRequired:["organizationId","basketId","siteId"],getShippingMethodsForShipment:["organizationId","shipmentId","basketId","siteId","locale"],getShippingMethodsForShipmentRequired:["organizationId","shipmentId","basketId","siteId"],getTaxesFromBasket:["organizationId","basketId","siteId"],getTaxesFromBasketRequired:["organizationId","basketId","siteId"],mergeBasket:["siteId","organizationId","createDestinationBasket","productItemMergeMode","locale"],mergeBasketRequired:["siteId","organizationId"],removeCouponFromBasket:["siteId","organizationId","basketId","couponItemId","locale"],removeCouponFromBasketRequired:["siteId","organizationId","basketId","couponItemId"],removeGiftCertificateItemFromBasket:["siteId","organizationId","basketId","giftCertificateItemId","locale"],removeGiftCertificateItemFromBasketRequired:["siteId","organizationId","basketId","giftCertificateItemId"],removeItemFromBasket:["itemId","organizationId","basketId","siteId","locale"],removeItemFromBasketRequired:["itemId","organizationId","basketId","siteId"],removePaymentInstrumentFromBasket:["paymentInstrumentId","organizationId","basketId","siteId","locale"],removePaymentInstrumentFromBasketRequired:["paymentInstrumentId","organizationId","basketId","siteId"],removePriceAdjustmentFromBasket:["priceAdjustmentId","organizationId","basketId","siteId","locale"],removePriceAdjustmentFromBasketRequired:["priceAdjustmentId","organizationId","basketId","siteId"],removeShipmentFromBasket:["shipmentId","organizationId","basketId","siteId","locale"],removeShipmentFromBasketRequired:["shipmentId","organizationId","basketId","siteId"],transferBasket:["siteId","organizationId","overrideExisting","locale"],transferBasketRequired:["siteId","organizationId"],updateAsAgentBasket:["siteId","organizationId","basketId","locale"],updateAsAgentBasketRequired:["siteId","organizationId","basketId"],updateAsStorefrontBasket:["organizationId","basketId","siteId","exchange","locale"],updateAsStorefrontBasketRequired:["organizationId","basketId","siteId"],updateBasket:["siteId","organizationId","basketId","removeExternalTax","locale"],updateBasketRequired:["siteId","organizationId","basketId"],updateBillingAddressForBasket:["siteId","organizationId","basketId","locale","useAsShipping","removeExternalTax"],updateBillingAddressForBasketRequired:["siteId","organizationId","basketId"],updateCustomerForBasket:["siteId","organizationId","basketId","locale"],updateCustomerForBasketRequired:["siteId","organizationId","basketId"],updateGiftCertificateItemInBasket:["siteId","organizationId","basketId","giftCertificateItemId","locale"],updateGiftCertificateItemInBasketRequired:["siteId","organizationId","basketId","giftCertificateItemId"],updateItemInBasket:["itemId","organizationId","basketId","siteId","removeExternalTax","locale"],updateItemInBasketRequired:["itemId","organizationId","basketId","siteId"],updateItemsInBasket:["organizationId","basketId","siteId","removeExternalTax","locale"],updateItemsInBasketRequired:["organizationId","basketId","siteId"],updatePaymentInstrumentInBasket:["paymentInstrumentId","organizationId","basketId","siteId","removeExternalTax","locale"],updatePaymentInstrumentInBasketRequired:["paymentInstrumentId","organizationId","basketId","siteId"],updatePriceAdjustmentInBasket:["priceAdjustmentId","organizationId","basketId","siteId"],updatePriceAdjustmentInBasketRequired:["priceAdjustmentId","organizationId","basketId","siteId"],updateShipmentForBasket:["shipmentId","organizationId","basketId","siteId","locale"],updateShipmentForBasketRequired:["shipmentId","organizationId","basketId","siteId"],updateShippingAddressForShipment:["organizationId","shipmentId","basketId","siteId","useAsBilling","removeExternalTax","locale"],updateShippingAddressForShipmentRequired:["organizationId","shipmentId","basketId","siteId"],updateShippingMethodForShipment:["organizationId","shipmentId","basketId","siteId","locale"],updateShippingMethodForShipmentRequired:["organizationId","shipmentId","basketId","siteId"]});function mu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function bu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?mu(Object(r),!0).forEach((function(t){pa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ku=function(){function e(t){la(this,e),pa(this,"clientConfig",void 0);var r=bu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Wo(r)}var t,r;return ha(e,[{key:"getSubscriptions",value:(r=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}o.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),void 0!==n.tags?o.tags=n.tags:void 0!==a.tags&&(o.tags=a.tags),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getSubscriptions: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/subscriptions",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=bu(bu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=30,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 30:return c=e.sent,e.abrupt("return",c);case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"updateSubscription",value:(t=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}o.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for updateSubscription: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/subscriptions",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=bu(bu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=29,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 29:return c=e.sent,e.abrupt("return",c);case 31:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();pa(ku,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/shopper/shopper-consents/v1"),pa(ku,"apiPaths",{getSubscriptions:"/organizations/{organizationId}/subscriptions",updateSubscription:"/organizations/{organizationId}/subscriptions"}),pa(ku,"paramKeys",{getSubscriptions:["organizationId","siteId","locale","tags"],getSubscriptionsRequired:["organizationId","siteId"],updateSubscription:["organizationId","siteId","locale"],updateSubscriptionRequired:["organizationId","siteId"]});function vu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function yu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?vu(Object(r),!0).forEach((function(t){pa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var xu=function(){function e(t){la(this,e),pa(this,"clientConfig",void 0);var r=yu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Wo(r)}var t,r,n,a;return ha(e,[{key:"createShopperContext",value:(a=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.usid){e.next=7;break}i.usid=n.usid,e.next=12;break;case 7:if(void 0===a.usid){e.next=11;break}i.usid=a.usid,e.next=12;break;case 11:throw new Error("Missing required path parameter: usid");case 12:if(void 0===n.organizationId){e.next=16;break}i.organizationId=n.organizationId,e.next=21;break;case 16:if(void 0===a.organizationId){e.next=20;break}i.organizationId=a.organizationId,e.next=21;break;case 20:throw new Error("Missing required path parameter: organizationId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.evaluateContextWithClientIp?o.evaluateContextWithClientIp=n.evaluateContextWithClientIp:void 0!==a.evaluateContextWithClientIp&&(o.evaluateContextWithClientIp=a.evaluateContextWithClientIp),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for createShopperContext: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=yu(yu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=38,md(s.toString(),{method:"PUT",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 38:if(c=e.sent,!r){e.next=41;break}return e.abrupt("return",c);case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"deleteShopperContext",value:(n=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.usid){e.next=7;break}i.usid=n.usid,e.next=12;break;case 7:if(void 0===a.usid){e.next=11;break}i.usid=a.usid,e.next=12;break;case 11:throw new Error("Missing required path parameter: usid");case 12:if(void 0===n.organizationId){e.next=16;break}i.organizationId=n.organizationId,e.next=21;break;case 16:if(void 0===a.organizationId){e.next=20;break}i.organizationId=a.organizationId,e.next=21;break;case 20:throw new Error("Missing required path parameter: organizationId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for deleteShopperContext: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=yu(yu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=37,md(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 37:if(c=e.sent,!r){e.next=40;break}return e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getShopperContext",value:(r=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.usid){e.next=7;break}i.usid=n.usid,e.next=12;break;case 7:if(void 0===a.usid){e.next=11;break}i.usid=a.usid,e.next=12;break;case 11:throw new Error("Missing required path parameter: usid");case 12:if(void 0===n.organizationId){e.next=16;break}i.organizationId=n.organizationId,e.next=21;break;case 16:if(void 0===a.organizationId){e.next=20;break}i.organizationId=a.organizationId,e.next=21;break;case 20:throw new Error("Missing required path parameter: organizationId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getShopperContext: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=yu(yu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=37,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 37:return c=e.sent,e.abrupt("return",c);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"updateShopperContext",value:(t=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.usid){e.next=7;break}i.usid=n.usid,e.next=12;break;case 7:if(void 0===a.usid){e.next=11;break}i.usid=a.usid,e.next=12;break;case 11:throw new Error("Missing required path parameter: usid");case 12:if(void 0===n.organizationId){e.next=16;break}i.organizationId=n.organizationId,e.next=21;break;case 16:if(void 0===a.organizationId){e.next=20;break}i.organizationId=a.organizationId,e.next=21;break;case 20:throw new Error("Missing required path parameter: organizationId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.evaluateContextWithClientIp?o.evaluateContextWithClientIp=n.evaluateContextWithClientIp:void 0!==a.evaluateContextWithClientIp&&(o.evaluateContextWithClientIp=a.evaluateContextWithClientIp),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for updateShopperContext: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=yu(yu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=38,md(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();pa(xu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/shopper/shopper-context/v1"),pa(xu,"apiPaths",{createShopperContext:"/organizations/{organizationId}/shopper-context/{usid}",deleteShopperContext:"/organizations/{organizationId}/shopper-context/{usid}",getShopperContext:"/organizations/{organizationId}/shopper-context/{usid}",updateShopperContext:"/organizations/{organizationId}/shopper-context/{usid}"}),pa(xu,"paramKeys",{createShopperContext:["usid","organizationId","siteId","evaluateContextWithClientIp"],createShopperContextRequired:["usid","organizationId","siteId"],deleteShopperContext:["usid","organizationId","siteId"],deleteShopperContextRequired:["usid","organizationId","siteId"],getShopperContext:["usid","organizationId","siteId"],getShopperContextRequired:["usid","organizationId","siteId"],updateShopperContext:["usid","organizationId","siteId","evaluateContextWithClientIp"],updateShopperContextRequired:["usid","organizationId","siteId"]});function wu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function zu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?wu(Object(r),!0).forEach((function(t){pa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Cu=function(){function e(t){la(this,e),pa(this,"clientConfig",void 0);var r=zu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Wo(r)}var t,r,n,a,i,o,s,d,c,u,l,g,h,p,f,I,m,b,k,v,y,x,w,z,C,q,E,P,j;return ha(e,[{key:"createCustomerAddress",value:(j=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.customerId){e.next=7;break}i.customerId=n.customerId,e.next=12;break;case 7:if(void 0===a.customerId){e.next=11;break}i.customerId=a.customerId,e.next=12;break;case 11:throw new Error("Missing required path parameter: customerId");case 12:if(void 0===n.organizationId){e.next=16;break}i.organizationId=n.organizationId,e.next=21;break;case 16:if(void 0===a.organizationId){e.next=20;break}i.organizationId=a.organizationId,e.next=21;break;case 20:throw new Error("Missing required path parameter: organizationId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for createCustomerAddress: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/customers/{customerId}/addresses",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=zu(zu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=37,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 37:return c=e.sent,e.abrupt("return",c);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return j.apply(this,arguments)})},{key:"createCustomerPaymentInstrument",value:(P=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.customerId){e.next=7;break}i.customerId=n.customerId,e.next=12;break;case 7:if(void 0===a.customerId){e.next=11;break}i.customerId=a.customerId,e.next=12;break;case 11:throw new Error("Missing required path parameter: customerId");case 12:if(void 0===n.organizationId){e.next=16;break}i.organizationId=n.organizationId,e.next=21;break;case 16:if(void 0===a.organizationId){e.next=20;break}i.organizationId=a.organizationId,e.next=21;break;case 20:throw new Error("Missing required path parameter: organizationId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for createCustomerPaymentInstrument: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/customers/{customerId}/payment-instruments",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=zu(zu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=37,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 37:return c=e.sent,e.abrupt("return",c);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return P.apply(this,arguments)})},{key:"createCustomerProductList",value:(E=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.customerId){e.next=7;break}i.customerId=n.customerId,e.next=12;break;case 7:if(void 0===a.customerId){e.next=11;break}i.customerId=a.customerId,e.next=12;break;case 11:throw new Error("Missing required path parameter: customerId");case 12:if(void 0===n.organizationId){e.next=16;break}i.organizationId=n.organizationId,e.next=21;break;case 16:if(void 0===a.organizationId){e.next=20;break}i.organizationId=a.organizationId,e.next=21;break;case 20:throw new Error("Missing required path parameter: organizationId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for createCustomerProductList: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/customers/{customerId}/product-lists",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=zu(zu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=37,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 37:return c=e.sent,e.abrupt("return",c);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return E.apply(this,arguments)})},{key:"createCustomerProductListItem",value:(q=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.listId){e.next=7;break}i.listId=n.listId,e.next=12;break;case 7:if(void 0===a.listId){e.next=11;break}i.listId=a.listId,e.next=12;break;case 11:throw new Error("Missing required path parameter: listId");case 12:if(void 0===n.customerId){e.next=16;break}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.organizationId){e.next=25;break}i.organizationId=n.organizationId,e.next=30;break;case 25:if(void 0===a.organizationId){e.next=29;break}i.organizationId=a.organizationId,e.next=30;break;case 29:throw new Error("Missing required path parameter: organizationId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for createCustomerProductListItem: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=zu(zu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=46,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 46:return c=e.sent,e.abrupt("return",c);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return q.apply(this,arguments)})},{key:"deleteCustomerPaymentInstrument",value:(C=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.paymentInstrumentId){e.next=7;break}i.paymentInstrumentId=n.paymentInstrumentId,e.next=12;break;case 7:if(void 0===a.paymentInstrumentId){e.next=11;break}i.paymentInstrumentId=a.paymentInstrumentId,e.next=12;break;case 11:throw new Error("Missing required path parameter: paymentInstrumentId");case 12:if(void 0===n.customerId){e.next=16;break}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.organizationId){e.next=25;break}i.organizationId=n.organizationId,e.next=30;break;case 25:if(void 0===a.organizationId){e.next=29;break}i.organizationId=a.organizationId,e.next=30;break;case 29:throw new Error("Missing required path parameter: organizationId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for deleteCustomerPaymentInstrument: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/customers/{customerId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=zu(zu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=46,md(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 46:if(c=e.sent,!r){e.next=49;break}return e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return C.apply(this,arguments)})},{key:"deleteCustomerProductList",value:(z=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.listId){e.next=7;break}i.listId=n.listId,e.next=12;break;case 7:if(void 0===a.listId){e.next=11;break}i.listId=a.listId,e.next=12;break;case 11:throw new Error("Missing required path parameter: listId");case 12:if(void 0===n.customerId){e.next=16;break}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.organizationId){e.next=25;break}i.organizationId=n.organizationId,e.next=30;break;case 25:if(void 0===a.organizationId){e.next=29;break}i.organizationId=a.organizationId,e.next=30;break;case 29:throw new Error("Missing required path parameter: organizationId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for deleteCustomerProductList: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=zu(zu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=46,md(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 46:if(c=e.sent,!r){e.next=49;break}return e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return z.apply(this,arguments)})},{key:"deleteCustomerProductListItem",value:(w=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.itemId){e.next=7;break}i.itemId=n.itemId,e.next=12;break;case 7:if(void 0===a.itemId){e.next=11;break}i.itemId=a.itemId,e.next=12;break;case 11:throw new Error("Missing required path parameter: itemId");case 12:if(void 0===n.listId){e.next=16;break}i.listId=n.listId,e.next=21;break;case 16:if(void 0===a.listId){e.next=20;break}i.listId=a.listId,e.next=21;break;case 20:throw new Error("Missing required path parameter: listId");case 21:if(void 0===n.customerId){e.next=25;break}i.customerId=n.customerId,e.next=30;break;case 25:if(void 0===a.customerId){e.next=29;break}i.customerId=a.customerId,e.next=30;break;case 29:throw new Error("Missing required path parameter: customerId");case 30:if(void 0===n.organizationId){e.next=34;break}i.organizationId=n.organizationId,e.next=39;break;case 34:if(void 0===a.organizationId){e.next=38;break}i.organizationId=a.organizationId,e.next=39;break;case 38:throw new Error("Missing required path parameter: organizationId");case 39:if(o={},void 0===n.siteId){e.next=44;break}o.siteId=n.siteId,e.next=49;break;case 44:if(void 0===a.siteId){e.next=48;break}o.siteId=a.siteId,e.next=49;break;case 48:throw new Error("Missing required query parameter: siteId");case 49:return Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for deleteCustomerProductListItem: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=zu(zu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=55,md(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 55:if(c=e.sent,!r){e.next=58;break}return e.abrupt("return",c);case 58:case"end":return e.stop()}}),e,this)}))),function(e,t){return w.apply(this,arguments)})},{key:"getCustomer",value:(x=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.customerId){e.next=7;break}i.customerId=n.customerId,e.next=12;break;case 7:if(void 0===a.customerId){e.next=11;break}i.customerId=a.customerId,e.next=12;break;case 11:throw new Error("Missing required path parameter: customerId");case 12:if(void 0===n.organizationId){e.next=16;break}i.organizationId=n.organizationId,e.next=21;break;case 16:if(void 0===a.organizationId){e.next=20;break}i.organizationId=a.organizationId,e.next=21;break;case 20:throw new Error("Missing required path parameter: organizationId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getCustomer: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/customers/{customerId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=zu(zu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=37,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 37:return c=e.sent,e.abrupt("return",c);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return x.apply(this,arguments)})},{key:"getCustomerAddress",value:(y=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.addressName){e.next=7;break}i.addressName=n.addressName,e.next=12;break;case 7:if(void 0===a.addressName){e.next=11;break}i.addressName=a.addressName,e.next=12;break;case 11:throw new Error("Missing required path parameter: addressName");case 12:if(void 0===n.customerId){e.next=16;break}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.organizationId){e.next=25;break}i.organizationId=n.organizationId,e.next=30;break;case 25:if(void 0===a.organizationId){e.next=29;break}i.organizationId=a.organizationId,e.next=30;break;case 29:throw new Error("Missing required path parameter: organizationId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getCustomerAddress: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=zu(zu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=46,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 46:return c=e.sent,e.abrupt("return",c);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return y.apply(this,arguments)})},{key:"getCustomerBaskets",value:(v=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.customerId){e.next=7;break}i.customerId=n.customerId,e.next=12;break;case 7:if(void 0===a.customerId){e.next=11;break}i.customerId=a.customerId,e.next=12;break;case 11:throw new Error("Missing required path parameter: customerId");case 12:if(void 0===n.organizationId){e.next=16;break}i.organizationId=n.organizationId,e.next=21;break;case 16:if(void 0===a.organizationId){e.next=20;break}i.organizationId=a.organizationId,e.next=21;break;case 20:throw new Error("Missing required path parameter: organizationId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getCustomerBaskets: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/customers/{customerId}/baskets",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=zu(zu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=37,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 37:return c=e.sent,e.abrupt("return",c);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return v.apply(this,arguments)})},{key:"getCustomerOrders",value:(k=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.customerId){e.next=7;break}i.customerId=n.customerId,e.next=12;break;case 7:if(void 0===a.customerId){e.next=11;break}i.customerId=a.customerId,e.next=12;break;case 11:throw new Error("Missing required path parameter: customerId");case 12:if(void 0===n.organizationId){e.next=16;break}i.organizationId=n.organizationId,e.next=21;break;case 16:if(void 0===a.organizationId){e.next=20;break}i.organizationId=a.organizationId,e.next=21;break;case 20:throw new Error("Missing required path parameter: organizationId");case 21:if(o={},void 0!==n.crossSites?o.crossSites=n.crossSites:void 0!==a.crossSites&&(o.crossSites=a.crossSites),void 0!==n.from?o.from=n.from:void 0!==a.from&&(o.from=a.from),void 0!==n.until?o.until=n.until:void 0!==a.until&&(o.until=a.until),void 0!==n.status?o.status=n.status:void 0!==a.status&&(o.status=a.status),void 0===n.siteId){e.next=30;break}o.siteId=n.siteId,e.next=35;break;case 30:if(void 0===a.siteId){e.next=34;break}o.siteId=a.siteId,e.next=35;break;case 34:throw new Error("Missing required query parameter: siteId");case 35:return void 0!==n.limit?o.limit=n.limit:void 0!==a.limit&&(o.limit=a.limit),void 0!==n.offset?o.offset=n.offset:void 0!==a.offset&&(o.offset=a.offset),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getCustomerOrders: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/customers/{customerId}/orders",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=zu(zu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=43,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 43:return c=e.sent,e.abrupt("return",c);case 45:case"end":return e.stop()}}),e,this)}))),function(e,t){return k.apply(this,arguments)})},{key:"getCustomerPaymentInstrument",value:(b=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.paymentInstrumentId){e.next=7;break}i.paymentInstrumentId=n.paymentInstrumentId,e.next=12;break;case 7:if(void 0===a.paymentInstrumentId){e.next=11;break}i.paymentInstrumentId=a.paymentInstrumentId,e.next=12;break;case 11:throw new Error("Missing required path parameter: paymentInstrumentId");case 12:if(void 0===n.customerId){e.next=16;break}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.organizationId){e.next=25;break}i.organizationId=n.organizationId,e.next=30;break;case 25:if(void 0===a.organizationId){e.next=29;break}i.organizationId=a.organizationId,e.next=30;break;case 29:throw new Error("Missing required path parameter: organizationId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getCustomerPaymentInstrument: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/customers/{customerId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=zu(zu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=46,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 46:return c=e.sent,e.abrupt("return",c);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"getCustomerProductList",value:(m=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.listId){e.next=7;break}i.listId=n.listId,e.next=12;break;case 7:if(void 0===a.listId){e.next=11;break}i.listId=a.listId,e.next=12;break;case 11:throw new Error("Missing required path parameter: listId");case 12:if(void 0===n.customerId){e.next=16;break}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.organizationId){e.next=25;break}i.organizationId=n.organizationId,e.next=30;break;case 25:if(void 0===a.organizationId){e.next=29;break}i.organizationId=a.organizationId,e.next=30;break;case 29:throw new Error("Missing required path parameter: organizationId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getCustomerProductList: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=zu(zu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=46,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 46:return c=e.sent,e.abrupt("return",c);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return m.apply(this,arguments)})},{key:"getCustomerProductListItem",value:(I=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.itemId){e.next=7;break}i.itemId=n.itemId,e.next=12;break;case 7:if(void 0===a.itemId){e.next=11;break}i.itemId=a.itemId,e.next=12;break;case 11:throw new Error("Missing required path parameter: itemId");case 12:if(void 0===n.listId){e.next=16;break}i.listId=n.listId,e.next=21;break;case 16:if(void 0===a.listId){e.next=20;break}i.listId=a.listId,e.next=21;break;case 20:throw new Error("Missing required path parameter: listId");case 21:if(void 0===n.customerId){e.next=25;break}i.customerId=n.customerId,e.next=30;break;case 25:if(void 0===a.customerId){e.next=29;break}i.customerId=a.customerId,e.next=30;break;case 29:throw new Error("Missing required path parameter: customerId");case 30:if(void 0===n.organizationId){e.next=34;break}i.organizationId=n.organizationId,e.next=39;break;case 34:if(void 0===a.organizationId){e.next=38;break}i.organizationId=a.organizationId,e.next=39;break;case 38:throw new Error("Missing required path parameter: organizationId");case 39:if(o={},void 0===n.siteId){e.next=44;break}o.siteId=n.siteId,e.next=49;break;case 44:if(void 0===a.siteId){e.next=48;break}o.siteId=a.siteId,e.next=49;break;case 48:throw new Error("Missing required query parameter: siteId");case 49:return Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getCustomerProductListItem: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=zu(zu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=55,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 55:return c=e.sent,e.abrupt("return",c);case 57:case"end":return e.stop()}}),e,this)}))),function(e,t){return I.apply(this,arguments)})},{key:"getCustomerProductLists",value:(f=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.customerId){e.next=7;break}i.customerId=n.customerId,e.next=12;break;case 7:if(void 0===a.customerId){e.next=11;break}i.customerId=a.customerId,e.next=12;break;case 11:throw new Error("Missing required path parameter: customerId");case 12:if(void 0===n.organizationId){e.next=16;break}i.organizationId=n.organizationId,e.next=21;break;case 16:if(void 0===a.organizationId){e.next=20;break}i.organizationId=a.organizationId,e.next=21;break;case 20:throw new Error("Missing required path parameter: organizationId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getCustomerProductLists: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/customers/{customerId}/product-lists",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=zu(zu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=37,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 37:return c=e.sent,e.abrupt("return",c);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"getExternalProfile",value:(p=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.externalId){e.next=17;break}o.externalId=n.externalId,e.next=22;break;case 17:if(void 0===a.externalId){e.next=21;break}o.externalId=a.externalId,e.next=22;break;case 21:throw new Error("Missing required query parameter: externalId");case 22:if(void 0===n.authenticationProviderId){e.next=26;break}o.authenticationProviderId=n.authenticationProviderId,e.next=31;break;case 26:if(void 0===a.authenticationProviderId){e.next=30;break}o.authenticationProviderId=a.authenticationProviderId,e.next=31;break;case 30:throw new Error("Missing required query parameter: authenticationProviderId");case 31:if(void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getExternalProfile: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/customers/external-profile",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=zu(zu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=46,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 46:return c=e.sent,e.abrupt("return",c);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"getProductListItem",value:(h=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.itemId){e.next=7;break}i.itemId=n.itemId,e.next=12;break;case 7:if(void 0===a.itemId){e.next=11;break}i.itemId=a.itemId,e.next=12;break;case 11:throw new Error("Missing required path parameter: itemId");case 12:if(void 0===n.listId){e.next=16;break}i.listId=n.listId,e.next=21;break;case 16:if(void 0===a.listId){e.next=20;break}i.listId=a.listId,e.next=21;break;case 20:throw new Error("Missing required path parameter: listId");case 21:if(void 0===n.organizationId){e.next=25;break}i.organizationId=n.organizationId,e.next=30;break;case 25:if(void 0===a.organizationId){e.next=29;break}i.organizationId=a.organizationId,e.next=30;break;case 29:throw new Error("Missing required path parameter: organizationId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getProductListItem: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=zu(zu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=46,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 46:return c=e.sent,e.abrupt("return",c);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"getPublicProductList",value:(g=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.listId){e.next=7;break}i.listId=n.listId,e.next=12;break;case 7:if(void 0===a.listId){e.next=11;break}i.listId=a.listId,e.next=12;break;case 11:throw new Error("Missing required path parameter: listId");case 12:if(void 0===n.organizationId){e.next=16;break}i.organizationId=n.organizationId,e.next=21;break;case 16:if(void 0===a.organizationId){e.next=20;break}i.organizationId=a.organizationId,e.next=21;break;case 20:throw new Error("Missing required path parameter: organizationId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getPublicProductList: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=zu(zu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=37,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 37:return c=e.sent,e.abrupt("return",c);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"getPublicProductListsBySearchTerm",value:(l=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.email?o.email=n.email:void 0!==a.email&&(o.email=a.email),void 0!==n.firstName?o.firstName=n.firstName:void 0!==a.firstName&&(o.firstName=a.firstName),void 0!==n.lastName?o.lastName=n.lastName:void 0!==a.lastName&&(o.lastName=a.lastName),void 0===n.siteId){e.next=20;break}o.siteId=n.siteId,e.next=25;break;case 20:if(void 0===a.siteId){e.next=24;break}o.siteId=a.siteId,e.next=25;break;case 24:throw new Error("Missing required query parameter: siteId");case 25:return Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getPublicProductListsBySearchTerm: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/product-lists",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=zu(zu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=31,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 31:return c=e.sent,e.abrupt("return",c);case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"getResetPasswordToken",value:(u=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}o.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getResetPasswordToken: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/customers/password/actions/create-reset-token",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=zu(zu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=28,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 28:return c=e.sent,e.abrupt("return",c);case 30:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"registerCustomer",value:(c=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}o.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for registerCustomer: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/customers",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=zu(zu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=28,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 28:return c=e.sent,e.abrupt("return",c);case 30:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"registerExternalProfile",value:(d=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}o.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for registerExternalProfile: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/customers/external-profile",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=zu(zu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=28,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 28:return c=e.sent,e.abrupt("return",c);case 30:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"removeCustomerAddress",value:(s=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.addressName){e.next=7;break}i.addressName=n.addressName,e.next=12;break;case 7:if(void 0===a.addressName){e.next=11;break}i.addressName=a.addressName,e.next=12;break;case 11:throw new Error("Missing required path parameter: addressName");case 12:if(void 0===n.customerId){e.next=16;break}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.organizationId){e.next=25;break}i.organizationId=n.organizationId,e.next=30;break;case 25:if(void 0===a.organizationId){e.next=29;break}i.organizationId=a.organizationId,e.next=30;break;case 29:throw new Error("Missing required path parameter: organizationId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for removeCustomerAddress: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=zu(zu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=46,md(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 46:if(c=e.sent,!r){e.next=49;break}return e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"resetPassword",value:(o=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}o.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for resetPassword: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/customers/password/actions/reset",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=zu(zu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=28,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 28:if(c=e.sent,!r){e.next=31;break}return e.abrupt("return",c);case 31:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"updateCustomer",value:(i=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.customerId){e.next=7;break}i.customerId=n.customerId,e.next=12;break;case 7:if(void 0===a.customerId){e.next=11;break}i.customerId=a.customerId,e.next=12;break;case 11:throw new Error("Missing required path parameter: customerId");case 12:if(void 0===n.organizationId){e.next=16;break}i.organizationId=n.organizationId,e.next=21;break;case 16:if(void 0===a.organizationId){e.next=20;break}i.organizationId=a.organizationId,e.next=21;break;case 20:throw new Error("Missing required path parameter: organizationId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for updateCustomer: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/customers/{customerId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=zu(zu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=37,md(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 37:return c=e.sent,e.abrupt("return",c);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"updateCustomerAddress",value:(a=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.addressName){e.next=7;break}i.addressName=n.addressName,e.next=12;break;case 7:if(void 0===a.addressName){e.next=11;break}i.addressName=a.addressName,e.next=12;break;case 11:throw new Error("Missing required path parameter: addressName");case 12:if(void 0===n.customerId){e.next=16;break}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.organizationId){e.next=25;break}i.organizationId=n.organizationId,e.next=30;break;case 25:if(void 0===a.organizationId){e.next=29;break}i.organizationId=a.organizationId,e.next=30;break;case 29:throw new Error("Missing required path parameter: organizationId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for updateCustomerAddress: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=zu(zu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=46,md(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 46:return c=e.sent,e.abrupt("return",c);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"updateCustomerPassword",value:(n=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.customerId){e.next=7;break}i.customerId=n.customerId,e.next=12;break;case 7:if(void 0===a.customerId){e.next=11;break}i.customerId=a.customerId,e.next=12;break;case 11:throw new Error("Missing required path parameter: customerId");case 12:if(void 0===n.organizationId){e.next=16;break}i.organizationId=n.organizationId,e.next=21;break;case 16:if(void 0===a.organizationId){e.next=20;break}i.organizationId=a.organizationId,e.next=21;break;case 20:throw new Error("Missing required path parameter: organizationId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for updateCustomerPassword: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/customers/{customerId}/password",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=zu(zu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=37,md(s.toString(),{method:"PUT",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 37:if(c=e.sent,!r){e.next=40;break}return e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"updateCustomerProductList",value:(r=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.listId){e.next=7;break}i.listId=n.listId,e.next=12;break;case 7:if(void 0===a.listId){e.next=11;break}i.listId=a.listId,e.next=12;break;case 11:throw new Error("Missing required path parameter: listId");case 12:if(void 0===n.customerId){e.next=16;break}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.organizationId){e.next=25;break}i.organizationId=n.organizationId,e.next=30;break;case 25:if(void 0===a.organizationId){e.next=29;break}i.organizationId=a.organizationId,e.next=30;break;case 29:throw new Error("Missing required path parameter: organizationId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for updateCustomerProductList: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=zu(zu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=46,md(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 46:return c=e.sent,e.abrupt("return",c);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"updateCustomerProductListItem",value:(t=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.itemId){e.next=7;break}i.itemId=n.itemId,e.next=12;break;case 7:if(void 0===a.itemId){e.next=11;break}i.itemId=a.itemId,e.next=12;break;case 11:throw new Error("Missing required path parameter: itemId");case 12:if(void 0===n.listId){e.next=16;break}i.listId=n.listId,e.next=21;break;case 16:if(void 0===a.listId){e.next=20;break}i.listId=a.listId,e.next=21;break;case 20:throw new Error("Missing required path parameter: listId");case 21:if(void 0===n.customerId){e.next=25;break}i.customerId=n.customerId,e.next=30;break;case 25:if(void 0===a.customerId){e.next=29;break}i.customerId=a.customerId,e.next=30;break;case 29:throw new Error("Missing required path parameter: customerId");case 30:if(void 0===n.organizationId){e.next=34;break}i.organizationId=n.organizationId,e.next=39;break;case 34:if(void 0===a.organizationId){e.next=38;break}i.organizationId=a.organizationId,e.next=39;break;case 38:throw new Error("Missing required path parameter: organizationId");case 39:if(o={},void 0===n.siteId){e.next=44;break}o.siteId=n.siteId,e.next=49;break;case 44:if(void 0===a.siteId){e.next=48;break}o.siteId=a.siteId,e.next=49;break;case 48:throw new Error("Missing required query parameter: siteId");case 49:return Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for updateCustomerProductListItem: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=zu(zu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=55,md(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 55:return c=e.sent,e.abrupt("return",c);case 57:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();pa(Cu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/customer/shopper-customers/v1"),pa(Cu,"apiPaths",{createCustomerAddress:"/organizations/{organizationId}/customers/{customerId}/addresses",createCustomerPaymentInstrument:"/organizations/{organizationId}/customers/{customerId}/payment-instruments",createCustomerProductList:"/organizations/{organizationId}/customers/{customerId}/product-lists",createCustomerProductListItem:"/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items",deleteCustomerPaymentInstrument:"/organizations/{organizationId}/customers/{customerId}/payment-instruments/{paymentInstrumentId}",deleteCustomerProductList:"/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",deleteCustomerProductListItem:"/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",getCustomer:"/organizations/{organizationId}/customers/{customerId}",getCustomerAddress:"/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",getCustomerBaskets:"/organizations/{organizationId}/customers/{customerId}/baskets",getCustomerOrders:"/organizations/{organizationId}/customers/{customerId}/orders",getCustomerPaymentInstrument:"/organizations/{organizationId}/customers/{customerId}/payment-instruments/{paymentInstrumentId}",getCustomerProductList:"/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",getCustomerProductListItem:"/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",getCustomerProductLists:"/organizations/{organizationId}/customers/{customerId}/product-lists",getExternalProfile:"/organizations/{organizationId}/customers/external-profile",getProductListItem:"/organizations/{organizationId}/product-lists/{listId}/items/{itemId}",getPublicProductList:"/organizations/{organizationId}/product-lists/{listId}",getPublicProductListsBySearchTerm:"/organizations/{organizationId}/product-lists",getResetPasswordToken:"/organizations/{organizationId}/customers/password/actions/create-reset-token",registerCustomer:"/organizations/{organizationId}/customers",registerExternalProfile:"/organizations/{organizationId}/customers/external-profile",removeCustomerAddress:"/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",resetPassword:"/organizations/{organizationId}/customers/password/actions/reset",updateCustomer:"/organizations/{organizationId}/customers/{customerId}",updateCustomerAddress:"/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",updateCustomerPassword:"/organizations/{organizationId}/customers/{customerId}/password",updateCustomerProductList:"/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",updateCustomerProductListItem:"/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}"}),pa(Cu,"paramKeys",{createCustomerAddress:["customerId","organizationId","siteId"],createCustomerAddressRequired:["customerId","organizationId","siteId"],createCustomerPaymentInstrument:["customerId","organizationId","siteId"],createCustomerPaymentInstrumentRequired:["customerId","organizationId","siteId"],createCustomerProductList:["customerId","organizationId","siteId"],createCustomerProductListRequired:["customerId","organizationId","siteId"],createCustomerProductListItem:["listId","customerId","organizationId","siteId"],createCustomerProductListItemRequired:["listId","customerId","organizationId","siteId"],deleteCustomerPaymentInstrument:["paymentInstrumentId","customerId","organizationId","siteId"],deleteCustomerPaymentInstrumentRequired:["paymentInstrumentId","customerId","organizationId","siteId"],deleteCustomerProductList:["listId","customerId","organizationId","siteId"],deleteCustomerProductListRequired:["listId","customerId","organizationId","siteId"],deleteCustomerProductListItem:["itemId","listId","customerId","organizationId","siteId"],deleteCustomerProductListItemRequired:["itemId","listId","customerId","organizationId","siteId"],getCustomer:["customerId","organizationId","siteId"],getCustomerRequired:["customerId","organizationId","siteId"],getCustomerAddress:["addressName","customerId","organizationId","siteId"],getCustomerAddressRequired:["addressName","customerId","organizationId","siteId"],getCustomerBaskets:["customerId","organizationId","siteId"],getCustomerBasketsRequired:["customerId","organizationId","siteId"],getCustomerOrders:["customerId","organizationId","siteId","crossSites","from","until","status","limit","offset"],getCustomerOrdersRequired:["customerId","organizationId","siteId"],getCustomerPaymentInstrument:["paymentInstrumentId","customerId","organizationId","siteId"],getCustomerPaymentInstrumentRequired:["paymentInstrumentId","customerId","organizationId","siteId"],getCustomerProductList:["listId","customerId","organizationId","siteId"],getCustomerProductListRequired:["listId","customerId","organizationId","siteId"],getCustomerProductListItem:["itemId","listId","customerId","organizationId","siteId"],getCustomerProductListItemRequired:["itemId","listId","customerId","organizationId","siteId"],getCustomerProductLists:["customerId","organizationId","siteId"],getCustomerProductListsRequired:["customerId","organizationId","siteId"],getExternalProfile:["organizationId","externalId","authenticationProviderId","siteId"],getExternalProfileRequired:["organizationId","externalId","authenticationProviderId","siteId"],getProductListItem:["itemId","listId","organizationId","siteId"],getProductListItemRequired:["itemId","listId","organizationId","siteId"],getPublicProductList:["listId","organizationId","siteId"],getPublicProductListRequired:["listId","organizationId","siteId"],getPublicProductListsBySearchTerm:["organizationId","siteId","email","firstName","lastName"],getPublicProductListsBySearchTermRequired:["organizationId","siteId"],getResetPasswordToken:["organizationId","siteId"],getResetPasswordTokenRequired:["organizationId","siteId"],registerCustomer:["organizationId","siteId"],registerCustomerRequired:["organizationId","siteId"],registerExternalProfile:["organizationId","siteId"],registerExternalProfileRequired:["organizationId","siteId"],removeCustomerAddress:["addressName","customerId","organizationId","siteId"],removeCustomerAddressRequired:["addressName","customerId","organizationId","siteId"],resetPassword:["organizationId","siteId"],resetPasswordRequired:["organizationId","siteId"],updateCustomer:["customerId","organizationId","siteId"],updateCustomerRequired:["customerId","organizationId","siteId"],updateCustomerAddress:["addressName","customerId","organizationId","siteId"],updateCustomerAddressRequired:["addressName","customerId","organizationId","siteId"],updateCustomerPassword:["customerId","organizationId","siteId"],updateCustomerPasswordRequired:["customerId","organizationId","siteId"],updateCustomerProductList:["listId","customerId","organizationId","siteId"],updateCustomerProductListRequired:["listId","customerId","organizationId","siteId"],updateCustomerProductListItem:["itemId","listId","customerId","organizationId","siteId"],updateCustomerProductListItemRequired:["itemId","listId","customerId","organizationId","siteId"]});function qu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Eu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?qu(Object(r),!0).forEach((function(t){pa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Pu=function(){function e(t){la(this,e),pa(this,"clientConfig",void 0);var r=Eu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Wo(r)}var t,r;return ha(e,[{key:"getPage",value:(r=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.pageId){e.next=7;break}i.pageId=n.pageId,e.next=12;break;case 7:if(void 0===a.pageId){e.next=11;break}i.pageId=a.pageId,e.next=12;break;case 11:throw new Error("Missing required path parameter: pageId");case 12:if(void 0===n.organizationId){e.next=16;break}i.organizationId=n.organizationId,e.next=21;break;case 16:if(void 0===a.organizationId){e.next=20;break}i.organizationId=a.organizationId,e.next=21;break;case 20:throw new Error("Missing required path parameter: organizationId");case 21:if(o={},void 0!==n.aspectAttributes?o.aspectAttributes=n.aspectAttributes:void 0!==a.aspectAttributes&&(o.aspectAttributes=a.aspectAttributes),void 0!==n.parameters?o.parameters=n.parameters:void 0!==a.parameters&&(o.parameters=a.parameters),void 0===n.siteId){e.next=28;break}o.siteId=n.siteId,e.next=33;break;case 28:if(void 0===a.siteId){e.next=32;break}o.siteId=a.siteId,e.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getPage: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/pages/{pageId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=Eu(Eu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=40,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 40:return c=e.sent,e.abrupt("return",c);case 42:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getPages",value:(t=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.categoryId?o.categoryId=n.categoryId:void 0!==a.categoryId&&(o.categoryId=a.categoryId),void 0!==n.productId?o.productId=n.productId:void 0!==a.productId&&(o.productId=a.productId),void 0===n.aspectTypeId){e.next=19;break}o.aspectTypeId=n.aspectTypeId,e.next=24;break;case 19:if(void 0===a.aspectTypeId){e.next=23;break}o.aspectTypeId=a.aspectTypeId,e.next=24;break;case 23:throw new Error("Missing required query parameter: aspectTypeId");case 24:if(void 0!==n.aspectAttributes?o.aspectAttributes=n.aspectAttributes:void 0!==a.aspectAttributes&&(o.aspectAttributes=a.aspectAttributes),void 0!==n.parameters?o.parameters=n.parameters:void 0!==a.parameters&&(o.parameters=a.parameters),void 0===n.siteId){e.next=30;break}o.siteId=n.siteId,e.next=35;break;case 30:if(void 0===a.siteId){e.next=34;break}o.siteId=a.siteId,e.next=35;break;case 34:throw new Error("Missing required query parameter: siteId");case 35:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getPages: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/pages",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=Eu(Eu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=42,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 42:return c=e.sent,e.abrupt("return",c);case 44:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();pa(Pu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/experience/shopper-experience/v1"),pa(Pu,"apiPaths",{getPage:"/organizations/{organizationId}/pages/{pageId}",getPages:"/organizations/{organizationId}/pages"}),pa(Pu,"paramKeys",{getPage:["pageId","organizationId","siteId","aspectAttributes","parameters","locale"],getPageRequired:["pageId","organizationId","siteId"],getPages:["organizationId","aspectTypeId","siteId","categoryId","productId","aspectAttributes","parameters","locale"],getPagesRequired:["organizationId","aspectTypeId","siteId"]});function ju(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ou(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ju(Object(r),!0).forEach((function(t){pa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ju(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Su=function(){function e(t){la(this,e),pa(this,"clientConfig",void 0);var r=Ou({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Wo(r)}var t;return ha(e,[{key:"getGiftCertificate",value:(t=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}o.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getGiftCertificate: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/gift-certificate",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=Ou(Ou({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=28,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 28:return c=e.sent,e.abrupt("return",c);case 30:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();pa(Su,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/pricing/shopper-gift-certificates/v1"),pa(Su,"apiPaths",{getGiftCertificate:"/organizations/{organizationId}/gift-certificate"}),pa(Su,"paramKeys",{getGiftCertificate:["organizationId","siteId"],getGiftCertificateRequired:["organizationId","siteId"]});function Tu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Tu(Object(r),!0).forEach((function(t){pa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Tu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Mu=function(){function e(t){la(this,e),pa(this,"clientConfig",void 0);var r=_u({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Wo(r)}var t,r,n,a,i,o,s,d,c,u,l,g,h,p,f,I;return ha(e,[{key:"authenticateCustomer",value:(I=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for authenticateCustomer: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/oauth2/login",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=_u(_u({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=19,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(null==t?void 0:t.body,d)},this.clientConfig,r);case 19:if(c=e.sent,!r){e.next=22;break}return e.abrupt("return",c);case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return I.apply(this,arguments)})},{key:"authorizeCustomer",value:(f=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.redirect_uri){e.next=17;break}o.redirect_uri=n.redirect_uri,e.next=22;break;case 17:if(void 0===a.redirect_uri){e.next=21;break}o.redirect_uri=a.redirect_uri,e.next=22;break;case 21:throw new Error("Missing required query parameter: redirect_uri");case 22:if(void 0===n.response_type){e.next=26;break}o.response_type=n.response_type,e.next=31;break;case 26:if(void 0===a.response_type){e.next=30;break}o.response_type=a.response_type,e.next=31;break;case 30:throw new Error("Missing required query parameter: response_type");case 31:if(void 0===n.client_id){e.next=35;break}o.client_id=n.client_id,e.next=40;break;case 35:if(void 0===a.client_id){e.next=39;break}o.client_id=a.client_id,e.next=40;break;case 39:throw new Error("Missing required query parameter: client_id");case 40:return void 0!==n.scope?o.scope=n.scope:void 0!==a.scope&&(o.scope=a.scope),void 0!==n.state?o.state=n.state:void 0!==a.state&&(o.state=a.state),void 0!==n.usid?o.usid=n.usid:void 0!==a.usid&&(o.usid=a.usid),void 0!==n.hint?o.hint=n.hint:void 0!==a.hint&&(o.hint=a.hint),void 0!==n.channel_id?o.channel_id=n.channel_id:void 0!==a.channel_id&&(o.channel_id=a.channel_id),void 0!==n.code_challenge?o.code_challenge=n.code_challenge:void 0!==a.code_challenge&&(o.code_challenge=a.code_challenge),void 0!==n.ui_locales?o.ui_locales=n.ui_locales:void 0!==a.ui_locales&&(o.ui_locales=a.ui_locales),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for authorizeCustomer: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/oauth2/authorize",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=_u(_u({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=53,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 53:if(c=e.sent,!r){e.next=56;break}return e.abrupt("return",c);case 56:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"authorizePasswordlessCustomer",value:(p=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for authorizePasswordlessCustomer: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/oauth2/passwordless/login",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=_u(_u({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=19,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(null==t?void 0:t.body,d)},this.clientConfig,r);case 19:return c=e.sent,e.abrupt("return",c);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"getAccessToken",value:(h=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getAccessToken: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/oauth2/token",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=_u(_u({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=19,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(null==t?void 0:t.body,d)},this.clientConfig,r);case 19:return c=e.sent,e.abrupt("return",c);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"getJwksUri",value:(g=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getJwksUri: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/oauth2/jwks",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=_u(_u({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=19,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 19:return c=e.sent,e.abrupt("return",c);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"getPasswordLessAccessToken",value:function(){var e=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getPasswordLessAccessToken: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/oauth2/passwordless/token",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=_u(_u({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=19,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(null==t?void 0:t.body,d)},this.clientConfig,r);case 19:return c=e.sent,e.abrupt("return",c);case 21:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()},{key:"getPasswordResetToken",value:(l=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getPasswordResetToken: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/oauth2/password/reset",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=_u(_u({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=19,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(null==t?void 0:t.body,d)},this.clientConfig,r);case 19:if(c=e.sent,!r){e.next=22;break}return e.abrupt("return",c);case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"getSessionBridgeAccessToken",value:(u=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getSessionBridgeAccessToken: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/oauth2/session-bridge/token",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=_u(_u({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=19,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(null==t?void 0:t.body,d)},this.clientConfig,r);case 19:return c=e.sent,e.abrupt("return",c);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"getTrustedAgentAccessToken",value:(c=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getTrustedAgentAccessToken: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/oauth2/trusted-agent/token",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=_u(_u({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=19,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(null==t?void 0:t.body,d)},this.clientConfig,r);case 19:return c=e.sent,e.abrupt("return",c);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"getTrustedAgentAuthorizationToken",value:(d=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.client_id){e.next=17;break}o.client_id=n.client_id,e.next=22;break;case 17:if(void 0===a.client_id){e.next=21;break}o.client_id=a.client_id,e.next=22;break;case 21:throw new Error("Missing required query parameter: client_id");case 22:if(void 0===n.channel_id){e.next=26;break}o.channel_id=n.channel_id,e.next=31;break;case 26:if(void 0===a.channel_id){e.next=30;break}o.channel_id=a.channel_id,e.next=31;break;case 30:throw new Error("Missing required query parameter: channel_id");case 31:if(void 0!==n.code_challenge?o.code_challenge=n.code_challenge:void 0!==a.code_challenge&&(o.code_challenge=a.code_challenge),void 0===n.login_id){e.next=36;break}o.login_id=n.login_id,e.next=41;break;case 36:if(void 0===a.login_id){e.next=40;break}o.login_id=a.login_id,e.next=41;break;case 40:throw new Error("Missing required query parameter: login_id");case 41:if(void 0===n.idp_origin){e.next=45;break}o.idp_origin=n.idp_origin,e.next=50;break;case 45:if(void 0===a.idp_origin){e.next=49;break}o.idp_origin=a.idp_origin,e.next=50;break;case 49:throw new Error("Missing required query parameter: idp_origin");case 50:if(void 0===n.redirect_uri){e.next=54;break}o.redirect_uri=n.redirect_uri,e.next=59;break;case 54:if(void 0===a.redirect_uri){e.next=58;break}o.redirect_uri=a.redirect_uri,e.next=59;break;case 58:throw new Error("Missing required query parameter: redirect_uri");case 59:if(void 0===n.response_type){e.next=63;break}o.response_type=n.response_type,e.next=68;break;case 63:if(void 0===a.response_type){e.next=67;break}o.response_type=a.response_type,e.next=68;break;case 67:throw new Error("Missing required query parameter: response_type");case 68:return Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getTrustedAgentAuthorizationToken: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/oauth2/trusted-agent/authorize",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=_u(_u({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=74,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 74:if(c=e.sent,!r){e.next=77;break}return e.abrupt("return",c);case 77:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"getTrustedSystemAccessToken",value:(s=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getTrustedSystemAccessToken: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/oauth2/trusted-system/token",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=_u(_u({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=19,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(null==t?void 0:t.body,d)},this.clientConfig,r);case 19:return c=e.sent,e.abrupt("return",c);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"getUserInfo",value:(o=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},void 0!==n.channel_id?o.channel_id=n.channel_id:void 0!==a.channel_id&&(o.channel_id=a.channel_id),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getUserInfo: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/oauth2/userinfo",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=_u(_u({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=20,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 20:return c=e.sent,e.abrupt("return",c);case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"getWellknownOpenidConfiguration",value:(i=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getWellknownOpenidConfiguration: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/oauth2/.well-known/openid-configuration",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=_u(_u({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=19,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 19:return c=e.sent,e.abrupt("return",c);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"introspectToken",value:(a=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for introspectToken: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/oauth2/introspect",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=_u(_u({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=19,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(null==t?void 0:t.body,d)},this.clientConfig,r);case 19:return c=e.sent,e.abrupt("return",c);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"logoutCustomer",value:(n=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.client_id){e.next=17;break}o.client_id=n.client_id,e.next=22;break;case 17:if(void 0===a.client_id){e.next=21;break}o.client_id=a.client_id,e.next=22;break;case 21:throw new Error("Missing required query parameter: client_id");case 22:if(void 0===n.refresh_token){e.next=26;break}o.refresh_token=n.refresh_token,e.next=31;break;case 26:if(void 0===a.refresh_token){e.next=30;break}o.refresh_token=a.refresh_token,e.next=31;break;case 30:throw new Error("Missing required query parameter: refresh_token");case 31:return void 0!==n.channel_id?o.channel_id=n.channel_id:void 0!==a.channel_id&&(o.channel_id=a.channel_id),void 0!==n.hint?o.hint=n.hint:void 0!==a.hint&&(o.hint=a.hint),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for logoutCustomer: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/oauth2/logout",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=_u(_u({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=39,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 39:return c=e.sent,e.abrupt("return",c);case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"resetPassword",value:(r=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for resetPassword: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/oauth2/password/action",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=_u(_u({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=19,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(null==t?void 0:t.body,d)},this.clientConfig,r);case 19:if(c=e.sent,!r){e.next=22;break}return e.abrupt("return",c);case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"revokeToken",value:(t=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for revokeToken: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/oauth2/revoke",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=_u(_u({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=19,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(null==t?void 0:t.body,d)},this.clientConfig,r);case 19:return c=e.sent,e.abrupt("return",c);case 21:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();pa(Mu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/v1"),pa(Mu,"apiPaths",{authenticateCustomer:"/organizations/{organizationId}/oauth2/login",authorizeCustomer:"/organizations/{organizationId}/oauth2/authorize",authorizePasswordlessCustomer:"/organizations/{organizationId}/oauth2/passwordless/login",getAccessToken:"/organizations/{organizationId}/oauth2/token",getJwksUri:"/organizations/{organizationId}/oauth2/jwks",getPasswordLessAccessToken:"/organizations/{organizationId}/oauth2/passwordless/token",getPasswordResetToken:"/organizations/{organizationId}/oauth2/password/reset",getSessionBridgeAccessToken:"/organizations/{organizationId}/oauth2/session-bridge/token",getTrustedAgentAccessToken:"/organizations/{organizationId}/oauth2/trusted-agent/token",getTrustedAgentAuthorizationToken:"/organizations/{organizationId}/oauth2/trusted-agent/authorize",getTrustedSystemAccessToken:"/organizations/{organizationId}/oauth2/trusted-system/token",getUserInfo:"/organizations/{organizationId}/oauth2/userinfo",getWellknownOpenidConfiguration:"/organizations/{organizationId}/oauth2/.well-known/openid-configuration",introspectToken:"/organizations/{organizationId}/oauth2/introspect",logoutCustomer:"/organizations/{organizationId}/oauth2/logout",resetPassword:"/organizations/{organizationId}/oauth2/password/action",revokeToken:"/organizations/{organizationId}/oauth2/revoke"}),pa(Mu,"paramKeys",{authenticateCustomer:["organizationId","redirect_uri","channel_id","client_id","response_type","state","scope","usid","code_challenge"],authenticateCustomerRequired:["organizationId","redirect_uri","channel_id"],authorizeCustomer:["organizationId","redirect_uri","response_type","client_id","scope","state","usid","hint","channel_id","code_challenge","ui_locales"],authorizeCustomerRequired:["organizationId","redirect_uri","response_type","client_id"],authorizePasswordlessCustomer:["organizationId","user_id","mode","channel_id","locale","usid","callback_uri"],authorizePasswordlessCustomerRequired:["organizationId","user_id","mode","channel_id"],getAccessToken:["organizationId","grant_type","refresh_token","code","usid","redirect_uri","code_verifier","client_id","channel_id","dnt"],getAccessTokenRequired:["organizationId","grant_type"],getJwksUri:["organizationId"],getJwksUriRequired:["organizationId"],getPasswordLessAccessToken:["organizationId","grant_type","hint","pwdless_login_token","client_id","code_verifier"],getPasswordLessAccessTokenRequired:["organizationId","grant_type","hint","pwdless_login_token"],getPasswordResetToken:["organizationId","user_id","mode","channel_id","locale","client_id","code_challenge","callback_uri","idp_name","hint"],getPasswordResetTokenRequired:["organizationId","user_id","mode","channel_id"],getSessionBridgeAccessToken:["organizationId","code","client_id","channel_id","code_verifier","dwsid","grant_type","login_id","dwsgst","dwsrst","usid","dnt"],getSessionBridgeAccessTokenRequired:["organizationId","code","client_id","channel_id","code_verifier","dwsid","grant_type","login_id"],getTrustedAgentAccessToken:["organizationId","client_id","channel_id","code_verifier","grant_type","login_id","idp_origin","agent_id","usid","dnt","state"],getTrustedAgentAccessTokenRequired:["organizationId","client_id","channel_id","code_verifier","grant_type","login_id","idp_origin"],getTrustedAgentAuthorizationToken:["organizationId","client_id","channel_id","login_id","idp_origin","redirect_uri","response_type","code_challenge"],getTrustedAgentAuthorizationTokenRequired:["organizationId","client_id","channel_id","login_id","idp_origin","redirect_uri","response_type"],getTrustedSystemAccessToken:["organizationId","grant_type","hint","login_id","idp_origin","client_id","channel_id","usid","email_id","dnt"],getTrustedSystemAccessTokenRequired:["organizationId","grant_type","hint","login_id","idp_origin","client_id","channel_id"],getUserInfo:["organizationId","channel_id"],getUserInfoRequired:["organizationId"],getWellknownOpenidConfiguration:["organizationId"],getWellknownOpenidConfigurationRequired:["organizationId"],introspectToken:["organizationId","token","token_type_hint"],introspectTokenRequired:["organizationId","token"],logoutCustomer:["organizationId","client_id","refresh_token","channel_id","hint"],logoutCustomerRequired:["organizationId","client_id","refresh_token"],resetPassword:["organizationId","client_id","pwd_action_token","code_verifier","channel_id","new_password","hint"],resetPasswordRequired:["organizationId","client_id","pwd_action_token","code_verifier","channel_id"],revokeToken:["organizationId","token","token_type_hint"],revokeTokenRequired:["organizationId","token"]});function Bu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Au(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Bu(Object(r),!0).forEach((function(t){pa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Ru=function(){function e(t){la(this,e),pa(this,"clientConfig",void 0);var r=Au({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Wo(r)}var t,r,n,a,i,o,s,d;return ha(e,[{key:"createOrder",value:(d=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}o.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for createOrder: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/orders",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=Au(Au({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=29,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 29:return c=e.sent,e.abrupt("return",c);case 31:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"createPaymentInstrumentForOrder",value:(s=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}i.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===a.orderNo){e.next=20;break}i.orderNo=a.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for createPaymentInstrumentForOrder: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/orders/{orderNo}/payment-instruments",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=Au(Au({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=38,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"getOrder",value:(o=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.orderNo){e.next=7;break}i.orderNo=n.orderNo,e.next=12;break;case 7:if(void 0===a.orderNo){e.next=11;break}i.orderNo=a.orderNo,e.next=12;break;case 11:throw new Error("Missing required path parameter: orderNo");case 12:if(void 0===n.organizationId){e.next=16;break}i.organizationId=n.organizationId,e.next=21;break;case 16:if(void 0===a.organizationId){e.next=20;break}i.organizationId=a.organizationId,e.next=21;break;case 20:throw new Error("Missing required path parameter: organizationId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getOrder: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/orders/{orderNo}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=Au(Au({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=38,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"getPaymentMethodsForOrder",value:(i=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}i.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===a.orderNo){e.next=20;break}i.orderNo=a.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getPaymentMethodsForOrder: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/orders/{orderNo}/payment-methods",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=Au(Au({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=38,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getTaxesFromOrder",value:(a=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}i.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===a.orderNo){e.next=20;break}i.orderNo=a.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getTaxesFromOrder: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/orders/{orderNo}/taxes",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=Au(Au({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=37,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 37:return c=e.sent,e.abrupt("return",c);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"guestOrderLookup",value:(n=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}i.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===a.orderNo){e.next=20;break}i.orderNo=a.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for guestOrderLookup: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/orders/{orderNo}/lookup",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=Au(Au({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=38,md(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"removePaymentInstrumentFromOrder",value:(r=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.paymentInstrumentId){e.next=7;break}i.paymentInstrumentId=n.paymentInstrumentId,e.next=12;break;case 7:if(void 0===a.paymentInstrumentId){e.next=11;break}i.paymentInstrumentId=a.paymentInstrumentId,e.next=12;break;case 11:throw new Error("Missing required path parameter: paymentInstrumentId");case 12:if(void 0===n.organizationId){e.next=16;break}i.organizationId=n.organizationId,e.next=21;break;case 16:if(void 0===a.organizationId){e.next=20;break}i.organizationId=a.organizationId,e.next=21;break;case 20:throw new Error("Missing required path parameter: organizationId");case 21:if(void 0===n.orderNo){e.next=25;break}i.orderNo=n.orderNo,e.next=30;break;case 25:if(void 0===a.orderNo){e.next=29;break}i.orderNo=a.orderNo,e.next=30;break;case 29:throw new Error("Missing required path parameter: orderNo");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for removePaymentInstrumentFromOrder: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/orders/{orderNo}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=Au(Au({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=47,md(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"updatePaymentInstrumentForOrder",value:(t=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.paymentInstrumentId){e.next=7;break}i.paymentInstrumentId=n.paymentInstrumentId,e.next=12;break;case 7:if(void 0===a.paymentInstrumentId){e.next=11;break}i.paymentInstrumentId=a.paymentInstrumentId,e.next=12;break;case 11:throw new Error("Missing required path parameter: paymentInstrumentId");case 12:if(void 0===n.organizationId){e.next=16;break}i.organizationId=n.organizationId,e.next=21;break;case 16:if(void 0===a.organizationId){e.next=20;break}i.organizationId=a.organizationId,e.next=21;break;case 20:throw new Error("Missing required path parameter: organizationId");case 21:if(void 0===n.orderNo){e.next=25;break}i.orderNo=n.orderNo,e.next=30;break;case 25:if(void 0===a.orderNo){e.next=29;break}i.orderNo=a.orderNo,e.next=30;break;case 29:throw new Error("Missing required path parameter: orderNo");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for updatePaymentInstrumentForOrder: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/orders/{orderNo}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=Au(Au({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=47,md(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();pa(Ru,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-orders/v1"),pa(Ru,"apiPaths",{createOrder:"/organizations/{organizationId}/orders",createPaymentInstrumentForOrder:"/organizations/{organizationId}/orders/{orderNo}/payment-instruments",getOrder:"/organizations/{organizationId}/orders/{orderNo}",getPaymentMethodsForOrder:"/organizations/{organizationId}/orders/{orderNo}/payment-methods",getTaxesFromOrder:"/organizations/{organizationId}/orders/{orderNo}/taxes",guestOrderLookup:"/organizations/{organizationId}/orders/{orderNo}/lookup",removePaymentInstrumentFromOrder:"/organizations/{organizationId}/orders/{orderNo}/payment-instruments/{paymentInstrumentId}",updatePaymentInstrumentForOrder:"/organizations/{organizationId}/orders/{orderNo}/payment-instruments/{paymentInstrumentId}"}),pa(Ru,"paramKeys",{createOrder:["organizationId","siteId","locale"],createOrderRequired:["organizationId","siteId"],createPaymentInstrumentForOrder:["organizationId","orderNo","siteId","locale"],createPaymentInstrumentForOrderRequired:["organizationId","orderNo","siteId"],getOrder:["orderNo","organizationId","siteId","locale"],getOrderRequired:["orderNo","organizationId","siteId"],getPaymentMethodsForOrder:["organizationId","orderNo","siteId","locale"],getPaymentMethodsForOrderRequired:["organizationId","orderNo","siteId"],getTaxesFromOrder:["organizationId","orderNo","siteId"],getTaxesFromOrderRequired:["organizationId","orderNo","siteId"],guestOrderLookup:["organizationId","orderNo","siteId","locale"],guestOrderLookupRequired:["organizationId","orderNo","siteId"],removePaymentInstrumentFromOrder:["paymentInstrumentId","organizationId","orderNo","siteId","locale"],removePaymentInstrumentFromOrderRequired:["paymentInstrumentId","organizationId","orderNo","siteId"],updatePaymentInstrumentForOrder:["paymentInstrumentId","organizationId","orderNo","siteId","locale"],updatePaymentInstrumentForOrderRequired:["paymentInstrumentId","organizationId","orderNo","siteId"]});function Fu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Uu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Fu(Object(r),!0).forEach((function(t){pa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Wu=function(){function e(t){la(this,e),pa(this,"clientConfig",void 0);var r=Uu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Wo(r)}var t,r,n,a;return ha(e,[{key:"getCategories",value:(a=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.ids){e.next=17;break}o.ids=n.ids,e.next=22;break;case 17:if(void 0===a.ids){e.next=21;break}o.ids=a.ids,e.next=22;break;case 21:throw new Error("Missing required query parameter: ids");case 22:if(void 0!==n.levels?o.levels=n.levels:void 0!==a.levels&&(o.levels=a.levels),void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),void 0===n.siteId){e.next=28;break}o.siteId=n.siteId,e.next=33;break;case 28:if(void 0===a.siteId){e.next=32;break}o.siteId=a.siteId,e.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getCategories: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/categories",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=Uu(Uu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=39,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 39:return c=e.sent,e.abrupt("return",c);case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"getCategory",value:(n=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.id){e.next=7;break}i.id=n.id,e.next=12;break;case 7:if(void 0===a.id){e.next=11;break}i.id=a.id,e.next=12;break;case 11:throw new Error("Missing required path parameter: id");case 12:if(void 0===n.organizationId){e.next=16;break}i.organizationId=n.organizationId,e.next=21;break;case 16:if(void 0===a.organizationId){e.next=20;break}i.organizationId=a.organizationId,e.next=21;break;case 20:throw new Error("Missing required path parameter: organizationId");case 21:if(o={},void 0!==n.levels?o.levels=n.levels:void 0!==a.levels&&(o.levels=a.levels),void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),void 0===n.siteId){e.next=28;break}o.siteId=n.siteId,e.next=33;break;case 28:if(void 0===a.siteId){e.next=32;break}o.siteId=a.siteId,e.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getCategory: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/categories/{id}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=Uu(Uu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=39,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 39:return c=e.sent,e.abrupt("return",c);case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getProduct",value:(r=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.id){e.next=16;break}i.id=n.id,e.next=21;break;case 16:if(void 0===a.id){e.next=20;break}i.id=a.id,e.next=21;break;case 20:throw new Error("Missing required path parameter: id");case 21:if(o={},void 0!==n.inventoryIds?o.inventoryIds=n.inventoryIds:void 0!==a.inventoryIds&&(o.inventoryIds=a.inventoryIds),void 0!==n.expand?o.expand=n.expand:void 0!==a.expand&&(o.expand=a.expand),void 0!==n.allImages?o.allImages=n.allImages:void 0!==a.allImages&&(o.allImages=a.allImages),void 0!==n.perPricebook?o.perPricebook=n.perPricebook:void 0!==a.perPricebook&&(o.perPricebook=a.perPricebook),void 0!==n.select?o.select=n.select:void 0!==a.select&&(o.select=a.select),void 0!==n.currency?o.currency=n.currency:void 0!==a.currency&&(o.currency=a.currency),void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),void 0===n.siteId){e.next=33;break}o.siteId=n.siteId,e.next=38;break;case 33:if(void 0===a.siteId){e.next=37;break}o.siteId=a.siteId,e.next=38;break;case 37:throw new Error("Missing required query parameter: siteId");case 38:return Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getProduct: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/products/{id}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=Uu(Uu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=44,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 44:return c=e.sent,e.abrupt("return",c);case 46:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getProducts",value:(t=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.ids){e.next=17;break}o.ids=n.ids,e.next=22;break;case 17:if(void 0===a.ids){e.next=21;break}o.ids=a.ids,e.next=22;break;case 21:throw new Error("Missing required query parameter: ids");case 22:if(void 0!==n.inventoryIds?o.inventoryIds=n.inventoryIds:void 0!==a.inventoryIds&&(o.inventoryIds=a.inventoryIds),void 0!==n.expand?o.expand=n.expand:void 0!==a.expand&&(o.expand=a.expand),void 0!==n.allImages?o.allImages=n.allImages:void 0!==a.allImages&&(o.allImages=a.allImages),void 0!==n.perPricebook?o.perPricebook=n.perPricebook:void 0!==a.perPricebook&&(o.perPricebook=a.perPricebook),void 0===n.siteId){e.next=30;break}o.siteId=n.siteId,e.next=35;break;case 30:if(void 0===a.siteId){e.next=34;break}o.siteId=a.siteId,e.next=35;break;case 34:throw new Error("Missing required query parameter: siteId");case 35:return void 0!==n.select?o.select=n.select:void 0!==a.select&&(o.select=a.select),void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),void 0!==n.currency?o.currency=n.currency:void 0!==a.currency&&(o.currency=a.currency),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getProducts: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/products",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=Uu(Uu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=44,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 44:return c=e.sent,e.abrupt("return",c);case 46:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();pa(Wu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/product/shopper-products/v1"),pa(Wu,"apiPaths",{getCategories:"/organizations/{organizationId}/categories",getCategory:"/organizations/{organizationId}/categories/{id}",getProduct:"/organizations/{organizationId}/products/{id}",getProducts:"/organizations/{organizationId}/products"}),pa(Wu,"paramKeys",{getCategories:["organizationId","ids","siteId","levels","locale"],getCategoriesRequired:["organizationId","ids","siteId"],getCategory:["id","organizationId","siteId","levels","locale"],getCategoryRequired:["id","organizationId","siteId"],getProduct:["organizationId","id","siteId","inventoryIds","expand","allImages","perPricebook","select","currency","locale"],getProductRequired:["organizationId","id","siteId"],getProducts:["organizationId","ids","siteId","inventoryIds","expand","allImages","perPricebook","select","locale","currency"],getProductsRequired:["organizationId","ids","siteId"]});function Lu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Nu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Lu(Object(r),!0).forEach((function(t){pa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Lu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Du=function(){function e(t){la(this,e),pa(this,"clientConfig",void 0);var r=Nu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Wo(r)}var t,r;return ha(e,[{key:"getPromotions",value:(r=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}o.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:if(void 0===n.ids){e.next=26;break}o.ids=n.ids,e.next=31;break;case 26:if(void 0===a.ids){e.next=30;break}o.ids=a.ids,e.next=31;break;case 30:throw new Error("Missing required query parameter: ids");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getPromotions: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/promotions",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=Nu(Nu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=38,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getPromotionsForCampaign",value:(t=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.campaignId){e.next=7;break}i.campaignId=n.campaignId,e.next=12;break;case 7:if(void 0===a.campaignId){e.next=11;break}i.campaignId=a.campaignId,e.next=12;break;case 11:throw new Error("Missing required path parameter: campaignId");case 12:if(void 0===n.organizationId){e.next=16;break}i.organizationId=n.organizationId,e.next=21;break;case 16:if(void 0===a.organizationId){e.next=20;break}i.organizationId=a.organizationId,e.next=21;break;case 20:throw new Error("Missing required path parameter: organizationId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.startDate?o.startDate=n.startDate:void 0!==a.startDate&&(o.startDate=a.startDate),void 0!==n.endDate?o.endDate=n.endDate:void 0!==a.endDate&&(o.endDate=a.endDate),void 0!==n.currency?o.currency=n.currency:void 0!==a.currency&&(o.currency=a.currency),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getPromotionsForCampaign: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/promotions/campaigns/{campaignId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=Nu(Nu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=40,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 40:return c=e.sent,e.abrupt("return",c);case 42:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();pa(Du,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/pricing/shopper-promotions/v1"),pa(Du,"apiPaths",{getPromotions:"/organizations/{organizationId}/promotions",getPromotionsForCampaign:"/organizations/{organizationId}/promotions/campaigns/{campaignId}"}),pa(Du,"paramKeys",{getPromotions:["organizationId","siteId","ids","locale"],getPromotionsRequired:["organizationId","siteId","ids"],getPromotionsForCampaign:["campaignId","organizationId","siteId","startDate","endDate","currency"],getPromotionsForCampaignRequired:["campaignId","organizationId","siteId"]});var Gu=TypeError,Hu=function(e,t){if(!delete e[t])throw Gu("Cannot delete property "+K(t)+" of "+K(e))},Vu=R.match(/firefox\/(\d+)/i),$u=!!Vu&&+Vu[1],Ku=/MSIE|Trident/.test(R),Yu=R.match(/AppleWebKit\/(\d+)\./),Ju=!!Yu&&+Yu[1],Qu=[],Xu=x(Qu.sort),Zu=x(Qu.push),el=c((function(){Qu.sort(void 0)})),tl=c((function(){Qu.sort(null)})),rl=Un("sort"),nl=!c((function(){if(N)return N<70;if(!($u&&$u>3)){if(Ku)return!0;if(Ju)return Ju<603;var e,t,r,n,a="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(n=0;n<47;n++)Qu.push({k:t+n,v:r})}for(Qu.sort((function(e,t){return t.v-e.v})),n=0;n<Qu.length;n++)t=Qu[n].k.charAt(0),a.charAt(a.length-1)!==t&&(a+=t);return"DGBEFHACIJK"!==a}}));function al(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function il(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?al(Object(r),!0).forEach((function(t){pa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):al(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Bt({target:"Array",proto:!0,forced:el||!tl||!rl||!nl},{sort:function(e){void 0!==e&&J(e);var t=ae(this);if(nl)return void 0===e?Xu(t):Xu(t,e);var r,n,a=[],i=pt(t);for(n=0;n<i;n++)n in t&&Zu(a,t[n]);for(Yi(a,function(e){return function(t,r){return void 0===r?-1:void 0===t?1:void 0!==e?+e(t,r)||0:Vt(t)>Vt(r)?1:-1}}(e)),r=a.length,n=0;n<r;)t[n]=a[n++];for(;n<i;)Hu(t,n++);return t}});var ol=function(){function e(t){la(this,e),pa(this,"clientConfig",void 0);var r=il({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Wo(r)}var t,r;return ha(e,[{key:"getSearchSuggestions",value:(r=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}o.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:if(void 0===n.q){e.next=26;break}o.q=n.q,e.next=31;break;case 26:if(void 0===a.q){e.next=30;break}o.q=a.q,e.next=31;break;case 30:throw new Error("Missing required query parameter: q");case 31:return void 0!==n.limit?o.limit=n.limit:void 0!==a.limit&&(o.limit=a.limit),void 0!==n.currency?o.currency=n.currency:void 0!==a.currency&&(o.currency=a.currency),void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),void 0!==n.expand?o.expand=n.expand:void 0!==a.expand&&(o.expand=a.expand),void 0!==n.includedCustomProductProperties?o.includedCustomProductProperties=n.includedCustomProductProperties:void 0!==a.includedCustomProductProperties&&(o.includedCustomProductProperties=a.includedCustomProductProperties),void 0!==n.includeEinsteinSuggestedPhrases?o.includeEinsteinSuggestedPhrases=n.includeEinsteinSuggestedPhrases:void 0!==a.includeEinsteinSuggestedPhrases&&(o.includeEinsteinSuggestedPhrases=a.includeEinsteinSuggestedPhrases),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getSearchSuggestions: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/search-suggestions",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=il(il({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=43,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 43:return c=e.sent,e.abrupt("return",c);case 45:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"productSearch",value:(t=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.select?o.select=n.select:void 0!==a.select&&(o.select=a.select),void 0===n.siteId){e.next=18;break}o.siteId=n.siteId,e.next=23;break;case 18:if(void 0===a.siteId){e.next=22;break}o.siteId=a.siteId,e.next=23;break;case 22:throw new Error("Missing required query parameter: siteId");case 23:return void 0!==n.q?o.q=n.q:void 0!==a.q&&(o.q=a.q),void 0!==n.refine?o.refine=n.refine:void 0!==a.refine&&(o.refine=a.refine),void 0!==n.sort?o.sort=n.sort:void 0!==a.sort&&(o.sort=a.sort),void 0!==n.currency?o.currency=n.currency:void 0!==a.currency&&(o.currency=a.currency),void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),void 0!==n.expand?o.expand=n.expand:void 0!==a.expand&&(o.expand=a.expand),void 0!==n.allImages?o.allImages=n.allImages:void 0!==a.allImages&&(o.allImages=a.allImages),void 0!==n.perPricebook?o.perPricebook=n.perPricebook:void 0!==a.perPricebook&&(o.perPricebook=a.perPricebook),void 0!==n.allVariationProperties?o.allVariationProperties=n.allVariationProperties:void 0!==a.allVariationProperties&&(o.allVariationProperties=a.allVariationProperties),void 0!==n.includedCustomVariationProperties?o.includedCustomVariationProperties=n.includedCustomVariationProperties:void 0!==a.includedCustomVariationProperties&&(o.includedCustomVariationProperties=a.includedCustomVariationProperties),void 0!==n.limit?o.limit=n.limit:void 0!==a.limit&&(o.limit=a.limit),void 0!==n.offset?o.offset=n.offset:void 0!==a.offset&&(o.offset=a.offset),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for productSearch: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/product-search",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=il(il({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=41,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 41:return c=e.sent,e.abrupt("return",c);case 43:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();pa(ol,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/search/shopper-search/v1"),pa(ol,"apiPaths",{getSearchSuggestions:"/organizations/{organizationId}/search-suggestions",productSearch:"/organizations/{organizationId}/product-search"}),pa(ol,"paramKeys",{getSearchSuggestions:["organizationId","siteId","q","limit","currency","locale","expand","includedCustomProductProperties","includeEinsteinSuggestedPhrases"],getSearchSuggestionsRequired:["organizationId","siteId","q"],productSearch:["organizationId","siteId","select","q","refine","sort","currency","locale","expand","allImages","perPricebook","allVariationProperties","includedCustomVariationProperties","limit","offset"],productSearchRequired:["organizationId","siteId"]});function sl(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function dl(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?sl(Object(r),!0).forEach((function(t){pa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sl(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var cl=function(){function e(t){la(this,e),pa(this,"clientConfig",void 0);var r=dl({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Wo(r)}var t;return ha(e,[{key:"getUrlMapping",value:(t=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.urlSegment){e.next=17;break}o.urlSegment=n.urlSegment,e.next=22;break;case 17:if(void 0===a.urlSegment){e.next=21;break}o.urlSegment=a.urlSegment,e.next=22;break;case 21:throw new Error("Missing required query parameter: urlSegment");case 22:if(void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getUrlMapping: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/url-mapping",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=dl(dl({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=38,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();pa(cl,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/site/shopper-seo/v1"),pa(cl,"apiPaths",{getUrlMapping:"/organizations/{organizationId}/url-mapping"}),pa(cl,"paramKeys",{getUrlMapping:["organizationId","urlSegment","siteId","locale"],getUrlMappingRequired:["organizationId","urlSegment","siteId"]});function ul(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ll(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ul(Object(r),!0).forEach((function(t){pa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ul(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var gl=function(){function e(t){la(this,e),pa(this,"clientConfig",void 0);var r=ll({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Wo(r)}var t,r;return ha(e,[{key:"getStores",value:(r=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.ids){e.next=17;break}o.ids=n.ids,e.next=22;break;case 17:if(void 0===a.ids){e.next=21;break}o.ids=a.ids,e.next=22;break;case 21:throw new Error("Missing required query parameter: ids");case 22:if(void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getStores: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/stores",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=ll(ll({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=38,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"searchStores",value:(t=ua(Wa.mark((function e(t,r){var n,a,i,o,s,d,c;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.countryCode?o.countryCode=n.countryCode:void 0!==a.countryCode&&(o.countryCode=a.countryCode),void 0!==n.distanceUnit?o.distanceUnit=n.distanceUnit:void 0!==a.distanceUnit&&(o.distanceUnit=a.distanceUnit),void 0!==n.latitude?o.latitude=n.latitude:void 0!==a.latitude&&(o.latitude=a.latitude),void 0!==n.longitude?o.longitude=n.longitude:void 0!==a.longitude&&(o.longitude=a.longitude),void 0!==n.maxDistance?o.maxDistance=n.maxDistance:void 0!==a.maxDistance&&(o.maxDistance=a.maxDistance),void 0!==n.postalCode?o.postalCode=n.postalCode:void 0!==a.postalCode&&(o.postalCode=a.postalCode),void 0===n.siteId){e.next=23;break}o.siteId=n.siteId,e.next=28;break;case 23:if(void 0===a.siteId){e.next=27;break}o.siteId=a.siteId,e.next=28;break;case 27:throw new Error("Missing required query parameter: siteId");case 28:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),void 0!==n.limit?o.limit=n.limit:void 0!==a.limit&&(o.limit=a.limit),void 0!==n.offset?o.offset=n.offset:void 0!==a.offset&&(o.offset=a.offset),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in o||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for searchStores: ".concat(e,", adding as query parameter anyway")),o[e]=t)})),s=new cu("/organizations/{organizationId}/store-search",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),d=ll(ll({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],uu].join(" ")),e.next=37,md(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 37:return c=e.sent,e.abrupt("return",c);case 39:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();pa(gl,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/store/shopper-stores/v1"),pa(gl,"apiPaths",{getStores:"/organizations/{organizationId}/stores",searchStores:"/organizations/{organizationId}/store-search"}),pa(gl,"paramKeys",{getStores:["organizationId","ids","siteId","locale"],getStoresRequired:["organizationId","ids","siteId"],searchStores:["organizationId","siteId","countryCode","distanceUnit","latitude","longitude","maxDistance","postalCode","locale","limit","offset"],searchStoresRequired:["organizationId","siteId"]});var hl=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};ms("search",(function(e,t,r){return[function(t){var r=O(this),n=null==t?void 0:Q(t,e);return n?h(n,t,r):new RegExp(t)[e](Vt(r))},function(e){var n=je(this),a=Vt(e),i=r(t,n,a);if(i.done)return i.value;var o=n.lastIndex;hl(o,0)||(n.lastIndex=0);var s=Ps(n,a);return hl(n.lastIndex,o)||(n.lastIndex=o),null===s?-1:s.index}]}));var pl=Sr.map,fl=jn("map");Bt({target:"Array",proto:!0,forced:!fl},{map:function(e){return pl(this,e,arguments.length>1?arguments[1]:void 0)}});var Il=fe("iterator"),ml=!1;try{var bl=0,kl={next:function(){return{done:!!bl++}},return:function(){ml=!0}};kl[Il]=function(){return this},Array.from(kl,(function(){throw 2}))}catch(e){}var vl,yl,xl,wl=function(e,t){if(!t&&!ml)return!1;var r=!1;try{var n={};n[Il]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r},zl="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView,Cl=_e.f,ql=rt.enforce,El=rt.get,Pl=d.Int8Array,jl=Pl&&Pl.prototype,Ol=d.Uint8ClampedArray,Sl=Ol&&Ol.prototype,Tl=Pl&&Za(Pl),_l=jl&&Za(jl),Ml=Object.prototype,Bl=d.TypeError,Al=fe("toStringTag"),Rl=ue("TYPED_ARRAY_TAG"),Fl=zl&&!!di&&"Opera"!==Gt(d.opera),Ul=!1,Wl={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},Ll={BigInt64Array:8,BigUint64Array:8},Nl=function(e){var t=Za(e);if(_(t)){var r=El(t);return r&&oe(r,"TypedArrayConstructor")?r.TypedArrayConstructor:Nl(t)}},Dl=function(e){if(!_(e))return!1;var t=Gt(e);return oe(Wl,t)||oe(Ll,t)};for(vl in Wl)(xl=(yl=d[vl])&&yl.prototype)?ql(xl).TypedArrayConstructor=yl:Fl=!1;for(vl in Ll)(xl=(yl=d[vl])&&yl.prototype)&&(ql(xl).TypedArrayConstructor=yl);if((!Fl||!T(Tl)||Tl===Function.prototype)&&(Tl=function(){throw Bl("Incorrect invocation")},Fl))for(vl in Wl)d[vl]&&di(d[vl],Tl);if((!Fl||!_l||_l===Ml)&&(_l=Tl.prototype,Fl))for(vl in Wl)d[vl]&&di(d[vl].prototype,_l);if(Fl&&Za(Sl)!==_l&&di(Sl,_l),u&&!oe(_l,Al))for(vl in Ul=!0,Cl(_l,Al,{get:function(){return _(this)?this[Rl]:void 0}}),Wl)d[vl]&&Me(d[vl],Rl,vl);var Gl={NATIVE_ARRAY_BUFFER_VIEWS:Fl,TYPED_ARRAY_TAG:Ul&&Rl,aTypedArray:function(e){if(Dl(e))return e;throw Bl("Target is not a typed array")},aTypedArrayConstructor:function(e){if(T(e)&&(!di||A(Tl,e)))return e;throw Bl(K(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,r,n){if(u){if(r)for(var a in Wl){var i=d[a];if(i&&oe(i.prototype,e))try{delete i.prototype[e]}catch(r){try{i.prototype[e]=t}catch(e){}}}_l[e]&&!r||at(_l,e,r?t:Fl&&jl[e]||t,n)}},exportTypedArrayStaticMethod:function(e,t,r){var n,a;if(u){if(di){if(r)for(n in Wl)if((a=d[n])&&oe(a,e))try{delete a[e]}catch(e){}if(Tl[e]&&!r)return;try{return at(Tl,e,r?t:Fl&&Tl[e]||t)}catch(e){}}for(n in Wl)!(a=d[n])||a[e]&&!r||at(a,e,t)}},getTypedArrayConstructor:Nl,isView:function(e){if(!_(e))return!1;var t=Gt(e);return"DataView"===t||oe(Wl,t)||oe(Ll,t)},isTypedArray:Dl,TypedArray:Tl,TypedArrayPrototype:_l},Hl=Gl.NATIVE_ARRAY_BUFFER_VIEWS,Vl=d.ArrayBuffer,$l=d.Int8Array,Kl=!Hl||!c((function(){$l(1)}))||!c((function(){new $l(-1)}))||!wl((function(e){new $l,new $l(null),new $l(1.5),new $l(e)}),!0)||c((function(){return 1!==new $l(new Vl(2),1,void 0).length})),Yl=RangeError,Jl=function(e){if(void 0===e)return 0;var t=dt(e),r=ht(t);if(t!==r)throw Yl("Wrong length or index");return r},Ql=Array,Xl=Math.abs,Zl=Math.pow,eg=Math.floor,tg=Math.log,rg=Math.LN2,ng=function(e,t,r){var n,a,i,o=Ql(r),s=8*r-t-1,d=(1<<s)-1,c=d>>1,u=23===t?Zl(2,-24)-Zl(2,-77):0,l=e<0||0===e&&1/e<0?1:0,g=0;for((e=Xl(e))!=e||e===1/0?(a=e!=e?1:0,n=d):(n=eg(tg(e)/rg),e*(i=Zl(2,-n))<1&&(n--,i*=2),(e+=n+c>=1?u/i:u*Zl(2,1-c))*i>=2&&(n++,i/=2),n+c>=d?(a=0,n=d):n+c>=1?(a=(e*i-1)*Zl(2,t),n+=c):(a=e*Zl(2,c-1)*Zl(2,t),n=0));t>=8;)o[g++]=255&a,a/=256,t-=8;for(n=n<<t|a,s+=t;s>0;)o[g++]=255&n,n/=256,s-=8;return o[--g]|=128*l,o},ag=function(e,t){var r,n=e.length,a=8*n-t-1,i=(1<<a)-1,o=i>>1,s=a-7,d=n-1,c=e[d--],u=127&c;for(c>>=7;s>0;)u=256*u+e[d--],s-=8;for(r=u&(1<<-s)-1,u>>=-s,s+=t;s>0;)r=256*r+e[d--],s-=8;if(0===u)u=1-o;else{if(u===i)return r?NaN:c?-1/0:1/0;r+=Zl(2,t),u-=o}return(c?-1:1)*r*Zl(2,u-t)},ig=function(e){for(var t=ae(this),r=pt(t),n=arguments.length,a=lt(n>1?arguments[1]:void 0,r),i=n>2?arguments[2]:void 0,o=void 0===i?r:lt(i,r);o>a;)t[a++]=e;return t},og=xt.f,sg=_e.f,dg=Fe.PROPER,cg=Fe.CONFIGURABLE,ug=rt.get,lg=rt.set,gg=d.ArrayBuffer,hg=gg,pg=hg&&hg.prototype,fg=d.DataView,Ig=fg&&fg.prototype,mg=Object.prototype,bg=d.Array,kg=d.RangeError,vg=x(ig),yg=x([].reverse),xg=ng,wg=ag,zg=function(e){return[255&e]},Cg=function(e){return[255&e,e>>8&255]},qg=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},Eg=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},Pg=function(e){return xg(e,23,4)},jg=function(e){return xg(e,52,8)},Og=function(e,t){sg(e.prototype,t,{get:function(){return ug(this)[t]}})},Sg=function(e,t,r,n){var a=Jl(r),i=ug(e);if(a+t>i.byteLength)throw kg("Wrong index");var o=ug(i.buffer).bytes,s=a+i.byteOffset,d=ar(o,s,s+t);return n?d:yg(d)},Tg=function(e,t,r,n,a,i){var o=Jl(r),s=ug(e);if(o+t>s.byteLength)throw kg("Wrong index");for(var d=ug(s.buffer).bytes,c=o+s.byteOffset,u=n(+a),l=0;l<t;l++)d[c+l]=u[i?l:t-l-1]};if(zl){var _g=dg&&"ArrayBuffer"!==gg.name;if(c((function(){gg(1)}))&&c((function(){new gg(-1)}))&&!c((function(){return new gg,new gg(1.5),new gg(NaN),_g&&!cg})))_g&&cg&&Me(gg,"name","ArrayBuffer");else{(hg=function(e){return Fi(this,pg),new gg(Jl(e))}).prototype=pg;for(var Mg,Bg=og(gg),Ag=0;Bg.length>Ag;)(Mg=Bg[Ag++])in hg||Me(hg,Mg,gg[Mg]);pg.constructor=hg}di&&Za(Ig)!==mg&&di(Ig,mg);var Rg=new fg(new hg(2)),Fg=x(Ig.setInt8);Rg.setInt8(0,2147483648),Rg.setInt8(1,2147483649),!Rg.getInt8(0)&&Rg.getInt8(1)||Ai(Ig,{setInt8:function(e,t){Fg(this,e,t<<24>>24)},setUint8:function(e,t){Fg(this,e,t<<24>>24)}},{unsafe:!0})}else pg=(hg=function(e){Fi(this,pg);var t=Jl(e);lg(this,{bytes:vg(bg(t),0),byteLength:t}),u||(this.byteLength=t)}).prototype,Ig=(fg=function(e,t,r){Fi(this,Ig),Fi(e,pg);var n=ug(e).byteLength,a=dt(t);if(a<0||a>n)throw kg("Wrong offset");if(a+(r=void 0===r?n-a:ht(r))>n)throw kg("Wrong length");lg(this,{buffer:e,byteLength:r,byteOffset:a}),u||(this.buffer=e,this.byteLength=r,this.byteOffset=a)}).prototype,u&&(Og(hg,"byteLength"),Og(fg,"buffer"),Og(fg,"byteLength"),Og(fg,"byteOffset")),Ai(Ig,{getInt8:function(e){return Sg(this,1,e)[0]<<24>>24},getUint8:function(e){return Sg(this,1,e)[0]},getInt16:function(e){var t=Sg(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=Sg(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return Eg(Sg(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return Eg(Sg(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return wg(Sg(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return wg(Sg(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){Tg(this,1,e,zg,t)},setUint8:function(e,t){Tg(this,1,e,zg,t)},setInt16:function(e,t){Tg(this,2,e,Cg,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){Tg(this,2,e,Cg,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){Tg(this,4,e,qg,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){Tg(this,4,e,qg,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){Tg(this,4,e,Pg,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){Tg(this,8,e,jg,t,arguments.length>2?arguments[2]:void 0)}});hr(hg,"ArrayBuffer"),hr(fg,"DataView");var Ug={ArrayBuffer:hg,DataView:fg},Wg=Math.floor,Lg=Number.isInteger||function(e){return!_(e)&&isFinite(e)&&Wg(e)===e},Ng=RangeError,Dg=RangeError,Gg=function(e,t){var r=function(e){var t=dt(e);if(t<0)throw Ng("The argument can't be less than 0");return t}(e);if(r%t)throw Dg("Wrong offset");return r},Hg=Gl.aTypedArrayConstructor,Vg=function(e){var t,r,n,a,i,o,s=Hs(this),d=ae(e),c=arguments.length,u=c>1?arguments[1]:void 0,l=void 0!==u,g=Wi(d);if(g&&!Ed(g))for(o=(i=Ni(d,g)).next,d=[];!(a=h(o,i)).done;)d.push(a.value);for(l&&c>2&&(u=fr(u,arguments[2])),r=pt(d),n=new(Hg(s))(r),t=0;r>t;t++)n[t]=l?u(d[t],t):d[t];return n},$g=fe("species"),Kg=function(e){var t=B(e),r=_e.f;u&&t&&!t[$g]&&r(t,$g,{configurable:!0,get:function(){return this}})};a((function(e){var t=xt.f,r=Sr.forEach,n=rt.get,a=rt.set,i=rt.enforce,o=_e.f,s=Ce.f,c=Math.round,l=d.RangeError,g=Ug.ArrayBuffer,p=g.prototype,f=Ug.DataView,I=Gl.NATIVE_ARRAY_BUFFER_VIEWS,b=Gl.TYPED_ARRAY_TAG,k=Gl.TypedArray,v=Gl.TypedArrayPrototype,y=Gl.aTypedArrayConstructor,x=Gl.isTypedArray,w=function(e,t){y(e);for(var r=0,n=t.length,a=new e(n);n>r;)a[r]=t[r++];return a},z=function(e,t){o(e,t,{get:function(){return n(this)[t]}})},C=function(e){var t;return A(p,e)||"ArrayBuffer"==(t=Gt(e))||"SharedArrayBuffer"==t},q=function(e,t){return x(e)&&!V(t)&&t in e&&Lg(+t)&&t>=0},E=function(e,t){return t=ke(t),q(e,t)?m(2,e[t]):s(e,t)},P=function(e,t,r){return t=ke(t),!(q(e,t)&&_(r)&&oe(r,"value"))||oe(r,"get")||oe(r,"set")||r.configurable||oe(r,"writable")&&!r.writable||oe(r,"enumerable")&&!r.enumerable?o(e,t,r):(e[t]=r.value,e)};u?(I||(Ce.f=E,_e.f=P,z(v,"buffer"),z(v,"byteOffset"),z(v,"byteLength"),z(v,"length")),Bt({target:"Object",stat:!0,forced:!I},{getOwnPropertyDescriptor:E,defineProperty:P}),e.exports=function(e,s,u){var p=e.match(/\d+$/)[0]/8,m=e+(u?"Clamped":"")+"Array",y="get"+e,z="set"+e,q=d[m],E=q,P=E&&E.prototype,j={},O=function(e,t){o(e,t,{get:function(){return function(e,t){var r=n(e);return r.view[y](t*p+r.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,r){var a=n(e);u&&(r=(r=c(r))<0?0:r>255?255:255&r),a.view[z](t*p+a.byteOffset,r,!0)}(this,t,e)},enumerable:!0})};I?Kl&&(E=s((function(e,t,r,n){return Fi(e,P),function(e,t,r){var n,a;return di&&T(n=t.constructor)&&n!==r&&_(a=n.prototype)&&a!==r.prototype&&di(e,a),e}(_(t)?C(t)?void 0!==n?new q(t,Gg(r,p),n):void 0!==r?new q(t,Gg(r,p)):new q(t):x(t)?w(E,t):h(Vg,E,t):new q(Jl(t)),e,E)})),di&&di(E,k),r(t(q),(function(e){e in E||Me(E,e,q[e])})),E.prototype=P):(E=s((function(e,t,r,n){Fi(e,P);var i,o,s,d=0,c=0;if(_(t)){if(!C(t))return x(t)?w(E,t):h(Vg,E,t);i=t,c=Gg(r,p);var u=t.byteLength;if(void 0===n){if(u%p)throw l("Wrong length");if((o=u-c)<0)throw l("Wrong length")}else if((o=ht(n)*p)+c>u)throw l("Wrong length");s=o/p}else s=Jl(t),i=new g(o=s*p);for(a(e,{buffer:i,byteOffset:c,byteLength:o,length:s,view:new f(i)});d<s;)O(e,d++)})),di&&di(E,k),P=E.prototype=er(v)),P.constructor!==E&&Me(P,"constructor",E),i(P).TypedArrayConstructor=E,b&&Me(P,b,m);var S=E!=q;j[m]=E,Bt({global:!0,constructor:!0,forced:S,sham:!I},j),"BYTES_PER_ELEMENT"in E||Me(E,"BYTES_PER_ELEMENT",p),"BYTES_PER_ELEMENT"in P||Me(P,"BYTES_PER_ELEMENT",p),Kg(m)}):e.exports=function(){}}))("Uint8",(function(e){return function(t,r,n){return e(this,t,r,n)}}));var Yg=Math.min,Jg=x([].copyWithin||function(e,t){var r=ae(this),n=pt(r),a=lt(e,n),i=lt(t,n),o=arguments.length>2?arguments[2]:void 0,s=Yg((void 0===o?n:lt(o,n))-i,n-a),d=1;for(i<a&&a<i+s&&(d=-1,i+=s-1,a+=s-1);s-- >0;)i in r?r[a]=r[i]:Hu(r,a),a+=d,i+=d;return r}),Qg=Gl.aTypedArray;(0,Gl.exportTypedArrayMethod)("copyWithin",(function(e,t){return Jg(Qg(this),e,t,arguments.length>2?arguments[2]:void 0)}));var Xg=Sr.every,Zg=Gl.aTypedArray;(0,Gl.exportTypedArrayMethod)("every",(function(e){return Xg(Zg(this),e,arguments.length>1?arguments[1]:void 0)}));var eh=TypeError,th=function(e){var t=be(e,"number");if("number"==typeof t)throw eh("Can't convert number to bigint");return BigInt(t)},rh=Gl.aTypedArray,nh=Gl.exportTypedArrayMethod,ah=x("".slice);nh("fill",(function(e){var t=arguments.length;rh(this);var r="Big"===ah(Gt(this),0,3)?th(e):+e;return h(ig,this,r,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}),c((function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e})));var ih=fe("species"),oh=function(e,t){var r,n=je(e).constructor;return void 0===n||null==(r=je(n)[ih])?t:Hs(r)},sh=Gl.aTypedArrayConstructor,dh=Gl.getTypedArrayConstructor,ch=function(e){return sh(oh(e,dh(e)))},uh=function(e,t){return function(e,t){for(var r=0,n=pt(t),a=new e(n);n>r;)a[r]=t[r++];return a}(ch(e),t)},lh=Sr.filter,gh=Gl.aTypedArray;(0,Gl.exportTypedArrayMethod)("filter",(function(e){var t=lh(gh(this),e,arguments.length>1?arguments[1]:void 0);return uh(this,t)}));var hh=Sr.find,ph=Gl.aTypedArray;(0,Gl.exportTypedArrayMethod)("find",(function(e){return hh(ph(this),e,arguments.length>1?arguments[1]:void 0)}));var fh=Sr.findIndex,Ih=Gl.aTypedArray;(0,Gl.exportTypedArrayMethod)("findIndex",(function(e){return fh(Ih(this),e,arguments.length>1?arguments[1]:void 0)}));var mh=Sr.forEach,bh=Gl.aTypedArray;(0,Gl.exportTypedArrayMethod)("forEach",(function(e){mh(bh(this),e,arguments.length>1?arguments[1]:void 0)}));var kh=It.includes,vh=Gl.aTypedArray;(0,Gl.exportTypedArrayMethod)("includes",(function(e){return kh(vh(this),e,arguments.length>1?arguments[1]:void 0)}));var yh=It.indexOf,xh=Gl.aTypedArray;(0,Gl.exportTypedArrayMethod)("indexOf",(function(e){return yh(xh(this),e,arguments.length>1?arguments[1]:void 0)}));var wh=fe("iterator"),zh=d.Uint8Array,Ch=x(ki.values),qh=x(ki.keys),Eh=x(ki.entries),Ph=Gl.aTypedArray,jh=Gl.exportTypedArrayMethod,Oh=zh&&zh.prototype,Sh=!c((function(){Oh[wh].call([1])})),Th=!!Oh&&Oh.values&&Oh[wh]===Oh.values&&"values"===Oh.values.name,_h=function(){return Ch(Ph(this))};jh("entries",(function(){return Eh(Ph(this))}),Sh),jh("keys",(function(){return qh(Ph(this))}),Sh),jh("values",_h,Sh||!Th,{name:"values"}),jh(wh,_h,Sh||!Th,{name:"values"});var Mh=Gl.aTypedArray,Bh=Gl.exportTypedArrayMethod,Ah=x([].join);Bh("join",(function(e){return Ah(Mh(this),e)}));var Rh=Math.min,Fh=[].lastIndexOf,Uh=!!Fh&&1/[1].lastIndexOf(1,-0)<0,Wh=Un("lastIndexOf"),Lh=Uh||!Wh?function(e){if(Uh)return gn(Fh,this,arguments)||0;var t=S(this),r=pt(t),n=r-1;for(arguments.length>1&&(n=Rh(n,dt(arguments[1]))),n<0&&(n=r+n);n>=0;n--)if(n in t&&t[n]===e)return n||0;return-1}:Fh,Nh=Gl.aTypedArray;(0,Gl.exportTypedArrayMethod)("lastIndexOf",(function(e){var t=arguments.length;return gn(Lh,Nh(this),t>1?[e,arguments[1]]:[e])}));var Dh=Sr.map,Gh=Gl.aTypedArray;(0,Gl.exportTypedArrayMethod)("map",(function(e){return Dh(Gh(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new(ch(e))(t)}))}));var Hh=TypeError,Vh=function(e){return function(t,r,n,a){J(r);var i=ae(t),o=P(i),s=pt(i),d=e?s-1:0,c=e?-1:1;if(n<2)for(;;){if(d in o){a=o[d],d+=c;break}if(d+=c,e?d<0:s<=d)throw Hh("Reduce of empty array with no initial value")}for(;e?d>=0:s>d;d+=c)d in o&&(a=r(a,o[d],d,i));return a}},$h={left:Vh(!1),right:Vh(!0)},Kh=$h.left,Yh=Gl.aTypedArray;(0,Gl.exportTypedArrayMethod)("reduce",(function(e){var t=arguments.length;return Kh(Yh(this),e,t,t>1?arguments[1]:void 0)}));var Jh=$h.right,Qh=Gl.aTypedArray;(0,Gl.exportTypedArrayMethod)("reduceRight",(function(e){var t=arguments.length;return Jh(Qh(this),e,t,t>1?arguments[1]:void 0)}));var Xh=Gl.aTypedArray,Zh=Gl.exportTypedArrayMethod,ep=Math.floor;Zh("reverse",(function(){for(var e,t=Xh(this).length,r=ep(t/2),n=0;n<r;)e=this[n],this[n++]=this[--t],this[t]=e;return this}));var tp=d.RangeError,rp=d.Int8Array,np=rp&&rp.prototype,ap=np&&np.set,ip=Gl.aTypedArray,op=Gl.exportTypedArrayMethod,sp=!c((function(){var e=new Uint8ClampedArray(2);return h(ap,e,{length:1,0:3},1),3!==e[1]})),dp=sp&&Gl.NATIVE_ARRAY_BUFFER_VIEWS&&c((function(){var e=new rp(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}));op("set",(function(e){ip(this);var t=Gg(arguments.length>1?arguments[1]:void 0,1),r=ae(e);if(sp)return h(ap,this,r,t);var n=this.length,a=pt(r),i=0;if(a+t>n)throw tp("Wrong length");for(;i<a;)this[t+i]=r[i++]}),!sp||dp);var cp=Gl.aTypedArray;(0,Gl.exportTypedArrayMethod)("slice",(function(e,t){for(var r=hn(cp(this),e,t),n=ch(this),a=0,i=r.length,o=new n(i);i>a;)o[a]=r[a++];return o}),c((function(){new Int8Array(1).slice()})));var up=Sr.some,lp=Gl.aTypedArray;(0,Gl.exportTypedArrayMethod)("some",(function(e){return up(lp(this),e,arguments.length>1?arguments[1]:void 0)}));var gp=Gl.aTypedArray,hp=Gl.exportTypedArrayMethod,pp=d.Uint16Array,fp=pp&&x(pp.prototype.sort),Ip=!(!fp||c((function(){fp(new pp(2),null)}))&&c((function(){fp(new pp(2),{})}))),mp=!!fp&&!c((function(){if(N)return N<74;if($u)return $u<67;if(Ku)return!0;if(Ju)return Ju<602;var e,t,r=new pp(516),n=Array(516);for(e=0;e<516;e++)t=e%4,r[e]=515-e,n[e]=e-2*t+3;for(fp(r,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(r[e]!==n[e])return!0}));hp("sort",(function(e){return void 0!==e&&J(e),mp?fp(this,e):Yi(gp(this),function(e){return function(t,r){return void 0!==e?+e(t,r)||0:r!=r?-1:t!=t?1:0===t&&0===r?1/t>0&&1/r<0?1:-1:t>r}}(e))}),!mp||Ip);var bp=d.Int8Array,kp=Gl.aTypedArray,vp=Gl.exportTypedArrayMethod,yp=[].toLocaleString,xp=!!bp&&c((function(){yp.call(new bp(1))}));vp("toLocaleString",(function(){return gn(yp,xp?hn(kp(this)):kp(this),hn(arguments))}),c((function(){return[1,2].toLocaleString()!=new bp([1,2]).toLocaleString()}))||!c((function(){bp.prototype.toLocaleString.call([1,2])})));var wp=Gl.exportTypedArrayMethod,zp=d.Uint8Array,Cp=zp&&zp.prototype||{},qp=[].toString,Ep=x([].join);c((function(){qp.call({})}))&&(qp=function(){return Ep(this)});var Pp=Cp.toString!=qp;wp("toString",qp,Pp);var jp,Op,Sp,Tp,_p="process"==C(d.process),Mp=/(?:ipad|iphone|ipod).*applewebkit/i.test(R),Bp=d.setImmediate,Ap=d.clearImmediate,Rp=d.process,Fp=d.Dispatch,Up=d.Function,Wp=d.MessageChannel,Lp=d.String,Np=0,Dp={};try{jp=d.location}catch(e){}var Gp=function(e){if(oe(Dp,e)){var t=Dp[e];delete Dp[e],t()}},Hp=function(e){return function(){Gp(e)}},Vp=function(e){Gp(e.data)},$p=function(e){d.postMessage(Lp(e),jp.protocol+"//"+jp.host)};Bp&&Ap||(Bp=function(e){Gi(arguments.length,1);var t=T(e)?e:Up(e),r=hn(arguments,1);return Dp[++Np]=function(){gn(t,void 0,r)},Op(Np),Np},Ap=function(e){delete Dp[e]},_p?Op=function(e){Rp.nextTick(Hp(e))}:Fp&&Fp.now?Op=function(e){Fp.now(Hp(e))}:Wp&&!Mp?(Tp=(Sp=new Wp).port2,Sp.port1.onmessage=Vp,Op=fr(Tp.postMessage,Tp)):d.addEventListener&&T(d.postMessage)&&!d.importScripts&&jp&&"file:"!==jp.protocol&&!c($p)?(Op=$p,d.addEventListener("message",Vp,!1)):Op="onreadystatechange"in xe("script")?function(e){Kt.appendChild(xe("script")).onreadystatechange=function(){Kt.removeChild(this),Gp(e)}}:function(e){setTimeout(Hp(e),0)});var Kp,Yp,Jp,Qp,Xp,Zp,ef,tf,rf={set:Bp,clear:Ap},nf=/ipad|iphone|ipod/i.test(R)&&void 0!==d.Pebble,af=/web0s(?!.*chrome)/i.test(R),of=Ce.f,sf=rf.set,df=d.MutationObserver||d.WebKitMutationObserver,cf=d.document,uf=d.process,lf=d.Promise,gf=of(d,"queueMicrotask"),hf=gf&&gf.value;hf||(Kp=function(){var e,t;for(_p&&(e=uf.domain)&&e.exit();Yp;){t=Yp.fn,Yp=Yp.next;try{t()}catch(e){throw Yp?Qp():Jp=void 0,e}}Jp=void 0,e&&e.enter()},Mp||_p||af||!df||!cf?!nf&&lf&&lf.resolve?((ef=lf.resolve(void 0)).constructor=lf,tf=fr(ef.then,ef),Qp=function(){tf(Kp)}):_p?Qp=function(){uf.nextTick(Kp)}:(sf=fr(sf,d),Qp=function(){sf(Kp)}):(Xp=!0,Zp=cf.createTextNode(""),new df(Kp).observe(Zp,{characterData:!0}),Qp=function(){Zp.data=Xp=!Xp}));var pf=hf||function(e){var t={fn:e,next:void 0};Jp&&(Jp.next=t),Yp||(Yp=t,Qp()),Jp=t},ff=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},If=function(){this.head=null,this.tail=null};If.prototype={add:function(e){var t={item:e,next:null};this.head?this.tail.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return this.head=e.next,this.tail===e&&(this.tail=null),e.item}};var mf=If,bf=d.Promise,kf="object"==typeof window&&"object"!=typeof Deno;bf&&bf.prototype;var vf,yf,xf,wf=fe("species"),zf=!1,Cf=T(d.PromiseRejectionEvent),qf={CONSTRUCTOR:_t("Promise",(function(){var e=De(bf),t=e!==String(bf);if(!t&&66===N)return!0;if(N>=51&&/native code/.test(e))return!1;var r=new bf((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};return(r.constructor={})[wf]=n,!(zf=r.then((function(){}))instanceof n)||!t&&kf&&!Cf})),REJECTION_EVENT:Cf,SUBCLASSING:zf},Ef=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw TypeError("Bad Promise constructor");t=e,r=n})),this.resolve=J(t),this.reject=J(r)},Pf={f:function(e){return new Ef(e)}},jf=rf.set,Of=qf.CONSTRUCTOR,Sf=qf.REJECTION_EVENT,Tf=qf.SUBCLASSING,_f=rt.getterFor("Promise"),Mf=rt.set,Bf=bf&&bf.prototype,Af=bf,Rf=Bf,Ff=d.TypeError,Uf=d.document,Wf=d.process,Lf=Pf.f,Nf=Lf,Df=!!(Uf&&Uf.createEvent&&d.dispatchEvent),Gf=function(e){var t;return!(!_(e)||!T(t=e.then))&&t},Hf=function(e,t){var r,n,a,i=t.value,o=1==t.state,s=o?e.ok:e.fail,d=e.resolve,c=e.reject,u=e.domain;try{s?(o||(2===t.rejection&&Jf(t),t.rejection=1),!0===s?r=i:(u&&u.enter(),r=s(i),u&&(u.exit(),a=!0)),r===e.promise?c(Ff("Promise-chain cycle")):(n=Gf(r))?h(n,r,d,c):d(r)):c(i)}catch(e){u&&!a&&u.exit(),c(e)}},Vf=function(e,t){e.notified||(e.notified=!0,pf((function(){for(var r,n=e.reactions;r=n.get();)Hf(r,e);e.notified=!1,t&&!e.rejection&&Kf(e)})))},$f=function(e,t,r){var n,a;Df?((n=Uf.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),d.dispatchEvent(n)):n={promise:t,reason:r},!Sf&&(a=d["on"+e])?a(n):"unhandledrejection"===e&&function(e,t){var r=d.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))}("Unhandled promise rejection",r)},Kf=function(e){h(jf,d,(function(){var t,r=e.facade,n=e.value;if(Yf(e)&&(t=ff((function(){_p?Wf.emit("unhandledRejection",n,r):$f("unhandledrejection",r,n)})),e.rejection=_p||Yf(e)?2:1,t.error))throw t.value}))},Yf=function(e){return 1!==e.rejection&&!e.parent},Jf=function(e){h(jf,d,(function(){var t=e.facade;_p?Wf.emit("rejectionHandled",t):$f("rejectionhandled",t,e.value)}))},Qf=function(e,t,r){return function(n){e(t,n,r)}},Xf=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,Vf(e,!0))},Zf=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw Ff("Promise can't be resolved itself");var n=Gf(t);n?pf((function(){var r={done:!1};try{h(n,t,Qf(Zf,r,e),Qf(Xf,r,e))}catch(t){Xf(r,t,e)}})):(e.value=t,e.state=1,Vf(e,!1))}catch(t){Xf({done:!1},t,e)}}};if(Of&&(Rf=(Af=function(e){Fi(this,Rf),J(e),h(vf,this);var t=_f(this);try{e(Qf(Zf,t),Qf(Xf,t))}catch(e){Xf(t,e)}}).prototype,(vf=function(e){Mf(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:new mf,rejection:!1,state:0,value:void 0})}).prototype=at(Rf,"then",(function(e,t){var r=_f(this),n=Lf(oh(this,Af));return r.parent=!0,n.ok=!T(e)||e,n.fail=T(t)&&t,n.domain=_p?Wf.domain:void 0,0==r.state?r.reactions.add(n):pf((function(){Hf(n,r)})),n.promise})),yf=function(){var e=new vf,t=_f(e);this.promise=e,this.resolve=Qf(Zf,t),this.reject=Qf(Xf,t)},Pf.f=Lf=function(e){return e===Af||void 0===e?new yf(e):Nf(e)},T(bf)&&Bf!==Object.prototype)){xf=Bf.then,Tf||at(Bf,"then",(function(e,t){var r=this;return new Af((function(e,t){h(xf,r,e,t)})).then(e,t)}),{unsafe:!0});try{delete Bf.constructor}catch(e){}di&&di(Bf,Rf)}Bt({global:!0,constructor:!0,wrap:!0,forced:Of},{Promise:Af}),hr(Af,"Promise",!1),Kg("Promise");var eI=TypeError,tI=function(e,t){this.stopped=e,this.result=t},rI=tI.prototype,nI=function(e,t,r){var n,a,i,o,s,d,c,u=r&&r.that,l=!(!r||!r.AS_ENTRIES),g=!(!r||!r.IS_RECORD),p=!(!r||!r.IS_ITERATOR),f=!(!r||!r.INTERRUPTED),I=fr(t,u),m=function(e){return n&&wd(n,"normal",e),new tI(!0,e)},b=function(e){return l?(je(e),f?I(e[0],e[1],m):I(e[0],e[1])):f?I(e,m):I(e)};if(g)n=e.iterator;else if(p)n=e;else{if(!(a=Wi(e)))throw eI(K(e)+" is not iterable");if(Ed(a)){for(i=0,o=pt(e);o>i;i++)if((s=b(e[i]))&&A(rI,s))return s;return new tI(!1)}n=Ni(e,a)}for(d=g?e.next:n.next;!(c=h(d,n)).done;){try{s=b(c.value)}catch(e){wd(n,"throw",e)}if("object"==typeof s&&s&&A(rI,s))return s}return new tI(!1)},aI=qf.CONSTRUCTOR||!wl((function(e){bf.all(e).then(void 0,(function(){}))}));Bt({target:"Promise",stat:!0,forced:aI},{all:function(e){var t=this,r=Pf.f(t),n=r.resolve,a=r.reject,i=ff((function(){var r=J(t.resolve),i=[],o=0,s=1;nI(e,(function(e){var d=o++,c=!1;s++,h(r,t,e).then((function(e){c||(c=!0,i[d]=e,--s||n(i))}),a)})),--s||n(i)}));return i.error&&a(i.value),r.promise}});var iI=qf.CONSTRUCTOR,oI=bf&&bf.prototype;if(Bt({target:"Promise",proto:!0,forced:iI,real:!0},{catch:function(e){return this.then(void 0,e)}}),T(bf)){var sI=B("Promise").prototype.catch;oI.catch!==sI&&at(oI,"catch",sI,{unsafe:!0})}Bt({target:"Promise",stat:!0,forced:aI},{race:function(e){var t=this,r=Pf.f(t),n=r.reject,a=ff((function(){var a=J(t.resolve);nI(e,(function(e){h(a,t,e).then(r.resolve,n)}))}));return a.error&&n(a.value),r.promise}}),Bt({target:"Promise",stat:!0,forced:qf.CONSTRUCTOR},{reject:function(e){var t=Pf.f(this);return h(t.reject,void 0,e),t.promise}});var dI=qf.CONSTRUCTOR;function cI(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function uI(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function lI(e){return function(e){if(Array.isArray(e))return uI(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return uI(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?uI(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}B("Promise"),Bt({target:"Promise",stat:!0,forced:dI},{resolve:function(e){return function(e,t){if(je(e),_(t)&&t.constructor===e)return t;var r=Pf.f(e);return(0,r.resolve)(t),r.promise}(this,e)}}),Bt({target:"Object",stat:!0},{fromEntries:function(e){var t={};return nI(e,(function(e,r){tr(t,e,r)}),{AS_ENTRIES:!0}),t}});var gI=["hint","redirectURI","usid"],hI=["hint","redirectURI","usid"],pI=["dnt","redirectURI","usid"];function fI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function II(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?fI(Object(r),!0).forEach((function(t){pa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fI(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var mI=Go?btoa:function(e){return Buffer.from(e).toString("base64")},bI=function(e){var t,r,n=new URL(e),a=new URLSearchParams(n.search),i=null!==(t=a.get("usid"))&&void 0!==t?t:"";return{code:null!==(r=a.get("code"))&&void 0!==r?r:"",usid:i}},kI=function(){return n=r(String(+new Date),{entropy:!0}),e(t,128,(function(e){return new Uint8Array(e).map((function(){return 256*n()}))}))();var n},vI=function(){var e=ua(Wa.mark((function e(t){var r,n,a,i,o,s,d;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=function(e){return e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")},n="",!Go||!window.crypto){e.next=12;break}return a=new TextEncoder,i=a.encode(t),e.next=7,window.crypto.subtle.digest("SHA-256",i);case 7:o=e.sent,s=btoa(String.fromCharCode.apply(String,lI(new Uint8Array(o)))),n=r(s),e.next=16;break;case 12:return e.next=14,import("crypto");case 14:d=e.sent,n=r(d.default.createHash("sha256").update(t).digest("base64"));case 16:if(0!==n.length){e.next=18;break}throw new Error("Problem generating code challenge");case 18:return e.abrupt("return",n);case 19:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();function yI(e){return xI.apply(this,arguments)}function xI(){return(xI=ua(Wa.mark((function e(t){var r,n,a,i,o,s,d,c,u,l,g,h,p,f,I,m;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.slasClient,a=t.codeVerifier,i=t.parameters,o=t.privateClient,s={},void 0!==o&&o){e.next=6;break}return e.next=5,vI(a);case 5:s.codeChallenge=e.sent;case 6:return(d=new Mu(n.clientConfig)).clientConfig.fetchOptions=II(II({},n.clientConfig.fetchOptions),{},{redirect:Go?"follow":"manual"}),c=i.hint,u=i.redirectURI,l=i.usid,g=cI(i,gI),h={parameters:II(II(II(II({},g),{},{client_id:n.clientConfig.parameters.clientId,channel_id:n.clientConfig.parameters.siteId},s.codeChallenge&&{code_challenge:s.codeChallenge}),c&&{hint:c}),{},{organizationId:n.clientConfig.parameters.organizationId,redirect_uri:u,response_type:"code"},l&&{usid:l})},e.next=12,d.authorizeCustomer(h,!0);case 12:if(p=e.sent,f=(null===(r=p.headers)||void 0===r?void 0:r.get("location"))||p.url,I=new URL(f),m=Object.fromEntries(I.searchParams.entries()),!(p.status>=400||m.error)){e.next=18;break}throw new hd(p);case 18:return e.abrupt("return",II({url:f},bI(f)));case 19:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function wI(){return(wI=ua(Wa.mark((function e(t){var r,n,a,i,o,s,d,c,u,l,g,h,p,f;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.slasClient,n=t.parameters,a=t.privateClient,i=void 0!==a&&a,o=n.hint,s=n.redirectURI,d=n.usid,c=cI(n,hI),u=kI(),l={},i){e.next=8;break}return e.next=7,vI(u);case 7:l.codeChallenge=e.sent;case 8:return g=Mu.apiPaths.authorizeCustomer,h={organizationId:r.clientConfig.parameters.organizationId,shortCode:r.clientConfig.parameters.shortCode},p=II(II(II({},c),{},{client_id:r.clientConfig.parameters.clientId,channel_id:r.clientConfig.parameters.siteId},l.codeChallenge&&{code_challenge:l.codeChallenge}),{},{hint:o,redirect_uri:s,response_type:"code"},d&&{usid:d}),f=new cu(g,r.clientConfig.baseUri,{pathParams:h,queryParams:p,origin:r.clientConfig.proxy}),e.abrupt("return",{url:f.toString(),codeVerifier:u});case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function zI(){return(zI=ua(Wa.mark((function e(t){var r,n,a,i,o,s,d;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.slasClient,n=t.credentials,a=t.parameters,i=!!n.clientSecret,o=II(II(II({client_id:r.clientConfig.parameters.clientId,channel_id:r.clientConfig.parameters.siteId,code:a.code,organizationId:r.clientConfig.parameters.organizationId},!i&&n.codeVerifier&&{code_verifier:n.codeVerifier}),{},{grant_type:i?"authorization_code":"authorization_code_pkce",redirect_uri:a.redirectURI},void 0!==a.dnt&&{dnt:a.dnt.toString()}),a.usid&&{usid:a.usid}),!n.clientSecret){e.next=7;break}return s="Basic ".concat(mI("".concat(r.clientConfig.parameters.clientId,":").concat(n.clientSecret))),d={headers:{Authorization:s},body:o},e.abrupt("return",r.getAccessToken(d));case 7:return e.abrupt("return",r.getAccessToken({body:o}));case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function CI(){return(CI=ua(Wa.mark((function e(t){var r,n,a,i,o;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.slasClient,n=t.parameters,a=t.credentials,r.clientConfig.parameters.siteId){e.next=3;break}throw new Error("Required argument channel_id is not provided through clientConfig.parameters.siteId");case 3:return i="Basic ".concat(mI("".concat(r.clientConfig.parameters.clientId,":").concat(a.clientSecret))),o={headers:{Authorization:i},body:II(II({grant_type:"client_credentials",channel_id:r.clientConfig.parameters.siteId},n.usid&&{usid:n.usid}),void 0!==n.dnt&&{dnt:n.dnt.toString()})},e.abrupt("return",r.getAccessToken(o));case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function qI(){return(qI=ua(Wa.mark((function e(t){var r,n,a,i,o,s,d,c,u;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.slasClient,n=t.parameters,a=kI(),i=n.dnt,o=n.redirectURI,s=n.usid,d=cI(n,pI),e.next=5,yI({slasClient:r,codeVerifier:a,parameters:II(II({},d),{},{redirectURI:o,hint:"guest"},s&&{usid:s}),privateClient:!1});case 5:return c=e.sent,u=II({client_id:r.clientConfig.parameters.clientId,channel_id:r.clientConfig.parameters.siteId,code:c.code,code_verifier:a,grant_type:"authorization_code_pkce",redirect_uri:o,usid:c.usid},void 0!==i&&{dnt:i.toString()}),e.abrupt("return",r.getAccessToken({body:u}));case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function EI(){return(EI=ua(Wa.mark((function e(t){var r,n,a,i,o,s,d,c,u,l,g,h,p,f,I,m,b,k,v,y,x;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.slasClient,a=t.credentials,i=t.parameters,o=t.body,s=kI(),e.next=4,vI(s);case 4:return d=e.sent,(c=new Mu(n.clientConfig)).clientConfig.fetchOptions=II(II({},n.clientConfig.fetchOptions),{},{redirect:Go?"follow":"manual"}),u="Basic ".concat(mI("".concat(a.username,":").concat(a.password))),l=i.dnt,g=i.usid,h=i.redirectURI,p={headers:{Authorization:u},parameters:{organizationId:n.clientConfig.parameters.organizationId},body:II(II({},o||{}),{},{redirect_uri:h,client_id:n.clientConfig.parameters.clientId,code_challenge:d,channel_id:n.clientConfig.parameters.siteId},g&&{usid:g})},e.next=12,c.authenticateCustomer(p,!0);case 12:if(f=e.sent,I=(null===(r=f.headers)||void 0===r?void 0:r.get("location"))||f.url,m=new URL(I),b=Object.fromEntries(m.searchParams.entries()),!(f.status>=400||b.error)){e.next=18;break}throw new hd(f);case 18:if(k=bI(I),v=II({client_id:n.clientConfig.parameters.clientId,channel_id:n.clientConfig.parameters.siteId,code:k.code,code_verifier:s,grant_type:"authorization_code_pkce",organizationId:n.clientConfig.parameters.organizationId,redirect_uri:i.redirectURI,usid:k.usid},void 0!==l&&{dnt:l.toString()}),!a.clientSecret){e.next=24;break}return y="Basic ".concat(mI("".concat(n.clientConfig.parameters.clientId,":").concat(a.clientSecret))),x={headers:{Authorization:y},body:v},e.abrupt("return",n.getAccessToken(x));case 24:return e.abrupt("return",n.getAccessToken({body:v}));case 25:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function PI(){return(PI=ua(Wa.mark((function e(t){var r,n,a,i,o;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.slasClient,n=t.credentials,a=t.parameters,n.clientSecret){e.next=3;break}throw new Error("Required argument client secret is not provided");case 3:if(r.clientConfig.parameters.siteId){e.next=5;break}throw new Error("Required argument channel_id is not provided through clientConfig.parameters.siteId");case 5:if(a.mode){e.next=7;break}throw new Error("Required argument mode is not provided through parameters");case 7:if(a.userid){e.next=9;break}throw new Error("Required argument userid is not provided through parameters");case 9:return i="Basic ".concat(mI("".concat(r.clientConfig.parameters.clientId,":").concat(n.clientSecret))),o=II(II(II({user_id:a.userid,mode:a.mode},a.locale&&{locale:a.locale}),a.usid&&{usid:a.usid}),{},{channel_id:r.clientConfig.parameters.siteId},a.callbackURI&&{callback_uri:a.callbackURI}),e.abrupt("return",r.authorizePasswordlessCustomer({headers:{Authorization:i},parameters:{organizationId:r.clientConfig.parameters.organizationId},body:o},!0));case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function jI(){return(jI=ua(Wa.mark((function e(t){var r,n,a,i,o,s;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.slasClient,n=t.credentials,a=t.parameters,n.clientSecret){e.next=3;break}throw new Error("Required argument client secret is not provided");case 3:if(r.clientConfig.parameters.organizationId){e.next=5;break}throw new Error("Required argument organizationId is not provided through clientConfig.parameters.organizationId");case 5:if(a.pwdlessLoginToken){e.next=7;break}throw new Error("Required argument pwdlessLoginToken is not provided through parameters");case 7:return i=kI(),o="Basic ".concat(mI("".concat(r.clientConfig.parameters.clientId,":").concat(n.clientSecret))),s=II({grant_type:"client_credentials",hint:"pwdless_login",pwdless_login_token:a.pwdlessLoginToken,code_verifier:i},a.dnt&&{dnt:a.dnt}),e.abrupt("return",r.getPasswordLessAccessToken({headers:{Authorization:o},parameters:{organizationId:r.clientConfig.parameters.organizationId},body:s}));case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var OI=Sr.find,SI=!0;"find"in[]&&Array(1).find((function(){SI=!1})),Bt({target:"Array",proto:!0,forced:SI},{find:function(e){return OI(this,e,arguments.length>1?arguments[1]:void 0)}}),$a("find");function TI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _I(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?TI(Object(r),!0).forEach((function(t){pa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):TI(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var MI=function(e){var t=!1;return e&&(t=Boolean(Object.keys(e).find((function(e){return"content-type"===e.toLowerCase()})))),t},BI=function(){var e=ua(Wa.mark((function e(t){var r,n,a,i,o,s,d,c,u,l,g,h;return Wa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.options,i=t.clientConfig,o=t.rawResponse,s=["apiName","endpointPath","organizationId","shortCode"],d=_I(_I({},i.parameters),null==a?void 0:a.customApiPathParameters),s.forEach((function(e){if(!d[e])throw new Error("Missing required property needed in options.customApiPathParameters or clientConfig.parameters: ".concat(e))})),d.apiVersion||(d.apiVersion="v1"),c=i,i.baseUri||(c=_I(_I({},i),{},{baseUri:"https://{shortCode}.api.commercecloud.salesforce.com/custom/{apiName}/{apiVersion}"})),u=Boolean(!(null!==(r=a.parameters)&&void 0!==r&&r.siteId)&&(null==i||null===(n=i.parameters)||void 0===n?void 0:n.siteId)),l=MI(a.headers)||MI(c.headers),g=a,l&&!u||(g=_I(_I({},a),{},{headers:_I(_I({},a.headers),!l&&{"Content-Type":"application/json"}),parameters:_I(_I({},a.parameters),u&&{siteId:i.parameters.siteId})})),h=new cu("/organizations/{organizationId}/{endpointPath}",c.baseUri,{pathParams:d,queryParams:g.parameters,origin:c.proxy}),e.abrupt("return",md(h.toString(),g,c,o));case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),AI=Object.freeze({__proto__:null,isBrowser:Go,isNode:Ho,globalObject:Vo,hasFetchAvailable:$o,fetch:Ko,stringToBase64:mI,getCodeAndUsidFromUrl:bI,createCodeVerifier:kI,generateCodeChallenge:vI,authorize:yI,authorizeIDP:function(e){return wI.apply(this,arguments)},loginIDPUser:function(e){return zI.apply(this,arguments)},loginGuestUserPrivate:function(e){return CI.apply(this,arguments)},loginGuestUser:function(e){return qI.apply(this,arguments)},loginRegisteredUserB2C:function(e){return EI.apply(this,arguments)},authorizePasswordless:function(e){return PI.apply(this,arguments)},getPasswordLessAccessToken:function(e){return jI.apply(this,arguments)},refreshAccessToken:function(e){var t=e.slasClient,r=e.parameters,n=e.credentials,a=II({grant_type:"refresh_token",refresh_token:r.refreshToken,client_id:t.clientConfig.parameters.clientId,channel_id:t.clientConfig.parameters.siteId},void 0!==r.dnt&&{dnt:r.dnt.toString()});if(n&&n.clientSecret){var i={headers:{Authorization:"Basic ".concat(mI("".concat(t.clientConfig.parameters.clientId,":").concat(n.clientSecret)))},body:a};return t.getAccessToken(i)}return t.getAccessToken({body:a})},logout:function(e){var t=e.slasClient,r=e.parameters;return t.logoutCustomer({headers:{Authorization:"Bearer ".concat(r.accessToken)},parameters:{refresh_token:r.refreshToken,client_id:t.clientConfig.parameters.clientId,channel_id:t.clientConfig.parameters.siteId}})},callCustomEndpoint:BI,doFetch:md,encodeSCAPISpecialCharacters:function(e){return e.replace(/%/g,"%25").replace(/,/g,"%2C")}});export{Wo as ClientConfig,hu as ShopperBaskets,Iu as ShopperBasketsV2,ku as ShopperConsents,xu as ShopperContexts,Cu as ShopperCustomers,Pu as ShopperExperience,Su as ShopperGiftCertificates,Mu as ShopperLogin,Ru as ShopperOrders,Wu as ShopperProducts,Du as ShopperPromotions,cl as ShopperSEO,ol as ShopperSearch,gl as ShopperStores,cu as TemplateURL,AI as helpers};
|