commerce-sdk-isomorphic 1.6.0 → 1.7.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/lib/index.cjs.js CHANGED
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("cross-fetch"),require("nanoid")):"function"==typeof define&&define.amd?define(["exports","cross-fetch","nanoid"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).CommerceSdk={},e.crossFetch,e.nanoid)}(this,(function(e,t,r){"use strict";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},c=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")(),d=function(e){try{return!!e()}catch(e){return!0}},u=!d((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),f=!d((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),h=Function.prototype.call,p=f?h.bind(h):function(){return h.apply(h,arguments)},l={}.propertyIsEnumerable,g=Object.getOwnPropertyDescriptor,b={f:g&&!l.call({1:2},1)?function(e){var t=g(this,e);return!!t&&t.enumerable}:l},v=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},I=Function.prototype,m=I.bind,x=I.call,k=f&&m.bind(x,x),w=f?function(e){return e&&k(e)}:function(e){return e&&function(){return x.apply(e,arguments)}},y=w({}.toString),C=w("".slice),z=function(e){return C(y(e),8,-1)},O=c.Object,q=w("".split),E=d((function(){return!O("z").propertyIsEnumerable(0)}))?function(e){return"String"==z(e)?q(e,""):O(e)}:O,P=c.TypeError,S=function(e){if(null==e)throw P("Can't call method on "+e);return e},R=function(e){return E(S(e))},j=function(e){return"function"==typeof e},M=function(e){return"object"==typeof e?null!==e:j(e)},T=function(e){return j(e)?e:void 0},U=function(e,t){return arguments.length<2?T(c[e]):c[e]&&c[e][t]},A=w({}.isPrototypeOf),B=U("navigator","userAgent")||"",N=c.process,_=c.Deno,L=N&&N.versions||_&&_.version,D=L&&L.v8;D&&(o=(a=D.split("."))[0]>0&&a[0]<4?1:+(a[0]+a[1])),!o&&B&&(!(a=B.match(/Edge\/(\d+)/))||a[1]>=74)&&(a=B.match(/Chrome\/(\d+)/))&&(o=+a[1]);var J=o,F=!!Object.getOwnPropertySymbols&&!d((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&J&&J<41})),G=F&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,H=c.Object,Y=G?function(e){return"symbol"==typeof e}:function(e){var t=U("Symbol");return j(t)&&A(t.prototype,H(e))},V=c.String,W=function(e){try{return V(e)}catch(e){return"Object"}},$=c.TypeError,K=function(e){if(j(e))return e;throw $(W(e)+" is not a function")},Q=function(e,t){var r=e[t];return null==r?void 0:K(r)},X=c.TypeError,Z=Object.defineProperty,ee=function(e,t){try{Z(c,e,{value:t,configurable:!0,writable:!0})}catch(r){c[e]=t}return t},te=c["__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.20.3",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.20.3/LICENSE",source:"https://github.com/zloirock/core-js"})})),ne=c.Object,ie=function(e){return ne(S(e))},ae=w({}.hasOwnProperty),oe=Object.hasOwn||function(e,t){return ae(ie(e),t)},se=0,ce=Math.random(),de=w(1..toString),ue=function(e){return"Symbol("+(void 0===e?"":e)+")_"+de(++se+ce,36)},fe=re("wks"),he=c.Symbol,pe=he&&he.for,le=G?he:he&&he.withoutSetter||ue,ge=function(e){if(!oe(fe,e)||!F&&"string"!=typeof fe[e]){var t="Symbol."+e;F&&oe(he,e)?fe[e]=he[e]:fe[e]=G&&pe?pe(t):le(t)}return fe[e]},be=c.TypeError,ve=ge("toPrimitive"),Ie=function(e,t){if(!M(e)||Y(e))return e;var r,n=Q(e,ve);if(n){if(void 0===t&&(t="default"),r=p(n,e,t),!M(r)||Y(r))return r;throw be("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var r,n;if("string"===t&&j(r=e.toString)&&!M(n=p(r,e)))return n;if(j(r=e.valueOf)&&!M(n=p(r,e)))return n;if("string"!==t&&j(r=e.toString)&&!M(n=p(r,e)))return n;throw X("Can't convert object to primitive value")}(e,t)},me=function(e){var t=Ie(e,"string");return Y(t)?t:t+""},xe=c.document,ke=M(xe)&&M(xe.createElement),we=function(e){return ke?xe.createElement(e):{}},ye=!u&&!d((function(){return 7!=Object.defineProperty(we("div"),"a",{get:function(){return 7}}).a})),Ce=Object.getOwnPropertyDescriptor,ze={f:u?Ce:function(e,t){if(e=R(e),t=me(t),ye)try{return Ce(e,t)}catch(e){}if(oe(e,t))return v(!p(b.f,e,t),e[t])}},Oe=u&&d((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),qe=c.String,Ee=c.TypeError,Pe=function(e){if(M(e))return e;throw Ee(qe(e)+" is not an object")},Se=c.TypeError,Re=Object.defineProperty,je=Object.getOwnPropertyDescriptor,Me={f:u?Oe?function(e,t,r){if(Pe(e),t=me(t),Pe(r),"function"==typeof e&&"prototype"===t&&"value"in r&&"writable"in r&&!r.writable){var n=je(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 Re(e,t,r)}:Re:function(e,t,r){if(Pe(e),t=me(t),Pe(r),ye)try{return Re(e,t,r)}catch(e){}if("get"in r||"set"in r)throw Se("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},Te=u?function(e,t,r){return Me.f(e,t,v(1,r))}:function(e,t,r){return e[t]=r,e},Ue=w(Function.toString);j(te.inspectSource)||(te.inspectSource=function(e){return Ue(e)});var Ae,Be,Ne,_e=te.inspectSource,Le=c.WeakMap,De=j(Le)&&/native code/.test(_e(Le)),Je=re("keys"),Fe=function(e){return Je[e]||(Je[e]=ue(e))},Ge={},He=c.TypeError,Ye=c.WeakMap;if(De||te.state){var Ve=te.state||(te.state=new Ye),We=w(Ve.get),$e=w(Ve.has),Ke=w(Ve.set);Ae=function(e,t){if($e(Ve,e))throw new He("Object already initialized");return t.facade=e,Ke(Ve,e,t),t},Be=function(e){return We(Ve,e)||{}},Ne=function(e){return $e(Ve,e)}}else{var Qe=Fe("state");Ge[Qe]=!0,Ae=function(e,t){if(oe(e,Qe))throw new He("Object already initialized");return t.facade=e,Te(e,Qe,t),t},Be=function(e){return oe(e,Qe)?e[Qe]:{}},Ne=function(e){return oe(e,Qe)}}var Xe={set:Ae,get:Be,has:Ne,enforce:function(e){return Ne(e)?Be(e):Ae(e,{})},getterFor:function(e){return function(t){var r;if(!M(t)||(r=Be(t)).type!==e)throw He("Incompatible receiver, "+e+" required");return r}}},Ze=Function.prototype,et=u&&Object.getOwnPropertyDescriptor,tt=oe(Ze,"name"),rt={EXISTS:tt,PROPER:tt&&"something"===function(){}.name,CONFIGURABLE:tt&&(!u||u&&et(Ze,"name").configurable)},nt=i((function(e){var t=rt.CONFIGURABLE,r=Xe.get,n=Xe.enforce,i=String(String).split("String");(e.exports=function(e,r,a,o){var s,d=!!o&&!!o.unsafe,u=!!o&&!!o.enumerable,f=!!o&&!!o.noTargetGet,h=o&&void 0!==o.name?o.name:r;j(a)&&("Symbol("===String(h).slice(0,7)&&(h="["+String(h).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!oe(a,"name")||t&&a.name!==h)&&Te(a,"name",h),(s=n(a)).source||(s.source=i.join("string"==typeof h?h:""))),e!==c?(d?!f&&e[r]&&(u=!0):delete e[r],u?e[r]=a:Te(e,r,a)):u?e[r]=a:ee(r,a)})(Function.prototype,"toString",(function(){return j(this)&&r(this).source||_e(this)}))})),it=Math.ceil,at=Math.floor,ot=function(e){var t=+e;return t!=t||0===t?0:(t>0?at:it)(t)},st=Math.max,ct=Math.min,dt=function(e,t){var r=ot(e);return r<0?st(r+t,0):ct(r,t)},ut=Math.min,ft=function(e){return e>0?ut(ot(e),9007199254740991):0},ht=function(e){return ft(e.length)},pt=function(e){return function(t,r,n){var i,a=R(t),o=ht(a),s=dt(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}},lt={includes:pt(!0),indexOf:pt(!1)},gt=lt.indexOf,bt=w([].push),vt=function(e,t){var r,n=R(e),i=0,a=[];for(r in n)!oe(Ge,r)&&oe(n,r)&&bt(a,r);for(;t.length>i;)oe(n,r=t[i++])&&(~gt(a,r)||bt(a,r));return a},It=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],mt=It.concat("length","prototype"),xt={f:Object.getOwnPropertyNames||function(e){return vt(e,mt)}},kt={f:Object.getOwnPropertySymbols},wt=w([].concat),yt=U("Reflect","ownKeys")||function(e){var t=xt.f(Pe(e)),r=kt.f;return r?wt(t,r(e)):t},Ct=function(e,t,r){for(var n=yt(t),i=Me.f,a=ze.f,o=0;o<n.length;o++){var s=n[o];oe(e,s)||r&&oe(r,s)||i(e,s,a(t,s))}},zt=/#|\.prototype\./,Ot=function(e,t){var r=Et[qt(e)];return r==St||r!=Pt&&(j(t)?d(t):!!t)},qt=Ot.normalize=function(e){return String(e).replace(zt,".").toLowerCase()},Et=Ot.data={},Pt=Ot.NATIVE="N",St=Ot.POLYFILL="P",Rt=Ot,jt=ze.f,Mt=function(e,t){var r,n,i,a,o,s=e.target,d=e.global,u=e.stat;if(r=d?c:u?c[s]||ee(s,{}):(c[s]||{}).prototype)for(n in t){if(a=t[n],i=e.noTargetGet?(o=jt(r,n))&&o.value:r[n],!Rt(d?n:s+(u?".":"#")+n,e.forced)&&void 0!==i){if(typeof a==typeof i)continue;Ct(a,i)}(e.sham||i&&i.sham)&&Te(a,"sham",!0),nt(r,n,a,e)}},Tt=Object.keys||function(e){return vt(e,It)},Ut=d((function(){Tt(1)}));Mt({target:"Object",stat:!0,forced:Ut},{keys:function(e){return Tt(ie(e))}});var At=Function.prototype,Bt=At.apply,Nt=At.call,_t="object"==typeof Reflect&&Reflect.apply||(f?Nt.bind(Bt):function(){return Nt.apply(Bt,arguments)}),Lt=Array.isArray||function(e){return"Array"==z(e)},Dt={};Dt[ge("toStringTag")]="z";var Jt,Ft="[object z]"===String(Dt),Gt=ge("toStringTag"),Ht=c.Object,Yt="Arguments"==z(function(){return arguments}()),Vt=Ft?z: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=Ht(e),Gt))?r:Yt?z(t):"Object"==(n=z(t))&&j(t.callee)?"Arguments":n},Wt=c.String,$t=function(e){if("Symbol"===Vt(e))throw TypeError("Cannot convert a Symbol value to a string");return Wt(e)},Kt={f:u&&!Oe?Object.defineProperties:function(e,t){Pe(e);for(var r,n=R(t),i=Tt(t),a=i.length,o=0;a>o;)Me.f(e,r=i[o++],n[r]);return e}},Qt=U("document","documentElement"),Xt=Fe("IE_PROTO"),Zt=function(){},er=function(e){return"<script>"+e+"<\/script>"},tr=function(e){e.write(er("")),e.close();var t=e.parentWindow.Object;return e=null,t},rr=function(){try{Jt=new ActiveXObject("htmlfile")}catch(e){}var e,t;rr="undefined"!=typeof document?document.domain&&Jt?tr(Jt):((t=we("iframe")).style.display="none",Qt.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(er("document.F=Object")),e.close(),e.F):tr(Jt);for(var r=It.length;r--;)delete rr.prototype[It[r]];return rr()};Ge[Xt]=!0;var nr=Object.create||function(e,t){var r;return null!==e?(Zt.prototype=Pe(e),r=new Zt,Zt.prototype=null,r[Xt]=e):r=rr(),void 0===t?r:Kt.f(r,t)},ir=function(e,t,r){var n=me(t);n in e?Me.f(e,n,v(0,r)):e[n]=r},ar=c.Array,or=Math.max,sr=function(e,t,r){for(var n=ht(e),i=dt(t,n),a=dt(void 0===r?n:r,n),o=ar(or(a-i,0)),s=0;i<a;i++,s++)ir(o,s,e[i]);return o.length=s,o},cr=xt.f,dr="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],ur={f:function(e){return dr&&"Window"==z(e)?function(e){try{return cr(e)}catch(e){return sr(dr)}}(e):cr(R(e))}},fr=w([].slice),hr={f:ge},pr=c,lr=Me.f,gr=Me.f,br=ge("toStringTag"),vr=function(e,t,r){e&&!r&&(e=e.prototype),e&&!oe(e,br)&&gr(e,br,{configurable:!0,value:t})},Ir=w(w.bind),mr=function(e,t){return K(e),void 0===t?e:f?Ir(e,t):function(){return e.apply(t,arguments)}},xr=function(){},kr=[],wr=U("Reflect","construct"),yr=/^\s*(?:class|function)\b/,Cr=w(yr.exec),zr=!yr.exec(xr),Or=function(e){if(!j(e))return!1;try{return wr(xr,kr,e),!0}catch(e){return!1}},qr=function(e){if(!j(e))return!1;switch(Vt(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return zr||!!Cr(yr,_e(e))}catch(e){return!0}};qr.sham=!0;var Er=!wr||d((function(){var e;return Or(Or.call)||!Or(Object)||!Or((function(){e=!0}))||e}))?qr:Or,Pr=ge("species"),Sr=c.Array,Rr=function(e,t){return new(function(e){var t;return Lt(e)&&(t=e.constructor,(Er(t)&&(t===Sr||Lt(t.prototype))||M(t)&&null===(t=t[Pr]))&&(t=void 0)),void 0===t?Sr:t}(e))(0===t?0:t)},jr=w([].push),Mr=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(c,d,u,f){for(var h,p,l=ie(c),g=E(l),b=mr(d,u),v=ht(g),I=0,m=f||Rr,x=t?m(c,v):r||o?m(c,0):void 0;v>I;I++)if((s||I in g)&&(p=b(h=g[I],I,l),e))if(t)x[I]=p;else if(p)switch(e){case 3:return!0;case 5:return h;case 6:return I;case 2:jr(x,h)}else switch(e){case 4:return!1;case 7:jr(x,h)}return a?-1:n||i?i:x}},Tr={forEach:Mr(0),map:Mr(1),filter:Mr(2),some:Mr(3),every:Mr(4),find:Mr(5),findIndex:Mr(6),filterReject:Mr(7)},Ur=Tr.forEach,Ar=Fe("hidden"),Br=ge("toPrimitive"),Nr=Xe.set,_r=Xe.getterFor("Symbol"),Lr=Object.prototype,Dr=c.Symbol,Jr=Dr&&Dr.prototype,Fr=c.TypeError,Gr=c.QObject,Hr=U("JSON","stringify"),Yr=ze.f,Vr=Me.f,Wr=ur.f,$r=b.f,Kr=w([].push),Qr=re("symbols"),Xr=re("op-symbols"),Zr=re("string-to-symbol-registry"),en=re("symbol-to-string-registry"),tn=re("wks"),rn=!Gr||!Gr.prototype||!Gr.prototype.findChild,nn=u&&d((function(){return 7!=nr(Vr({},"a",{get:function(){return Vr(this,"a",{value:7}).a}})).a}))?function(e,t,r){var n=Yr(Lr,t);n&&delete Lr[t],Vr(e,t,r),n&&e!==Lr&&Vr(Lr,t,n)}:Vr,an=function(e,t){var r=Qr[e]=nr(Jr);return Nr(r,{type:"Symbol",tag:e,description:t}),u||(r.description=t),r},on=function(e,t,r){e===Lr&&on(Xr,t,r),Pe(e);var n=me(t);return Pe(r),oe(Qr,n)?(r.enumerable?(oe(e,Ar)&&e[Ar][n]&&(e[Ar][n]=!1),r=nr(r,{enumerable:v(0,!1)})):(oe(e,Ar)||Vr(e,Ar,v(1,{})),e[Ar][n]=!0),nn(e,n,r)):Vr(e,n,r)},sn=function(e,t){Pe(e);var r=R(t),n=Tt(r).concat(fn(r));return Ur(n,(function(t){u&&!p(cn,r,t)||on(e,t,r[t])})),e},cn=function(e){var t=me(e),r=p($r,this,t);return!(this===Lr&&oe(Qr,t)&&!oe(Xr,t))&&(!(r||!oe(this,t)||!oe(Qr,t)||oe(this,Ar)&&this[Ar][t])||r)},dn=function(e,t){var r=R(e),n=me(t);if(r!==Lr||!oe(Qr,n)||oe(Xr,n)){var i=Yr(r,n);return!i||!oe(Qr,n)||oe(r,Ar)&&r[Ar][n]||(i.enumerable=!0),i}},un=function(e){var t=Wr(R(e)),r=[];return Ur(t,(function(e){oe(Qr,e)||oe(Ge,e)||Kr(r,e)})),r},fn=function(e){var t=e===Lr,r=Wr(t?Xr:R(e)),n=[];return Ur(r,(function(e){!oe(Qr,e)||t&&!oe(Lr,e)||Kr(n,Qr[e])})),n};if(F||(Jr=(Dr=function(){if(A(Jr,this))throw Fr("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?$t(arguments[0]):void 0,t=ue(e),r=function(e){this===Lr&&p(r,Xr,e),oe(this,Ar)&&oe(this[Ar],t)&&(this[Ar][t]=!1),nn(this,t,v(1,e))};return u&&rn&&nn(Lr,t,{configurable:!0,set:r}),an(t,e)}).prototype,nt(Jr,"toString",(function(){return _r(this).tag})),nt(Dr,"withoutSetter",(function(e){return an(ue(e),e)})),b.f=cn,Me.f=on,Kt.f=sn,ze.f=dn,xt.f=ur.f=un,kt.f=fn,hr.f=function(e){return an(ge(e),e)},u&&(Vr(Jr,"description",{configurable:!0,get:function(){return _r(this).description}}),nt(Lr,"propertyIsEnumerable",cn,{unsafe:!0}))),Mt({global:!0,wrap:!0,forced:!F,sham:!F},{Symbol:Dr}),Ur(Tt(tn),(function(e){!function(e){var t=pr.Symbol||(pr.Symbol={});oe(t,e)||lr(t,e,{value:hr.f(e)})}(e)})),Mt({target:"Symbol",stat:!0,forced:!F},{for:function(e){var t=$t(e);if(oe(Zr,t))return Zr[t];var r=Dr(t);return Zr[t]=r,en[r]=t,r},keyFor:function(e){if(!Y(e))throw Fr(e+" is not a symbol");if(oe(en,e))return en[e]},useSetter:function(){rn=!0},useSimple:function(){rn=!1}}),Mt({target:"Object",stat:!0,forced:!F,sham:!u},{create:function(e,t){return void 0===t?nr(e):sn(nr(e),t)},defineProperty:on,defineProperties:sn,getOwnPropertyDescriptor:dn}),Mt({target:"Object",stat:!0,forced:!F},{getOwnPropertyNames:un,getOwnPropertySymbols:fn}),Mt({target:"Object",stat:!0,forced:d((function(){kt.f(1)}))},{getOwnPropertySymbols:function(e){return kt.f(ie(e))}}),Hr){var hn=!F||d((function(){var e=Dr();return"[null]"!=Hr([e])||"{}"!=Hr({a:e})||"{}"!=Hr(Object(e))}));Mt({target:"JSON",stat:!0,forced:hn},{stringify:function(e,t,r){var n=fr(arguments),i=t;if((M(t)||void 0!==e)&&!Y(e))return Lt(t)||(t=function(e,t){if(j(i)&&(t=p(i,this,e,t)),!Y(t))return t}),n[1]=t,_t(Hr,null,n)}})}if(!Jr[Br]){var pn=Jr.valueOf;nt(Jr,Br,(function(e){return p(pn,this)}))}vr(Dr,"Symbol"),Ge[Ar]=!0;var ln=ge("species"),gn=function(e){return J>=51||!d((function(){var t=[];return(t.constructor={})[ln]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},bn=Tr.filter,vn=gn("filter");Mt({target:"Array",proto:!0,forced:!vn},{filter:function(e){return bn(this,e,arguments.length>1?arguments[1]:void 0)}});var In=Ft?{}.toString:function(){return"[object "+Vt(this)+"]"};Ft||nt(Object.prototype,"toString",In,{unsafe:!0});var mn=ze.f,xn=d((function(){mn(1)}));Mt({target:"Object",stat:!0,forced:!u||xn,sham:!u},{getOwnPropertyDescriptor:function(e,t){return mn(R(e),t)}});var kn={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},wn=we("span").classList,yn=wn&&wn.constructor&&wn.constructor.prototype,Cn=yn===Object.prototype?void 0:yn,zn=function(e,t){var r=[][e];return!!r&&d((function(){r.call(null,t||function(){throw 1},1)}))},On=Tr.forEach,qn=zn("forEach")?[].forEach:function(e){return On(this,e,arguments.length>1?arguments[1]:void 0)},En=function(e){if(e&&e.forEach!==qn)try{Te(e,"forEach",qn)}catch(t){e.forEach=qn}};for(var Pn in kn)kn[Pn]&&En(c[Pn]&&c[Pn].prototype);En(Cn),Mt({target:"Object",stat:!0,sham:!u},{getOwnPropertyDescriptors:function(e){for(var t,r,n=R(e),i=ze.f,a=yt(n),o={},s=0;a.length>s;)void 0!==(r=i(n,t=a[s++]))&&ir(o,t,r);return o}});var Sn=Kt.f;Mt({target:"Object",stat:!0,forced:Object.defineProperties!==Sn,sham:!u},{defineProperties:Sn});var Rn=Me.f;Mt({target:"Object",stat:!0,forced:Object.defineProperty!==Rn,sham:!u},{defineProperty:Rn});var jn=w([].join),Mn=E!=Object,Tn=zn("join",",");Mt({target:"Array",proto:!0,forced:Mn||!Tn},{join:function(e){return jn(R(this),void 0===e?",":e)}});var Un=function(){var e=Pe(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},An=rt.PROPER,Bn=RegExp.prototype,Nn=Bn.toString,_n=w(Un),Ln=d((function(){return"/a/b"!=Nn.call({source:"a",flags:"b"})})),Dn=An&&"toString"!=Nn.name;function Jn(e,t,r,n,i,a,o){try{var s=e[a](o),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,i)}function Fn(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function o(e){Jn(a,n,i,o,s,"next",e)}function s(e){Jn(a,n,i,o,s,"throw",e)}o(void 0)}))}}function Gn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Hn(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 Yn(e,t,r){return t&&Hn(e.prototype,t),r&&Hn(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Vn(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}(Ln||Dn)&&nt(RegExp.prototype,"toString",(function(){var e=Pe(this),t=$t(e.source),r=e.flags;return"/"+t+"/"+$t(void 0===r&&A(Bn,e)&&!("flags"in Bn)?_n(e):r)}),{unsafe:!0});var Wn=Object.prototype,$n=Wn.hasOwnProperty,Kn="function"==typeof Symbol?Symbol:{},Qn=Kn.iterator||"@@iterator",Xn=Kn.asyncIterator||"@@asyncIterator",Zn=Kn.toStringTag||"@@toStringTag";function ei(e,t,r,n){var i=t&&t.prototype instanceof ni?t:ni,a=Object.create(i.prototype),o=new bi(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 Ii()}for(r.method=i,r.arg=a;;){var o=r.delegate;if(o){var s=pi(o,r);if(s){if(s===ri)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 c=ti(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===ri)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}(e,r,o),a}function ti(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}var ri={};function ni(){}function ii(){}function ai(){}var oi={};oi[Qn]=function(){return this};var si=Object.getPrototypeOf,ci=si&&si(si(vi([])));ci&&ci!==Wn&&$n.call(ci,Qn)&&(oi=ci);var di=ai.prototype=ni.prototype=Object.create(oi);function ui(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function fi(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===ii||"GeneratorFunction"===(t.displayName||t.name))}function hi(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=ti(e[n],e,i);if("throw"!==s.type){var c=s.arg,d=c.value;return d&&"object"==typeof d&&$n.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,a,o)}),(function(e){r("throw",e,a,o)})):t.resolve(d).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,o)}))}o(s.arg)}(n,i,r,a)}))}return r=r?r.then(a,a):a()}}function pi(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,pi(e,t),"throw"===t.method))return ri;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return ri}var n=ti(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,ri;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,ri):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,ri)}function li(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 gi(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function bi(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(li,this),this.reset(!0)}function vi(e){if(e){var t=e[Qn];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($n.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:Ii}}function Ii(){return{value:void 0,done:!0}}ii.prototype=di.constructor=ai,ai.constructor=ii,ai[Zn]=ii.displayName="GeneratorFunction",ui(hi.prototype),hi.prototype[Xn]=function(){return this},ui(di),di[Zn]="Generator",di[Qn]=function(){return this},di.toString=function(){return"[object Generator]"},bi.prototype={constructor:bi,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(gi),!e)for(var t in this)"t"===t.charAt(0)&&$n.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=$n.call(i,"catchLoc"),s=$n.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&&$n.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,ri):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),ri},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),gi(r),ri}},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;gi(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:vi(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),ri}};var mi={wrap:ei,isGeneratorFunction:fi,AsyncIterator:hi,mark:function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,ai):(e.__proto__=ai,Zn in e||(e[Zn]="GeneratorFunction")),e.prototype=Object.create(di),e},awrap:function(e){return{__await:e}},async:function(e,t,r,n,i){void 0===i&&(i=Promise);var a=new hi(ei(e,t,r,n),i);return fi(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:vi},xi=ge("unscopables"),ki=Array.prototype;null==ki[xi]&&Me.f(ki,xi,{configurable:!0,value:nr(null)});var wi,yi,Ci,zi=function(e){ki[xi][e]=!0},Oi={},qi=!d((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Ei=Fe("IE_PROTO"),Pi=c.Object,Si=Pi.prototype,Ri=qi?Pi.getPrototypeOf:function(e){var t=ie(e);if(oe(t,Ei))return t[Ei];var r=t.constructor;return j(r)&&t instanceof r?r.prototype:t instanceof Pi?Si:null},ji=ge("iterator"),Mi=!1;[].keys&&("next"in(Ci=[].keys())?(yi=Ri(Ri(Ci)))!==Object.prototype&&(wi=yi):Mi=!0),(null==wi||d((function(){var e={};return wi[ji].call(e)!==e})))&&(wi={}),j(wi[ji])||nt(wi,ji,(function(){return this}));var Ti={IteratorPrototype:wi,BUGGY_SAFARI_ITERATORS:Mi},Ui=Ti.IteratorPrototype,Ai=function(){return this},Bi=function(e,t,r,n){var i=t+" Iterator";return e.prototype=nr(Ui,{next:v(+!n,r)}),vr(e,i,!1),Oi[i]=Ai,e},Ni=c.String,_i=c.TypeError,Li=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=w(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),t=r instanceof Array}catch(e){}return function(r,n){return Pe(r),function(e){if("object"==typeof e||j(e))return e;throw _i("Can't set "+Ni(e)+" as a prototype")}(n),t?e(r,n):r.__proto__=n,r}}():void 0),Di=rt.PROPER,Ji=rt.CONFIGURABLE,Fi=Ti.IteratorPrototype,Gi=Ti.BUGGY_SAFARI_ITERATORS,Hi=ge("iterator"),Yi=function(){return this},Vi=function(e,t,r,n,i,a,o){Bi(r,t,n);var s,c,d,u=function(e){if(e===i&&b)return b;if(!Gi&&e in l)return l[e];switch(e){case"keys":case"values":case"entries":return function(){return new r(this,e)}}return function(){return new r(this)}},f=t+" Iterator",h=!1,l=e.prototype,g=l[Hi]||l["@@iterator"]||i&&l[i],b=!Gi&&g||u(i),v="Array"==t&&l.entries||g;if(v&&(s=Ri(v.call(new e)))!==Object.prototype&&s.next&&(Ri(s)!==Fi&&(Li?Li(s,Fi):j(s[Hi])||nt(s,Hi,Yi)),vr(s,f,!0)),Di&&"values"==i&&g&&"values"!==g.name&&(Ji?Te(l,"name","values"):(h=!0,b=function(){return p(g,this)})),i)if(c={values:u("values"),keys:a?b:u("keys"),entries:u("entries")},o)for(d in c)(Gi||h||!(d in l))&&nt(l,d,c[d]);else Mt({target:t,proto:!0,forced:Gi||h},c);return l[Hi]!==b&&nt(l,Hi,b,{name:i}),Oi[t]=b,c},Wi=Me.f,$i=Xe.set,Ki=Xe.getterFor("Array Iterator"),Qi=Vi(Array,"Array",(function(e,t){$i(this,{type:"Array Iterator",target:R(e),index:0,kind:t})}),(function(){var e=Ki(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"),Xi=Oi.Arguments=Oi.Array;if(zi("keys"),zi("values"),zi("entries"),u&&"values"!==Xi.name)try{Wi(Xi,"name",{value:"values"})}catch(e){}var Zi=w("".charAt),ea=w("".charCodeAt),ta=w("".slice),ra=function(e){return function(t,r){var n,i,a=$t(S(t)),o=ot(r),s=a.length;return o<0||o>=s?e?"":void 0:(n=ea(a,o))<55296||n>56319||o+1===s||(i=ea(a,o+1))<56320||i>57343?e?Zi(a,o):n:e?ta(a,o,o+2):i-56320+(n-55296<<10)+65536}},na={codeAt:ra(!1),charAt:ra(!0)},ia=na.charAt,aa=Xe.set,oa=Xe.getterFor("String Iterator");Vi(String,"String",(function(e){aa(this,{type:"String Iterator",string:$t(e),index:0})}),(function(){var e,t=oa(this),r=t.string,n=t.index;return n>=r.length?{value:void 0,done:!0}:(e=ia(r,n),t.index+=e.length,{value:e,done:!1})}));var sa=ge("iterator"),ca=ge("toStringTag"),da=Qi.values,ua=function(e,t){if(e){if(e[sa]!==da)try{Te(e,sa,da)}catch(t){e[sa]=da}if(e[ca]||Te(e,ca,t),kn[t])for(var r in Qi)if(e[r]!==Qi[r])try{Te(e,r,Qi[r])}catch(t){e[r]=Qi[r]}}};for(var fa in kn)ua(c[fa]&&c[fa].prototype,fa);ua(Cn,"DOMTokenList");var ha=ge("iterator"),pa=!d((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[ha]||"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})),la=function(e,t,r){for(var n in t)nt(e,n,t[n],r);return e},ga=c.TypeError,ba=function(e,t){if(A(t,e))return e;throw ga("Incorrect invocation")},va=ge("iterator"),Ia=function(e){if(null!=e)return Q(e,va)||Q(e,"@@iterator")||Oi[Vt(e)]},ma=c.TypeError,xa=function(e,t){var r=arguments.length<2?Ia(e):t;if(K(r))return Pe(p(r,e));throw ma(W(e)+" is not iterable")},ka=c.TypeError,wa=function(e,t){if(e<t)throw ka("Not enough arguments");return e},ya=Math.floor,Ca=function(e,t){var r=e.length,n=ya(r/2);return r<8?za(e,t):Oa(e,Ca(sr(e,0,n),t),Ca(sr(e,n),t),t)},za=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},Oa=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},qa=Ca,Ea=ge("iterator"),Pa=Xe.set,Sa=Xe.getterFor("URLSearchParams"),Ra=Xe.getterFor("URLSearchParamsIterator"),ja=U("fetch"),Ma=U("Request"),Ta=U("Headers"),Ua=Ma&&Ma.prototype,Aa=Ta&&Ta.prototype,Ba=c.RegExp,Na=c.TypeError,_a=c.decodeURIComponent,La=c.encodeURIComponent,Da=w("".charAt),Ja=w([].join),Fa=w([].push),Ga=w("".replace),Ha=w([].shift),Ya=w([].splice),Va=w("".split),Wa=w("".slice),$a=/\+/g,Ka=Array(4),Qa=function(e){return Ka[e-1]||(Ka[e-1]=Ba("((?:%[\\da-f]{2}){"+e+"})","gi"))},Xa=function(e){try{return _a(e)}catch(t){return e}},Za=function(e){var t=Ga(e,$a," "),r=4;try{return _a(t)}catch(e){for(;r;)t=Ga(t,Qa(r--),Xa);return t}},eo=/[!'()~]|%20/g,to={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},ro=function(e){return to[e]},no=function(e){return Ga(La(e),eo,ro)},io=Bi((function(e,t){Pa(this,{type:"URLSearchParamsIterator",iterator:xa(Sa(e).entries),kind:t})}),"Iterator",(function(){var e=Ra(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),ao=function(e){this.entries=[],this.url=null,void 0!==e&&(M(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===Da(e,0)?Wa(e,1):e:$t(e)))};ao.prototype={type:"URLSearchParams",bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,r,n,i,a,o,s,c=Ia(e);if(c)for(r=(t=xa(e,c)).next;!(n=p(r,t)).done;){if(a=(i=xa(Pe(n.value))).next,(o=p(a,i)).done||(s=p(a,i)).done||!p(a,i).done)throw Na("Expected sequence with length 2");Fa(this.entries,{key:$t(o.value),value:$t(s.value)})}else for(var d in e)oe(e,d)&&Fa(this.entries,{key:d,value:$t(e[d])})},parseQuery:function(e){if(e)for(var t,r,n=Va(e,"&"),i=0;i<n.length;)(t=n[i++]).length&&(r=Va(t,"="),Fa(this.entries,{key:Za(Ha(r)),value:Za(Ja(r,"="))}))},serialize:function(){for(var e,t=this.entries,r=[],n=0;n<t.length;)e=t[n++],Fa(r,no(e.key)+"="+no(e.value));return Ja(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var oo=function(){ba(this,so);var e=arguments.length>0?arguments[0]:void 0;Pa(this,new ao(e))},so=oo.prototype;if(la(so,{append:function(e,t){wa(arguments.length,2);var r=Sa(this);Fa(r.entries,{key:$t(e),value:$t(t)}),r.updateURL()},delete:function(e){wa(arguments.length,1);for(var t=Sa(this),r=t.entries,n=$t(e),i=0;i<r.length;)r[i].key===n?Ya(r,i,1):i++;t.updateURL()},get:function(e){wa(arguments.length,1);for(var t=Sa(this).entries,r=$t(e),n=0;n<t.length;n++)if(t[n].key===r)return t[n].value;return null},getAll:function(e){wa(arguments.length,1);for(var t=Sa(this).entries,r=$t(e),n=[],i=0;i<t.length;i++)t[i].key===r&&Fa(n,t[i].value);return n},has:function(e){wa(arguments.length,1);for(var t=Sa(this).entries,r=$t(e),n=0;n<t.length;)if(t[n++].key===r)return!0;return!1},set:function(e,t){wa(arguments.length,1);for(var r,n=Sa(this),i=n.entries,a=!1,o=$t(e),s=$t(t),c=0;c<i.length;c++)(r=i[c]).key===o&&(a?Ya(i,c--,1):(a=!0,r.value=s));a||Fa(i,{key:o,value:s}),n.updateURL()},sort:function(){var e=Sa(this);qa(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,r=Sa(this).entries,n=mr(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 io(this,"keys")},values:function(){return new io(this,"values")},entries:function(){return new io(this,"entries")}},{enumerable:!0}),nt(so,Ea,so.entries,{name:"entries"}),nt(so,"toString",(function(){return Sa(this).serialize()}),{enumerable:!0}),vr(oo,"URLSearchParams"),Mt({global:!0,forced:!pa},{URLSearchParams:oo}),!pa&&j(Ta)){var co=w(Aa.has),uo=w(Aa.set),fo=function(e){if(M(e)){var t,r=e.body;if("URLSearchParams"===Vt(r))return t=e.headers?new Ta(e.headers):new Ta,co(t,"content-type")||uo(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),nr(e,{body:v(0,$t(r)),headers:v(0,t)})}return e};if(j(ja)&&Mt({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return ja(e,arguments.length>1?fo(arguments[1]):{})}}),j(Ma)){var ho=function(e){return ba(this,Ua),new Ma(e,arguments.length>1?fo(arguments[1]):{})};Ua.constructor=ho,ho.prototype=Ua,Mt({global:!0,forced:!0},{Request:ho})}}var po={URLSearchParams:oo,getState:Sa};function lo(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 go(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?lo(Object(r),!0).forEach((function(t){Vn(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lo(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var bo=Yn((function e(t){if(Gn(this,e),Vn(this,"baseUri",void 0),Vn(this,"proxy",void 0),Vn(this,"headers",void 0),Vn(this,"parameters",void 0),Vn(this,"fetchOptions",void 0),Vn(this,"transformRequest",void 0),Vn(this,"throwOnBadResponse",void 0),this.headers=go({},t.headers),this.parameters=go({},t.parameters),!this.parameters.shortCode)throw new Error("Missing required parameter: shortCode");this.fetchOptions=go({},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 vo(e){return(vo="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)}Vn(bo,"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}}});var Io="object"===("undefined"==typeof window?"undefined":vo(window))&&"object"===vo(window.document),mo="object"===("undefined"==typeof process?"undefined":vo(process))&&"object"===vo(process.versions)&&"string"==typeof process.versions.node,xo=c.Function,ko=w([].concat),wo=w([].join),yo={},Co=function(e,t,r){if(!oe(yo,t)){for(var n=[],i=0;i<t;i++)n[i]="a["+i+"]";yo[t]=xo("C,a","return new C("+wo(n,",")+")")}return yo[t](e,r)},zo=f?xo.bind:function(e){var t=K(this),r=t.prototype,n=fr(arguments,1),i=function(){var r=ko(n,fr(arguments));return this instanceof i?Co(t,r.length,r):t.apply(e,r)};return M(r)&&(i.prototype=r),i},Oo=c.TypeError,qo=function(e){if(Er(e))return e;throw Oo(W(e)+" is not a constructor")},Eo=U("Reflect","construct"),Po=Object.prototype,So=[].push,Ro=d((function(){function e(){}return!(Eo((function(){}),[],e)instanceof e)})),jo=!d((function(){Eo((function(){}))})),Mo=Ro||jo;Mt({target:"Reflect",stat:!0,forced:Mo,sham:Mo},{construct:function(e,t){qo(e),Pe(t);var r=arguments.length<3?e:qo(arguments[2]);if(jo&&!Ro)return Eo(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 _t(So,n,t),new(_t(zo,e,n))}var i=r.prototype,a=nr(M(i)?i:Po),o=_t(e,a,t);return M(o)?o:a}});var To=ge("isConcatSpreadable"),Uo=c.TypeError,Ao=J>=51||!d((function(){var e=[];return e[To]=!1,e.concat()[0]!==e})),Bo=gn("concat"),No=function(e){if(!M(e))return!1;var t=e[To];return void 0!==t?!!t:Lt(e)};function _o(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Lo(e,t){return(Lo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Do(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&&Lo(e,t)}function Jo(e,t){if(t&&("object"===vo(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _o(e)}function Fo(e){return(Fo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Go(){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 Ho(e,t,r){return(Ho=Go()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Function.bind.apply(e,n));return r&&Lo(i,r.prototype),i}).apply(null,arguments)}function Yo(e){var t="function"==typeof Map?new Map:void 0;return(Yo=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 Ho(e,arguments,Fo(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Lo(n,e)})(e)}function Vo(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=Fo(e);if(t){var i=Fo(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Jo(this,r)}}Mt({target:"Array",proto:!0,forced:!Ao||!Bo},{concat:function(e){var t,r,n,i,a,o=ie(this),s=Rr(o,0),c=0;for(t=-1,n=arguments.length;t<n;t++)if(No(a=-1===t?o:arguments[t])){if(c+(i=ht(a))>9007199254740991)throw Uo("Maximum allowed index exceeded");for(r=0;r<i;r++,c++)r in a&&ir(s,c,a[r])}else{if(c>=9007199254740991)throw Uo("Maximum allowed index exceeded");ir(s,c++,a)}return s.length=c,s}});var Wo,$o,Ko=function(e){Do(r,e);var t=Vo(r);function r(e){var n;return Gn(this,r),Vn(_o(n=t.call(this,"".concat(e.status," ").concat(e.statusText))),"response",void 0),n.response=e,n}return Yn(r)}(Yo(Error)),Qo=c.RegExp,Xo=d((function(){var e=Qo("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),Zo=Xo||d((function(){return!Qo("a","y").sticky})),es={BROKEN_CARET:Xo||d((function(){var e=Qo("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:Zo,UNSUPPORTED_Y:Xo},ts=c.RegExp,rs=d((function(){var e=ts(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),ns=c.RegExp,is=d((function(){var e=ns("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),as=Xe.get,os=re("native-string-replace",String.prototype.replace),ss=RegExp.prototype.exec,cs=ss,ds=w("".charAt),us=w("".indexOf),fs=w("".replace),hs=w("".slice),ps=($o=/b*/g,p(ss,Wo=/a/,"a"),p(ss,$o,"a"),0!==Wo.lastIndex||0!==$o.lastIndex),ls=es.BROKEN_CARET,gs=void 0!==/()??/.exec("")[1];(ps||gs||ls||rs||is)&&(cs=function(e){var t,r,n,i,a,o,s,c=this,d=as(c),u=$t(e),f=d.raw;if(f)return f.lastIndex=c.lastIndex,t=p(cs,f,u),c.lastIndex=f.lastIndex,t;var h=d.groups,l=ls&&c.sticky,g=p(Un,c),b=c.source,v=0,I=u;if(l&&(g=fs(g,"y",""),-1===us(g,"g")&&(g+="g"),I=hs(u,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==ds(u,c.lastIndex-1))&&(b="(?: "+b+")",I=" "+I,v++),r=new RegExp("^(?:"+b+")",g)),gs&&(r=new RegExp("^"+b+"$(?!\\s)",g)),ps&&(n=c.lastIndex),i=p(ss,l?r:c,I),l?i?(i.input=hs(i.input,v),i[0]=hs(i[0],v),i.index=c.lastIndex,c.lastIndex+=i[0].length):c.lastIndex=0:ps&&i&&(c.lastIndex=c.global?i.index+i[0].length:n),gs&&i&&i.length>1&&p(os,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=nr(null),a=0;a<h.length;a++)o[(s=h[a])[0]]=i[s[1]];return i});var bs=cs;Mt({target:"RegExp",proto:!0,forced:/./.exec!==bs},{exec:bs});var vs=ge("species"),Is=RegExp.prototype,ms=function(e,t,r,n){var i=ge(e),a=!d((function(){var t={};return t[i]=function(){return 7},7!=""[e](t)})),o=a&&!d((function(){var t=!1,r=/a/;return"split"===e&&((r={}).constructor={},r.constructor[vs]=function(){return r},r.flags="",r[i]=/./[i]),r.exec=function(){return t=!0,null},r[i](""),!t}));if(!a||!o||r){var s=w(/./[i]),c=t(i,""[e],(function(e,t,r,n,i){var o=w(e),c=t.exec;return c===bs||c===Is.exec?a&&!i?{done:!0,value:s(t,r,n)}:{done:!0,value:o(r,t,n)}:{done:!1}}));nt(String.prototype,e,c[0]),nt(Is,i,c[1])}n&&Te(Is[i],"sham",!0)},xs=na.charAt,ks=function(e,t,r){return t+(r?xs(e,t).length:1)},ws=Math.floor,ys=w("".charAt),Cs=w("".replace),zs=w("".slice),Os=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,qs=/\$([$&'`]|\d{1,2})/g,Es=function(e,t,r,n,i,a){var o=r+e.length,s=n.length,c=qs;return void 0!==i&&(i=ie(i),c=Os),Cs(a,c,(function(a,c){var d;switch(ys(c,0)){case"$":return"$";case"&":return e;case"`":return zs(t,0,r);case"'":return zs(t,o);case"<":d=i[zs(c,1,-1)];break;default:var u=+c;if(0===u)return a;if(u>s){var f=ws(u/10);return 0===f?a:f<=s?void 0===n[f-1]?ys(c,1):n[f-1]+ys(c,1):a}d=n[u-1]}return void 0===d?"":d}))},Ps=c.TypeError,Ss=function(e,t){var r=e.exec;if(j(r)){var n=p(r,e,t);return null!==n&&Pe(n),n}if("RegExp"===z(e))return p(bs,e,t);throw Ps("RegExp#exec called on incompatible receiver")},Rs=ge("replace"),js=Math.max,Ms=Math.min,Ts=w([].concat),Us=w([].push),As=w("".indexOf),Bs=w("".slice),Ns="$0"==="a".replace(/./,"$0"),_s=!!/./[Rs]&&""===/./[Rs]("a","$0");ms("replace",(function(e,t,r){var n=_s?"$":"$0";return[function(e,r){var n=S(this),i=null==e?void 0:Q(e,Rs);return i?p(i,e,n,r):p(t,$t(n),e,r)},function(e,i){var a=Pe(this),o=$t(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 c=j(i);c||(i=$t(i));var d=a.global;if(d){var u=a.unicode;a.lastIndex=0}for(var f=[];;){var h=Ss(a,o);if(null===h)break;if(Us(f,h),!d)break;""===$t(h[0])&&(a.lastIndex=ks(o,ft(a.lastIndex),u))}for(var p,l="",g=0,b=0;b<f.length;b++){for(var v=$t((h=f[b])[0]),I=js(Ms(ot(h.index),o.length),0),m=[],x=1;x<h.length;x++)Us(m,void 0===(p=h[x])?p:String(p));var k=h.groups;if(c){var w=Ts([v],m,I,o);void 0!==k&&Us(w,k);var y=$t(_t(i,void 0,w))}else y=Es(v,o,I,m,k,i);I>=g&&(l+=Bs(o,g,I)+y,g=I+v.length)}return l+Bs(o,g)}]}),!!d((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!Ns||_s);var Ls,Ds=Object.assign,Js=Object.defineProperty,Fs=w([].concat),Gs=!Ds||d((function(){if(u&&1!==Ds({b:1},Ds(Js({},"a",{enumerable:!0,get:function(){Js(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!=Ds({},e)[r]||"abcdefghijklmnopqrst"!=Tt(Ds({},t)).join("")}))?function(e,t){for(var r=ie(e),n=arguments.length,i=1,a=kt.f,o=b.f;n>i;)for(var s,c=E(arguments[i++]),d=a?Fs(Tt(c),a(c)):Tt(c),f=d.length,h=0;f>h;)s=d[h++],u&&!p(o,c,s)||(r[s]=c[s]);return r}:Ds,Hs=function(e,t,r){var n,i;Pe(e);try{if(!(n=Q(e,"return"))){if("throw"===t)throw r;return r}n=p(n,e)}catch(e){i=!0,n=e}if("throw"===t)throw r;if(i)throw n;return Pe(n),r},Ys=function(e,t,r,n){try{return n?t(Pe(r)[0],r[1]):t(r)}catch(t){Hs(e,"throw",t)}},Vs=ge("iterator"),Ws=Array.prototype,$s=function(e){return void 0!==e&&(Oi.Array===e||Ws[Vs]===e)},Ks=c.Array,Qs=function(e){var t=ie(e),r=Er(this),n=arguments.length,i=n>1?arguments[1]:void 0,a=void 0!==i;a&&(i=mr(i,n>2?arguments[2]:void 0));var o,s,c,d,u,f,h=Ia(t),l=0;if(!h||this==Ks&&$s(h))for(o=ht(t),s=r?new this(o):Ks(o);o>l;l++)f=a?i(t[l],l):t[l],ir(s,l,f);else for(u=(d=xa(t,h)).next,s=r?new this:[];!(c=p(u,d)).done;l++)f=a?Ys(d,i,[c.value,l],!0):c.value,ir(s,l,f);return s.length=l,s},Xs=/[^\0-\u007E]/,Zs=/[.\u3002\uFF0E\uFF61]/g,ec="Overflow: input needs wider integers to process",tc=c.RangeError,rc=w(Zs.exec),nc=Math.floor,ic=String.fromCharCode,ac=w("".charCodeAt),oc=w([].join),sc=w([].push),cc=w("".replace),dc=w("".split),uc=w("".toLowerCase),fc=function(e){return e+22+75*(e<26)},hc=function(e,t,r){var n=0;for(e=r?nc(e/700):e>>1,e+=nc(e/t);e>455;)e=nc(e/35),n+=36;return nc(n+36*e/(e+38))},pc=function(e){var t,r,n=[],i=(e=function(e){for(var t=[],r=0,n=e.length;r<n;){var i=ac(e,r++);if(i>=55296&&i<=56319&&r<n){var a=ac(e,r++);56320==(64512&a)?sc(t,((1023&i)<<10)+(1023&a)+65536):(sc(t,i),r--)}else sc(t,i)}return t}(e)).length,a=128,o=0,s=72;for(t=0;t<e.length;t++)(r=e[t])<128&&sc(n,ic(r));var c=n.length,d=c;for(c&&sc(n,"-");d<i;){var u=2147483647;for(t=0;t<e.length;t++)(r=e[t])>=a&&r<u&&(u=r);var f=d+1;if(u-a>nc((2147483647-o)/f))throw tc(ec);for(o+=(u-a)*f,a=u,t=0;t<e.length;t++){if((r=e[t])<a&&++o>2147483647)throw tc(ec);if(r==a){for(var h=o,p=36;;){var l=p<=s?1:p>=s+26?26:p-s;if(h<l)break;var g=h-l,b=36-l;sc(n,ic(fc(l+g%b))),h=nc(g/b),p+=36}sc(n,ic(fc(h))),s=hc(o,f,d==c),o=0,d++}}o++,a++}return oc(n,"")},lc=Kt.f,gc=na.codeAt,bc=Xe.set,vc=Xe.getterFor("URL"),Ic=po.URLSearchParams,mc=po.getState,xc=c.URL,kc=c.TypeError,wc=c.parseInt,yc=Math.floor,Cc=Math.pow,zc=w("".charAt),Oc=w(/./.exec),qc=w([].join),Ec=w(1..toString),Pc=w([].pop),Sc=w([].push),Rc=w("".replace),jc=w([].shift),Mc=w("".split),Tc=w("".slice),Uc=w("".toLowerCase),Ac=w([].unshift),Bc=/[a-z]/i,Nc=/[\d+-.a-z]/i,_c=/\d/,Lc=/^0x/i,Dc=/^[0-7]+$/,Jc=/^\d+$/,Fc=/^[\da-f]+$/i,Gc=/[\0\t\n\r #%/:<>?@[\\\]^|]/,Hc=/[\0\t\n\r #/:<>?@[\\\]^|]/,Yc=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,Vc=/[\t\n\r]/g,Wc=function(e){var t,r,n,i;if("number"==typeof e){for(t=[],r=0;r<4;r++)Ac(t,e%256),e=yc(e/256);return qc(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+=Ec(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},$c={},Kc=Gs({},$c,{" ":1,'"':1,"<":1,">":1,"`":1}),Qc=Gs({},Kc,{"#":1,"?":1,"{":1,"}":1}),Xc=Gs({},Qc,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Zc=function(e,t){var r=gc(e,0);return r>32&&r<127&&!oe(t,e)?e:encodeURIComponent(e)},ed={ftp:21,file:null,http:80,https:443,ws:80,wss:443},td=function(e,t){var r;return 2==e.length&&Oc(Bc,zc(e,0))&&(":"==(r=zc(e,1))||!t&&"|"==r)},rd=function(e){var t;return e.length>1&&td(Tc(e,0,2))&&(2==e.length||"/"===(t=zc(e,2))||"\\"===t||"?"===t||"#"===t)},nd=function(e){return"."===e||"%2e"===Uc(e)},id={},ad={},od={},sd={},cd={},dd={},ud={},fd={},hd={},pd={},ld={},gd={},bd={},vd={},Id={},md={},xd={},kd={},wd={},yd={},Cd={},zd=function(e,t,r){var n,i,a,o=$t(e);if(t){if(i=this.parse(o))throw kc(i);this.searchParams=null}else{if(void 0!==r&&(n=new zd(r,!0)),i=this.parse(o,null,n))throw kc(i);(a=mc(new Ic)).bindURL(this),this.searchParams=a}};zd.prototype={type:"URL",parse:function(e,t,r){var n,i,a,o,s,c=this,d=t||id,u=0,f="",h=!1,p=!1,l=!1;for(e=$t(e),t||(c.scheme="",c.username="",c.password="",c.host=null,c.port=null,c.path=[],c.query=null,c.fragment=null,c.cannotBeABaseURL=!1,e=Rc(e,Yc,"")),e=Rc(e,Vc,""),n=Qs(e);u<=n.length;){switch(i=n[u],d){case id:if(!i||!Oc(Bc,i)){if(t)return"Invalid scheme";d=od;continue}f+=Uc(i),d=ad;break;case ad:if(i&&(Oc(Nc,i)||"+"==i||"-"==i||"."==i))f+=Uc(i);else{if(":"!=i){if(t)return"Invalid scheme";f="",d=od,u=0;continue}if(t&&(c.isSpecial()!=oe(ed,f)||"file"==f&&(c.includesCredentials()||null!==c.port)||"file"==c.scheme&&!c.host))return;if(c.scheme=f,t)return void(c.isSpecial()&&ed[c.scheme]==c.port&&(c.port=null));f="","file"==c.scheme?d=vd:c.isSpecial()&&r&&r.scheme==c.scheme?d=sd:c.isSpecial()?d=fd:"/"==n[u+1]?(d=cd,u++):(c.cannotBeABaseURL=!0,Sc(c.path,""),d=wd)}break;case od:if(!r||r.cannotBeABaseURL&&"#"!=i)return"Invalid scheme";if(r.cannotBeABaseURL&&"#"==i){c.scheme=r.scheme,c.path=sr(r.path),c.query=r.query,c.fragment="",c.cannotBeABaseURL=!0,d=Cd;break}d="file"==r.scheme?vd:dd;continue;case sd:if("/"!=i||"/"!=n[u+1]){d=dd;continue}d=hd,u++;break;case cd:if("/"==i){d=pd;break}d=kd;continue;case dd:if(c.scheme=r.scheme,i==Ls)c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=sr(r.path),c.query=r.query;else if("/"==i||"\\"==i&&c.isSpecial())d=ud;else if("?"==i)c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=sr(r.path),c.query="",d=yd;else{if("#"!=i){c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=sr(r.path),c.path.length--,d=kd;continue}c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=sr(r.path),c.query=r.query,c.fragment="",d=Cd}break;case ud:if(!c.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,d=kd;continue}d=pd}else d=hd;break;case fd:if(d=hd,"/"!=i||"/"!=zc(f,u+1))continue;u++;break;case hd:if("/"!=i&&"\\"!=i){d=pd;continue}break;case pd:if("@"==i){h&&(f="%40"+f),h=!0,a=Qs(f);for(var g=0;g<a.length;g++){var b=a[g];if(":"!=b||l){var v=Zc(b,Xc);l?c.password+=v:c.username+=v}else l=!0}f=""}else if(i==Ls||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()){if(h&&""==f)return"Invalid authority";u-=Qs(f).length+1,f="",d=ld}else f+=i;break;case ld:case gd:if(t&&"file"==c.scheme){d=md;continue}if(":"!=i||p){if(i==Ls||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()){if(c.isSpecial()&&""==f)return"Invalid host";if(t&&""==f&&(c.includesCredentials()||null!==c.port))return;if(o=c.parseHost(f))return o;if(f="",d=xd,t)return;continue}"["==i?p=!0:"]"==i&&(p=!1),f+=i}else{if(""==f)return"Invalid host";if(o=c.parseHost(f))return o;if(f="",d=bd,t==gd)return}break;case bd:if(!Oc(_c,i)){if(i==Ls||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()||t){if(""!=f){var I=wc(f,10);if(I>65535)return"Invalid port";c.port=c.isSpecial()&&I===ed[c.scheme]?null:I,f=""}if(t)return;d=xd;continue}return"Invalid port"}f+=i;break;case vd:if(c.scheme="file","/"==i||"\\"==i)d=Id;else{if(!r||"file"!=r.scheme){d=kd;continue}if(i==Ls)c.host=r.host,c.path=sr(r.path),c.query=r.query;else if("?"==i)c.host=r.host,c.path=sr(r.path),c.query="",d=yd;else{if("#"!=i){rd(qc(sr(n,u),""))||(c.host=r.host,c.path=sr(r.path),c.shortenPath()),d=kd;continue}c.host=r.host,c.path=sr(r.path),c.query=r.query,c.fragment="",d=Cd}}break;case Id:if("/"==i||"\\"==i){d=md;break}r&&"file"==r.scheme&&!rd(qc(sr(n,u),""))&&(td(r.path[0],!0)?Sc(c.path,r.path[0]):c.host=r.host),d=kd;continue;case md:if(i==Ls||"/"==i||"\\"==i||"?"==i||"#"==i){if(!t&&td(f))d=kd;else if(""==f){if(c.host="",t)return;d=xd}else{if(o=c.parseHost(f))return o;if("localhost"==c.host&&(c.host=""),t)return;f="",d=xd}continue}f+=i;break;case xd:if(c.isSpecial()){if(d=kd,"/"!=i&&"\\"!=i)continue}else if(t||"?"!=i)if(t||"#"!=i){if(i!=Ls&&(d=kd,"/"!=i))continue}else c.fragment="",d=Cd;else c.query="",d=yd;break;case kd:if(i==Ls||"/"==i||"\\"==i&&c.isSpecial()||!t&&("?"==i||"#"==i)){if(".."===(s=Uc(s=f))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(c.shortenPath(),"/"==i||"\\"==i&&c.isSpecial()||Sc(c.path,"")):nd(f)?"/"==i||"\\"==i&&c.isSpecial()||Sc(c.path,""):("file"==c.scheme&&!c.path.length&&td(f)&&(c.host&&(c.host=""),f=zc(f,0)+":"),Sc(c.path,f)),f="","file"==c.scheme&&(i==Ls||"?"==i||"#"==i))for(;c.path.length>1&&""===c.path[0];)jc(c.path);"?"==i?(c.query="",d=yd):"#"==i&&(c.fragment="",d=Cd)}else f+=Zc(i,Qc);break;case wd:"?"==i?(c.query="",d=yd):"#"==i?(c.fragment="",d=Cd):i!=Ls&&(c.path[0]+=Zc(i,$c));break;case yd:t||"#"!=i?i!=Ls&&("'"==i&&c.isSpecial()?c.query+="%27":c.query+="#"==i?"%23":Zc(i,$c)):(c.fragment="",d=Cd);break;case Cd:i!=Ls&&(c.fragment+=Zc(i,Kc))}u++}},parseHost:function(e){var t,r,n;if("["==zc(e,0)){if("]"!=zc(e,e.length-1))return"Invalid host";if(!(t=function(e){var t,r,n,i,a,o,s,c=[0,0,0,0,0,0,0,0],d=0,u=null,f=0,h=function(){return zc(e,f)};if(":"==h()){if(":"!=zc(e,1))return;f+=2,u=++d}for(;h();){if(8==d)return;if(":"!=h()){for(t=r=0;r<4&&Oc(Fc,h());)t=16*t+wc(h(),16),f++,r++;if("."==h()){if(0==r)return;if(f-=r,d>6)return;for(n=0;h();){if(i=null,n>0){if(!("."==h()&&n<4))return;f++}if(!Oc(_c,h()))return;for(;Oc(_c,h());){if(a=wc(h(),10),null===i)i=a;else{if(0==i)return;i=10*i+a}if(i>255)return;f++}c[d]=256*c[d]+i,2!=++n&&4!=n||d++}if(4!=n)return;break}if(":"==h()){if(f++,!h())return}else if(h())return;c[d++]=t}else{if(null!==u)return;f++,u=++d}}if(null!==u)for(o=d-u,d=7;0!=d&&o>0;)s=c[d],c[d--]=c[u+o-1],c[u+--o]=s;else if(8!=d)return;return c}(Tc(e,1,-1))))return"Invalid host";this.host=t}else if(this.isSpecial()){if(e=function(e){var t,r,n=[],i=dc(cc(uc(e),Zs,"."),".");for(t=0;t<i.length;t++)r=i[t],sc(n,rc(Xs,r)?"xn--"+pc(r):r);return oc(n,".")}(e),Oc(Gc,e))return"Invalid host";if(null===(t=function(e){var t,r,n,i,a,o,s,c=Mc(e,".");if(c.length&&""==c[c.length-1]&&c.length--,(t=c.length)>4)return e;for(r=[],n=0;n<t;n++){if(""==(i=c[n]))return e;if(a=10,i.length>1&&"0"==zc(i,0)&&(a=Oc(Lc,i)?16:8,i=Tc(i,8==a?1:2)),""===i)o=0;else{if(!Oc(10==a?Jc:8==a?Dc:Fc,i))return e;o=wc(i,a)}Sc(r,o)}for(n=0;n<t;n++)if(o=r[n],n==t-1){if(o>=Cc(256,5-t))return null}else if(o>255)return null;for(s=Pc(r),n=0;n<r.length;n++)s+=r[n]*Cc(256,3-n);return s}(e)))return"Invalid host";this.host=t}else{if(Oc(Hc,e))return"Invalid host";for(t="",r=Qs(e),n=0;n<r.length;n++)t+=Zc(r[n],$c);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return oe(ed,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&td(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,c=e.fragment,d=t+":";return null!==i?(d+="//",e.includesCredentials()&&(d+=r+(n?":"+n:"")+"@"),d+=Wc(i),null!==a&&(d+=":"+a)):"file"==t&&(d+="//"),d+=e.cannotBeABaseURL?o[0]:o.length?"/"+qc(o,"/"):"",null!==s&&(d+="?"+s),null!==c&&(d+="#"+c),d},setHref:function(e){var t=this.parse(e);if(t)throw kc(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new Od(e.path[0]).origin}catch(e){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+Wc(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse($t(e)+":",id)},getUsername:function(){return this.username},setUsername:function(e){var t=Qs($t(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<t.length;r++)this.username+=Zc(t[r],Xc)}},getPassword:function(){return this.password},setPassword:function(e){var t=Qs($t(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<t.length;r++)this.password+=Zc(t[r],Xc)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?Wc(e):Wc(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,ld)},getHostname:function(){var e=this.host;return null===e?"":Wc(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,gd)},getPort:function(){var e=this.port;return null===e?"":$t(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=$t(e))?this.port=null:this.parse(e,bd))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+qc(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,xd))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=$t(e))?this.query=null:("?"==zc(e,0)&&(e=Tc(e,1)),this.query="",this.parse(e,yd)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=$t(e))?("#"==zc(e,0)&&(e=Tc(e,1)),this.fragment="",this.parse(e,Cd)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var Od=function(e){var t=ba(this,qd),r=arguments.length>1?arguments[1]:void 0,n=bc(t,new zd(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())},qd=Od.prototype,Ed=function(e,t){return{get:function(){return vc(this)[e]()},set:t&&function(e){return vc(this)[t](e)},configurable:!0,enumerable:!0}};if(u&&lc(qd,{href:Ed("serialize","setHref"),origin:Ed("getOrigin"),protocol:Ed("getProtocol","setProtocol"),username:Ed("getUsername","setUsername"),password:Ed("getPassword","setPassword"),host:Ed("getHost","setHost"),hostname:Ed("getHostname","setHostname"),port:Ed("getPort","setPort"),pathname:Ed("getPathname","setPathname"),search:Ed("getSearch","setSearch"),searchParams:Ed("getSearchParams"),hash:Ed("getHash","setHash")}),nt(qd,"toJSON",(function(){return vc(this).serialize()}),{enumerable:!0}),nt(qd,"toString",(function(){return vc(this).serialize()}),{enumerable:!0}),xc){var Pd=xc.createObjectURL,Sd=xc.revokeObjectURL;Pd&&nt(Od,"createObjectURL",mr(Pd,xc)),Sd&&nt(Od,"revokeObjectURL",mr(Sd,xc))}function Rd(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=Fo(e);if(t){var i=Fo(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Jo(this,r)}}vr(Od,"URL"),Mt({global:!0,forced:!pa,sham:!u},{URL:Od});var jd=function(e){Do(r,e);var t=Rd(r);function r(e,n,i){var a;return Gn(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 Yn(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))for(var i=0;i<n.length;i+=1)t.searchParams.append(r,String(n[i]));else t.searchParams.append(r,String(n))}))}}],[{key:"renderTemplateUri",value:function(e,t){return t?e.replace(/\{([^\}]+)\}/g,(function(e,r){return String(t[r])})):e}}]),r}(Yo(URL)),Md="commerce-sdk-isomorphic@1.6.0";function Td(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 Ud(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Td(Object(r),!0).forEach((function(t){Vn(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Td(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Ad=function(){function e(t){Gn(this,e),Vn(this,"clientConfig",void 0);var r=Ud({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new bo(r)}var r,n,i,a,o,s,c,d,u,f,h,p,l,g,b,v,I,m,x,k,w,y,C,z,O,q,E,P,S,R,j;return Yn(e,[{key:"createBasket",value:(j=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0!==i.taxMode?s.taxMode=i.taxMode:void 0!==a.taxMode&&(s.taxMode=a.taxMode),void 0===i.siteId){e.next=18;break}s.siteId=i.siteId,e.next=23;break;case 18:if(void 0===a.siteId){e.next=22;break}s.siteId=a.siteId,e.next=23;break;case 22:throw new Error("Missing required query parameter: siteId");case 23:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new jd("/organizations/{organizationId}/baskets",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Ud(Ud({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=30,t.fetch(u);case 30:if(f=e.sent,!n){e.next=35;break}return e.abrupt("return",f);case 35:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=39;break}throw new Ko(f);case 39:return e.next=41,f.text();case 41:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 43:case"end":return e.stop()}}),e,this)}))),function(e,t){return j.apply(this,arguments)})},{key:"transferBasket",value:(R=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0!==i.overrideExisting?s.overrideExisting=i.overrideExisting:void 0!==a.overrideExisting&&(s.overrideExisting=a.overrideExisting),void 0===i.siteId){e.next=18;break}s.siteId=i.siteId,e.next=23;break;case 18:if(void 0===a.siteId){e.next=22;break}s.siteId=a.siteId,e.next=23;break;case 22:throw new Error("Missing required query parameter: siteId");case 23:return c=new jd("/organizations/{organizationId}/baskets/actions/transfer",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Ud(Ud({},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{headers:d,method:"POST"})),e.next=29,t.fetch(u);case 29:if(f=e.sent,!n){e.next=34;break}return e.abrupt("return",f);case 34:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=38;break}throw new Ko(f);case 38:return e.next=40,f.text();case 40:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 42:case"end":return e.stop()}}),e,this)}))),function(e,t){return R.apply(this,arguments)})},{key:"mergeBasket",value:(S=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0!==i.createDestinationBasket?s.createDestinationBasket=i.createDestinationBasket:void 0!==a.createDestinationBasket&&(s.createDestinationBasket=a.createDestinationBasket),void 0!==i.productItemMergeMode?s.productItemMergeMode=i.productItemMergeMode:void 0!==a.productItemMergeMode&&(s.productItemMergeMode=a.productItemMergeMode),void 0===i.siteId){e.next=19;break}s.siteId=i.siteId,e.next=24;break;case 19:if(void 0===a.siteId){e.next=23;break}s.siteId=a.siteId,e.next=24;break;case 23:throw new Error("Missing required query parameter: siteId");case 24:return c=new jd("/organizations/{organizationId}/baskets/actions/merge",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Ud(Ud({},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{headers:d,method:"POST"})),e.next=30,t.fetch(u);case 30:if(f=e.sent,!n){e.next=35;break}return e.abrupt("return",f);case 35:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=39;break}throw new Ko(f);case 39:return e.next=41,f.text();case 41:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 43:case"end":return e.stop()}}),e,this)}))),function(e,t){return S.apply(this,arguments)})},{key:"deleteBasket",value:(P=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return c=new jd("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Ud(Ud({},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{headers:d,method:"DELETE"})),e.next=37,t.fetch(u);case 37:if(f=e.sent,!n){e.next=42;break}return e.abrupt("return",f);case 42:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=44;break}throw new Ko(f);case 44:case"end":return e.stop()}}),e,this)}))),function(e,t){return P.apply(this,arguments)})},{key:"getBasket",value:(E=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new jd("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Ud(Ud({},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=38,t.fetch(u);case 38:if(f=e.sent,!n){e.next=43;break}return e.abrupt("return",f);case 43:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=47;break}throw new Ko(f);case 47:return e.next=49,f.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return E.apply(this,arguments)})},{key:"updateBasket",value:(q=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new jd("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Ud(Ud({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PATCH"})),e.next=38,t.fetch(u);case 38:if(f=e.sent,!n){e.next=43;break}return e.abrupt("return",f);case 43:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=47;break}throw new Ko(f);case 47:return e.next=49,f.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return q.apply(this,arguments)})},{key:"updateBillingAddressForBasket",value:(O=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(s={},void 0!==i.useAsShipping?s.useAsShipping=i.useAsShipping:void 0!==a.useAsShipping&&(s.useAsShipping=a.useAsShipping),void 0!==i.removeExternalTax?s.removeExternalTax=i.removeExternalTax:void 0!==a.removeExternalTax&&(s.removeExternalTax=a.removeExternalTax),void 0===i.siteId){e.next=28;break}s.siteId=i.siteId,e.next=33;break;case 28:if(void 0===a.siteId){e.next=32;break}s.siteId=a.siteId,e.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new jd("/organizations/{organizationId}/baskets/{basketId}/billing-address",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Ud(Ud({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PUT"})),e.next=40,t.fetch(u);case 40:if(f=e.sent,!n){e.next=45;break}return e.abrupt("return",f);case 45:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=49;break}throw new Ko(f);case 49:return e.next=51,f.text();case 51:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 53:case"end":return e.stop()}}),e,this)}))),function(e,t){return O.apply(this,arguments)})},{key:"addCouponToBasket",value:(z=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new jd("/organizations/{organizationId}/baskets/{basketId}/coupons",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Ud(Ud({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=38,t.fetch(u);case 38:if(f=e.sent,!n){e.next=43;break}return e.abrupt("return",f);case 43:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=47;break}throw new Ko(f);case 47:return e.next=49,f.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return z.apply(this,arguments)})},{key:"removeCouponFromBasket",value:(C=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===i.couponItemId){e.next=25;break}o.couponItemId=i.couponItemId,e.next=30;break;case 25:if(void 0===a.couponItemId){e.next=29;break}o.couponItemId=a.couponItemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: couponItemId");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new jd("/organizations/{organizationId}/baskets/{basketId}/coupons/{couponItemId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Ud(Ud({},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{headers:d,method:"DELETE"})),e.next=46,t.fetch(u);case 46:if(f=e.sent,!n){e.next=51;break}return e.abrupt("return",f);case 51:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=55;break}throw new Ko(f);case 55:return e.next=57,f.text();case 57:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return C.apply(this,arguments)})},{key:"updateCustomerForBasket",value:(y=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new jd("/organizations/{organizationId}/baskets/{basketId}/customer",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Ud(Ud({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PUT"})),e.next=38,t.fetch(u);case 38:if(f=e.sent,!n){e.next=43;break}return e.abrupt("return",f);case 43:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=47;break}throw new Ko(f);case 47:return e.next=49,f.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return y.apply(this,arguments)})},{key:"addGiftCertificateItemToBasket",value:(w=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new jd("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Ud(Ud({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=38,t.fetch(u);case 38:if(f=e.sent,!n){e.next=43;break}return e.abrupt("return",f);case 43:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=47;break}throw new Ko(f);case 47:return e.next=49,f.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return w.apply(this,arguments)})},{key:"removeGiftCertificateItemFromBasket",value:(k=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===i.giftCertificateItemId){e.next=25;break}o.giftCertificateItemId=i.giftCertificateItemId,e.next=30;break;case 25:if(void 0===a.giftCertificateItemId){e.next=29;break}o.giftCertificateItemId=a.giftCertificateItemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: giftCertificateItemId");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new jd("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Ud(Ud({},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{headers:d,method:"DELETE"})),e.next=46,t.fetch(u);case 46:if(f=e.sent,!n){e.next=51;break}return e.abrupt("return",f);case 51:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=55;break}throw new Ko(f);case 55:return e.next=57,f.text();case 57:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return k.apply(this,arguments)})},{key:"updateGiftCertificateItemInBasket",value:(x=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===i.giftCertificateItemId){e.next=25;break}o.giftCertificateItemId=i.giftCertificateItemId,e.next=30;break;case 25:if(void 0===a.giftCertificateItemId){e.next=29;break}o.giftCertificateItemId=a.giftCertificateItemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: giftCertificateItemId");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new jd("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Ud(Ud({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PATCH"})),e.next=47,t.fetch(u);case 47:if(f=e.sent,!n){e.next=52;break}return e.abrupt("return",f);case 52:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=56;break}throw new Ko(f);case 56:return e.next=58,f.text();case 58:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return x.apply(this,arguments)})},{key:"addItemToBasket",value:(m=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new jd("/organizations/{organizationId}/baskets/{basketId}/items",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Ud(Ud({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=38,t.fetch(u);case 38:if(f=e.sent,!n){e.next=43;break}return e.abrupt("return",f);case 43:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=47;break}throw new Ko(f);case 47:return e.next=49,f.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return m.apply(this,arguments)})},{key:"removeItemFromBasket",value:(I=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===i.itemId){e.next=25;break}o.itemId=i.itemId,e.next=30;break;case 25:if(void 0===a.itemId){e.next=29;break}o.itemId=a.itemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: itemId");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new jd("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Ud(Ud({},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{headers:d,method:"DELETE"})),e.next=46,t.fetch(u);case 46:if(f=e.sent,!n){e.next=51;break}return e.abrupt("return",f);case 51:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=55;break}throw new Ko(f);case 55:return e.next=57,f.text();case 57:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return I.apply(this,arguments)})},{key:"updateItemInBasket",value:(v=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===i.itemId){e.next=25;break}o.itemId=i.itemId,e.next=30;break;case 25:if(void 0===a.itemId){e.next=29;break}o.itemId=a.itemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: itemId");case 30:if(s={},void 0!==i.removeExternalTax?s.removeExternalTax=i.removeExternalTax:void 0!==a.removeExternalTax&&(s.removeExternalTax=a.removeExternalTax),void 0===i.siteId){e.next=36;break}s.siteId=i.siteId,e.next=41;break;case 36:if(void 0===a.siteId){e.next=40;break}s.siteId=a.siteId,e.next=41;break;case 40:throw new Error("Missing required query parameter: siteId");case 41:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new jd("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Ud(Ud({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PATCH"})),e.next=48,t.fetch(u);case 48:if(f=e.sent,!n){e.next=53;break}return e.abrupt("return",f);case 53:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=57;break}throw new Ko(f);case 57:return e.next=59,f.text();case 59:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return v.apply(this,arguments)})},{key:"addTaxesForBasketItem",value:(b=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===i.itemId){e.next=25;break}o.itemId=i.itemId,e.next=30;break;case 25:if(void 0===a.itemId){e.next=29;break}o.itemId=a.itemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: itemId");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new jd("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}/taxes",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Ud(Ud({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PUT"})),e.next=46,t.fetch(u);case 46:if(f=e.sent,!n){e.next=51;break}return e.abrupt("return",f);case 51:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=53;break}throw new Ko(f);case 53:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"addPaymentInstrumentToBasket",value:(g=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new jd("/organizations/{organizationId}/baskets/{basketId}/payment-instruments",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Ud(Ud({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=38,t.fetch(u);case 38:if(f=e.sent,!n){e.next=43;break}return e.abrupt("return",f);case 43:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=47;break}throw new Ko(f);case 47:return e.next=49,f.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"removePaymentInstrumentFromBasket",value:(l=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===i.paymentInstrumentId){e.next=25;break}o.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 25:if(void 0===a.paymentInstrumentId){e.next=29;break}o.paymentInstrumentId=a.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new jd("/organizations/{organizationId}/baskets/{basketId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Ud(Ud({},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{headers:d,method:"DELETE"})),e.next=46,t.fetch(u);case 46:if(f=e.sent,!n){e.next=51;break}return e.abrupt("return",f);case 51:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=55;break}throw new Ko(f);case 55:return e.next=57,f.text();case 57:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"updatePaymentInstrumentInBasket",value:(p=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===i.paymentInstrumentId){e.next=25;break}o.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 25:if(void 0===a.paymentInstrumentId){e.next=29;break}o.paymentInstrumentId=a.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(s={},void 0!==i.removeExternalTax?s.removeExternalTax=i.removeExternalTax:void 0!==a.removeExternalTax&&(s.removeExternalTax=a.removeExternalTax),void 0===i.siteId){e.next=36;break}s.siteId=i.siteId,e.next=41;break;case 36:if(void 0===a.siteId){e.next=40;break}s.siteId=a.siteId,e.next=41;break;case 40:throw new Error("Missing required query parameter: siteId");case 41:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new jd("/organizations/{organizationId}/baskets/{basketId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Ud(Ud({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PATCH"})),e.next=48,t.fetch(u);case 48:if(f=e.sent,!n){e.next=53;break}return e.abrupt("return",f);case 53:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=57;break}throw new Ko(f);case 57:return e.next=59,f.text();case 59:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"getPaymentMethodsForBasket",value:(h=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new jd("/organizations/{organizationId}/baskets/{basketId}/payment-methods",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Ud(Ud({},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=38,t.fetch(u);case 38:if(f=e.sent,!n){e.next=43;break}return e.abrupt("return",f);case 43:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=47;break}throw new Ko(f);case 47:return e.next=49,f.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"getPriceBooksForBasket",value:(f=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return c=new jd("/organizations/{organizationId}/baskets/{basketId}/price-books",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Ud(Ud({},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=37,t.fetch(u);case 37:if(f=e.sent,!n){e.next=42;break}return e.abrupt("return",f);case 42:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=46;break}throw new Ko(f);case 46:return e.next=48,f.text();case 48:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"addPriceBooksToBasket",value:(u=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return c=new jd("/organizations/{organizationId}/baskets/{basketId}/price-books",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Ud(Ud({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PUT"})),e.next=37,t.fetch(u);case 37:if(f=e.sent,!n){e.next=42;break}return e.abrupt("return",f);case 42:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=44;break}throw new Ko(f);case 44:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"createShipmentForBasket",value:(d=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new jd("/organizations/{organizationId}/baskets/{basketId}/shipments",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Ud(Ud({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=38,t.fetch(u);case 38:if(f=e.sent,!n){e.next=43;break}return e.abrupt("return",f);case 43:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=47;break}throw new Ko(f);case 47:return e.next=49,f.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"removeShipmentFromBasket",value:(c=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===i.shipmentId){e.next=25;break}o.shipmentId=i.shipmentId,e.next=30;break;case 25:if(void 0===a.shipmentId){e.next=29;break}o.shipmentId=a.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new jd("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Ud(Ud({},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{headers:d,method:"DELETE"})),e.next=46,t.fetch(u);case 46:if(f=e.sent,!n){e.next=51;break}return e.abrupt("return",f);case 51:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=55;break}throw new Ko(f);case 55:return e.next=57,f.text();case 57:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"updateShipmentForBasket",value:(s=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===i.shipmentId){e.next=25;break}o.shipmentId=i.shipmentId,e.next=30;break;case 25:if(void 0===a.shipmentId){e.next=29;break}o.shipmentId=a.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new jd("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Ud(Ud({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PATCH"})),e.next=47,t.fetch(u);case 47:if(f=e.sent,!n){e.next=52;break}return e.abrupt("return",f);case 52:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=56;break}throw new Ko(f);case 56:return e.next=58,f.text();case 58:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"updateShippingAddressForShipment",value:(o=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===i.shipmentId){e.next=25;break}o.shipmentId=i.shipmentId,e.next=30;break;case 25:if(void 0===a.shipmentId){e.next=29;break}o.shipmentId=a.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(s={},void 0!==i.useAsBilling?s.useAsBilling=i.useAsBilling:void 0!==a.useAsBilling&&(s.useAsBilling=a.useAsBilling),void 0!==i.removeExternalTax?s.removeExternalTax=i.removeExternalTax:void 0!==a.removeExternalTax&&(s.removeExternalTax=a.removeExternalTax),void 0===i.siteId){e.next=37;break}s.siteId=i.siteId,e.next=42;break;case 37:if(void 0===a.siteId){e.next=41;break}s.siteId=a.siteId,e.next=42;break;case 41:throw new Error("Missing required query parameter: siteId");case 42:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new jd("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-address",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Ud(Ud({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PUT"})),e.next=49,t.fetch(u);case 49:if(f=e.sent,!n){e.next=54;break}return e.abrupt("return",f);case 54:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=58;break}throw new Ko(f);case 58:return e.next=60,f.text();case 60:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 62:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"updateShippingMethodForShipment",value:(a=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===i.shipmentId){e.next=25;break}o.shipmentId=i.shipmentId,e.next=30;break;case 25:if(void 0===a.shipmentId){e.next=29;break}o.shipmentId=a.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new jd("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-method",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Ud(Ud({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PUT"})),e.next=47,t.fetch(u);case 47:if(f=e.sent,!n){e.next=52;break}return e.abrupt("return",f);case 52:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=56;break}throw new Ko(f);case 56:return e.next=58,f.text();case 58:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"getShippingMethodsForShipment",value:(i=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===i.shipmentId){e.next=25;break}o.shipmentId=i.shipmentId,e.next=30;break;case 25:if(void 0===a.shipmentId){e.next=29;break}o.shipmentId=a.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new jd("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-methods",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Ud(Ud({},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=47,t.fetch(u);case 47:if(f=e.sent,!n){e.next=52;break}return e.abrupt("return",f);case 52:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=56;break}throw new Ko(f);case 56:return e.next=58,f.text();case 58:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getTaxesFromBasket",value:(n=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return c=new jd("/organizations/{organizationId}/baskets/{basketId}/taxes",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Ud(Ud({},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=37,t.fetch(u);case 37:if(f=e.sent,!n){e.next=42;break}return e.abrupt("return",f);case 42:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=46;break}throw new Ko(f);case 46:return e.next=48,f.text();case 48:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"addTaxesForBasket",value:(r=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return c=new jd("/organizations/{organizationId}/baskets/{basketId}/taxes",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Ud(Ud({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Ud(Ud({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PUT"})),e.next=37,t.fetch(u);case 37:if(f=e.sent,!n){e.next=42;break}return e.abrupt("return",f);case 42:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=44;break}throw new Ko(f);case 44:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})}]),e}();function Bd(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 Nd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Bd(Object(r),!0).forEach((function(t){Vn(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bd(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Vn(Ad,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-baskets/{version}");var _d=function(){function e(t){Gn(this,e),Vn(this,"clientConfig",void 0);var r=Nd({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new bo(r)}var r,n,i,a;return Yn(e,[{key:"getShopperContext",value:(a=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.usid){e.next=16;break}o.usid=i.usid,e.next=21;break;case 16:if(void 0===a.usid){e.next=20;break}o.usid=a.usid,e.next=21;break;case 20:throw new Error("Missing required path parameter: usid");case 21:return s={},c=new jd("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Nd(Nd({},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Nd(Nd({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=28,t.fetch(u);case 28:if(f=e.sent,!n){e.next=33;break}return e.abrupt("return",f);case 33:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=37;break}throw new Ko(f);case 37:return e.next=39,f.text();case 39:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"createShopperContext",value:(i=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.usid){e.next=16;break}o.usid=i.usid,e.next=21;break;case 16:if(void 0===a.usid){e.next=20;break}o.usid=a.usid,e.next=21;break;case 20:throw new Error("Missing required path parameter: usid");case 21:return s={},c=new jd("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Nd(Nd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Nd(Nd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PUT"})),e.next=28,t.fetch(u);case 28:if(f=e.sent,!n){e.next=33;break}return e.abrupt("return",f);case 33:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=37;break}throw new Ko(f);case 37:return e.next=39,f.text();case 39:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"deleteShopperContext",value:(n=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.usid){e.next=16;break}o.usid=i.usid,e.next=21;break;case 16:if(void 0===a.usid){e.next=20;break}o.usid=a.usid,e.next=21;break;case 20:throw new Error("Missing required path parameter: usid");case 21:return s={},c=new jd("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Nd(Nd({},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Nd(Nd({},this.clientConfig.fetchOptions),{},{headers:d,method:"DELETE"})),e.next=28,t.fetch(u);case 28:if(f=e.sent,!n){e.next=33;break}return e.abrupt("return",f);case 33:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=35;break}throw new Ko(f);case 35:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"updateShopperContext",value:(r=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.usid){e.next=16;break}o.usid=i.usid,e.next=21;break;case 16:if(void 0===a.usid){e.next=20;break}o.usid=a.usid,e.next=21;break;case 20:throw new Error("Missing required path parameter: usid");case 21:return s={},c=new jd("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Nd(Nd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Nd(Nd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PATCH"})),e.next=28,t.fetch(u);case 28:if(f=e.sent,!n){e.next=33;break}return e.abrupt("return",f);case 33:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=37;break}throw new Ko(f);case 37:return e.next=39,f.text();case 39:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})}]),e}();function Ld(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 Dd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ld(Object(r),!0).forEach((function(t){Vn(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ld(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Vn(_d,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/shopper/shopper-context/{version}");var Jd=function(){function e(t){Gn(this,e),Vn(this,"clientConfig",void 0);var r=Dd({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new bo(r)}var r,n,i,a,o,s,c,d,u,f,h,p,l,g,b,v,I,m,x,k,w,y,C,z,O,q,E,P,S,R,j,M;return Yn(e,[{key:"registerCustomer",value:(M=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0===i.siteId){e.next=17;break}s.siteId=i.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}s.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return c=new jd("/organizations/{organizationId}/customers",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Dd(Dd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=28,t.fetch(u);case 28:if(f=e.sent,!n){e.next=33;break}return e.abrupt("return",f);case 33:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=37;break}throw new Ko(f);case 37:return e.next=39,f.text();case 39:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return M.apply(this,arguments)})},{key:"invalidateCustomerAuth",value:(j=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0===i.siteId){e.next=17;break}s.siteId=i.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}s.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return c=new jd("/organizations/{organizationId}/customers/actions/logout",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Dd(Dd({},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{headers:d,method:"DELETE"})),e.next=28,t.fetch(u);case 28:if(f=e.sent,!n){e.next=33;break}return e.abrupt("return",f);case 33:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=35;break}throw new Ko(f);case 35:case"end":return e.stop()}}),e,this)}))),function(e,t){return j.apply(this,arguments)})},{key:"authorizeCustomer",value:(R=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0===i.clientId){e.next=17;break}s.clientId=i.clientId,e.next=22;break;case 17:if(void 0===a.clientId){e.next=21;break}s.clientId=a.clientId,e.next=22;break;case 21:throw new Error("Missing required query parameter: clientId");case 22:if(void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return c=new jd("/organizations/{organizationId}/customers/actions/login",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Dd(Dd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=37,t.fetch(u);case 37:if(f=e.sent,!n){e.next=42;break}return e.abrupt("return",f);case 42:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=46;break}throw new Ko(f);case 46:return e.next=48,f.text();case 48:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return R.apply(this,arguments)})},{key:"authorizeTrustedSystem",value:(S=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0===i.siteId){e.next=17;break}s.siteId=i.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}s.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return c=new jd("/organizations/{organizationId}/customers/trusted-system/actions/login",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Dd(Dd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=28,t.fetch(u);case 28:if(f=e.sent,!n){e.next=33;break}return e.abrupt("return",f);case 33:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=37;break}throw new Ko(f);case 37:return e.next=39,f.text();case 39:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return S.apply(this,arguments)})},{key:"resetPassword",value:(P=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0===i.siteId){e.next=17;break}s.siteId=i.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}s.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return c=new jd("/organizations/{organizationId}/customers/password/actions/reset",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Dd(Dd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=28,t.fetch(u);case 28:if(f=e.sent,!n){e.next=33;break}return e.abrupt("return",f);case 33:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=35;break}throw new Ko(f);case 35:case"end":return e.stop()}}),e,this)}))),function(e,t){return P.apply(this,arguments)})},{key:"getResetPasswordToken",value:(E=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0===i.siteId){e.next=17;break}s.siteId=i.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}s.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return c=new jd("/organizations/{organizationId}/customers/password/actions/create-reset-token",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Dd(Dd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=28,t.fetch(u);case 28:if(f=e.sent,!n){e.next=33;break}return e.abrupt("return",f);case 33:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=37;break}throw new Ko(f);case 37:return e.next=39,f.text();case 39:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return E.apply(this,arguments)})},{key:"registerExternalProfile",value:(q=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0===i.siteId){e.next=17;break}s.siteId=i.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}s.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return c=new jd("/organizations/{organizationId}/customers/external-profile",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Dd(Dd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=28,t.fetch(u);case 28:if(f=e.sent,!n){e.next=33;break}return e.abrupt("return",f);case 33:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=37;break}throw new Ko(f);case 37:return e.next=39,f.text();case 39:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return q.apply(this,arguments)})},{key:"getExternalProfile",value:(O=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0===i.externalId){e.next=17;break}s.externalId=i.externalId,e.next=22;break;case 17:if(void 0===a.externalId){e.next=21;break}s.externalId=a.externalId,e.next=22;break;case 21:throw new Error("Missing required query parameter: externalId");case 22:if(void 0===i.authenticationProviderId){e.next=26;break}s.authenticationProviderId=i.authenticationProviderId,e.next=31;break;case 26:if(void 0===a.authenticationProviderId){e.next=30;break}s.authenticationProviderId=a.authenticationProviderId,e.next=31;break;case 30:throw new Error("Missing required query parameter: authenticationProviderId");case 31:if(void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new jd("/organizations/{organizationId}/customers/external-profile",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Dd(Dd({},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=46,t.fetch(u);case 46:if(f=e.sent,!n){e.next=51;break}return e.abrupt("return",f);case 51:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=55;break}throw new Ko(f);case 55:return e.next=57,f.text();case 57:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return O.apply(this,arguments)})},{key:"getCustomer",value:(z=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.customerId){e.next=16;break}o.customerId=i.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}o.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return c=new jd("/organizations/{organizationId}/customers/{customerId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Dd(Dd({},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=37,t.fetch(u);case 37:if(f=e.sent,!n){e.next=42;break}return e.abrupt("return",f);case 42:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=46;break}throw new Ko(f);case 46:return e.next=48,f.text();case 48:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return z.apply(this,arguments)})},{key:"updateCustomer",value:(C=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.customerId){e.next=16;break}o.customerId=i.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}o.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return c=new jd("/organizations/{organizationId}/customers/{customerId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Dd(Dd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PATCH"})),e.next=37,t.fetch(u);case 37:if(f=e.sent,!n){e.next=42;break}return e.abrupt("return",f);case 42:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=46;break}throw new Ko(f);case 46:return e.next=48,f.text();case 48:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return C.apply(this,arguments)})},{key:"createCustomerAddress",value:(y=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.customerId){e.next=16;break}o.customerId=i.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}o.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return c=new jd("/organizations/{organizationId}/customers/{customerId}/addresses",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Dd(Dd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=37,t.fetch(u);case 37:if(f=e.sent,!n){e.next=42;break}return e.abrupt("return",f);case 42:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=46;break}throw new Ko(f);case 46:return e.next=48,f.text();case 48:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return y.apply(this,arguments)})},{key:"getCustomerAddress",value:(w=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.customerId){e.next=16;break}o.customerId=i.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}o.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===i.addressName){e.next=25;break}o.addressName=i.addressName,e.next=30;break;case 25:if(void 0===a.addressName){e.next=29;break}o.addressName=a.addressName,e.next=30;break;case 29:throw new Error("Missing required path parameter: addressName");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new jd("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Dd(Dd({},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=46,t.fetch(u);case 46:if(f=e.sent,!n){e.next=51;break}return e.abrupt("return",f);case 51:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=55;break}throw new Ko(f);case 55:return e.next=57,f.text();case 57:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return w.apply(this,arguments)})},{key:"removeCustomerAddress",value:(k=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.customerId){e.next=16;break}o.customerId=i.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}o.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===i.addressName){e.next=25;break}o.addressName=i.addressName,e.next=30;break;case 25:if(void 0===a.addressName){e.next=29;break}o.addressName=a.addressName,e.next=30;break;case 29:throw new Error("Missing required path parameter: addressName");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new jd("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Dd(Dd({},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{headers:d,method:"DELETE"})),e.next=46,t.fetch(u);case 46:if(f=e.sent,!n){e.next=51;break}return e.abrupt("return",f);case 51:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=53;break}throw new Ko(f);case 53:case"end":return e.stop()}}),e,this)}))),function(e,t){return k.apply(this,arguments)})},{key:"updateCustomerAddress",value:(x=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.customerId){e.next=16;break}o.customerId=i.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}o.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===i.addressName){e.next=25;break}o.addressName=i.addressName,e.next=30;break;case 25:if(void 0===a.addressName){e.next=29;break}o.addressName=a.addressName,e.next=30;break;case 29:throw new Error("Missing required path parameter: addressName");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new jd("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Dd(Dd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PATCH"})),e.next=46,t.fetch(u);case 46:if(f=e.sent,!n){e.next=51;break}return e.abrupt("return",f);case 51:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=55;break}throw new Ko(f);case 55:return e.next=57,f.text();case 57:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return x.apply(this,arguments)})},{key:"getCustomerBaskets",value:(m=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.customerId){e.next=16;break}o.customerId=i.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}o.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return c=new jd("/organizations/{organizationId}/customers/{customerId}/baskets",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Dd(Dd({},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=37,t.fetch(u);case 37:if(f=e.sent,!n){e.next=42;break}return e.abrupt("return",f);case 42:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=46;break}throw new Ko(f);case 46:return e.next=48,f.text();case 48:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return m.apply(this,arguments)})},{key:"getCustomerOrders",value:(I=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.customerId){e.next=16;break}o.customerId=i.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}o.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(s={},void 0!==i.crossSites?s.crossSites=i.crossSites:void 0!==a.crossSites&&(s.crossSites=a.crossSites),void 0!==i.from?s.from=i.from:void 0!==a.from&&(s.from=a.from),void 0!==i.until?s.until=i.until:void 0!==a.until&&(s.until=a.until),void 0!==i.status?s.status=i.status:void 0!==a.status&&(s.status=a.status),void 0===i.siteId){e.next=30;break}s.siteId=i.siteId,e.next=35;break;case 30:if(void 0===a.siteId){e.next=34;break}s.siteId=a.siteId,e.next=35;break;case 34:throw new Error("Missing required query parameter: siteId");case 35:return void 0!==i.offset?s.offset=i.offset:void 0!==a.offset&&(s.offset=a.offset),void 0!==i.limit?s.limit=i.limit:void 0!==a.limit&&(s.limit=a.limit),c=new jd("/organizations/{organizationId}/customers/{customerId}/orders",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Dd(Dd({},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=43,t.fetch(u);case 43:if(f=e.sent,!n){e.next=48;break}return e.abrupt("return",f);case 48:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=52;break}throw new Ko(f);case 52:return e.next=54,f.text();case 54:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 56:case"end":return e.stop()}}),e,this)}))),function(e,t){return I.apply(this,arguments)})},{key:"updateCustomerPassword",value:(v=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.customerId){e.next=16;break}o.customerId=i.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}o.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return c=new jd("/organizations/{organizationId}/customers/{customerId}/password",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Dd(Dd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PUT"})),e.next=37,t.fetch(u);case 37:if(f=e.sent,!n){e.next=42;break}return e.abrupt("return",f);case 42:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=44;break}throw new Ko(f);case 44:case"end":return e.stop()}}),e,this)}))),function(e,t){return v.apply(this,arguments)})},{key:"createCustomerPaymentInstrument",value:(b=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.customerId){e.next=16;break}o.customerId=i.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}o.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return c=new jd("/organizations/{organizationId}/customers/{customerId}/payment-instruments",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Dd(Dd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=37,t.fetch(u);case 37:if(f=e.sent,!n){e.next=42;break}return e.abrupt("return",f);case 42:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=46;break}throw new Ko(f);case 46:return e.next=48,f.text();case 48:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"deleteCustomerPaymentInstrument",value:(g=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.customerId){e.next=16;break}o.customerId=i.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}o.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===i.paymentInstrumentId){e.next=25;break}o.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 25:if(void 0===a.paymentInstrumentId){e.next=29;break}o.paymentInstrumentId=a.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new jd("/organizations/{organizationId}/customers/{customerId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Dd(Dd({},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{headers:d,method:"DELETE"})),e.next=46,t.fetch(u);case 46:if(f=e.sent,!n){e.next=51;break}return e.abrupt("return",f);case 51:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=53;break}throw new Ko(f);case 53:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"getCustomerPaymentInstrument",value:(l=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.customerId){e.next=16;break}o.customerId=i.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}o.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===i.paymentInstrumentId){e.next=25;break}o.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 25:if(void 0===a.paymentInstrumentId){e.next=29;break}o.paymentInstrumentId=a.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new jd("/organizations/{organizationId}/customers/{customerId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Dd(Dd({},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=46,t.fetch(u);case 46:if(f=e.sent,!n){e.next=51;break}return e.abrupt("return",f);case 51:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=55;break}throw new Ko(f);case 55:return e.next=57,f.text();case 57:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"getCustomerProductLists",value:(p=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.customerId){e.next=16;break}o.customerId=i.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}o.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return c=new jd("/organizations/{organizationId}/customers/{customerId}/product-lists",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Dd(Dd({},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=37,t.fetch(u);case 37:if(f=e.sent,!n){e.next=42;break}return e.abrupt("return",f);case 42:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=46;break}throw new Ko(f);case 46:return e.next=48,f.text();case 48:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"createCustomerProductList",value:(h=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.customerId){e.next=16;break}o.customerId=i.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}o.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return c=new jd("/organizations/{organizationId}/customers/{customerId}/product-lists",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Dd(Dd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=37,t.fetch(u);case 37:if(f=e.sent,!n){e.next=42;break}return e.abrupt("return",f);case 42:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=46;break}throw new Ko(f);case 46:return e.next=48,f.text();case 48:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"deleteCustomerProductList",value:(f=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.customerId){e.next=16;break}o.customerId=i.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}o.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===i.listId){e.next=25;break}o.listId=i.listId,e.next=30;break;case 25:if(void 0===a.listId){e.next=29;break}o.listId=a.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new jd("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Dd(Dd({},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{headers:d,method:"DELETE"})),e.next=46,t.fetch(u);case 46:if(f=e.sent,!n){e.next=51;break}return e.abrupt("return",f);case 51:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=53;break}throw new Ko(f);case 53:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"getCustomerProductList",value:(u=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.customerId){e.next=16;break}o.customerId=i.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}o.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===i.listId){e.next=25;break}o.listId=i.listId,e.next=30;break;case 25:if(void 0===a.listId){e.next=29;break}o.listId=a.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new jd("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Dd(Dd({},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=46,t.fetch(u);case 46:if(f=e.sent,!n){e.next=51;break}return e.abrupt("return",f);case 51:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=55;break}throw new Ko(f);case 55:return e.next=57,f.text();case 57:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"updateCustomerProductList",value:(d=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.customerId){e.next=16;break}o.customerId=i.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}o.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===i.listId){e.next=25;break}o.listId=i.listId,e.next=30;break;case 25:if(void 0===a.listId){e.next=29;break}o.listId=a.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new jd("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Dd(Dd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PATCH"})),e.next=46,t.fetch(u);case 46:if(f=e.sent,!n){e.next=51;break}return e.abrupt("return",f);case 51:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=55;break}throw new Ko(f);case 55:return e.next=57,f.text();case 57:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"createCustomerProductListItem",value:(c=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.customerId){e.next=16;break}o.customerId=i.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}o.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===i.listId){e.next=25;break}o.listId=i.listId,e.next=30;break;case 25:if(void 0===a.listId){e.next=29;break}o.listId=a.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new jd("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Dd(Dd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=46,t.fetch(u);case 46:if(f=e.sent,!n){e.next=51;break}return e.abrupt("return",f);case 51:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=55;break}throw new Ko(f);case 55:return e.next=57,f.text();case 57:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"deleteCustomerProductListItem",value:(s=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.customerId){e.next=16;break}o.customerId=i.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}o.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===i.listId){e.next=25;break}o.listId=i.listId,e.next=30;break;case 25:if(void 0===a.listId){e.next=29;break}o.listId=a.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(void 0===i.itemId){e.next=34;break}o.itemId=i.itemId,e.next=39;break;case 34:if(void 0===a.itemId){e.next=38;break}o.itemId=a.itemId,e.next=39;break;case 38:throw new Error("Missing required path parameter: itemId");case 39:if(s={},void 0===i.siteId){e.next=44;break}s.siteId=i.siteId,e.next=49;break;case 44:if(void 0===a.siteId){e.next=48;break}s.siteId=a.siteId,e.next=49;break;case 48:throw new Error("Missing required query parameter: siteId");case 49:return c=new jd("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Dd(Dd({},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{headers:d,method:"DELETE"})),e.next=55,t.fetch(u);case 55:if(f=e.sent,!n){e.next=60;break}return e.abrupt("return",f);case 60:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=62;break}throw new Ko(f);case 62:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"getCustomerProductListItem",value:(o=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.customerId){e.next=16;break}o.customerId=i.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}o.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===i.listId){e.next=25;break}o.listId=i.listId,e.next=30;break;case 25:if(void 0===a.listId){e.next=29;break}o.listId=a.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(void 0===i.itemId){e.next=34;break}o.itemId=i.itemId,e.next=39;break;case 34:if(void 0===a.itemId){e.next=38;break}o.itemId=a.itemId,e.next=39;break;case 38:throw new Error("Missing required path parameter: itemId");case 39:if(s={},void 0===i.siteId){e.next=44;break}s.siteId=i.siteId,e.next=49;break;case 44:if(void 0===a.siteId){e.next=48;break}s.siteId=a.siteId,e.next=49;break;case 48:throw new Error("Missing required query parameter: siteId");case 49:return c=new jd("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Dd(Dd({},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=55,t.fetch(u);case 55:if(f=e.sent,!n){e.next=60;break}return e.abrupt("return",f);case 60:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=64;break}throw new Ko(f);case 64:return e.next=66,f.text();case 66:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 68:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"updateCustomerProductListItem",value:(a=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.customerId){e.next=16;break}o.customerId=i.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}o.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===i.listId){e.next=25;break}o.listId=i.listId,e.next=30;break;case 25:if(void 0===a.listId){e.next=29;break}o.listId=a.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(void 0===i.itemId){e.next=34;break}o.itemId=i.itemId,e.next=39;break;case 34:if(void 0===a.itemId){e.next=38;break}o.itemId=a.itemId,e.next=39;break;case 38:throw new Error("Missing required path parameter: itemId");case 39:if(s={},void 0===i.siteId){e.next=44;break}s.siteId=i.siteId,e.next=49;break;case 44:if(void 0===a.siteId){e.next=48;break}s.siteId=a.siteId,e.next=49;break;case 48:throw new Error("Missing required query parameter: siteId");case 49:return c=new jd("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Dd(Dd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PATCH"})),e.next=55,t.fetch(u);case 55:if(f=e.sent,!n){e.next=60;break}return e.abrupt("return",f);case 60:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=64;break}throw new Ko(f);case 64:return e.next=66,f.text();case 66:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 68:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"getPublicProductListsBySearchTerm",value:(i=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0!==i.email?s.email=i.email:void 0!==a.email&&(s.email=a.email),void 0!==i.firstName?s.firstName=i.firstName:void 0!==a.firstName&&(s.firstName=a.firstName),void 0!==i.lastName?s.lastName=i.lastName:void 0!==a.lastName&&(s.lastName=a.lastName),void 0===i.siteId){e.next=20;break}s.siteId=i.siteId,e.next=25;break;case 20:if(void 0===a.siteId){e.next=24;break}s.siteId=a.siteId,e.next=25;break;case 24:throw new Error("Missing required query parameter: siteId");case 25:return c=new jd("/organizations/{organizationId}/product-lists",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Dd(Dd({},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=31,t.fetch(u);case 31:if(f=e.sent,!n){e.next=36;break}return e.abrupt("return",f);case 36:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=40;break}throw new Ko(f);case 40:return e.next=42,f.text();case 42:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 44:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getPublicProductList",value:(n=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.listId){e.next=16;break}o.listId=i.listId,e.next=21;break;case 16:if(void 0===a.listId){e.next=20;break}o.listId=a.listId,e.next=21;break;case 20:throw new Error("Missing required path parameter: listId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return c=new jd("/organizations/{organizationId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Dd(Dd({},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=37,t.fetch(u);case 37:if(f=e.sent,!n){e.next=42;break}return e.abrupt("return",f);case 42:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=46;break}throw new Ko(f);case 46:return e.next=48,f.text();case 48:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getProductListItem",value:(r=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.listId){e.next=16;break}o.listId=i.listId,e.next=21;break;case 16:if(void 0===a.listId){e.next=20;break}o.listId=a.listId,e.next=21;break;case 20:throw new Error("Missing required path parameter: listId");case 21:if(void 0===i.itemId){e.next=25;break}o.itemId=i.itemId,e.next=30;break;case 25:if(void 0===a.itemId){e.next=29;break}o.itemId=a.itemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: itemId");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new jd("/organizations/{organizationId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Dd(Dd({},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Dd(Dd({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=46,t.fetch(u);case 46:if(f=e.sent,!n){e.next=51;break}return e.abrupt("return",f);case 51:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=55;break}throw new Ko(f);case 55:return e.next=57,f.text();case 57:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})}]),e}();function Fd(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?Fd(Object(r),!0).forEach((function(t){Vn(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fd(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Vn(Jd,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/customer/shopper-customers/{version}");var Hd=function(){function e(t){Gn(this,e),Vn(this,"clientConfig",void 0);var r=Gd({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new bo(r)}var r,n;return Yn(e,[{key:"retrieveResults",value:(n=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.channelId){e.next=16;break}o.channelId=i.channelId,e.next=21;break;case 16:if(void 0===a.channelId){e.next=20;break}o.channelId=a.channelId,e.next=21;break;case 20:throw new Error("Missing required path parameter: channelId");case 21:if(s={},void 0===i.locale){e.next=26;break}s.locale=i.locale,e.next=31;break;case 26:if(void 0===a.locale){e.next=30;break}s.locale=a.locale,e.next=31;break;case 30:throw new Error("Missing required query parameter: locale");case 31:return void 0!==i.offset?s.offset=i.offset:void 0!==a.offset&&(s.offset=a.offset),void 0!==i.limit?s.limit=i.limit:void 0!==a.limit&&(s.limit=a.limit),c=new jd("/organizations/{organizationId}/channels/{channelId}/results",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Gd(Gd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Gd(Gd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=39,t.fetch(u);case 39:if(f=e.sent,!n){e.next=44;break}return e.abrupt("return",f);case 44:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=48;break}throw new Ko(f);case 48:return e.next=50,f.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getSuggestions",value:(r=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.channelId){e.next=16;break}o.channelId=i.channelId,e.next=21;break;case 16:if(void 0===a.channelId){e.next=20;break}o.channelId=a.channelId,e.next=21;break;case 20:throw new Error("Missing required path parameter: channelId");case 21:if(s={},void 0===i.suggestionTypes){e.next=26;break}s.suggestionTypes=i.suggestionTypes,e.next=31;break;case 26:if(void 0===a.suggestionTypes){e.next=30;break}s.suggestionTypes=a.suggestionTypes,e.next=31;break;case 30:throw new Error("Missing required query parameter: suggestionTypes");case 31:if(void 0!==i.searchText?s.searchText=i.searchText:void 0!==a.searchText&&(s.searchText=a.searchText),void 0===i.locale){e.next=36;break}s.locale=i.locale,e.next=41;break;case 36:if(void 0===a.locale){e.next=40;break}s.locale=a.locale,e.next=41;break;case 40:throw new Error("Missing required query parameter: locale");case 41:return c=new jd("/organizations/{organizationId}/channels/{channelId}/suggestions",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Gd(Gd({},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Gd(Gd({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=47,t.fetch(u);case 47:if(f=e.sent,!n){e.next=52;break}return e.abrupt("return",f);case 52:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=56;break}throw new Ko(f);case 56:return e.next=58,f.text();case 58:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})}]),e}();function Yd(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 Vd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Yd(Object(r),!0).forEach((function(t){Vn(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yd(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Vn(Hd,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/discovery/query/{version}");var Wd=function(){function e(t){Gn(this,e),Vn(this,"clientConfig",void 0);var r=Vd({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new bo(r)}var r;return Yn(e,[{key:"getGiftCertificate",value:(r=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0===i.siteId){e.next=17;break}s.siteId=i.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}s.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return c=new jd("/organizations/{organizationId}/gift-certificate",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Vd(Vd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Vd(Vd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=28,t.fetch(u);case 28:if(f=e.sent,!n){e.next=33;break}return e.abrupt("return",f);case 33:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=37;break}throw new Ko(f);case 37:return e.next=39,f.text();case 39:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})}]),e}();function $d(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 Kd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?$d(Object(r),!0).forEach((function(t){Vn(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$d(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Vn(Wd,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/pricing/shopper-gift-certificates/{version}");var Qd=function(){function e(t){Gn(this,e),Vn(this,"clientConfig",void 0);var r=Kd({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new bo(r)}var r,n,i,a,o,s,c,d,u,f,h,p,l,g,b;return Yn(e,[{key:"retrieveCredQualityUserInfo",value:(b=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0===i.username){e.next=17;break}s.username=i.username,e.next=22;break;case 17:if(void 0===a.username){e.next=21;break}s.username=a.username,e.next=22;break;case 21:throw new Error("Missing required query parameter: username");case 22:return c=new jd("/organizations/{organizationId}/cred-qual/user",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Kd(Kd({},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Kd(Kd({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=28,t.fetch(u);case 28:if(f=e.sent,!n){e.next=33;break}return e.abrupt("return",f);case 33:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=37;break}throw new Ko(f);case 37:return e.next=39,f.text();case 39:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"authenticateCustomer",value:(g=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return s={},c=new jd("/organizations/{organizationId}/oauth2/login",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Kd(Kd({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Kd(Kd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=19,t.fetch(u);case 19:if(f=e.sent,!n){e.next=24;break}return e.abrupt("return",f);case 24:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=26;break}throw new Ko(f);case 26:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"authorizePasswordlessCustomer",value:(l=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return s={},c=new jd("/organizations/{organizationId}/oauth2/passwordless/login",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Kd(Kd({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Kd(Kd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=19,t.fetch(u);case 19:if(f=e.sent,!n){e.next=24;break}return e.abrupt("return",f);case 24:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=28;break}throw new Ko(f);case 28:return e.next=30,f.text();case 30:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"logoutCustomer",value:(p=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0===i.client_id){e.next=17;break}s.client_id=i.client_id,e.next=22;break;case 17:if(void 0===a.client_id){e.next=21;break}s.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===i.refresh_token){e.next=26;break}s.refresh_token=i.refresh_token,e.next=31;break;case 26:if(void 0===a.refresh_token){e.next=30;break}s.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!==i.channel_id?s.channel_id=i.channel_id:void 0!==a.channel_id&&(s.channel_id=a.channel_id),void 0!==i.hint?s.hint=i.hint:void 0!==a.hint&&(s.hint=a.hint),c=new jd("/organizations/{organizationId}/oauth2/logout",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Kd(Kd({},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Kd(Kd({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=39,t.fetch(u);case 39:if(f=e.sent,!n){e.next=44;break}return e.abrupt("return",f);case 44:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=48;break}throw new Ko(f);case 48:return e.next=50,f.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"authorizeCustomer",value:(h=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0===i.redirect_uri){e.next=17;break}s.redirect_uri=i.redirect_uri,e.next=22;break;case 17:if(void 0===a.redirect_uri){e.next=21;break}s.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===i.response_type){e.next=26;break}s.response_type=i.response_type,e.next=31;break;case 26:if(void 0===a.response_type){e.next=30;break}s.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===i.client_id){e.next=35;break}s.client_id=i.client_id,e.next=40;break;case 35:if(void 0===a.client_id){e.next=39;break}s.client_id=a.client_id,e.next=40;break;case 39:throw new Error("Missing required query parameter: client_id");case 40:if(void 0!==i.scope?s.scope=i.scope:void 0!==a.scope&&(s.scope=a.scope),void 0!==i.state?s.state=i.state:void 0!==a.state&&(s.state=a.state),void 0!==i.usid?s.usid=i.usid:void 0!==a.usid&&(s.usid=a.usid),void 0!==i.hint?s.hint=i.hint:void 0!==a.hint&&(s.hint=a.hint),void 0!==i.channel_id?s.channel_id=i.channel_id:void 0!==a.channel_id&&(s.channel_id=a.channel_id),void 0===i.code_challenge){e.next=49;break}s.code_challenge=i.code_challenge,e.next=54;break;case 49:if(void 0===a.code_challenge){e.next=53;break}s.code_challenge=a.code_challenge,e.next=54;break;case 53:throw new Error("Missing required query parameter: code_challenge");case 54:return c=new jd("/organizations/{organizationId}/oauth2/authorize",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Kd(Kd({},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Kd(Kd({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=60,t.fetch(u);case 60:if(f=e.sent,!n){e.next=65;break}return e.abrupt("return",f);case 65:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=67;break}throw new Ko(f);case 67:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"getAccessToken",value:(f=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return s={},c=new jd("/organizations/{organizationId}/oauth2/token",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Kd(Kd({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Kd(Kd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=19,t.fetch(u);case 19:if(f=e.sent,!n){e.next=24;break}return e.abrupt("return",f);case 24:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=28;break}throw new Ko(f);case 28:return e.next=30,f.text();case 30:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"getTrustedSystemAccessToken",value:(u=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return s={},c=new jd("/organizations/{organizationId}/oauth2/trusted-system/token",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Kd(Kd({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Kd(Kd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=19,t.fetch(u);case 19:if(f=e.sent,!n){e.next=24;break}return e.abrupt("return",f);case 24:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=28;break}throw new Ko(f);case 28:return e.next=30,f.text();case 30:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"getPasswordResetToken",value:(d=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return s={},c=new jd("/organizations/{organizationId}/oauth2/password/reset",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Kd(Kd({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Kd(Kd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=19,t.fetch(u);case 19:if(f=e.sent,!n){e.next=24;break}return e.abrupt("return",f);case 24:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=26;break}throw new Ko(f);case 26:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"resetPassword",value:(c=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return s={},c=new jd("/organizations/{organizationId}/oauth2/password/action",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Kd(Kd({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Kd(Kd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=19,t.fetch(u);case 19:if(f=e.sent,!n){e.next=24;break}return e.abrupt("return",f);case 24:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=26;break}throw new Ko(f);case 26:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"getPasswordLessAccessToken",value:(s=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return s={},c=new jd("/organizations/{organizationId}/oauth2/passwordless/token",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Kd(Kd({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Kd(Kd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=19,t.fetch(u);case 19:if(f=e.sent,!n){e.next=24;break}return e.abrupt("return",f);case 24:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=28;break}throw new Ko(f);case 28:return e.next=30,f.text();case 30:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"revokeToken",value:(o=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return s={},c=new jd("/organizations/{organizationId}/oauth2/revoke",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Kd(Kd({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Kd(Kd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=19,t.fetch(u);case 19:if(f=e.sent,!n){e.next=24;break}return e.abrupt("return",f);case 24:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=28;break}throw new Ko(f);case 28:return e.next=30,f.text();case 30:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"introspectToken",value:(a=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return s={},c=new jd("/organizations/{organizationId}/oauth2/introspect",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Kd(Kd({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Kd(Kd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=19,t.fetch(u);case 19:if(f=e.sent,!n){e.next=24;break}return e.abrupt("return",f);case 24:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=28;break}throw new Ko(f);case 28:return e.next=30,f.text();case 30:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"getUserInfo",value:(i=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return s={},void 0!==i.channel_id?s.channel_id=i.channel_id:void 0!==a.channel_id&&(s.channel_id=a.channel_id),c=new jd("/organizations/{organizationId}/oauth2/userinfo",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Kd(Kd({},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Kd(Kd({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=20,t.fetch(u);case 20:if(f=e.sent,!n){e.next=25;break}return e.abrupt("return",f);case 25:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=29;break}throw new Ko(f);case 29:return e.next=31,f.text();case 31:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getWellknownOpenidConfiguration",value:(n=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return s={},c=new jd("/organizations/{organizationId}/oauth2/.well-known/openid-configuration",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Kd(Kd({},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Kd(Kd({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=19,t.fetch(u);case 19:if(f=e.sent,!n){e.next=24;break}return e.abrupt("return",f);case 24:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=28;break}throw new Ko(f);case 28:return e.next=30,f.text();case 30:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getJwksUri",value:(r=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return s={},c=new jd("/organizations/{organizationId}/oauth2/jwks",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Kd(Kd({},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Kd(Kd({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=19,t.fetch(u);case 19:if(f=e.sent,!n){e.next=24;break}return e.abrupt("return",f);case 24:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=28;break}throw new Ko(f);case 28:return e.next=30,f.text();case 30:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})}]),e}();function Xd(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 Zd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Xd(Object(r),!0).forEach((function(t){Vn(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xd(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Vn(Qd,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/{version}");var eu=function(){function e(t){Gn(this,e),Vn(this,"clientConfig",void 0);var r=Zd({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new bo(r)}var r,n,i,a,o,s,c;return Yn(e,[{key:"createOrder",value:(c=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0===i.siteId){e.next=17;break}s.siteId=i.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}s.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new jd("/organizations/{organizationId}/orders",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Zd(Zd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Zd(Zd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=29,t.fetch(u);case 29:if(f=e.sent,!n){e.next=34;break}return e.abrupt("return",f);case 34:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=38;break}throw new Ko(f);case 38:return e.next=40,f.text();case 40:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 42:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"getOrder",value:(s=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.orderNo){e.next=16;break}o.orderNo=i.orderNo,e.next=21;break;case 16:if(void 0===a.orderNo){e.next=20;break}o.orderNo=a.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new jd("/organizations/{organizationId}/orders/{orderNo}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Zd(Zd({},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Zd(Zd({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=38,t.fetch(u);case 38:if(f=e.sent,!n){e.next=43;break}return e.abrupt("return",f);case 43:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=47;break}throw new Ko(f);case 47:return e.next=49,f.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"createPaymentInstrumentForOrder",value:(o=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.orderNo){e.next=16;break}o.orderNo=i.orderNo,e.next=21;break;case 16:if(void 0===a.orderNo){e.next=20;break}o.orderNo=a.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new jd("/organizations/{organizationId}/orders/{orderNo}/payment-instruments",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Zd(Zd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Zd(Zd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=38,t.fetch(u);case 38:if(f=e.sent,!n){e.next=43;break}return e.abrupt("return",f);case 43:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=47;break}throw new Ko(f);case 47:return e.next=49,f.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"removePaymentInstrumentFromOrder",value:(a=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.orderNo){e.next=16;break}o.orderNo=i.orderNo,e.next=21;break;case 16:if(void 0===a.orderNo){e.next=20;break}o.orderNo=a.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(void 0===i.paymentInstrumentId){e.next=25;break}o.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 25:if(void 0===a.paymentInstrumentId){e.next=29;break}o.paymentInstrumentId=a.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new jd("/organizations/{organizationId}/orders/{orderNo}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Zd(Zd({},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Zd(Zd({},this.clientConfig.fetchOptions),{},{headers:d,method:"DELETE"})),e.next=47,t.fetch(u);case 47:if(f=e.sent,!n){e.next=52;break}return e.abrupt("return",f);case 52:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=56;break}throw new Ko(f);case 56:return e.next=58,f.text();case 58:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"updatePaymentInstrumentForOrder",value:(i=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.orderNo){e.next=16;break}o.orderNo=i.orderNo,e.next=21;break;case 16:if(void 0===a.orderNo){e.next=20;break}o.orderNo=a.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(void 0===i.paymentInstrumentId){e.next=25;break}o.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 25:if(void 0===a.paymentInstrumentId){e.next=29;break}o.paymentInstrumentId=a.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new jd("/organizations/{organizationId}/orders/{orderNo}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Zd(Zd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Zd(Zd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PATCH"})),e.next=47,t.fetch(u);case 47:if(f=e.sent,!n){e.next=52;break}return e.abrupt("return",f);case 52:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=56;break}throw new Ko(f);case 56:return e.next=58,f.text();case 58:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getPaymentMethodsForOrder",value:(n=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.orderNo){e.next=16;break}o.orderNo=i.orderNo,e.next=21;break;case 16:if(void 0===a.orderNo){e.next=20;break}o.orderNo=a.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new jd("/organizations/{organizationId}/orders/{orderNo}/payment-methods",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Zd(Zd({},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Zd(Zd({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=38,t.fetch(u);case 38:if(f=e.sent,!n){e.next=43;break}return e.abrupt("return",f);case 43:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=47;break}throw new Ko(f);case 47:return e.next=49,f.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getTaxesFromOrder",value:(r=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.orderNo){e.next=16;break}o.orderNo=i.orderNo,e.next=21;break;case 16:if(void 0===a.orderNo){e.next=20;break}o.orderNo=a.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return c=new jd("/organizations/{organizationId}/orders/{orderNo}/taxes",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Zd(Zd({},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),Zd(Zd({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=37,t.fetch(u);case 37:if(f=e.sent,!n){e.next=42;break}return e.abrupt("return",f);case 42:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=46;break}throw new Ko(f);case 46:return e.next=48,f.text();case 48:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.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 ru(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){Vn(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}Vn(eu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-orders/{version}");var nu=function(){function e(t){Gn(this,e),Vn(this,"clientConfig",void 0);var r=ru({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new bo(r)}var r,n,i,a;return Yn(e,[{key:"getProducts",value:(a=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0===i.ids){e.next=17;break}s.ids=i.ids,e.next=22;break;case 17:if(void 0===a.ids){e.next=21;break}s.ids=a.ids,e.next=22;break;case 21:throw new Error("Missing required query parameter: ids");case 22:if(void 0!==i.inventoryIds?s.inventoryIds=i.inventoryIds:void 0!==a.inventoryIds&&(s.inventoryIds=a.inventoryIds),void 0!==i.currency?s.currency=i.currency:void 0!==a.currency&&(s.currency=a.currency),void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),void 0!==i.allImages?s.allImages=i.allImages:void 0!==a.allImages&&(s.allImages=a.allImages),void 0!==i.perPricebook?s.perPricebook=i.perPricebook:void 0!==a.perPricebook&&(s.perPricebook=a.perPricebook),void 0===i.siteId){e.next=31;break}s.siteId=i.siteId,e.next=36;break;case 31:if(void 0===a.siteId){e.next=35;break}s.siteId=a.siteId,e.next=36;break;case 35:throw new Error("Missing required query parameter: siteId");case 36:return c=new jd("/organizations/{organizationId}/products",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=ru(ru({},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),ru(ru({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=42,t.fetch(u);case 42:if(f=e.sent,!n){e.next=47;break}return e.abrupt("return",f);case 47:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=51;break}throw new Ko(f);case 51:return e.next=53,f.text();case 53:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 55:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"getProduct",value:(i=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.id){e.next=16;break}o.id=i.id,e.next=21;break;case 16:if(void 0===a.id){e.next=20;break}o.id=a.id,e.next=21;break;case 20:throw new Error("Missing required path parameter: id");case 21:if(s={},void 0!==i.inventoryIds?s.inventoryIds=i.inventoryIds:void 0!==a.inventoryIds&&(s.inventoryIds=a.inventoryIds),void 0!==i.currency?s.currency=i.currency:void 0!==a.currency&&(s.currency=a.currency),void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),void 0!==i.allImages?s.allImages=i.allImages:void 0!==a.allImages&&(s.allImages=a.allImages),void 0!==i.perPricebook?s.perPricebook=i.perPricebook:void 0!==a.perPricebook&&(s.perPricebook=a.perPricebook),void 0===i.siteId){e.next=31;break}s.siteId=i.siteId,e.next=36;break;case 31:if(void 0===a.siteId){e.next=35;break}s.siteId=a.siteId,e.next=36;break;case 35:throw new Error("Missing required query parameter: siteId");case 36:return c=new jd("/organizations/{organizationId}/products/{id}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=ru(ru({},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),ru(ru({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=42,t.fetch(u);case 42:if(f=e.sent,!n){e.next=47;break}return e.abrupt("return",f);case 47:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=51;break}throw new Ko(f);case 51:return e.next=53,f.text();case 53:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 55:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getCategories",value:(n=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0===i.ids){e.next=17;break}s.ids=i.ids,e.next=22;break;case 17:if(void 0===a.ids){e.next=21;break}s.ids=a.ids,e.next=22;break;case 21:throw new Error("Missing required query parameter: ids");case 22:if(void 0!==i.levels?s.levels=i.levels:void 0!==a.levels&&(s.levels=a.levels),void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),void 0===i.siteId){e.next=28;break}s.siteId=i.siteId,e.next=33;break;case 28:if(void 0===a.siteId){e.next=32;break}s.siteId=a.siteId,e.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return c=new jd("/organizations/{organizationId}/categories",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=ru(ru({},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),ru(ru({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=39,t.fetch(u);case 39:if(f=e.sent,!n){e.next=44;break}return e.abrupt("return",f);case 44:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=48;break}throw new Ko(f);case 48:return e.next=50,f.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getCategory",value:(r=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.id){e.next=16;break}o.id=i.id,e.next=21;break;case 16:if(void 0===a.id){e.next=20;break}o.id=a.id,e.next=21;break;case 20:throw new Error("Missing required path parameter: id");case 21:if(s={},void 0!==i.levels?s.levels=i.levels:void 0!==a.levels&&(s.levels=a.levels),void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),void 0===i.siteId){e.next=28;break}s.siteId=i.siteId,e.next=33;break;case 28:if(void 0===a.siteId){e.next=32;break}s.siteId=a.siteId,e.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return c=new jd("/organizations/{organizationId}/categories/{id}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=ru(ru({},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),ru(ru({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=39,t.fetch(u);case 39:if(f=e.sent,!n){e.next=44;break}return e.abrupt("return",f);case 44:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=48;break}throw new Ko(f);case 48:return e.next=50,f.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})}]),e}();function iu(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?iu(Object(r),!0).forEach((function(t){Vn(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Vn(nu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/product/shopper-products/{version}");var ou=function(){function e(t){Gn(this,e),Vn(this,"clientConfig",void 0);var r=au({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new bo(r)}var r,n;return Yn(e,[{key:"getPromotions",value:(n=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0===i.siteId){e.next=17;break}s.siteId=i.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}s.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:if(void 0===i.ids){e.next=26;break}s.ids=i.ids,e.next=31;break;case 26:if(void 0===a.ids){e.next=30;break}s.ids=a.ids,e.next=31;break;case 30:throw new Error("Missing required query parameter: ids");case 31:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new jd("/organizations/{organizationId}/promotions",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=au(au({},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),au(au({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=38,t.fetch(u);case 38:if(f=e.sent,!n){e.next=43;break}return e.abrupt("return",f);case 43:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=47;break}throw new Ko(f);case 47:return e.next=49,f.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getPromotionsForCampaign",value:(r=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.campaignId){e.next=16;break}o.campaignId=i.campaignId,e.next=21;break;case 16:if(void 0===a.campaignId){e.next=20;break}o.campaignId=a.campaignId,e.next=21;break;case 20:throw new Error("Missing required path parameter: campaignId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==i.startDate?s.startDate=i.startDate:void 0!==a.startDate&&(s.startDate=a.startDate),void 0!==i.endDate?s.endDate=i.endDate:void 0!==a.endDate&&(s.endDate=a.endDate),void 0!==i.currency?s.currency=i.currency:void 0!==a.currency&&(s.currency=a.currency),c=new jd("/organizations/{organizationId}/promotions/campaigns/{campaignId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=au(au({},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),au(au({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=40,t.fetch(u);case 40:if(f=e.sent,!n){e.next=45;break}return e.abrupt("return",f);case 45:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=49;break}throw new Ko(f);case 49:return e.next=51,f.text();case 51:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 53:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})}]),e}();Vn(ou,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/pricing/shopper-promotions/{version}");var su=B.match(/firefox\/(\d+)/i),cu=!!su&&+su[1],du=/MSIE|Trident/.test(B),uu=B.match(/AppleWebKit\/(\d+)\./),fu=!!uu&&+uu[1],hu=[],pu=w(hu.sort),lu=w(hu.push),gu=d((function(){hu.sort(void 0)})),bu=d((function(){hu.sort(null)})),vu=zn("sort"),Iu=!d((function(){if(J)return J<70;if(!(cu&&cu>3)){if(du)return!0;if(fu)return fu<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 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 xu(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){Vn(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}Mt({target:"Array",proto:!0,forced:gu||!bu||!vu||!Iu},{sort:function(e){void 0!==e&&K(e);var t=ie(this);if(Iu)return void 0===e?pu(t):pu(t,e);var r,n,i=[],a=ht(t);for(n=0;n<a;n++)n in t&&lu(i,t[n]);for(qa(i,function(e){return function(t,r){return void 0===r?-1:void 0===t?1:void 0!==e?+e(t,r)||0:$t(t)>$t(r)?1:-1}}(e)),r=i.length,n=0;n<r;)t[n]=i[n++];for(;n<a;)delete t[n++];return t}});var ku=function(){function e(t){Gn(this,e),Vn(this,"clientConfig",void 0);var r=xu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new bo(r)}var r,n;return Yn(e,[{key:"productSearch",value:(n=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0===i.siteId){e.next=17;break}s.siteId=i.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}s.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return void 0!==i.q?s.q=i.q:void 0!==a.q&&(s.q=a.q),void 0!==i.refine?s.refine=i.refine:void 0!==a.refine&&(s.refine=a.refine),void 0!==i.sort?s.sort=i.sort:void 0!==a.sort&&(s.sort=a.sort),void 0!==i.currency?s.currency=i.currency:void 0!==a.currency&&(s.currency=a.currency),void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),void 0!==i.offset?s.offset=i.offset:void 0!==a.offset&&(s.offset=a.offset),void 0!==i.limit?s.limit=i.limit:void 0!==a.limit&&(s.limit=a.limit),c=new jd("/organizations/{organizationId}/product-search",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=xu(xu({},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),xu(xu({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=35,t.fetch(u);case 35:if(f=e.sent,!n){e.next=40;break}return e.abrupt("return",f);case 40:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=44;break}throw new Ko(f);case 44:return e.next=46,f.text();case 46:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getSearchSuggestions",value:(r=Fn(mi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0===i.siteId){e.next=17;break}s.siteId=i.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}s.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:if(void 0===i.q){e.next=26;break}s.q=i.q,e.next=31;break;case 26:if(void 0===a.q){e.next=30;break}s.q=a.q,e.next=31;break;case 30:throw new Error("Missing required query parameter: q");case 31:return void 0!==i.limit?s.limit=i.limit:void 0!==a.limit&&(s.limit=a.limit),void 0!==i.currency?s.currency=i.currency:void 0!==a.currency&&(s.currency=a.currency),void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new jd("/organizations/{organizationId}/search-suggestions",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=xu(xu({},this.clientConfig.headers),null==r?void 0:r.headers),Io||(d["user-agent"]=[d["user-agent"],Md].join(" ")),u=new t.Request(c.toString(),xu(xu({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=40,t.fetch(u);case 40:if(f=e.sent,!n){e.next=45;break}return e.abrupt("return",f);case 45:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=49;break}throw new Ko(f);case 49:return e.next=51,f.text();case 51:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 53:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})}]),e}();Vn(ku,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/search/shopper-search/{version}/");var wu=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=S(this),n=null==t?void 0:Q(t,e);return n?p(n,t,r):new RegExp(t)[e]($t(r))},function(e){var n=Pe(this),i=$t(e),a=r(t,n,i);if(a.done)return a.value;var o=n.lastIndex;wu(o,0)||(n.lastIndex=0);var s=Ss(n,i);return wu(n.lastIndex,o)||(n.lastIndex=o),null===s?-1:s.index}]}));var yu=ge("iterator"),Cu=!1;try{var zu=0,Ou={next:function(){return{done:!!zu++}},return:function(){Cu=!0}};Ou[yu]=function(){return this},Array.from(Ou,(function(){throw 2}))}catch(e){}var qu,Eu,Pu,Su=function(e,t){if(!t&&!Cu)return!1;var r=!1;try{var n={};n[yu]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r},Ru="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView,ju=Me.f,Mu=c.Int8Array,Tu=Mu&&Mu.prototype,Uu=c.Uint8ClampedArray,Au=Uu&&Uu.prototype,Bu=Mu&&Ri(Mu),Nu=Tu&&Ri(Tu),_u=Object.prototype,Lu=c.TypeError,Du=ge("toStringTag"),Ju=ue("TYPED_ARRAY_TAG"),Fu=ue("TYPED_ARRAY_CONSTRUCTOR"),Gu=Ru&&!!Li&&"Opera"!==Vt(c.opera),Hu=!1,Yu={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},Vu={BigInt64Array:8,BigUint64Array:8},Wu=function(e){if(!M(e))return!1;var t=Vt(e);return oe(Yu,t)||oe(Vu,t)};for(qu in Yu)(Pu=(Eu=c[qu])&&Eu.prototype)?Te(Pu,Fu,Eu):Gu=!1;for(qu in Vu)(Pu=(Eu=c[qu])&&Eu.prototype)&&Te(Pu,Fu,Eu);if((!Gu||!j(Bu)||Bu===Function.prototype)&&(Bu=function(){throw Lu("Incorrect invocation")},Gu))for(qu in Yu)c[qu]&&Li(c[qu],Bu);if((!Gu||!Nu||Nu===_u)&&(Nu=Bu.prototype,Gu))for(qu in Yu)c[qu]&&Li(c[qu].prototype,Nu);if(Gu&&Ri(Au)!==Nu&&Li(Au,Nu),u&&!oe(Nu,Du))for(qu in Hu=!0,ju(Nu,Du,{get:function(){return M(this)?this[Ju]:void 0}}),Yu)c[qu]&&Te(c[qu],Ju,qu);var $u={NATIVE_ARRAY_BUFFER_VIEWS:Gu,TYPED_ARRAY_CONSTRUCTOR:Fu,TYPED_ARRAY_TAG:Hu&&Ju,aTypedArray:function(e){if(Wu(e))return e;throw Lu("Target is not a typed array")},aTypedArrayConstructor:function(e){if(j(e)&&(!Li||A(Bu,e)))return e;throw Lu(W(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,r,n){if(u){if(r)for(var i in Yu){var a=c[i];if(a&&oe(a.prototype,e))try{delete a.prototype[e]}catch(r){try{a.prototype[e]=t}catch(e){}}}Nu[e]&&!r||nt(Nu,e,r?t:Gu&&Tu[e]||t,n)}},exportTypedArrayStaticMethod:function(e,t,r){var n,i;if(u){if(Li){if(r)for(n in Yu)if((i=c[n])&&oe(i,e))try{delete i[e]}catch(e){}if(Bu[e]&&!r)return;try{return nt(Bu,e,r?t:Gu&&Bu[e]||t)}catch(e){}}for(n in Yu)!(i=c[n])||i[e]&&!r||nt(i,e,t)}},isView:function(e){if(!M(e))return!1;var t=Vt(e);return"DataView"===t||oe(Yu,t)||oe(Vu,t)},isTypedArray:Wu,TypedArray:Bu,TypedArrayPrototype:Nu},Ku=$u.NATIVE_ARRAY_BUFFER_VIEWS,Qu=c.ArrayBuffer,Xu=c.Int8Array,Zu=!Ku||!d((function(){Xu(1)}))||!d((function(){new Xu(-1)}))||!Su((function(e){new Xu,new Xu(null),new Xu(1.5),new Xu(e)}),!0)||d((function(){return 1!==new Xu(new Qu(2),1,void 0).length})),ef=c.RangeError,tf=function(e){if(void 0===e)return 0;var t=ot(e),r=ft(t);if(t!==r)throw ef("Wrong length or index");return r},rf=c.Array,nf=Math.abs,af=Math.pow,of=Math.floor,sf=Math.log,cf=Math.LN2,df=function(e,t,r){var n,i,a,o=rf(r),s=8*r-t-1,c=(1<<s)-1,d=c>>1,u=23===t?af(2,-24)-af(2,-77):0,f=e<0||0===e&&1/e<0?1:0,h=0;for((e=nf(e))!=e||e===1/0?(i=e!=e?1:0,n=c):(n=of(sf(e)/cf),e*(a=af(2,-n))<1&&(n--,a*=2),(e+=n+d>=1?u/a:u*af(2,1-d))*a>=2&&(n++,a/=2),n+d>=c?(i=0,n=c):n+d>=1?(i=(e*a-1)*af(2,t),n+=d):(i=e*af(2,d-1)*af(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*f,o},uf=function(e,t){var r,n=e.length,i=8*n-t-1,a=(1<<i)-1,o=a>>1,s=i-7,c=n-1,d=e[c--],u=127&d;for(d>>=7;s>0;)u=256*u+e[c--],s-=8;for(r=u&(1<<-s)-1,u>>=-s,s+=t;s>0;)r=256*r+e[c--],s-=8;if(0===u)u=1-o;else{if(u===a)return r?NaN:d?-1/0:1/0;r+=af(2,t),u-=o}return(d?-1:1)*r*af(2,u-t)},ff=function(e){for(var t=ie(this),r=ht(t),n=arguments.length,i=dt(n>1?arguments[1]:void 0,r),a=n>2?arguments[2]:void 0,o=void 0===a?r:dt(a,r);o>i;)t[i++]=e;return t},hf=xt.f,pf=Me.f,lf=rt.PROPER,gf=rt.CONFIGURABLE,bf=Xe.get,vf=Xe.set,If=c.ArrayBuffer,mf=If,xf=mf&&mf.prototype,kf=c.DataView,wf=kf&&kf.prototype,yf=Object.prototype,Cf=c.Array,zf=c.RangeError,Of=w(ff),qf=w([].reverse),Ef=df,Pf=uf,Sf=function(e){return[255&e]},Rf=function(e){return[255&e,e>>8&255]},jf=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},Mf=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},Tf=function(e){return Ef(e,23,4)},Uf=function(e){return Ef(e,52,8)},Af=function(e,t){pf(e.prototype,t,{get:function(){return bf(this)[t]}})},Bf=function(e,t,r,n){var i=tf(r),a=bf(e);if(i+t>a.byteLength)throw zf("Wrong index");var o=bf(a.buffer).bytes,s=i+a.byteOffset,c=sr(o,s,s+t);return n?c:qf(c)},Nf=function(e,t,r,n,i,a){var o=tf(r),s=bf(e);if(o+t>s.byteLength)throw zf("Wrong index");for(var c=bf(s.buffer).bytes,d=o+s.byteOffset,u=n(+i),f=0;f<t;f++)c[d+f]=u[a?f:t-f-1]};if(Ru){var _f=lf&&"ArrayBuffer"!==If.name;if(d((function(){If(1)}))&&d((function(){new If(-1)}))&&!d((function(){return new If,new If(1.5),new If(NaN),_f&&!gf})))_f&&gf&&Te(If,"name","ArrayBuffer");else{(mf=function(e){return ba(this,xf),new If(tf(e))}).prototype=xf;for(var Lf,Df=hf(If),Jf=0;Df.length>Jf;)(Lf=Df[Jf++])in mf||Te(mf,Lf,If[Lf]);xf.constructor=mf}Li&&Ri(wf)!==yf&&Li(wf,yf);var Ff=new kf(new mf(2)),Gf=w(wf.setInt8);Ff.setInt8(0,2147483648),Ff.setInt8(1,2147483649),!Ff.getInt8(0)&&Ff.getInt8(1)||la(wf,{setInt8:function(e,t){Gf(this,e,t<<24>>24)},setUint8:function(e,t){Gf(this,e,t<<24>>24)}},{unsafe:!0})}else xf=(mf=function(e){ba(this,xf);var t=tf(e);vf(this,{bytes:Of(Cf(t),0),byteLength:t}),u||(this.byteLength=t)}).prototype,wf=(kf=function(e,t,r){ba(this,wf),ba(e,xf);var n=bf(e).byteLength,i=ot(t);if(i<0||i>n)throw zf("Wrong offset");if(i+(r=void 0===r?n-i:ft(r))>n)throw zf("Wrong length");vf(this,{buffer:e,byteLength:r,byteOffset:i}),u||(this.buffer=e,this.byteLength=r,this.byteOffset=i)}).prototype,u&&(Af(mf,"byteLength"),Af(kf,"buffer"),Af(kf,"byteLength"),Af(kf,"byteOffset")),la(wf,{getInt8:function(e){return Bf(this,1,e)[0]<<24>>24},getUint8:function(e){return Bf(this,1,e)[0]},getInt16:function(e){var t=Bf(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=Bf(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return Mf(Bf(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return Mf(Bf(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return Pf(Bf(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return Pf(Bf(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){Nf(this,1,e,Sf,t)},setUint8:function(e,t){Nf(this,1,e,Sf,t)},setInt16:function(e,t){Nf(this,2,e,Rf,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){Nf(this,2,e,Rf,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){Nf(this,4,e,jf,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){Nf(this,4,e,jf,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){Nf(this,4,e,Tf,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){Nf(this,8,e,Uf,t,arguments.length>2?arguments[2]:void 0)}});vr(mf,"ArrayBuffer"),vr(kf,"DataView");var Hf={ArrayBuffer:mf,DataView:kf},Yf=Math.floor,Vf=Number.isInteger||function(e){return!M(e)&&isFinite(e)&&Yf(e)===e},Wf=c.RangeError,$f=c.RangeError,Kf=function(e,t){var r=function(e){var t=ot(e);if(t<0)throw Wf("The argument can't be less than 0");return t}(e);if(r%t)throw $f("Wrong offset");return r},Qf=$u.aTypedArrayConstructor,Xf=function(e){var t,r,n,i,a,o,s=qo(this),c=ie(e),d=arguments.length,u=d>1?arguments[1]:void 0,f=void 0!==u,h=Ia(c);if(h&&!$s(h))for(o=(a=xa(c,h)).next,c=[];!(i=p(o,a)).done;)c.push(i.value);for(f&&d>2&&(u=mr(u,arguments[2])),r=ht(c),n=new(Qf(s))(r),t=0;r>t;t++)n[t]=f?u(c[t],t):c[t];return n},Zf=ge("species"),eh=function(e){var t=U(e),r=Me.f;u&&t&&!t[Zf]&&r(t,Zf,{configurable:!0,get:function(){return this}})};i((function(e){var t=xt.f,r=Tr.forEach,n=Xe.get,i=Xe.set,a=Me.f,o=ze.f,s=Math.round,d=c.RangeError,f=Hf.ArrayBuffer,h=f.prototype,l=Hf.DataView,g=$u.NATIVE_ARRAY_BUFFER_VIEWS,b=$u.TYPED_ARRAY_CONSTRUCTOR,I=$u.TYPED_ARRAY_TAG,m=$u.TypedArray,x=$u.TypedArrayPrototype,k=$u.aTypedArrayConstructor,w=$u.isTypedArray,y=function(e,t){k(e);for(var r=0,n=t.length,i=new e(n);n>r;)i[r]=t[r++];return i},C=function(e,t){a(e,t,{get:function(){return n(this)[t]}})},z=function(e){var t;return A(h,e)||"ArrayBuffer"==(t=Vt(e))||"SharedArrayBuffer"==t},O=function(e,t){return w(e)&&!Y(t)&&t in e&&Vf(+t)&&t>=0},q=function(e,t){return t=me(t),O(e,t)?v(2,e[t]):o(e,t)},E=function(e,t,r){return t=me(t),!(O(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?a(e,t,r):(e[t]=r.value,e)};u?(g||(ze.f=q,Me.f=E,C(x,"buffer"),C(x,"byteOffset"),C(x,"byteLength"),C(x,"length")),Mt({target:"Object",stat:!0,forced:!g},{getOwnPropertyDescriptor:q,defineProperty:E}),e.exports=function(e,o,u){var h=e.match(/\d+$/)[0]/8,v=e+(u?"Clamped":"")+"Array",k="get"+e,C="set"+e,O=c[v],q=O,E=q&&q.prototype,P={},S=function(e,t){a(e,t,{get:function(){return function(e,t){var r=n(e);return r.view[k](t*h+r.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,r){var i=n(e);u&&(r=(r=s(r))<0?0:r>255?255:255&r),i.view[C](t*h+i.byteOffset,r,!0)}(this,t,e)},enumerable:!0})};g?Zu&&(q=o((function(e,t,r,n){return ba(e,E),function(e,t,r){var n,i;return Li&&j(n=t.constructor)&&n!==r&&M(i=n.prototype)&&i!==r.prototype&&Li(e,i),e}(M(t)?z(t)?void 0!==n?new O(t,Kf(r,h),n):void 0!==r?new O(t,Kf(r,h)):new O(t):w(t)?y(q,t):p(Xf,q,t):new O(tf(t)),e,q)})),Li&&Li(q,m),r(t(O),(function(e){e in q||Te(q,e,O[e])})),q.prototype=E):(q=o((function(e,t,r,n){ba(e,E);var a,o,s,c=0,u=0;if(M(t)){if(!z(t))return w(t)?y(q,t):p(Xf,q,t);a=t,u=Kf(r,h);var g=t.byteLength;if(void 0===n){if(g%h)throw d("Wrong length");if((o=g-u)<0)throw d("Wrong length")}else if((o=ft(n)*h)+u>g)throw d("Wrong length");s=o/h}else s=tf(t),a=new f(o=s*h);for(i(e,{buffer:a,byteOffset:u,byteLength:o,length:s,view:new l(a)});c<s;)S(e,c++)})),Li&&Li(q,m),E=q.prototype=nr(x)),E.constructor!==q&&Te(E,"constructor",q),Te(E,b,q),I&&Te(E,I,v),P[v]=q,Mt({global:!0,forced:q!=O,sham:!g},P),"BYTES_PER_ELEMENT"in q||Te(q,"BYTES_PER_ELEMENT",h),"BYTES_PER_ELEMENT"in E||Te(E,"BYTES_PER_ELEMENT",h),eh(v)}):e.exports=function(){}}))("Uint8",(function(e){return function(t,r,n){return e(this,t,r,n)}}));var th=Math.min,rh=w([].copyWithin||function(e,t){var r=ie(this),n=ht(r),i=dt(e,n),a=dt(t,n),o=arguments.length>2?arguments[2]:void 0,s=th((void 0===o?n:dt(o,n))-a,n-i),c=1;for(a<i&&i<a+s&&(c=-1,a+=s-1,i+=s-1);s-- >0;)a in r?r[i]=r[a]:delete r[i],i+=c,a+=c;return r}),nh=$u.aTypedArray;(0,$u.exportTypedArrayMethod)("copyWithin",(function(e,t){return rh(nh(this),e,t,arguments.length>2?arguments[2]:void 0)}));var ih=Tr.every,ah=$u.aTypedArray;(0,$u.exportTypedArrayMethod)("every",(function(e){return ih(ah(this),e,arguments.length>1?arguments[1]:void 0)}));var oh=$u.aTypedArray;(0,$u.exportTypedArrayMethod)("fill",(function(e){var t=arguments.length;return p(ff,oh(this),e,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}));var sh=ge("species"),ch=function(e,t){var r,n=Pe(e).constructor;return void 0===n||null==(r=Pe(n)[sh])?t:qo(r)},dh=$u.TYPED_ARRAY_CONSTRUCTOR,uh=$u.aTypedArrayConstructor,fh=function(e){return uh(ch(e,e[dh]))},hh=function(e,t){return function(e,t){for(var r=0,n=ht(t),i=new e(n);n>r;)i[r]=t[r++];return i}(fh(e),t)},ph=Tr.filter,lh=$u.aTypedArray;(0,$u.exportTypedArrayMethod)("filter",(function(e){var t=ph(lh(this),e,arguments.length>1?arguments[1]:void 0);return hh(this,t)}));var gh=Tr.find,bh=$u.aTypedArray;(0,$u.exportTypedArrayMethod)("find",(function(e){return gh(bh(this),e,arguments.length>1?arguments[1]:void 0)}));var vh=Tr.findIndex,Ih=$u.aTypedArray;(0,$u.exportTypedArrayMethod)("findIndex",(function(e){return vh(Ih(this),e,arguments.length>1?arguments[1]:void 0)}));var mh=Tr.forEach,xh=$u.aTypedArray;(0,$u.exportTypedArrayMethod)("forEach",(function(e){mh(xh(this),e,arguments.length>1?arguments[1]:void 0)}));var kh=lt.includes,wh=$u.aTypedArray;(0,$u.exportTypedArrayMethod)("includes",(function(e){return kh(wh(this),e,arguments.length>1?arguments[1]:void 0)}));var yh=lt.indexOf,Ch=$u.aTypedArray;(0,$u.exportTypedArrayMethod)("indexOf",(function(e){return yh(Ch(this),e,arguments.length>1?arguments[1]:void 0)}));var zh=ge("iterator"),Oh=c.Uint8Array,qh=w(Qi.values),Eh=w(Qi.keys),Ph=w(Qi.entries),Sh=$u.aTypedArray,Rh=$u.exportTypedArrayMethod,jh=Oh&&Oh.prototype,Mh=!d((function(){jh[zh].call([1])})),Th=!!jh&&jh.values&&jh[zh]===jh.values&&"values"===jh.values.name,Uh=function(){return qh(Sh(this))};Rh("entries",(function(){return Ph(Sh(this))}),Mh),Rh("keys",(function(){return Eh(Sh(this))}),Mh),Rh("values",Uh,Mh||!Th,{name:"values"}),Rh(zh,Uh,Mh||!Th,{name:"values"});var Ah=$u.aTypedArray,Bh=$u.exportTypedArrayMethod,Nh=w([].join);Bh("join",(function(e){return Nh(Ah(this),e)}));var _h=Math.min,Lh=[].lastIndexOf,Dh=!!Lh&&1/[1].lastIndexOf(1,-0)<0,Jh=zn("lastIndexOf"),Fh=Dh||!Jh?function(e){if(Dh)return _t(Lh,this,arguments)||0;var t=R(this),r=ht(t),n=r-1;for(arguments.length>1&&(n=_h(n,ot(arguments[1]))),n<0&&(n=r+n);n>=0;n--)if(n in t&&t[n]===e)return n||0;return-1}:Lh,Gh=$u.aTypedArray;(0,$u.exportTypedArrayMethod)("lastIndexOf",(function(e){var t=arguments.length;return _t(Fh,Gh(this),t>1?[e,arguments[1]]:[e])}));var Hh=Tr.map,Yh=$u.aTypedArray;(0,$u.exportTypedArrayMethod)("map",(function(e){return Hh(Yh(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new(fh(e))(t)}))}));var Vh=c.TypeError,Wh=function(e){return function(t,r,n,i){K(r);var a=ie(t),o=E(a),s=ht(a),c=e?s-1:0,d=e?-1:1;if(n<2)for(;;){if(c in o){i=o[c],c+=d;break}if(c+=d,e?c<0:s<=c)throw Vh("Reduce of empty array with no initial value")}for(;e?c>=0:s>c;c+=d)c in o&&(i=r(i,o[c],c,a));return i}},$h={left:Wh(!1),right:Wh(!0)},Kh=$h.left,Qh=$u.aTypedArray;(0,$u.exportTypedArrayMethod)("reduce",(function(e){var t=arguments.length;return Kh(Qh(this),e,t,t>1?arguments[1]:void 0)}));var Xh=$h.right,Zh=$u.aTypedArray;(0,$u.exportTypedArrayMethod)("reduceRight",(function(e){var t=arguments.length;return Xh(Zh(this),e,t,t>1?arguments[1]:void 0)}));var ep=$u.aTypedArray,tp=$u.exportTypedArrayMethod,rp=Math.floor;tp("reverse",(function(){for(var e,t=ep(this).length,r=rp(t/2),n=0;n<r;)e=this[n],this[n++]=this[--t],this[t]=e;return this}));var np=c.RangeError,ip=c.Int8Array,ap=ip&&ip.prototype,op=ap&&ap.set,sp=$u.aTypedArray,cp=$u.exportTypedArrayMethod,dp=!d((function(){var e=new Uint8ClampedArray(2);return p(op,e,{length:1,0:3},1),3!==e[1]})),up=dp&&$u.NATIVE_ARRAY_BUFFER_VIEWS&&d((function(){var e=new ip(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}));cp("set",(function(e){sp(this);var t=Kf(arguments.length>1?arguments[1]:void 0,1),r=ie(e);if(dp)return p(op,this,r,t);var n=this.length,i=ht(r),a=0;if(i+t>n)throw np("Wrong length");for(;a<i;)this[t+a]=r[a++]}),!dp||up);var fp=$u.aTypedArray;(0,$u.exportTypedArrayMethod)("slice",(function(e,t){for(var r=fr(fp(this),e,t),n=fh(this),i=0,a=r.length,o=new n(a);a>i;)o[i]=r[i++];return o}),d((function(){new Int8Array(1).slice()})));var hp=Tr.some,pp=$u.aTypedArray;(0,$u.exportTypedArrayMethod)("some",(function(e){return hp(pp(this),e,arguments.length>1?arguments[1]:void 0)}));var lp=c.Array,gp=$u.aTypedArray,bp=$u.exportTypedArrayMethod,vp=c.Uint16Array,Ip=vp&&w(vp.prototype.sort),mp=!(!Ip||d((function(){Ip(new vp(2),null)}))&&d((function(){Ip(new vp(2),{})}))),xp=!!Ip&&!d((function(){if(J)return J<74;if(cu)return cu<67;if(du)return!0;if(fu)return fu<602;var e,t,r=new vp(516),n=lp(516);for(e=0;e<516;e++)t=e%4,r[e]=515-e,n[e]=e-2*t+3;for(Ip(r,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(r[e]!==n[e])return!0}));bp("sort",(function(e){return void 0!==e&&K(e),xp?Ip(this,e):qa(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))}),!xp||mp);var kp=$u.aTypedArray;(0,$u.exportTypedArrayMethod)("subarray",(function(e,t){var r=kp(this),n=r.length,i=dt(e,n);return new(fh(r))(r.buffer,r.byteOffset+i*r.BYTES_PER_ELEMENT,ft((void 0===t?n:dt(t,n))-i))}));var wp=c.Int8Array,yp=$u.aTypedArray,Cp=$u.exportTypedArrayMethod,zp=[].toLocaleString,Op=!!wp&&d((function(){zp.call(new wp(1))}));Cp("toLocaleString",(function(){return _t(zp,Op?fr(yp(this)):yp(this),fr(arguments))}),d((function(){return[1,2].toLocaleString()!=new wp([1,2]).toLocaleString()}))||!d((function(){wp.prototype.toLocaleString.call([1,2])})));var qp=$u.exportTypedArrayMethod,Ep=c.Uint8Array,Pp=Ep&&Ep.prototype||{},Sp=[].toString,Rp=w([].join);d((function(){Sp.call({})}))&&(Sp=function(){return Rp(this)});var jp=Pp.toString!=Sp;qp("toString",Sp,jp);var Mp,Tp,Up,Ap,Bp=c.Promise,Np=c.TypeError,_p=function(e,t){this.stopped=e,this.result=t},Lp=_p.prototype,Dp=function(e,t,r){var n,i,a,o,s,c,d,u=r&&r.that,f=!(!r||!r.AS_ENTRIES),h=!(!r||!r.IS_ITERATOR),l=!(!r||!r.INTERRUPTED),g=mr(t,u),b=function(e){return n&&Hs(n,"normal",e),new _p(!0,e)},v=function(e){return f?(Pe(e),l?g(e[0],e[1],b):g(e[0],e[1])):l?g(e,b):g(e)};if(h)n=e;else{if(!(i=Ia(e)))throw Np(W(e)+" is not iterable");if($s(i)){for(a=0,o=ht(e);o>a;a++)if((s=v(e[a]))&&A(Lp,s))return s;return new _p(!1)}n=xa(e,i)}for(c=n.next;!(d=p(c,n)).done;){try{s=v(d.value)}catch(e){Hs(n,"throw",e)}if("object"==typeof s&&s&&A(Lp,s))return s}return new _p(!1)},Jp=/(?:ipad|iphone|ipod).*applewebkit/i.test(B),Fp="process"==z(c.process),Gp=c.setImmediate,Hp=c.clearImmediate,Yp=c.process,Vp=c.Dispatch,Wp=c.Function,$p=c.MessageChannel,Kp=c.String,Qp=0,Xp={};try{Mp=c.location}catch(e){}var Zp=function(e){if(oe(Xp,e)){var t=Xp[e];delete Xp[e],t()}},el=function(e){return function(){Zp(e)}},tl=function(e){Zp(e.data)},rl=function(e){c.postMessage(Kp(e),Mp.protocol+"//"+Mp.host)};Gp&&Hp||(Gp=function(e){var t=fr(arguments,1);return Xp[++Qp]=function(){_t(j(e)?e:Wp(e),void 0,t)},Tp(Qp),Qp},Hp=function(e){delete Xp[e]},Fp?Tp=function(e){Yp.nextTick(el(e))}:Vp&&Vp.now?Tp=function(e){Vp.now(el(e))}:$p&&!Jp?(Ap=(Up=new $p).port2,Up.port1.onmessage=tl,Tp=mr(Ap.postMessage,Ap)):c.addEventListener&&j(c.postMessage)&&!c.importScripts&&Mp&&"file:"!==Mp.protocol&&!d(rl)?(Tp=rl,c.addEventListener("message",tl,!1)):Tp="onreadystatechange"in we("script")?function(e){Qt.appendChild(we("script")).onreadystatechange=function(){Qt.removeChild(this),Zp(e)}}:function(e){setTimeout(el(e),0)});var nl,il,al,ol,sl,cl,dl,ul,fl={set:Gp,clear:Hp},hl=/ipad|iphone|ipod/i.test(B)&&void 0!==c.Pebble,pl=/web0s(?!.*chrome)/i.test(B),ll=ze.f,gl=fl.set,bl=c.MutationObserver||c.WebKitMutationObserver,vl=c.document,Il=c.process,ml=c.Promise,xl=ll(c,"queueMicrotask"),kl=xl&&xl.value;kl||(nl=function(){var e,t;for(Fp&&(e=Il.domain)&&e.exit();il;){t=il.fn,il=il.next;try{t()}catch(e){throw il?ol():al=void 0,e}}al=void 0,e&&e.enter()},Jp||Fp||pl||!bl||!vl?!hl&&ml&&ml.resolve?((dl=ml.resolve(void 0)).constructor=ml,ul=mr(dl.then,dl),ol=function(){ul(nl)}):Fp?ol=function(){Il.nextTick(nl)}:(gl=mr(gl,c),ol=function(){gl(nl)}):(sl=!0,cl=vl.createTextNode(""),new bl(nl).observe(cl,{characterData:!0}),ol=function(){cl.data=sl=!sl}));var wl=kl||function(e){var t={fn:e,next:void 0};al&&(al.next=t),il||(il=t,ol()),al=t},yl=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=K(t),this.reject=K(r)},Cl={f:function(e){return new yl(e)}},zl=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},Ol=function(){this.head=null,this.tail=null};Ol.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 ql,El,Pl,Sl,Rl=Ol,jl="object"==typeof window,Ml=fl.set,Tl=ge("species"),Ul="Promise",Al=Xe.getterFor(Ul),Bl=Xe.set,Nl=Xe.getterFor(Ul),_l=Bp&&Bp.prototype,Ll=Bp,Dl=_l,Jl=c.TypeError,Fl=c.document,Gl=c.process,Hl=Cl.f,Yl=Hl,Vl=!!(Fl&&Fl.createEvent&&c.dispatchEvent),Wl=j(c.PromiseRejectionEvent),$l=!1,Kl=Rt(Ul,(function(){var e=_e(Ll),t=e!==String(Ll);if(!t&&66===J)return!0;if(J>=51&&/native code/.test(e))return!1;var r=new Ll((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};return(r.constructor={})[Tl]=n,!($l=r.then((function(){}))instanceof n)||!t&&jl&&!Wl})),Ql=Kl||!Su((function(e){Ll.all(e).catch((function(){}))})),Xl=function(e){var t;return!(!M(e)||!j(t=e.then))&&t},Zl=function(e,t){var r,n,i,a=t.value,o=1==t.state,s=o?e.ok:e.fail,c=e.resolve,d=e.reject,u=e.domain;try{s?(o||(2===t.rejection&&ig(t),t.rejection=1),!0===s?r=a:(u&&u.enter(),r=s(a),u&&(u.exit(),i=!0)),r===e.promise?d(Jl("Promise-chain cycle")):(n=Xl(r))?p(n,r,c,d):c(r)):d(a)}catch(e){u&&!i&&u.exit(),d(e)}},eg=function(e,t){e.notified||(e.notified=!0,wl((function(){for(var r,n=e.reactions;r=n.get();)Zl(r,e);e.notified=!1,t&&!e.rejection&&rg(e)})))},tg=function(e,t,r){var n,i;Vl?((n=Fl.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),c.dispatchEvent(n)):n={promise:t,reason:r},!Wl&&(i=c["on"+e])?i(n):"unhandledrejection"===e&&function(e,t){var r=c.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))}("Unhandled promise rejection",r)},rg=function(e){p(Ml,c,(function(){var t,r=e.facade,n=e.value;if(ng(e)&&(t=zl((function(){Fp?Gl.emit("unhandledRejection",n,r):tg("unhandledrejection",r,n)})),e.rejection=Fp||ng(e)?2:1,t.error))throw t.value}))},ng=function(e){return 1!==e.rejection&&!e.parent},ig=function(e){p(Ml,c,(function(){var t=e.facade;Fp?Gl.emit("rejectionHandled",t):tg("rejectionhandled",t,e.value)}))},ag=function(e,t,r){return function(n){e(t,n,r)}},og=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,eg(e,!0))},sg=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw Jl("Promise can't be resolved itself");var n=Xl(t);n?wl((function(){var r={done:!1};try{p(n,t,ag(sg,r,e),ag(og,r,e))}catch(t){og(r,t,e)}})):(e.value=t,e.state=1,eg(e,!1))}catch(t){og({done:!1},t,e)}}};if(Kl&&(Dl=(Ll=function(e){ba(this,Dl),K(e),p(ql,this);var t=Al(this);try{e(ag(sg,t),ag(og,t))}catch(e){og(t,e)}}).prototype,(ql=function(e){Bl(this,{type:Ul,done:!1,notified:!1,parent:!1,reactions:new Rl,rejection:!1,state:0,value:void 0})}).prototype=la(Dl,{then:function(e,t){var r=Nl(this),n=Hl(ch(this,Ll));return r.parent=!0,n.ok=!j(e)||e,n.fail=j(t)&&t,n.domain=Fp?Gl.domain:void 0,0==r.state?r.reactions.add(n):wl((function(){Zl(n,r)})),n.promise},catch:function(e){return this.then(void 0,e)}}),El=function(){var e=new ql,t=Al(e);this.promise=e,this.resolve=ag(sg,t),this.reject=ag(og,t)},Cl.f=Hl=function(e){return e===Ll||e===Pl?new El(e):Yl(e)},j(Bp)&&_l!==Object.prototype)){Sl=_l.then,$l||(nt(_l,"then",(function(e,t){var r=this;return new Ll((function(e,t){p(Sl,r,e,t)})).then(e,t)}),{unsafe:!0}),nt(_l,"catch",Dl.catch,{unsafe:!0}));try{delete _l.constructor}catch(e){}Li&&Li(_l,Dl)}function cg(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 dg(e){return function(e){if(Array.isArray(e))return cg(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 cg(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)?cg(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.")}()}function ug(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 fg(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ug(Object(r),!0).forEach((function(t){Vn(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ug(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Mt({global:!0,wrap:!0,forced:Kl},{Promise:Ll}),vr(Ll,Ul,!1),eh(Ul),Pl=U(Ul),Mt({target:Ul,stat:!0,forced:Kl},{reject:function(e){var t=Hl(this);return p(t.reject,void 0,e),t.promise}}),Mt({target:Ul,stat:!0,forced:Kl},{resolve:function(e){return function(e,t){if(Pe(e),M(t)&&t.constructor===e)return t;var r=Cl.f(e);return(0,r.resolve)(t),r.promise}(this,e)}}),Mt({target:Ul,stat:!0,forced:Ql},{all:function(e){var t=this,r=Hl(t),n=r.resolve,i=r.reject,a=zl((function(){var r=K(t.resolve),a=[],o=0,s=1;Dp(e,(function(e){var c=o++,d=!1;s++,p(r,t,e).then((function(e){d||(d=!0,a[c]=e,--s||n(a))}),i)})),--s||n(a)}));return a.error&&i(a.value),r.promise},race:function(e){var t=this,r=Hl(t),n=r.reject,i=zl((function(){var i=K(t.resolve);Dp(e,(function(e){p(i,t,e).then(r.resolve,n)}))}));return i.error&&n(i.value),r.promise}});var hg=Io?btoa:function(e){return Buffer.from(e).toString("base64")},pg=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}},lg=function(){return r.nanoid(128)},gg=function(){var e=Fn(mi.mark((function e(t){var r,n,i,a,o,s,c;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=function(e){return e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")},n="",!Io||!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,dg(new Uint8Array(o)))),n=r(s),e.next=16;break;case 12:return e.next=14,import("crypto");case 14:c=e.sent,n=r(c.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 bg(e,t,r){return vg.apply(this,arguments)}function vg(){return(vg=Fn(mi.mark((function e(t,r,n){var i,a,o,s,c,d;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,gg(r);case 2:return a=e.sent,(o=new Qd(t.clientConfig)).clientConfig.fetchOptions=fg(fg({},t.clientConfig.fetchOptions),{},{redirect:Io?"follow":"manual"}),s={parameters:fg(fg({client_id:t.clientConfig.parameters.clientId,code_challenge:a},n.hint&&{hint:n.hint}),{},{organizationId:t.clientConfig.parameters.organizationId,redirect_uri:n.redirectURI,response_type:"code"},n.usid&&{usid:n.usid})},e.next=8,o.authorizeCustomer(s,!0);case 8:if(c=e.sent,d=(null===(i=c.headers)||void 0===i?void 0:i.get("location"))||c.url){e.next=12;break}throw new Error("Authorization failed");case 12:return e.abrupt("return",fg({url:d},pg(d)));case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ig(){return(Ig=Fn(mi.mark((function e(t,r){var n,i,a;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=lg(),e.next=3,bg(t,n,fg({redirectURI:r.redirectURI,hint:"guest"},r.usid&&{usid:r.usid}));case 3:return i=e.sent,a={client_id:t.clientConfig.parameters.clientId,code:i.code,code_verifier:n,grant_type:"authorization_code_pkce",redirect_uri:r.redirectURI,usid:i.usid},e.abrupt("return",t.getAccessToken({body:a}));case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function mg(){return(mg=Fn(mi.mark((function e(t,r,n){var i,a,o,s,c,d,u,f,h,p;return mi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=lg(),e.next=3,gg(a);case 3:return o=e.sent,(s=new Qd(t.clientConfig)).clientConfig.fetchOptions=fg(fg({},t.clientConfig.fetchOptions),{},{redirect:Io?"follow":"manual"}),c="Basic ".concat(hg("".concat(r.username,":").concat(r.password))),d={headers:{Authorization:c},parameters:{organizationId:t.clientConfig.parameters.organizationId},body:fg({redirect_uri:n.redirectURI,client_id:t.clientConfig.parameters.clientId,code_challenge:o,channel_id:t.clientConfig.parameters.siteId},n.usid&&{usid:n.usid})},e.next=10,s.authenticateCustomer(d,!0);case 10:if(303===(u=e.sent).status){e.next=13;break}throw new Ko(u);case 13:return f=(null===(i=u.headers)||void 0===i?void 0:i.get("location"))||u.url,h=pg(f),p={client_id:t.clientConfig.parameters.clientId,code:h.code,code_verifier:a,grant_type:"authorization_code_pkce",organizationId:t.clientConfig.parameters.organizationId,redirect_uri:n.redirectURI,usid:h.usid},e.abrupt("return",t.getAccessToken({body:p}));case 17:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var xg=Object.freeze({__proto__:null,isBrowser:Io,isNode:mo,stringToBase64:hg,getCodeAndUsidFromUrl:pg,createCodeVerifier:lg,generateCodeChallenge:gg,authorize:bg,loginGuestUser:function(e,t){return Ig.apply(this,arguments)},loginRegisteredUserB2C:function(e,t,r){return mg.apply(this,arguments)},refreshAccessToken:function(e,t){var r={grant_type:"refresh_token",refresh_token:t.refreshToken,client_id:e.clientConfig.parameters.clientId};return e.getAccessToken({body:r})},logout:function(e,t){return e.logoutCustomer({parameters:{refresh_token:t.refreshToken,client_id:e.clientConfig.parameters.clientId,channel_id:e.clientConfig.parameters.siteId}})}});e.ClientConfig=bo,e.ShopperBaskets=Ad,e.ShopperContexts=_d,e.ShopperCustomers=Jd,e.ShopperDiscoverySearch=Hd,e.ShopperGiftCertificates=Wd,e.ShopperLogin=Qd,e.ShopperOrders=eu,e.ShopperProducts=nu,e.ShopperPromotions=ou,e.ShopperSearch=ku,e.TemplateURL=jd,e.helpers=xg,Object.defineProperty(e,"__esModule",{value:!0})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("cross-fetch"),require("nanoid")):"function"==typeof define&&define.amd?define(["exports","cross-fetch","nanoid"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).CommerceSdk={},e.crossFetch,e.nanoid)}(this,(function(e,t,r){"use strict";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},c=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")(),d=function(e){try{return!!e()}catch(e){return!0}},u=!d((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),f=!d((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),h=Function.prototype.call,p=f?h.bind(h):function(){return h.apply(h,arguments)},l={}.propertyIsEnumerable,g=Object.getOwnPropertyDescriptor,b={f:g&&!l.call({1:2},1)?function(e){var t=g(this,e);return!!t&&t.enumerable}:l},v=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},I=Function.prototype,m=I.bind,x=I.call,k=f&&m.bind(x,x),w=f?function(e){return e&&k(e)}:function(e){return e&&function(){return x.apply(e,arguments)}},y=w({}.toString),C=w("".slice),z=function(e){return C(y(e),8,-1)},O=Object,q=w("".split),E=d((function(){return!O("z").propertyIsEnumerable(0)}))?function(e){return"String"==z(e)?q(e,""):O(e)}:O,P=TypeError,S=function(e){if(null==e)throw P("Can't call method on "+e);return e},R=function(e){return E(S(e))},j=function(e){return"function"==typeof e},T=function(e){return"object"==typeof e?null!==e:j(e)},M=function(e){return j(e)?e:void 0},U=function(e,t){return arguments.length<2?M(c[e]):c[e]&&c[e][t]},A=w({}.isPrototypeOf),B=U("navigator","userAgent")||"",N=c.process,_=c.Deno,L=N&&N.versions||_&&_.version,D=L&&L.v8;D&&(o=(a=D.split("."))[0]>0&&a[0]<4?1:+(a[0]+a[1])),!o&&B&&(!(a=B.match(/Edge\/(\d+)/))||a[1]>=74)&&(a=B.match(/Chrome\/(\d+)/))&&(o=+a[1]);var F=o,J=!!Object.getOwnPropertySymbols&&!d((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&F&&F<41})),G=J&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,H=Object,V=G?function(e){return"symbol"==typeof e}:function(e){var t=U("Symbol");return j(t)&&A(t.prototype,H(e))},W=String,$=function(e){try{return W(e)}catch(e){return"Object"}},Y=TypeError,K=function(e){if(j(e))return e;throw Y($(e)+" is not a function")},Q=function(e,t){var r=e[t];return null==r?void 0:K(r)},X=TypeError,Z=Object.defineProperty,ee=function(e,t){try{Z(c,e,{value:t,configurable:!0,writable:!0})}catch(r){c[e]=t}return t},te=c["__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(S(e))},ae=w({}.hasOwnProperty),oe=Object.hasOwn||function(e,t){return ae(ie(e),t)},se=0,ce=Math.random(),de=w(1..toString),ue=function(e){return"Symbol("+(void 0===e?"":e)+")_"+de(++se+ce,36)},fe=re("wks"),he=c.Symbol,pe=he&&he.for,le=G?he:he&&he.withoutSetter||ue,ge=function(e){if(!oe(fe,e)||!J&&"string"!=typeof fe[e]){var t="Symbol."+e;J&&oe(he,e)?fe[e]=he[e]:fe[e]=G&&pe?pe(t):le(t)}return fe[e]},be=TypeError,ve=ge("toPrimitive"),Ie=function(e,t){if(!T(e)||V(e))return e;var r,n=Q(e,ve);if(n){if(void 0===t&&(t="default"),r=p(n,e,t),!T(r)||V(r))return r;throw be("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var r,n;if("string"===t&&j(r=e.toString)&&!T(n=p(r,e)))return n;if(j(r=e.valueOf)&&!T(n=p(r,e)))return n;if("string"!==t&&j(r=e.toString)&&!T(n=p(r,e)))return n;throw X("Can't convert object to primitive value")}(e,t)},me=function(e){var t=Ie(e,"string");return V(t)?t:t+""},xe=c.document,ke=T(xe)&&T(xe.createElement),we=function(e){return ke?xe.createElement(e):{}},ye=!u&&!d((function(){return 7!=Object.defineProperty(we("div"),"a",{get:function(){return 7}}).a})),Ce=Object.getOwnPropertyDescriptor,ze={f:u?Ce:function(e,t){if(e=R(e),t=me(t),ye)try{return Ce(e,t)}catch(e){}if(oe(e,t))return v(!p(b.f,e,t),e[t])}},Oe=u&&d((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),qe=String,Ee=TypeError,Pe=function(e){if(T(e))return e;throw Ee(qe(e)+" is not an object")},Se=TypeError,Re=Object.defineProperty,je=Object.getOwnPropertyDescriptor,Te={f:u?Oe?function(e,t,r){if(Pe(e),t=me(t),Pe(r),"function"==typeof e&&"prototype"===t&&"value"in r&&"writable"in r&&!r.writable){var n=je(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 Re(e,t,r)}:Re:function(e,t,r){if(Pe(e),t=me(t),Pe(r),ye)try{return Re(e,t,r)}catch(e){}if("get"in r||"set"in r)throw Se("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},Me=u?function(e,t,r){return Te.f(e,t,v(1,r))}:function(e,t,r){return e[t]=r,e},Ue=Function.prototype,Ae=u&&Object.getOwnPropertyDescriptor,Be=oe(Ue,"name"),Ne={EXISTS:Be,PROPER:Be&&"something"===function(){}.name,CONFIGURABLE:Be&&(!u||u&&Ae(Ue,"name").configurable)},_e=w(Function.toString);j(te.inspectSource)||(te.inspectSource=function(e){return _e(e)});var Le,De,Fe,Je=te.inspectSource,Ge=c.WeakMap,He=j(Ge)&&/native code/.test(Je(Ge)),Ve=re("keys"),We=function(e){return Ve[e]||(Ve[e]=ue(e))},$e={},Ye=c.TypeError,Ke=c.WeakMap;if(He||te.state){var Qe=te.state||(te.state=new Ke),Xe=w(Qe.get),Ze=w(Qe.has),et=w(Qe.set);Le=function(e,t){if(Ze(Qe,e))throw new Ye("Object already initialized");return t.facade=e,et(Qe,e,t),t},De=function(e){return Xe(Qe,e)||{}},Fe=function(e){return Ze(Qe,e)}}else{var tt=We("state");$e[tt]=!0,Le=function(e,t){if(oe(e,tt))throw new Ye("Object already initialized");return t.facade=e,Me(e,tt,t),t},De=function(e){return oe(e,tt)?e[tt]:{}},Fe=function(e){return oe(e,tt)}}var rt={set:Le,get:De,has:Fe,enforce:function(e){return Fe(e)?De(e):Le(e,{})},getterFor:function(e){return function(t){var r;if(!T(t)||(r=De(t)).type!==e)throw Ye("Incompatible receiver, "+e+" required");return r}}},nt=i((function(e){var t=Ne.CONFIGURABLE,r=rt.enforce,n=rt.get,i=Object.defineProperty,a=u&&!d((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 c=r(e);return oe(c,"source")||(c.source=o.join("string"==typeof n?n:"")),e};Function.prototype.toString=s((function(){return j(this)&&n(this).source||Je(this)}),"toString")})),it=function(e,t,r,n){n||(n={});var i=n.enumerable,a=void 0!==n.name?n.name:t;if(j(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:Te.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)},ct=function(e){var t=+e;return t!=t||0===t?0:st(t)},dt=Math.max,ut=Math.min,ft=function(e,t){var r=ct(e);return r<0?dt(r+t,0):ut(r,t)},ht=Math.min,pt=function(e){return e>0?ht(ct(e),9007199254740991):0},lt=function(e){return pt(e.length)},gt=function(e){return function(t,r,n){var i,a=R(t),o=lt(a),s=ft(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}},bt={includes:gt(!0),indexOf:gt(!1)},vt=bt.indexOf,It=w([].push),mt=function(e,t){var r,n=R(e),i=0,a=[];for(r in n)!oe($e,r)&&oe(n,r)&&It(a,r);for(;t.length>i;)oe(n,r=t[i++])&&(~vt(a,r)||It(a,r));return a},xt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],kt=xt.concat("length","prototype"),wt={f:Object.getOwnPropertyNames||function(e){return mt(e,kt)}},yt={f:Object.getOwnPropertySymbols},Ct=w([].concat),zt=U("Reflect","ownKeys")||function(e){var t=wt.f(Pe(e)),r=yt.f;return r?Ct(t,r(e)):t},Ot=function(e,t,r){for(var n=zt(t),i=Te.f,a=ze.f,o=0;o<n.length;o++){var s=n[o];oe(e,s)||r&&oe(r,s)||i(e,s,a(t,s))}},qt=/#|\.prototype\./,Et=function(e,t){var r=St[Pt(e)];return r==jt||r!=Rt&&(j(t)?d(t):!!t)},Pt=Et.normalize=function(e){return String(e).replace(qt,".").toLowerCase()},St=Et.data={},Rt=Et.NATIVE="N",jt=Et.POLYFILL="P",Tt=Et,Mt=ze.f,Ut=function(e,t){var r,n,i,a,o,s=e.target,d=e.global,u=e.stat;if(r=d?c:u?c[s]||ee(s,{}):(c[s]||{}).prototype)for(n in t){if(a=t[n],i=e.dontCallGetSet?(o=Mt(r,n))&&o.value:r[n],!Tt(d?n:s+(u?".":"#")+n,e.forced)&&void 0!==i){if(typeof a==typeof i)continue;Ot(a,i)}(e.sham||i&&i.sham)&&Me(a,"sham",!0),it(r,n,a,e)}},At=Object.keys||function(e){return mt(e,xt)},Bt=d((function(){At(1)}));Ut({target:"Object",stat:!0,forced:Bt},{keys:function(e){return At(ie(e))}});var Nt={};Nt[ge("toStringTag")]="z";var _t,Lt="[object z]"===String(Nt),Dt=ge("toStringTag"),Ft=Object,Jt="Arguments"==z(function(){return arguments}()),Gt=Lt?z: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=Ft(e),Dt))?r:Jt?z(t):"Object"==(n=z(t))&&j(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)},Wt={f:u&&!Oe?Object.defineProperties:function(e,t){Pe(e);for(var r,n=R(t),i=At(t),a=i.length,o=0;a>o;)Te.f(e,r=i[o++],n[r]);return e}},$t=U("document","documentElement"),Yt=We("IE_PROTO"),Kt=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{_t=new ActiveXObject("htmlfile")}catch(e){}var e,t;Zt="undefined"!=typeof document?document.domain&&_t?Xt(_t):((t=we("iframe")).style.display="none",$t.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(Qt("document.F=Object")),e.close(),e.F):Xt(_t);for(var r=xt.length;r--;)delete Zt.prototype[xt[r]];return Zt()};$e[Yt]=!0;var er=Object.create||function(e,t){var r;return null!==e?(Kt.prototype=Pe(e),r=new Kt,Kt.prototype=null,r[Yt]=e):r=Zt(),void 0===t?r:Wt.f(r,t)},tr=function(e,t,r){var n=me(t);n in e?Te.f(e,n,v(0,r)):e[n]=r},rr=Array,nr=Math.max,ir=function(e,t,r){for(var n=lt(e),i=ft(t,n),a=ft(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=wt.f,or="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],sr={f:function(e){return or&&"Window"==z(e)?function(e){try{return ar(e)}catch(e){return ir(or)}}(e):ar(R(e))}},cr={f:ge},dr=c,ur=Te.f,fr=Te.f,hr=ge("toStringTag"),pr=function(e,t,r){e&&!r&&(e=e.prototype),e&&!oe(e,hr)&&fr(e,hr,{configurable:!0,value:t})},lr=w(w.bind),gr=function(e,t){return K(e),void 0===t?e:f?lr(e,t):function(){return e.apply(t,arguments)}},br=Array.isArray||function(e){return"Array"==z(e)},vr=function(){},Ir=[],mr=U("Reflect","construct"),xr=/^\s*(?:class|function)\b/,kr=w(xr.exec),wr=!xr.exec(vr),yr=function(e){if(!j(e))return!1;try{return mr(vr,Ir,e),!0}catch(e){return!1}},Cr=function(e){if(!j(e))return!1;switch(Gt(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return wr||!!kr(xr,Je(e))}catch(e){return!0}};Cr.sham=!0;var zr=!mr||d((function(){var e;return yr(yr.call)||!yr(Object)||!yr((function(){e=!0}))||e}))?Cr:yr,Or=ge("species"),qr=Array,Er=function(e,t){return new(function(e){var t;return br(e)&&(t=e.constructor,(zr(t)&&(t===qr||br(t.prototype))||T(t)&&null===(t=t[Or]))&&(t=void 0)),void 0===t?qr:t}(e))(0===t?0:t)},Pr=w([].push),Sr=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(c,d,u,f){for(var h,p,l=ie(c),g=E(l),b=gr(d,u),v=lt(g),I=0,m=f||Er,x=t?m(c,v):r||o?m(c,0):void 0;v>I;I++)if((s||I in g)&&(p=b(h=g[I],I,l),e))if(t)x[I]=p;else if(p)switch(e){case 3:return!0;case 5:return h;case 6:return I;case 2:Pr(x,h)}else switch(e){case 4:return!1;case 7:Pr(x,h)}return a?-1:n||i?i:x}},Rr={forEach:Sr(0),map:Sr(1),filter:Sr(2),some:Sr(3),every:Sr(4),find:Sr(5),findIndex:Sr(6),filterReject:Sr(7)},jr=Rr.forEach,Tr=We("hidden"),Mr=rt.set,Ur=rt.getterFor("Symbol"),Ar=Object.prototype,Br=c.Symbol,Nr=Br&&Br.prototype,_r=c.TypeError,Lr=c.QObject,Dr=ze.f,Fr=Te.f,Jr=sr.f,Gr=b.f,Hr=w([].push),Vr=re("symbols"),Wr=re("op-symbols"),$r=re("wks"),Yr=!Lr||!Lr.prototype||!Lr.prototype.findChild,Kr=u&&d((function(){return 7!=er(Fr({},"a",{get:function(){return Fr(this,"a",{value:7}).a}})).a}))?function(e,t,r){var n=Dr(Ar,t);n&&delete Ar[t],Fr(e,t,r),n&&e!==Ar&&Fr(Ar,t,n)}:Fr,Qr=function(e,t){var r=Vr[e]=er(Nr);return Mr(r,{type:"Symbol",tag:e,description:t}),u||(r.description=t),r},Xr=function(e,t,r){e===Ar&&Xr(Wr,t,r),Pe(e);var n=me(t);return Pe(r),oe(Vr,n)?(r.enumerable?(oe(e,Tr)&&e[Tr][n]&&(e[Tr][n]=!1),r=er(r,{enumerable:v(0,!1)})):(oe(e,Tr)||Fr(e,Tr,v(1,{})),e[Tr][n]=!0),Kr(e,n,r)):Fr(e,n,r)},Zr=function(e,t){Pe(e);var r=R(t),n=At(r).concat(nn(r));return jr(n,(function(t){u&&!p(en,r,t)||Xr(e,t,r[t])})),e},en=function(e){var t=me(e),r=p(Gr,this,t);return!(this===Ar&&oe(Vr,t)&&!oe(Wr,t))&&(!(r||!oe(this,t)||!oe(Vr,t)||oe(this,Tr)&&this[Tr][t])||r)},tn=function(e,t){var r=R(e),n=me(t);if(r!==Ar||!oe(Vr,n)||oe(Wr,n)){var i=Dr(r,n);return!i||!oe(Vr,n)||oe(r,Tr)&&r[Tr][n]||(i.enumerable=!0),i}},rn=function(e){var t=Jr(R(e)),r=[];return jr(t,(function(e){oe(Vr,e)||oe($e,e)||Hr(r,e)})),r},nn=function(e){var t=e===Ar,r=Jr(t?Wr:R(e)),n=[];return jr(r,(function(e){!oe(Vr,e)||t&&!oe(Ar,e)||Hr(n,Vr[e])})),n};J||(Nr=(Br=function(){if(A(Nr,this))throw _r("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&&p(r,Wr,e),oe(this,Tr)&&oe(this[Tr],t)&&(this[Tr][t]=!1),Kr(this,t,v(1,e))};return u&&Yr&&Kr(Ar,t,{configurable:!0,set:r}),Qr(t,e)}).prototype,it(Nr,"toString",(function(){return Ur(this).tag})),it(Br,"withoutSetter",(function(e){return Qr(ue(e),e)})),b.f=en,Te.f=Xr,Wt.f=Zr,ze.f=tn,wt.f=sr.f=rn,yt.f=nn,cr.f=function(e){return Qr(ge(e),e)},u&&(Fr(Nr,"description",{configurable:!0,get:function(){return Ur(this).description}}),it(Ar,"propertyIsEnumerable",en,{unsafe:!0}))),Ut({global:!0,constructor:!0,wrap:!0,forced:!J,sham:!J},{Symbol:Br}),jr(At($r),(function(e){!function(e){var t=dr.Symbol||(dr.Symbol={});oe(t,e)||ur(t,e,{value:cr.f(e)})}(e)})),Ut({target:"Symbol",stat:!0,forced:!J},{useSetter:function(){Yr=!0},useSimple:function(){Yr=!1}}),Ut({target:"Object",stat:!0,forced:!J,sham:!u},{create:function(e,t){return void 0===t?er(e):Zr(er(e),t)},defineProperty:Xr,defineProperties:Zr,getOwnPropertyDescriptor:tn}),Ut({target:"Object",stat:!0,forced:!J},{getOwnPropertyNames:rn}),function(){var e=U("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,n=ge("toPrimitive");t&&!t[n]&&it(t,n,(function(e){return p(r,this)}),{arity:1})}(),pr(Br,"Symbol"),$e[Tr]=!0;var an=J&&!!Symbol.for&&!!Symbol.keyFor,on=re("string-to-symbol-registry"),sn=re("symbol-to-string-registry");Ut({target:"Symbol",stat:!0,forced:!an},{for:function(e){var t=Vt(e);if(oe(on,t))return on[t];var r=U("Symbol")(t);return on[t]=r,sn[r]=t,r}});var cn=re("symbol-to-string-registry");Ut({target:"Symbol",stat:!0,forced:!an},{keyFor:function(e){if(!V(e))throw TypeError($(e)+" is not a symbol");if(oe(cn,e))return cn[e]}});var dn=Function.prototype,un=dn.apply,fn=dn.call,hn="object"==typeof Reflect&&Reflect.apply||(f?fn.bind(un):function(){return fn.apply(un,arguments)}),pn=w([].slice),ln=U("JSON","stringify"),gn=w(/./.exec),bn=w("".charAt),vn=w("".charCodeAt),In=w("".replace),mn=w(1..toString),xn=/[\uD800-\uDFFF]/g,kn=/^[\uD800-\uDBFF]$/,wn=/^[\uDC00-\uDFFF]$/,yn=!J||d((function(){var e=U("Symbol")();return"[null]"!=ln([e])||"{}"!=ln({a:e})||"{}"!=ln(Object(e))})),Cn=d((function(){return'"\\udf06\\ud834"'!==ln("\udf06\ud834")||'"\\udead"'!==ln("\udead")})),zn=function(e,t){var r=pn(arguments),n=t;if((T(t)||void 0!==e)&&!V(e))return br(t)||(t=function(e,t){if(j(n)&&(t=p(n,this,e,t)),!V(t))return t}),r[1]=t,hn(ln,null,r)},On=function(e,t,r){var n=bn(r,t-1),i=bn(r,t+1);return gn(kn,e)&&!gn(wn,i)||gn(wn,e)&&!gn(kn,n)?"\\u"+mn(vn(e,0),16):e};ln&&Ut({target:"JSON",stat:!0,arity:3,forced:yn||Cn},{stringify:function(e,t,r){var n=pn(arguments),i=hn(yn?zn:ln,null,n);return Cn&&"string"==typeof i?In(i,xn,On):i}});var qn=!J||d((function(){yt.f(1)}));Ut({target:"Object",stat:!0,forced:qn},{getOwnPropertySymbols:function(e){var t=yt.f;return t?t(ie(e)):[]}});var En=ge("species"),Pn=function(e){return F>=51||!d((function(){var t=[];return(t.constructor={})[En]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Sn=Rr.filter,Rn=Pn("filter");Ut({target:"Array",proto:!0,forced:!Rn},{filter:function(e){return Sn(this,e,arguments.length>1?arguments[1]:void 0)}});var jn=Lt?{}.toString:function(){return"[object "+Gt(this)+"]"};Lt||it(Object.prototype,"toString",jn,{unsafe:!0});var Tn=ze.f,Mn=d((function(){Tn(1)}));Ut({target:"Object",stat:!0,forced:!u||Mn,sham:!u},{getOwnPropertyDescriptor:function(e,t){return Tn(R(e),t)}});var Un={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=we("span").classList,Bn=An&&An.constructor&&An.constructor.prototype,Nn=Bn===Object.prototype?void 0:Bn,_n=function(e,t){var r=[][e];return!!r&&d((function(){r.call(null,t||function(){return 1},1)}))},Ln=Rr.forEach,Dn=_n("forEach")?[].forEach:function(e){return Ln(this,e,arguments.length>1?arguments[1]:void 0)},Fn=function(e){if(e&&e.forEach!==Dn)try{Me(e,"forEach",Dn)}catch(t){e.forEach=Dn}};for(var Jn in Un)Un[Jn]&&Fn(c[Jn]&&c[Jn].prototype);Fn(Nn),Ut({target:"Object",stat:!0,sham:!u},{getOwnPropertyDescriptors:function(e){for(var t,r,n=R(e),i=ze.f,a=zt(n),o={},s=0;a.length>s;)void 0!==(r=i(n,t=a[s++]))&&tr(o,t,r);return o}});var Gn=Wt.f;Ut({target:"Object",stat:!0,forced:Object.defineProperties!==Gn,sham:!u},{defineProperties:Gn});var Hn=Te.f;Ut({target:"Object",stat:!0,forced:Object.defineProperty!==Hn,sham:!u},{defineProperty:Hn});var Vn=function(){var e=Pe(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},Wn=RegExp.prototype,$n=Ne.PROPER,Yn=RegExp.prototype.toString,Kn=d((function(){return"/a/b"!=Yn.call({source:"a",flags:"b"})})),Qn=$n&&"toString"!=Yn.name;function Xn(e,t,r,n,i,a,o){try{var s=e[a](o),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,i)}function Zn(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function o(e){Xn(a,n,i,o,s,"next",e)}function s(e){Xn(a,n,i,o,s,"throw",e)}o(void 0)}))}}function ei(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ti(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 ri(e,t,r){return t&&ti(e.prototype,t),r&&ti(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function ni(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}(Kn||Qn)&&it(RegExp.prototype,"toString",(function(){var e=Pe(this);return"/"+Vt(e.source)+"/"+Vt(function(e){var t=e.flags;return void 0!==t||"flags"in Wn||oe(e,"flags")||!A(Wn,e)?t:p(Vn,e)}(e))}),{unsafe:!0});var ii=Object.prototype,ai=ii.hasOwnProperty,oi="function"==typeof Symbol?Symbol:{},si=oi.iterator||"@@iterator",ci=oi.asyncIterator||"@@asyncIterator",di=oi.toStringTag||"@@toStringTag";function ui(e,t,r,n){var i=t&&t.prototype instanceof pi?t:pi,a=Object.create(i.prototype),o=new Oi(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 Ei()}for(r.method=i,r.arg=a;;){var o=r.delegate;if(o){var s=yi(o,r);if(s){if(s===hi)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 c=fi(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===hi)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}(e,r,o),a}function fi(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}var hi={};function pi(){}function li(){}function gi(){}var bi={};bi[si]=function(){return this};var vi=Object.getPrototypeOf,Ii=vi&&vi(vi(qi([])));Ii&&Ii!==ii&&ai.call(Ii,si)&&(bi=Ii);var mi=gi.prototype=pi.prototype=Object.create(bi);function xi(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function ki(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===li||"GeneratorFunction"===(t.displayName||t.name))}function wi(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=fi(e[n],e,i);if("throw"!==s.type){var c=s.arg,d=c.value;return d&&"object"==typeof d&&ai.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,a,o)}),(function(e){r("throw",e,a,o)})):t.resolve(d).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,o)}))}o(s.arg)}(n,i,r,a)}))}return r=r?r.then(a,a):a()}}function yi(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,yi(e,t),"throw"===t.method))return hi;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return hi}var n=fi(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,hi;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,hi):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,hi)}function Ci(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 zi(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function Oi(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(Ci,this),this.reset(!0)}function qi(e){if(e){var t=e[si];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(ai.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:Ei}}function Ei(){return{value:void 0,done:!0}}li.prototype=mi.constructor=gi,gi.constructor=li,gi[di]=li.displayName="GeneratorFunction",xi(wi.prototype),wi.prototype[ci]=function(){return this},xi(mi),mi[di]="Generator",mi[si]=function(){return this},mi.toString=function(){return"[object Generator]"},Oi.prototype={constructor:Oi,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(zi),!e)for(var t in this)"t"===t.charAt(0)&&ai.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=ai.call(i,"catchLoc"),s=ai.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&&ai.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,hi):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),hi},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),zi(r),hi}},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;zi(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:qi(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),hi}};var Pi={wrap:ui,isGeneratorFunction:ki,AsyncIterator:wi,mark:function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,gi):(e.__proto__=gi,di in e||(e[di]="GeneratorFunction")),e.prototype=Object.create(mi),e},awrap:function(e){return{__await:e}},async:function(e,t,r,n,i){void 0===i&&(i=Promise);var a=new wi(ui(e,t,r,n),i);return ki(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:qi},Si=Te.f,Ri=ge("unscopables"),ji=Array.prototype;null==ji[Ri]&&Si(ji,Ri,{configurable:!0,value:er(null)});var Ti,Mi,Ui,Ai=function(e){ji[Ri][e]=!0},Bi={},Ni=!d((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),_i=We("IE_PROTO"),Li=Object,Di=Li.prototype,Fi=Ni?Li.getPrototypeOf:function(e){var t=ie(e);if(oe(t,_i))return t[_i];var r=t.constructor;return j(r)&&t instanceof r?r.prototype:t instanceof Li?Di:null},Ji=ge("iterator"),Gi=!1;[].keys&&("next"in(Ui=[].keys())?(Mi=Fi(Fi(Ui)))!==Object.prototype&&(Ti=Mi):Gi=!0),(null==Ti||d((function(){var e={};return Ti[Ji].call(e)!==e})))&&(Ti={}),j(Ti[Ji])||it(Ti,Ji,(function(){return this}));var Hi={IteratorPrototype:Ti,BUGGY_SAFARI_ITERATORS:Gi},Vi=Hi.IteratorPrototype,Wi=function(){return this},$i=function(e,t,r,n){var i=t+" Iterator";return e.prototype=er(Vi,{next:v(+!n,r)}),pr(e,i,!1),Bi[i]=Wi,e},Yi=String,Ki=TypeError,Qi=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=w(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),t=r instanceof Array}catch(e){}return function(r,n){return Pe(r),function(e){if("object"==typeof e||j(e))return e;throw Ki("Can't set "+Yi(e)+" as a prototype")}(n),t?e(r,n):r.__proto__=n,r}}():void 0),Xi=Ne.PROPER,Zi=Ne.CONFIGURABLE,ea=Hi.IteratorPrototype,ta=Hi.BUGGY_SAFARI_ITERATORS,ra=ge("iterator"),na=function(){return this},ia=function(e,t,r,n,i,a,o){$i(r,t,n);var s,c,d,u=function(e){if(e===i&&b)return b;if(!ta&&e in l)return l[e];switch(e){case"keys":case"values":case"entries":return function(){return new r(this,e)}}return function(){return new r(this)}},f=t+" Iterator",h=!1,l=e.prototype,g=l[ra]||l["@@iterator"]||i&&l[i],b=!ta&&g||u(i),v="Array"==t&&l.entries||g;if(v&&(s=Fi(v.call(new e)))!==Object.prototype&&s.next&&(Fi(s)!==ea&&(Qi?Qi(s,ea):j(s[ra])||it(s,ra,na)),pr(s,f,!0)),Xi&&"values"==i&&g&&"values"!==g.name&&(Zi?Me(l,"name","values"):(h=!0,b=function(){return p(g,this)})),i)if(c={values:u("values"),keys:a?b:u("keys"),entries:u("entries")},o)for(d in c)(ta||h||!(d in l))&&it(l,d,c[d]);else Ut({target:t,proto:!0,forced:ta||h},c);return l[ra]!==b&&it(l,ra,b,{name:i}),Bi[t]=b,c},aa=Te.f,oa=rt.set,sa=rt.getterFor("Array Iterator"),ca=ia(Array,"Array",(function(e,t){oa(this,{type:"Array Iterator",target:R(e),index:0,kind:t})}),(function(){var e=sa(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"),da=Bi.Arguments=Bi.Array;if(Ai("keys"),Ai("values"),Ai("entries"),u&&"values"!==da.name)try{aa(da,"name",{value:"values"})}catch(e){}var ua=w("".charAt),fa=w("".charCodeAt),ha=w("".slice),pa=function(e){return function(t,r){var n,i,a=Vt(S(t)),o=ct(r),s=a.length;return o<0||o>=s?e?"":void 0:(n=fa(a,o))<55296||n>56319||o+1===s||(i=fa(a,o+1))<56320||i>57343?e?ua(a,o):n:e?ha(a,o,o+2):i-56320+(n-55296<<10)+65536}},la={codeAt:pa(!1),charAt:pa(!0)},ga=la.charAt,ba=rt.set,va=rt.getterFor("String Iterator");ia(String,"String",(function(e){ba(this,{type:"String Iterator",string:Vt(e),index:0})}),(function(){var e,t=va(this),r=t.string,n=t.index;return n>=r.length?{value:void 0,done:!0}:(e=ga(r,n),t.index+=e.length,{value:e,done:!1})}));var Ia=ge("iterator"),ma=ge("toStringTag"),xa=ca.values,ka=function(e,t){if(e){if(e[Ia]!==xa)try{Me(e,Ia,xa)}catch(t){e[Ia]=xa}if(e[ma]||Me(e,ma,t),Un[t])for(var r in ca)if(e[r]!==ca[r])try{Me(e,r,ca[r])}catch(t){e[r]=ca[r]}}};for(var wa in Un)ka(c[wa]&&c[wa].prototype,wa);ka(Nn,"DOMTokenList");var ya=ge("iterator"),Ca=!d((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[ya]||"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})),za=function(e,t,r){for(var n in t)it(e,n,t[n],r);return e},Oa=TypeError,qa=function(e,t){if(A(t,e))return e;throw Oa("Incorrect invocation")},Ea=ge("iterator"),Pa=function(e){if(null!=e)return Q(e,Ea)||Q(e,"@@iterator")||Bi[Gt(e)]},Sa=TypeError,Ra=function(e,t){var r=arguments.length<2?Pa(e):t;if(K(r))return Pe(p(r,e));throw Sa($(e)+" is not iterable")},ja=TypeError,Ta=function(e,t){if(e<t)throw ja("Not enough arguments");return e},Ma=Math.floor,Ua=function(e,t){var r=e.length,n=Ma(r/2);return r<8?Aa(e,t):Ba(e,Ua(ir(e,0,n),t),Ua(ir(e,n),t),t)},Aa=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},Ba=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},Na=Ua,_a=ge("iterator"),La=rt.set,Da=rt.getterFor("URLSearchParams"),Fa=rt.getterFor("URLSearchParamsIterator"),Ja=Object.getOwnPropertyDescriptor,Ga=function(e){if(!u)return c[e];var t=Ja(c,e);return t&&t.value},Ha=Ga("fetch"),Va=Ga("Request"),Wa=Ga("Headers"),$a=Va&&Va.prototype,Ya=Wa&&Wa.prototype,Ka=c.RegExp,Qa=c.TypeError,Xa=c.decodeURIComponent,Za=c.encodeURIComponent,eo=w("".charAt),to=w([].join),ro=w([].push),no=w("".replace),io=w([].shift),ao=w([].splice),oo=w("".split),so=w("".slice),co=/\+/g,uo=Array(4),fo=function(e){return uo[e-1]||(uo[e-1]=Ka("((?:%[\\da-f]{2}){"+e+"})","gi"))},ho=function(e){try{return Xa(e)}catch(t){return e}},po=function(e){var t=no(e,co," "),r=4;try{return Xa(t)}catch(e){for(;r;)t=no(t,fo(r--),ho);return t}},lo=/[!'()~]|%20/g,go={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},bo=function(e){return go[e]},vo=function(e){return no(Za(e),lo,bo)},Io=$i((function(e,t){La(this,{type:"URLSearchParamsIterator",iterator:Ra(Da(e).entries),kind:t})}),"Iterator",(function(){var e=Fa(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),mo=function(e){this.entries=[],this.url=null,void 0!==e&&(T(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===eo(e,0)?so(e,1):e:Vt(e)))};mo.prototype={type:"URLSearchParams",bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,r,n,i,a,o,s,c=Pa(e);if(c)for(r=(t=Ra(e,c)).next;!(n=p(r,t)).done;){if(a=(i=Ra(Pe(n.value))).next,(o=p(a,i)).done||(s=p(a,i)).done||!p(a,i).done)throw Qa("Expected sequence with length 2");ro(this.entries,{key:Vt(o.value),value:Vt(s.value)})}else for(var d in e)oe(e,d)&&ro(this.entries,{key:d,value:Vt(e[d])})},parseQuery:function(e){if(e)for(var t,r,n=oo(e,"&"),i=0;i<n.length;)(t=n[i++]).length&&(r=oo(t,"="),ro(this.entries,{key:po(io(r)),value:po(to(r,"="))}))},serialize:function(){for(var e,t=this.entries,r=[],n=0;n<t.length;)e=t[n++],ro(r,vo(e.key)+"="+vo(e.value));return to(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var xo=function(){qa(this,ko);var e=arguments.length>0?arguments[0]:void 0;La(this,new mo(e))},ko=xo.prototype;if(za(ko,{append:function(e,t){Ta(arguments.length,2);var r=Da(this);ro(r.entries,{key:Vt(e),value:Vt(t)}),r.updateURL()},delete:function(e){Ta(arguments.length,1);for(var t=Da(this),r=t.entries,n=Vt(e),i=0;i<r.length;)r[i].key===n?ao(r,i,1):i++;t.updateURL()},get:function(e){Ta(arguments.length,1);for(var t=Da(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){Ta(arguments.length,1);for(var t=Da(this).entries,r=Vt(e),n=[],i=0;i<t.length;i++)t[i].key===r&&ro(n,t[i].value);return n},has:function(e){Ta(arguments.length,1);for(var t=Da(this).entries,r=Vt(e),n=0;n<t.length;)if(t[n++].key===r)return!0;return!1},set:function(e,t){Ta(arguments.length,1);for(var r,n=Da(this),i=n.entries,a=!1,o=Vt(e),s=Vt(t),c=0;c<i.length;c++)(r=i[c]).key===o&&(a?ao(i,c--,1):(a=!0,r.value=s));a||ro(i,{key:o,value:s}),n.updateURL()},sort:function(){var e=Da(this);Na(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,r=Da(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 Io(this,"keys")},values:function(){return new Io(this,"values")},entries:function(){return new Io(this,"entries")}},{enumerable:!0}),it(ko,_a,ko.entries,{name:"entries"}),it(ko,"toString",(function(){return Da(this).serialize()}),{enumerable:!0}),pr(xo,"URLSearchParams"),Ut({global:!0,constructor:!0,forced:!Ca},{URLSearchParams:xo}),!Ca&&j(Wa)){var wo=w(Ya.has),yo=w(Ya.set),Co=function(e){if(T(e)){var t,r=e.body;if("URLSearchParams"===Gt(r))return t=e.headers?new Wa(e.headers):new Wa,wo(t,"content-type")||yo(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),er(e,{body:v(0,Vt(r)),headers:v(0,t)})}return e};if(j(Ha)&&Ut({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return Ha(e,arguments.length>1?Co(arguments[1]):{})}}),j(Va)){var zo=function(e){return qa(this,$a),new Va(e,arguments.length>1?Co(arguments[1]):{})};$a.constructor=zo,zo.prototype=$a,Ut({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:zo})}}var Oo={URLSearchParams:xo,getState:Da};function qo(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 Eo(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?qo(Object(r),!0).forEach((function(t){ni(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qo(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Po=ri((function e(t){if(ei(this,e),ni(this,"baseUri",void 0),ni(this,"proxy",void 0),ni(this,"headers",void 0),ni(this,"parameters",void 0),ni(this,"fetchOptions",void 0),ni(this,"transformRequest",void 0),ni(this,"throwOnBadResponse",void 0),this.headers=Eo({},t.headers),this.parameters=Eo({},t.parameters),!this.parameters.shortCode)throw new Error("Missing required parameter: shortCode");this.fetchOptions=Eo({},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 So(e){return(So="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)}ni(Po,"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}}});var Ro="object"===("undefined"==typeof window?"undefined":So(window))&&"object"===So(window.document),jo="object"===("undefined"==typeof process?"undefined":So(process))&&"object"===So(process.versions)&&"string"==typeof process.versions.node,To=Function,Mo=w([].concat),Uo=w([].join),Ao={},Bo=function(e,t,r){if(!oe(Ao,t)){for(var n=[],i=0;i<t;i++)n[i]="a["+i+"]";Ao[t]=To("C,a","return new C("+Uo(n,",")+")")}return Ao[t](e,r)},No=f?To.bind:function(e){var t=K(this),r=t.prototype,n=pn(arguments,1),i=function(){var r=Mo(n,pn(arguments));return this instanceof i?Bo(t,r.length,r):t.apply(e,r)};return T(r)&&(i.prototype=r),i},_o=TypeError,Lo=function(e){if(zr(e))return e;throw _o($(e)+" is not a constructor")},Do=U("Reflect","construct"),Fo=Object.prototype,Jo=[].push,Go=d((function(){function e(){}return!(Do((function(){}),[],e)instanceof e)})),Ho=!d((function(){Do((function(){}))})),Vo=Go||Ho;Ut({target:"Reflect",stat:!0,forced:Vo,sham:Vo},{construct:function(e,t){Lo(e),Pe(t);var r=arguments.length<3?e:Lo(arguments[2]);if(Ho&&!Go)return Do(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(Jo,n,t),new(hn(No,e,n))}var i=r.prototype,a=er(T(i)?i:Fo),o=hn(e,a,t);return T(o)?o:a}});var Wo=TypeError,$o=function(e){if(e>9007199254740991)throw Wo("Maximum allowed index exceeded");return e},Yo=ge("isConcatSpreadable"),Ko=F>=51||!d((function(){var e=[];return e[Yo]=!1,e.concat()[0]!==e})),Qo=Pn("concat"),Xo=function(e){if(!T(e))return!1;var t=e[Yo];return void 0!==t?!!t:br(e)};function Zo(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function es(e,t){return(es=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ts(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&&es(e,t)}function rs(e,t){if(t&&("object"===So(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Zo(e)}function ns(e){return(ns=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function is(){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 as(e,t,r){return(as=is()?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&&es(i,r.prototype),i}).apply(null,arguments)}function os(e){var t="function"==typeof Map?new Map:void 0;return(os=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 as(e,arguments,ns(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),es(n,e)})(e)}function ss(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=ns(e);if(t){var i=ns(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return rs(this,r)}}Ut({target:"Array",proto:!0,arity:1,forced:!Ko||!Qo},{concat:function(e){var t,r,n,i,a,o=ie(this),s=Er(o,0),c=0;for(t=-1,n=arguments.length;t<n;t++)if(Xo(a=-1===t?o:arguments[t]))for(i=lt(a),$o(c+i),r=0;r<i;r++,c++)r in a&&tr(s,c,a[r]);else $o(c+1),tr(s,c++,a);return s.length=c,s}});var cs,ds,us=function(e){ts(r,e);var t=ss(r);function r(e){var n;return ei(this,r),ni(Zo(n=t.call(this,"".concat(e.status," ").concat(e.statusText))),"response",void 0),n.response=e,n}return ri(r)}(os(Error)),fs=c.RegExp,hs=d((function(){var e=fs("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),ps=hs||d((function(){return!fs("a","y").sticky})),ls={BROKEN_CARET:hs||d((function(){var e=fs("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:ps,UNSUPPORTED_Y:hs},gs=c.RegExp,bs=d((function(){var e=gs(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),vs=c.RegExp,Is=d((function(){var e=vs("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),ms=rt.get,xs=re("native-string-replace",String.prototype.replace),ks=RegExp.prototype.exec,ws=ks,ys=w("".charAt),Cs=w("".indexOf),zs=w("".replace),Os=w("".slice),qs=(ds=/b*/g,p(ks,cs=/a/,"a"),p(ks,ds,"a"),0!==cs.lastIndex||0!==ds.lastIndex),Es=ls.BROKEN_CARET,Ps=void 0!==/()??/.exec("")[1];(qs||Ps||Es||bs||Is)&&(ws=function(e){var t,r,n,i,a,o,s,c=this,d=ms(c),u=Vt(e),f=d.raw;if(f)return f.lastIndex=c.lastIndex,t=p(ws,f,u),c.lastIndex=f.lastIndex,t;var h=d.groups,l=Es&&c.sticky,g=p(Vn,c),b=c.source,v=0,I=u;if(l&&(g=zs(g,"y",""),-1===Cs(g,"g")&&(g+="g"),I=Os(u,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==ys(u,c.lastIndex-1))&&(b="(?: "+b+")",I=" "+I,v++),r=new RegExp("^(?:"+b+")",g)),Ps&&(r=new RegExp("^"+b+"$(?!\\s)",g)),qs&&(n=c.lastIndex),i=p(ks,l?r:c,I),l?i?(i.input=Os(i.input,v),i[0]=Os(i[0],v),i.index=c.lastIndex,c.lastIndex+=i[0].length):c.lastIndex=0:qs&&i&&(c.lastIndex=c.global?i.index+i[0].length:n),Ps&&i&&i.length>1&&p(xs,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 Ss=ws;Ut({target:"RegExp",proto:!0,forced:/./.exec!==Ss},{exec:Ss});var Rs=ge("species"),js=RegExp.prototype,Ts=function(e,t,r,n){var i=ge(e),a=!d((function(){var t={};return t[i]=function(){return 7},7!=""[e](t)})),o=a&&!d((function(){var t=!1,r=/a/;return"split"===e&&((r={}).constructor={},r.constructor[Rs]=function(){return r},r.flags="",r[i]=/./[i]),r.exec=function(){return t=!0,null},r[i](""),!t}));if(!a||!o||r){var s=w(/./[i]),c=t(i,""[e],(function(e,t,r,n,i){var o=w(e),c=t.exec;return c===Ss||c===js.exec?a&&!i?{done:!0,value:s(t,r,n)}:{done:!0,value:o(r,t,n)}:{done:!1}}));it(String.prototype,e,c[0]),it(js,i,c[1])}n&&Me(js[i],"sham",!0)},Ms=la.charAt,Us=function(e,t,r){return t+(r?Ms(e,t).length:1)},As=Math.floor,Bs=w("".charAt),Ns=w("".replace),_s=w("".slice),Ls=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Ds=/\$([$&'`]|\d{1,2})/g,Fs=function(e,t,r,n,i,a){var o=r+e.length,s=n.length,c=Ds;return void 0!==i&&(i=ie(i),c=Ls),Ns(a,c,(function(a,c){var d;switch(Bs(c,0)){case"$":return"$";case"&":return e;case"`":return _s(t,0,r);case"'":return _s(t,o);case"<":d=i[_s(c,1,-1)];break;default:var u=+c;if(0===u)return a;if(u>s){var f=As(u/10);return 0===f?a:f<=s?void 0===n[f-1]?Bs(c,1):n[f-1]+Bs(c,1):a}d=n[u-1]}return void 0===d?"":d}))},Js=TypeError,Gs=function(e,t){var r=e.exec;if(j(r)){var n=p(r,e,t);return null!==n&&Pe(n),n}if("RegExp"===z(e))return p(Ss,e,t);throw Js("RegExp#exec called on incompatible receiver")},Hs=ge("replace"),Vs=Math.max,Ws=Math.min,$s=w([].concat),Ys=w([].push),Ks=w("".indexOf),Qs=w("".slice),Xs="$0"==="a".replace(/./,"$0"),Zs=!!/./[Hs]&&""===/./[Hs]("a","$0");Ts("replace",(function(e,t,r){var n=Zs?"$":"$0";return[function(e,r){var n=S(this),i=null==e?void 0:Q(e,Hs);return i?p(i,e,n,r):p(t,Vt(n),e,r)},function(e,i){var a=Pe(this),o=Vt(e);if("string"==typeof i&&-1===Ks(i,n)&&-1===Ks(i,"$<")){var s=r(t,a,o,i);if(s.done)return s.value}var c=j(i);c||(i=Vt(i));var d=a.global;if(d){var u=a.unicode;a.lastIndex=0}for(var f=[];;){var h=Gs(a,o);if(null===h)break;if(Ys(f,h),!d)break;""===Vt(h[0])&&(a.lastIndex=Us(o,pt(a.lastIndex),u))}for(var p,l="",g=0,b=0;b<f.length;b++){for(var v=Vt((h=f[b])[0]),I=Vs(Ws(ct(h.index),o.length),0),m=[],x=1;x<h.length;x++)Ys(m,void 0===(p=h[x])?p:String(p));var k=h.groups;if(c){var w=$s([v],m,I,o);void 0!==k&&Ys(w,k);var y=Vt(hn(i,void 0,w))}else y=Fs(v,o,I,m,k,i);I>=g&&(l+=Qs(o,g,I)+y,g=I+v.length)}return l+Qs(o,g)}]}),!!d((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!Xs||Zs);var ec,tc=function(e,t,r){return r.get&&nt(r.get,t,{getter:!0}),r.set&&nt(r.set,t,{setter:!0}),Te.f(e,t,r)},rc=Object.assign,nc=Object.defineProperty,ic=w([].concat),ac=!rc||d((function(){if(u&&1!==rc({b:1},rc(nc({},"a",{enumerable:!0,get:function(){nc(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!=rc({},e)[r]||"abcdefghijklmnopqrst"!=At(rc({},t)).join("")}))?function(e,t){for(var r=ie(e),n=arguments.length,i=1,a=yt.f,o=b.f;n>i;)for(var s,c=E(arguments[i++]),d=a?ic(At(c),a(c)):At(c),f=d.length,h=0;f>h;)s=d[h++],u&&!p(o,c,s)||(r[s]=c[s]);return r}:rc,oc=function(e,t,r){var n,i;Pe(e);try{if(!(n=Q(e,"return"))){if("throw"===t)throw r;return r}n=p(n,e)}catch(e){i=!0,n=e}if("throw"===t)throw r;if(i)throw n;return Pe(n),r},sc=function(e,t,r,n){try{return n?t(Pe(r)[0],r[1]):t(r)}catch(t){oc(e,"throw",t)}},cc=ge("iterator"),dc=Array.prototype,uc=function(e){return void 0!==e&&(Bi.Array===e||dc[cc]===e)},fc=Array,hc=function(e){var t=ie(e),r=zr(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,c,d,u,f,h=Pa(t),l=0;if(!h||this===fc&&uc(h))for(o=lt(t),s=r?new this(o):fc(o);o>l;l++)f=a?i(t[l],l):t[l],tr(s,l,f);else for(u=(d=Ra(t,h)).next,s=r?new this:[];!(c=p(u,d)).done;l++)f=a?sc(d,i,[c.value,l],!0):c.value,tr(s,l,f);return s.length=l,s},pc=/[^\0-\u007E]/,lc=/[.\u3002\uFF0E\uFF61]/g,gc="Overflow: input needs wider integers to process",bc=RangeError,vc=w(lc.exec),Ic=Math.floor,mc=String.fromCharCode,xc=w("".charCodeAt),kc=w([].join),wc=w([].push),yc=w("".replace),Cc=w("".split),zc=w("".toLowerCase),Oc=function(e){return e+22+75*(e<26)},qc=function(e,t,r){var n=0;for(e=r?Ic(e/700):e>>1,e+=Ic(e/t);e>455;)e=Ic(e/35),n+=36;return Ic(n+36*e/(e+38))},Ec=function(e){var t,r,n=[],i=(e=function(e){for(var t=[],r=0,n=e.length;r<n;){var i=xc(e,r++);if(i>=55296&&i<=56319&&r<n){var a=xc(e,r++);56320==(64512&a)?wc(t,((1023&i)<<10)+(1023&a)+65536):(wc(t,i),r--)}else wc(t,i)}return t}(e)).length,a=128,o=0,s=72;for(t=0;t<e.length;t++)(r=e[t])<128&&wc(n,mc(r));var c=n.length,d=c;for(c&&wc(n,"-");d<i;){var u=2147483647;for(t=0;t<e.length;t++)(r=e[t])>=a&&r<u&&(u=r);var f=d+1;if(u-a>Ic((2147483647-o)/f))throw bc(gc);for(o+=(u-a)*f,a=u,t=0;t<e.length;t++){if((r=e[t])<a&&++o>2147483647)throw bc(gc);if(r==a){for(var h=o,p=36;;){var l=p<=s?1:p>=s+26?26:p-s;if(h<l)break;var g=h-l,b=36-l;wc(n,mc(Oc(l+g%b))),h=Ic(g/b),p+=36}wc(n,mc(Oc(h))),s=qc(o,f,d==c),o=0,d++}}o++,a++}return kc(n,"")},Pc=la.codeAt,Sc=rt.set,Rc=rt.getterFor("URL"),jc=Oo.URLSearchParams,Tc=Oo.getState,Mc=c.URL,Uc=c.TypeError,Ac=c.parseInt,Bc=Math.floor,Nc=Math.pow,_c=w("".charAt),Lc=w(/./.exec),Dc=w([].join),Fc=w(1..toString),Jc=w([].pop),Gc=w([].push),Hc=w("".replace),Vc=w([].shift),Wc=w("".split),$c=w("".slice),Yc=w("".toLowerCase),Kc=w([].unshift),Qc=/[a-z]/i,Xc=/[\d+-.a-z]/i,Zc=/\d/,ed=/^0x/i,td=/^[0-7]+$/,rd=/^\d+$/,nd=/^[\da-f]+$/i,id=/[\0\t\n\r #%/:<>?@[\\\]^|]/,ad=/[\0\t\n\r #/:<>?@[\\\]^|]/,od=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,sd=/[\t\n\r]/g,cd=function(e){var t,r,n,i;if("number"==typeof e){for(t=[],r=0;r<4;r++)Kc(t,e%256),e=Bc(e/256);return Dc(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+=Fc(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},dd={},ud=ac({},dd,{" ":1,'"':1,"<":1,">":1,"`":1}),fd=ac({},ud,{"#":1,"?":1,"{":1,"}":1}),hd=ac({},fd,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),pd=function(e,t){var r=Pc(e,0);return r>32&&r<127&&!oe(t,e)?e:encodeURIComponent(e)},ld={ftp:21,file:null,http:80,https:443,ws:80,wss:443},gd=function(e,t){var r;return 2==e.length&&Lc(Qc,_c(e,0))&&(":"==(r=_c(e,1))||!t&&"|"==r)},bd=function(e){var t;return e.length>1&&gd($c(e,0,2))&&(2==e.length||"/"===(t=_c(e,2))||"\\"===t||"?"===t||"#"===t)},vd=function(e){return"."===e||"%2e"===Yc(e)},Id={},md={},xd={},kd={},wd={},yd={},Cd={},zd={},Od={},qd={},Ed={},Pd={},Sd={},Rd={},jd={},Td={},Md={},Ud={},Ad={},Bd={},Nd={},_d=function(e,t,r){var n,i,a,o=Vt(e);if(t){if(i=this.parse(o))throw Uc(i);this.searchParams=null}else{if(void 0!==r&&(n=new _d(r,!0)),i=this.parse(o,null,n))throw Uc(i);(a=Tc(new jc)).bindURL(this),this.searchParams=a}};_d.prototype={type:"URL",parse:function(e,t,r){var n,i,a,o,s,c=this,d=t||Id,u=0,f="",h=!1,p=!1,l=!1;for(e=Vt(e),t||(c.scheme="",c.username="",c.password="",c.host=null,c.port=null,c.path=[],c.query=null,c.fragment=null,c.cannotBeABaseURL=!1,e=Hc(e,od,"")),e=Hc(e,sd,""),n=hc(e);u<=n.length;){switch(i=n[u],d){case Id:if(!i||!Lc(Qc,i)){if(t)return"Invalid scheme";d=xd;continue}f+=Yc(i),d=md;break;case md:if(i&&(Lc(Xc,i)||"+"==i||"-"==i||"."==i))f+=Yc(i);else{if(":"!=i){if(t)return"Invalid scheme";f="",d=xd,u=0;continue}if(t&&(c.isSpecial()!=oe(ld,f)||"file"==f&&(c.includesCredentials()||null!==c.port)||"file"==c.scheme&&!c.host))return;if(c.scheme=f,t)return void(c.isSpecial()&&ld[c.scheme]==c.port&&(c.port=null));f="","file"==c.scheme?d=Rd:c.isSpecial()&&r&&r.scheme==c.scheme?d=kd:c.isSpecial()?d=zd:"/"==n[u+1]?(d=wd,u++):(c.cannotBeABaseURL=!0,Gc(c.path,""),d=Ad)}break;case xd:if(!r||r.cannotBeABaseURL&&"#"!=i)return"Invalid scheme";if(r.cannotBeABaseURL&&"#"==i){c.scheme=r.scheme,c.path=ir(r.path),c.query=r.query,c.fragment="",c.cannotBeABaseURL=!0,d=Nd;break}d="file"==r.scheme?Rd:yd;continue;case kd:if("/"!=i||"/"!=n[u+1]){d=yd;continue}d=Od,u++;break;case wd:if("/"==i){d=qd;break}d=Ud;continue;case yd:if(c.scheme=r.scheme,i==ec)c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=ir(r.path),c.query=r.query;else if("/"==i||"\\"==i&&c.isSpecial())d=Cd;else if("?"==i)c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=ir(r.path),c.query="",d=Bd;else{if("#"!=i){c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=ir(r.path),c.path.length--,d=Ud;continue}c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=ir(r.path),c.query=r.query,c.fragment="",d=Nd}break;case Cd:if(!c.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,d=Ud;continue}d=qd}else d=Od;break;case zd:if(d=Od,"/"!=i||"/"!=_c(f,u+1))continue;u++;break;case Od:if("/"!=i&&"\\"!=i){d=qd;continue}break;case qd:if("@"==i){h&&(f="%40"+f),h=!0,a=hc(f);for(var g=0;g<a.length;g++){var b=a[g];if(":"!=b||l){var v=pd(b,hd);l?c.password+=v:c.username+=v}else l=!0}f=""}else if(i==ec||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()){if(h&&""==f)return"Invalid authority";u-=hc(f).length+1,f="",d=Ed}else f+=i;break;case Ed:case Pd:if(t&&"file"==c.scheme){d=Td;continue}if(":"!=i||p){if(i==ec||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()){if(c.isSpecial()&&""==f)return"Invalid host";if(t&&""==f&&(c.includesCredentials()||null!==c.port))return;if(o=c.parseHost(f))return o;if(f="",d=Md,t)return;continue}"["==i?p=!0:"]"==i&&(p=!1),f+=i}else{if(""==f)return"Invalid host";if(o=c.parseHost(f))return o;if(f="",d=Sd,t==Pd)return}break;case Sd:if(!Lc(Zc,i)){if(i==ec||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()||t){if(""!=f){var I=Ac(f,10);if(I>65535)return"Invalid port";c.port=c.isSpecial()&&I===ld[c.scheme]?null:I,f=""}if(t)return;d=Md;continue}return"Invalid port"}f+=i;break;case Rd:if(c.scheme="file","/"==i||"\\"==i)d=jd;else{if(!r||"file"!=r.scheme){d=Ud;continue}if(i==ec)c.host=r.host,c.path=ir(r.path),c.query=r.query;else if("?"==i)c.host=r.host,c.path=ir(r.path),c.query="",d=Bd;else{if("#"!=i){bd(Dc(ir(n,u),""))||(c.host=r.host,c.path=ir(r.path),c.shortenPath()),d=Ud;continue}c.host=r.host,c.path=ir(r.path),c.query=r.query,c.fragment="",d=Nd}}break;case jd:if("/"==i||"\\"==i){d=Td;break}r&&"file"==r.scheme&&!bd(Dc(ir(n,u),""))&&(gd(r.path[0],!0)?Gc(c.path,r.path[0]):c.host=r.host),d=Ud;continue;case Td:if(i==ec||"/"==i||"\\"==i||"?"==i||"#"==i){if(!t&&gd(f))d=Ud;else if(""==f){if(c.host="",t)return;d=Md}else{if(o=c.parseHost(f))return o;if("localhost"==c.host&&(c.host=""),t)return;f="",d=Md}continue}f+=i;break;case Md:if(c.isSpecial()){if(d=Ud,"/"!=i&&"\\"!=i)continue}else if(t||"?"!=i)if(t||"#"!=i){if(i!=ec&&(d=Ud,"/"!=i))continue}else c.fragment="",d=Nd;else c.query="",d=Bd;break;case Ud:if(i==ec||"/"==i||"\\"==i&&c.isSpecial()||!t&&("?"==i||"#"==i)){if(".."===(s=Yc(s=f))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(c.shortenPath(),"/"==i||"\\"==i&&c.isSpecial()||Gc(c.path,"")):vd(f)?"/"==i||"\\"==i&&c.isSpecial()||Gc(c.path,""):("file"==c.scheme&&!c.path.length&&gd(f)&&(c.host&&(c.host=""),f=_c(f,0)+":"),Gc(c.path,f)),f="","file"==c.scheme&&(i==ec||"?"==i||"#"==i))for(;c.path.length>1&&""===c.path[0];)Vc(c.path);"?"==i?(c.query="",d=Bd):"#"==i&&(c.fragment="",d=Nd)}else f+=pd(i,fd);break;case Ad:"?"==i?(c.query="",d=Bd):"#"==i?(c.fragment="",d=Nd):i!=ec&&(c.path[0]+=pd(i,dd));break;case Bd:t||"#"!=i?i!=ec&&("'"==i&&c.isSpecial()?c.query+="%27":c.query+="#"==i?"%23":pd(i,dd)):(c.fragment="",d=Nd);break;case Nd:i!=ec&&(c.fragment+=pd(i,ud))}u++}},parseHost:function(e){var t,r,n;if("["==_c(e,0)){if("]"!=_c(e,e.length-1))return"Invalid host";if(!(t=function(e){var t,r,n,i,a,o,s,c=[0,0,0,0,0,0,0,0],d=0,u=null,f=0,h=function(){return _c(e,f)};if(":"==h()){if(":"!=_c(e,1))return;f+=2,u=++d}for(;h();){if(8==d)return;if(":"!=h()){for(t=r=0;r<4&&Lc(nd,h());)t=16*t+Ac(h(),16),f++,r++;if("."==h()){if(0==r)return;if(f-=r,d>6)return;for(n=0;h();){if(i=null,n>0){if(!("."==h()&&n<4))return;f++}if(!Lc(Zc,h()))return;for(;Lc(Zc,h());){if(a=Ac(h(),10),null===i)i=a;else{if(0==i)return;i=10*i+a}if(i>255)return;f++}c[d]=256*c[d]+i,2!=++n&&4!=n||d++}if(4!=n)return;break}if(":"==h()){if(f++,!h())return}else if(h())return;c[d++]=t}else{if(null!==u)return;f++,u=++d}}if(null!==u)for(o=d-u,d=7;0!=d&&o>0;)s=c[d],c[d--]=c[u+o-1],c[u+--o]=s;else if(8!=d)return;return c}($c(e,1,-1))))return"Invalid host";this.host=t}else if(this.isSpecial()){if(e=function(e){var t,r,n=[],i=Cc(yc(zc(e),lc,"."),".");for(t=0;t<i.length;t++)r=i[t],wc(n,vc(pc,r)?"xn--"+Ec(r):r);return kc(n,".")}(e),Lc(id,e))return"Invalid host";if(null===(t=function(e){var t,r,n,i,a,o,s,c=Wc(e,".");if(c.length&&""==c[c.length-1]&&c.length--,(t=c.length)>4)return e;for(r=[],n=0;n<t;n++){if(""==(i=c[n]))return e;if(a=10,i.length>1&&"0"==_c(i,0)&&(a=Lc(ed,i)?16:8,i=$c(i,8==a?1:2)),""===i)o=0;else{if(!Lc(10==a?rd:8==a?td:nd,i))return e;o=Ac(i,a)}Gc(r,o)}for(n=0;n<t;n++)if(o=r[n],n==t-1){if(o>=Nc(256,5-t))return null}else if(o>255)return null;for(s=Jc(r),n=0;n<r.length;n++)s+=r[n]*Nc(256,3-n);return s}(e)))return"Invalid host";this.host=t}else{if(Lc(ad,e))return"Invalid host";for(t="",r=hc(e),n=0;n<r.length;n++)t+=pd(r[n],dd);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return oe(ld,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&gd(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,c=e.fragment,d=t+":";return null!==i?(d+="//",e.includesCredentials()&&(d+=r+(n?":"+n:"")+"@"),d+=cd(i),null!==a&&(d+=":"+a)):"file"==t&&(d+="//"),d+=e.cannotBeABaseURL?o[0]:o.length?"/"+Dc(o,"/"):"",null!==s&&(d+="?"+s),null!==c&&(d+="#"+c),d},setHref:function(e){var t=this.parse(e);if(t)throw Uc(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new Ld(e.path[0]).origin}catch(e){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+cd(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(Vt(e)+":",Id)},getUsername:function(){return this.username},setUsername:function(e){var t=hc(Vt(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<t.length;r++)this.username+=pd(t[r],hd)}},getPassword:function(){return this.password},setPassword:function(e){var t=hc(Vt(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<t.length;r++)this.password+=pd(t[r],hd)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?cd(e):cd(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,Ed)},getHostname:function(){var e=this.host;return null===e?"":cd(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,Pd)},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,Sd))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+Dc(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,Md))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=Vt(e))?this.query=null:("?"==_c(e,0)&&(e=$c(e,1)),this.query="",this.parse(e,Bd)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=Vt(e))?("#"==_c(e,0)&&(e=$c(e,1)),this.fragment="",this.parse(e,Nd)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var Ld=function(e){var t=qa(this,Dd),r=Ta(arguments.length,1)>1?arguments[1]:void 0,n=Sc(t,new _d(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())},Dd=Ld.prototype,Fd=function(e,t){return{get:function(){return Rc(this)[e]()},set:t&&function(e){return Rc(this)[t](e)},configurable:!0,enumerable:!0}};if(u&&(tc(Dd,"href",Fd("serialize","setHref")),tc(Dd,"origin",Fd("getOrigin")),tc(Dd,"protocol",Fd("getProtocol","setProtocol")),tc(Dd,"username",Fd("getUsername","setUsername")),tc(Dd,"password",Fd("getPassword","setPassword")),tc(Dd,"host",Fd("getHost","setHost")),tc(Dd,"hostname",Fd("getHostname","setHostname")),tc(Dd,"port",Fd("getPort","setPort")),tc(Dd,"pathname",Fd("getPathname","setPathname")),tc(Dd,"search",Fd("getSearch","setSearch")),tc(Dd,"searchParams",Fd("getSearchParams")),tc(Dd,"hash",Fd("getHash","setHash"))),it(Dd,"toJSON",(function(){return Rc(this).serialize()}),{enumerable:!0}),it(Dd,"toString",(function(){return Rc(this).serialize()}),{enumerable:!0}),Mc){var Jd=Mc.createObjectURL,Gd=Mc.revokeObjectURL;Jd&&it(Ld,"createObjectURL",gr(Jd,Mc)),Gd&&it(Ld,"revokeObjectURL",gr(Gd,Mc))}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=ns(e);if(t){var i=ns(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return rs(this,r)}}pr(Ld,"URL"),Ut({global:!0,constructor:!0,forced:!Ca,sham:!u},{URL:Ld});var Vd=function(e){ts(r,e);var t=Hd(r);function r(e,n,i){var a;return ei(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 ri(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))for(var i=0;i<n.length;i+=1)t.searchParams.append(r,String(n[i]));else t.searchParams.append(r,String(n))}))}}],[{key:"renderTemplateUri",value:function(e,t){return t?e.replace(/\{([^\}]+)\}/g,(function(e,r){return String(t[r])})):e}}]),r}(os(URL)),Wd="commerce-sdk-isomorphic@1.7.0";function $d(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 Yd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?$d(Object(r),!0).forEach((function(t){ni(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$d(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Kd=function(){function e(t){ei(this,e),ni(this,"clientConfig",void 0);var r=Yd({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Po(r)}var r,n,i,a,o,s,c,d,u,f,h,p,l,g,b,v,I,m,x,k,w,y,C,z,O,q,E,P,S,R,j;return ri(e,[{key:"createBasket",value:(j=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0!==i.taxMode?s.taxMode=i.taxMode:void 0!==a.taxMode&&(s.taxMode=a.taxMode),void 0===i.siteId){e.next=18;break}s.siteId=i.siteId,e.next=23;break;case 18:if(void 0===a.siteId){e.next=22;break}s.siteId=a.siteId,e.next=23;break;case 22:throw new Error("Missing required query parameter: siteId");case 23:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new Vd("/organizations/{organizationId}/baskets",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Yd(Yd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),Yd(Yd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=30,t.fetch(u);case 30:if(f=e.sent,!n){e.next=35;break}return e.abrupt("return",f);case 35:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=39;break}throw new us(f);case 39:return e.next=41,f.text();case 41:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 43:case"end":return e.stop()}}),e,this)}))),function(e,t){return j.apply(this,arguments)})},{key:"transferBasket",value:(R=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0!==i.overrideExisting?s.overrideExisting=i.overrideExisting:void 0!==a.overrideExisting&&(s.overrideExisting=a.overrideExisting),void 0===i.siteId){e.next=18;break}s.siteId=i.siteId,e.next=23;break;case 18:if(void 0===a.siteId){e.next=22;break}s.siteId=a.siteId,e.next=23;break;case 22:throw new Error("Missing required query parameter: siteId");case 23:return c=new Vd("/organizations/{organizationId}/baskets/actions/transfer",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Yd(Yd({},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),Yd(Yd({},this.clientConfig.fetchOptions),{},{headers:d,method:"POST"})),e.next=29,t.fetch(u);case 29:if(f=e.sent,!n){e.next=34;break}return e.abrupt("return",f);case 34:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=38;break}throw new us(f);case 38:return e.next=40,f.text();case 40:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 42:case"end":return e.stop()}}),e,this)}))),function(e,t){return R.apply(this,arguments)})},{key:"mergeBasket",value:(S=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0!==i.createDestinationBasket?s.createDestinationBasket=i.createDestinationBasket:void 0!==a.createDestinationBasket&&(s.createDestinationBasket=a.createDestinationBasket),void 0!==i.productItemMergeMode?s.productItemMergeMode=i.productItemMergeMode:void 0!==a.productItemMergeMode&&(s.productItemMergeMode=a.productItemMergeMode),void 0===i.siteId){e.next=19;break}s.siteId=i.siteId,e.next=24;break;case 19:if(void 0===a.siteId){e.next=23;break}s.siteId=a.siteId,e.next=24;break;case 23:throw new Error("Missing required query parameter: siteId");case 24:return c=new Vd("/organizations/{organizationId}/baskets/actions/merge",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Yd(Yd({},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),Yd(Yd({},this.clientConfig.fetchOptions),{},{headers:d,method:"POST"})),e.next=30,t.fetch(u);case 30:if(f=e.sent,!n){e.next=35;break}return e.abrupt("return",f);case 35:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=39;break}throw new us(f);case 39:return e.next=41,f.text();case 41:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 43:case"end":return e.stop()}}),e,this)}))),function(e,t){return S.apply(this,arguments)})},{key:"deleteBasket",value:(P=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return c=new Vd("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Yd(Yd({},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),Yd(Yd({},this.clientConfig.fetchOptions),{},{headers:d,method:"DELETE"})),e.next=37,t.fetch(u);case 37:if(f=e.sent,!n){e.next=42;break}return e.abrupt("return",f);case 42:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=44;break}throw new us(f);case 44:case"end":return e.stop()}}),e,this)}))),function(e,t){return P.apply(this,arguments)})},{key:"getBasket",value:(E=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new Vd("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Yd(Yd({},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),Yd(Yd({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=38,t.fetch(u);case 38:if(f=e.sent,!n){e.next=43;break}return e.abrupt("return",f);case 43:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=47;break}throw new us(f);case 47:return e.next=49,f.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return E.apply(this,arguments)})},{key:"updateBasket",value:(q=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new Vd("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Yd(Yd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),Yd(Yd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PATCH"})),e.next=38,t.fetch(u);case 38:if(f=e.sent,!n){e.next=43;break}return e.abrupt("return",f);case 43:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=47;break}throw new us(f);case 47:return e.next=49,f.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return q.apply(this,arguments)})},{key:"updateBillingAddressForBasket",value:(O=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(s={},void 0!==i.useAsShipping?s.useAsShipping=i.useAsShipping:void 0!==a.useAsShipping&&(s.useAsShipping=a.useAsShipping),void 0!==i.removeExternalTax?s.removeExternalTax=i.removeExternalTax:void 0!==a.removeExternalTax&&(s.removeExternalTax=a.removeExternalTax),void 0===i.siteId){e.next=28;break}s.siteId=i.siteId,e.next=33;break;case 28:if(void 0===a.siteId){e.next=32;break}s.siteId=a.siteId,e.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new Vd("/organizations/{organizationId}/baskets/{basketId}/billing-address",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Yd(Yd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),Yd(Yd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PUT"})),e.next=40,t.fetch(u);case 40:if(f=e.sent,!n){e.next=45;break}return e.abrupt("return",f);case 45:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=49;break}throw new us(f);case 49:return e.next=51,f.text();case 51:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 53:case"end":return e.stop()}}),e,this)}))),function(e,t){return O.apply(this,arguments)})},{key:"addCouponToBasket",value:(z=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new Vd("/organizations/{organizationId}/baskets/{basketId}/coupons",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Yd(Yd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),Yd(Yd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=38,t.fetch(u);case 38:if(f=e.sent,!n){e.next=43;break}return e.abrupt("return",f);case 43:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=47;break}throw new us(f);case 47:return e.next=49,f.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return z.apply(this,arguments)})},{key:"removeCouponFromBasket",value:(C=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===i.couponItemId){e.next=25;break}o.couponItemId=i.couponItemId,e.next=30;break;case 25:if(void 0===a.couponItemId){e.next=29;break}o.couponItemId=a.couponItemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: couponItemId");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new Vd("/organizations/{organizationId}/baskets/{basketId}/coupons/{couponItemId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Yd(Yd({},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),Yd(Yd({},this.clientConfig.fetchOptions),{},{headers:d,method:"DELETE"})),e.next=46,t.fetch(u);case 46:if(f=e.sent,!n){e.next=51;break}return e.abrupt("return",f);case 51:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=55;break}throw new us(f);case 55:return e.next=57,f.text();case 57:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return C.apply(this,arguments)})},{key:"updateCustomerForBasket",value:(y=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new Vd("/organizations/{organizationId}/baskets/{basketId}/customer",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Yd(Yd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),Yd(Yd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PUT"})),e.next=38,t.fetch(u);case 38:if(f=e.sent,!n){e.next=43;break}return e.abrupt("return",f);case 43:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=47;break}throw new us(f);case 47:return e.next=49,f.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return y.apply(this,arguments)})},{key:"addGiftCertificateItemToBasket",value:(w=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new Vd("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Yd(Yd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),Yd(Yd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=38,t.fetch(u);case 38:if(f=e.sent,!n){e.next=43;break}return e.abrupt("return",f);case 43:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=47;break}throw new us(f);case 47:return e.next=49,f.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return w.apply(this,arguments)})},{key:"removeGiftCertificateItemFromBasket",value:(k=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===i.giftCertificateItemId){e.next=25;break}o.giftCertificateItemId=i.giftCertificateItemId,e.next=30;break;case 25:if(void 0===a.giftCertificateItemId){e.next=29;break}o.giftCertificateItemId=a.giftCertificateItemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: giftCertificateItemId");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new Vd("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Yd(Yd({},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),Yd(Yd({},this.clientConfig.fetchOptions),{},{headers:d,method:"DELETE"})),e.next=46,t.fetch(u);case 46:if(f=e.sent,!n){e.next=51;break}return e.abrupt("return",f);case 51:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=55;break}throw new us(f);case 55:return e.next=57,f.text();case 57:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return k.apply(this,arguments)})},{key:"updateGiftCertificateItemInBasket",value:(x=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===i.giftCertificateItemId){e.next=25;break}o.giftCertificateItemId=i.giftCertificateItemId,e.next=30;break;case 25:if(void 0===a.giftCertificateItemId){e.next=29;break}o.giftCertificateItemId=a.giftCertificateItemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: giftCertificateItemId");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new Vd("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Yd(Yd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),Yd(Yd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PATCH"})),e.next=47,t.fetch(u);case 47:if(f=e.sent,!n){e.next=52;break}return e.abrupt("return",f);case 52:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=56;break}throw new us(f);case 56:return e.next=58,f.text();case 58:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return x.apply(this,arguments)})},{key:"addItemToBasket",value:(m=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new Vd("/organizations/{organizationId}/baskets/{basketId}/items",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Yd(Yd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),Yd(Yd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=38,t.fetch(u);case 38:if(f=e.sent,!n){e.next=43;break}return e.abrupt("return",f);case 43:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=47;break}throw new us(f);case 47:return e.next=49,f.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return m.apply(this,arguments)})},{key:"removeItemFromBasket",value:(I=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===i.itemId){e.next=25;break}o.itemId=i.itemId,e.next=30;break;case 25:if(void 0===a.itemId){e.next=29;break}o.itemId=a.itemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: itemId");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new Vd("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Yd(Yd({},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),Yd(Yd({},this.clientConfig.fetchOptions),{},{headers:d,method:"DELETE"})),e.next=46,t.fetch(u);case 46:if(f=e.sent,!n){e.next=51;break}return e.abrupt("return",f);case 51:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=55;break}throw new us(f);case 55:return e.next=57,f.text();case 57:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return I.apply(this,arguments)})},{key:"updateItemInBasket",value:(v=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===i.itemId){e.next=25;break}o.itemId=i.itemId,e.next=30;break;case 25:if(void 0===a.itemId){e.next=29;break}o.itemId=a.itemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: itemId");case 30:if(s={},void 0!==i.removeExternalTax?s.removeExternalTax=i.removeExternalTax:void 0!==a.removeExternalTax&&(s.removeExternalTax=a.removeExternalTax),void 0===i.siteId){e.next=36;break}s.siteId=i.siteId,e.next=41;break;case 36:if(void 0===a.siteId){e.next=40;break}s.siteId=a.siteId,e.next=41;break;case 40:throw new Error("Missing required query parameter: siteId");case 41:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new Vd("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Yd(Yd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),Yd(Yd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PATCH"})),e.next=48,t.fetch(u);case 48:if(f=e.sent,!n){e.next=53;break}return e.abrupt("return",f);case 53:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=57;break}throw new us(f);case 57:return e.next=59,f.text();case 59:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return v.apply(this,arguments)})},{key:"addTaxesForBasketItem",value:(b=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===i.itemId){e.next=25;break}o.itemId=i.itemId,e.next=30;break;case 25:if(void 0===a.itemId){e.next=29;break}o.itemId=a.itemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: itemId");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new Vd("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}/taxes",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Yd(Yd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),Yd(Yd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PUT"})),e.next=46,t.fetch(u);case 46:if(f=e.sent,!n){e.next=51;break}return e.abrupt("return",f);case 51:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=53;break}throw new us(f);case 53:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"addPaymentInstrumentToBasket",value:(g=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new Vd("/organizations/{organizationId}/baskets/{basketId}/payment-instruments",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Yd(Yd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),Yd(Yd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=38,t.fetch(u);case 38:if(f=e.sent,!n){e.next=43;break}return e.abrupt("return",f);case 43:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=47;break}throw new us(f);case 47:return e.next=49,f.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"removePaymentInstrumentFromBasket",value:(l=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===i.paymentInstrumentId){e.next=25;break}o.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 25:if(void 0===a.paymentInstrumentId){e.next=29;break}o.paymentInstrumentId=a.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new Vd("/organizations/{organizationId}/baskets/{basketId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Yd(Yd({},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),Yd(Yd({},this.clientConfig.fetchOptions),{},{headers:d,method:"DELETE"})),e.next=46,t.fetch(u);case 46:if(f=e.sent,!n){e.next=51;break}return e.abrupt("return",f);case 51:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=55;break}throw new us(f);case 55:return e.next=57,f.text();case 57:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"updatePaymentInstrumentInBasket",value:(p=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===i.paymentInstrumentId){e.next=25;break}o.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 25:if(void 0===a.paymentInstrumentId){e.next=29;break}o.paymentInstrumentId=a.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(s={},void 0!==i.removeExternalTax?s.removeExternalTax=i.removeExternalTax:void 0!==a.removeExternalTax&&(s.removeExternalTax=a.removeExternalTax),void 0===i.siteId){e.next=36;break}s.siteId=i.siteId,e.next=41;break;case 36:if(void 0===a.siteId){e.next=40;break}s.siteId=a.siteId,e.next=41;break;case 40:throw new Error("Missing required query parameter: siteId");case 41:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new Vd("/organizations/{organizationId}/baskets/{basketId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Yd(Yd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),Yd(Yd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PATCH"})),e.next=48,t.fetch(u);case 48:if(f=e.sent,!n){e.next=53;break}return e.abrupt("return",f);case 53:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=57;break}throw new us(f);case 57:return e.next=59,f.text();case 59:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"getPaymentMethodsForBasket",value:(h=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new Vd("/organizations/{organizationId}/baskets/{basketId}/payment-methods",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Yd(Yd({},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),Yd(Yd({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=38,t.fetch(u);case 38:if(f=e.sent,!n){e.next=43;break}return e.abrupt("return",f);case 43:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=47;break}throw new us(f);case 47:return e.next=49,f.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"getPriceBooksForBasket",value:(f=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return c=new Vd("/organizations/{organizationId}/baskets/{basketId}/price-books",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Yd(Yd({},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),Yd(Yd({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=37,t.fetch(u);case 37:if(f=e.sent,!n){e.next=42;break}return e.abrupt("return",f);case 42:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=46;break}throw new us(f);case 46:return e.next=48,f.text();case 48:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"addPriceBooksToBasket",value:(u=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return c=new Vd("/organizations/{organizationId}/baskets/{basketId}/price-books",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Yd(Yd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),Yd(Yd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PUT"})),e.next=37,t.fetch(u);case 37:if(f=e.sent,!n){e.next=42;break}return e.abrupt("return",f);case 42:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=44;break}throw new us(f);case 44:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"createShipmentForBasket",value:(d=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new Vd("/organizations/{organizationId}/baskets/{basketId}/shipments",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Yd(Yd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),Yd(Yd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=38,t.fetch(u);case 38:if(f=e.sent,!n){e.next=43;break}return e.abrupt("return",f);case 43:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=47;break}throw new us(f);case 47:return e.next=49,f.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"removeShipmentFromBasket",value:(c=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===i.shipmentId){e.next=25;break}o.shipmentId=i.shipmentId,e.next=30;break;case 25:if(void 0===a.shipmentId){e.next=29;break}o.shipmentId=a.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new Vd("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Yd(Yd({},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),Yd(Yd({},this.clientConfig.fetchOptions),{},{headers:d,method:"DELETE"})),e.next=46,t.fetch(u);case 46:if(f=e.sent,!n){e.next=51;break}return e.abrupt("return",f);case 51:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=55;break}throw new us(f);case 55:return e.next=57,f.text();case 57:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"updateShipmentForBasket",value:(s=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===i.shipmentId){e.next=25;break}o.shipmentId=i.shipmentId,e.next=30;break;case 25:if(void 0===a.shipmentId){e.next=29;break}o.shipmentId=a.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new Vd("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Yd(Yd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),Yd(Yd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PATCH"})),e.next=47,t.fetch(u);case 47:if(f=e.sent,!n){e.next=52;break}return e.abrupt("return",f);case 52:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=56;break}throw new us(f);case 56:return e.next=58,f.text();case 58:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"updateShippingAddressForShipment",value:(o=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===i.shipmentId){e.next=25;break}o.shipmentId=i.shipmentId,e.next=30;break;case 25:if(void 0===a.shipmentId){e.next=29;break}o.shipmentId=a.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(s={},void 0!==i.useAsBilling?s.useAsBilling=i.useAsBilling:void 0!==a.useAsBilling&&(s.useAsBilling=a.useAsBilling),void 0!==i.removeExternalTax?s.removeExternalTax=i.removeExternalTax:void 0!==a.removeExternalTax&&(s.removeExternalTax=a.removeExternalTax),void 0===i.siteId){e.next=37;break}s.siteId=i.siteId,e.next=42;break;case 37:if(void 0===a.siteId){e.next=41;break}s.siteId=a.siteId,e.next=42;break;case 41:throw new Error("Missing required query parameter: siteId");case 42:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new Vd("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-address",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Yd(Yd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),Yd(Yd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PUT"})),e.next=49,t.fetch(u);case 49:if(f=e.sent,!n){e.next=54;break}return e.abrupt("return",f);case 54:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=58;break}throw new us(f);case 58:return e.next=60,f.text();case 60:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 62:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"updateShippingMethodForShipment",value:(a=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===i.shipmentId){e.next=25;break}o.shipmentId=i.shipmentId,e.next=30;break;case 25:if(void 0===a.shipmentId){e.next=29;break}o.shipmentId=a.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new Vd("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-method",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Yd(Yd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),Yd(Yd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PUT"})),e.next=47,t.fetch(u);case 47:if(f=e.sent,!n){e.next=52;break}return e.abrupt("return",f);case 52:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=56;break}throw new us(f);case 56:return e.next=58,f.text();case 58:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"getShippingMethodsForShipment",value:(i=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===i.shipmentId){e.next=25;break}o.shipmentId=i.shipmentId,e.next=30;break;case 25:if(void 0===a.shipmentId){e.next=29;break}o.shipmentId=a.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new Vd("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-methods",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Yd(Yd({},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),Yd(Yd({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=47,t.fetch(u);case 47:if(f=e.sent,!n){e.next=52;break}return e.abrupt("return",f);case 52:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=56;break}throw new us(f);case 56:return e.next=58,f.text();case 58:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getTaxesFromBasket",value:(n=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return c=new Vd("/organizations/{organizationId}/baskets/{basketId}/taxes",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Yd(Yd({},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),Yd(Yd({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=37,t.fetch(u);case 37:if(f=e.sent,!n){e.next=42;break}return e.abrupt("return",f);case 42:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=46;break}throw new us(f);case 46:return e.next=48,f.text();case 48:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"addTaxesForBasket",value:(r=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.basketId){e.next=16;break}o.basketId=i.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}o.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return c=new Vd("/organizations/{organizationId}/baskets/{basketId}/taxes",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Yd(Yd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),Yd(Yd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PUT"})),e.next=37,t.fetch(u);case 37:if(f=e.sent,!n){e.next=42;break}return e.abrupt("return",f);case 42:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=44;break}throw new us(f);case 44:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})}]),e}();function Qd(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 Xd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Qd(Object(r),!0).forEach((function(t){ni(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qd(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}ni(Kd,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-baskets/{version}");var Zd=function(){function e(t){ei(this,e),ni(this,"clientConfig",void 0);var r=Xd({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Po(r)}var r,n,i,a;return ri(e,[{key:"getShopperContext",value:(a=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.usid){e.next=16;break}o.usid=i.usid,e.next=21;break;case 16:if(void 0===a.usid){e.next=20;break}o.usid=a.usid,e.next=21;break;case 20:throw new Error("Missing required path parameter: usid");case 21:return s={},c=new Vd("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Xd(Xd({},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),Xd(Xd({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=28,t.fetch(u);case 28:if(f=e.sent,!n){e.next=33;break}return e.abrupt("return",f);case 33:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=37;break}throw new us(f);case 37:return e.next=39,f.text();case 39:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"createShopperContext",value:(i=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.usid){e.next=16;break}o.usid=i.usid,e.next=21;break;case 16:if(void 0===a.usid){e.next=20;break}o.usid=a.usid,e.next=21;break;case 20:throw new Error("Missing required path parameter: usid");case 21:return s={},c=new Vd("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Xd(Xd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),Xd(Xd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PUT"})),e.next=28,t.fetch(u);case 28:if(f=e.sent,!n){e.next=33;break}return e.abrupt("return",f);case 33:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=37;break}throw new us(f);case 37:return e.next=39,f.text();case 39:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"deleteShopperContext",value:(n=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.usid){e.next=16;break}o.usid=i.usid,e.next=21;break;case 16:if(void 0===a.usid){e.next=20;break}o.usid=a.usid,e.next=21;break;case 20:throw new Error("Missing required path parameter: usid");case 21:return s={},c=new Vd("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Xd(Xd({},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),Xd(Xd({},this.clientConfig.fetchOptions),{},{headers:d,method:"DELETE"})),e.next=28,t.fetch(u);case 28:if(f=e.sent,!n){e.next=33;break}return e.abrupt("return",f);case 33:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=35;break}throw new us(f);case 35:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"updateShopperContext",value:(r=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.usid){e.next=16;break}o.usid=i.usid,e.next=21;break;case 16:if(void 0===a.usid){e.next=20;break}o.usid=a.usid,e.next=21;break;case 20:throw new Error("Missing required path parameter: usid");case 21:return s={},c=new Vd("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Xd(Xd({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),Xd(Xd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PATCH"})),e.next=28,t.fetch(u);case 28:if(f=e.sent,!n){e.next=33;break}return e.abrupt("return",f);case 33:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=37;break}throw new us(f);case 37:return e.next=39,f.text();case 39:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})}]),e}();function eu(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 tu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?eu(Object(r),!0).forEach((function(t){ni(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}ni(Zd,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/shopper/shopper-context/{version}");var ru=function(){function e(t){ei(this,e),ni(this,"clientConfig",void 0);var r=tu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Po(r)}var r,n,i,a,o,s,c,d,u,f,h,p,l,g,b,v,I,m,x,k,w,y,C,z,O,q,E,P,S,R,j,T;return ri(e,[{key:"registerCustomer",value:(T=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0===i.siteId){e.next=17;break}s.siteId=i.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}s.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return c=new Vd("/organizations/{organizationId}/customers",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=tu(tu({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),tu(tu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=28,t.fetch(u);case 28:if(f=e.sent,!n){e.next=33;break}return e.abrupt("return",f);case 33:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=37;break}throw new us(f);case 37:return e.next=39,f.text();case 39:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return T.apply(this,arguments)})},{key:"invalidateCustomerAuth",value:(j=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0===i.siteId){e.next=17;break}s.siteId=i.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}s.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return c=new Vd("/organizations/{organizationId}/customers/actions/logout",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=tu(tu({},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),tu(tu({},this.clientConfig.fetchOptions),{},{headers:d,method:"DELETE"})),e.next=28,t.fetch(u);case 28:if(f=e.sent,!n){e.next=33;break}return e.abrupt("return",f);case 33:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=35;break}throw new us(f);case 35:case"end":return e.stop()}}),e,this)}))),function(e,t){return j.apply(this,arguments)})},{key:"authorizeCustomer",value:(R=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0===i.clientId){e.next=17;break}s.clientId=i.clientId,e.next=22;break;case 17:if(void 0===a.clientId){e.next=21;break}s.clientId=a.clientId,e.next=22;break;case 21:throw new Error("Missing required query parameter: clientId");case 22:if(void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return c=new Vd("/organizations/{organizationId}/customers/actions/login",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=tu(tu({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),tu(tu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=37,t.fetch(u);case 37:if(f=e.sent,!n){e.next=42;break}return e.abrupt("return",f);case 42:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=46;break}throw new us(f);case 46:return e.next=48,f.text();case 48:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return R.apply(this,arguments)})},{key:"authorizeTrustedSystem",value:(S=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0===i.siteId){e.next=17;break}s.siteId=i.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}s.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return c=new Vd("/organizations/{organizationId}/customers/trusted-system/actions/login",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=tu(tu({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),tu(tu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=28,t.fetch(u);case 28:if(f=e.sent,!n){e.next=33;break}return e.abrupt("return",f);case 33:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=37;break}throw new us(f);case 37:return e.next=39,f.text();case 39:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return S.apply(this,arguments)})},{key:"resetPassword",value:(P=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0===i.siteId){e.next=17;break}s.siteId=i.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}s.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return c=new Vd("/organizations/{organizationId}/customers/password/actions/reset",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=tu(tu({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),tu(tu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=28,t.fetch(u);case 28:if(f=e.sent,!n){e.next=33;break}return e.abrupt("return",f);case 33:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=35;break}throw new us(f);case 35:case"end":return e.stop()}}),e,this)}))),function(e,t){return P.apply(this,arguments)})},{key:"getResetPasswordToken",value:(E=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0===i.siteId){e.next=17;break}s.siteId=i.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}s.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return c=new Vd("/organizations/{organizationId}/customers/password/actions/create-reset-token",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=tu(tu({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),tu(tu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=28,t.fetch(u);case 28:if(f=e.sent,!n){e.next=33;break}return e.abrupt("return",f);case 33:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=37;break}throw new us(f);case 37:return e.next=39,f.text();case 39:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return E.apply(this,arguments)})},{key:"registerExternalProfile",value:(q=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0===i.siteId){e.next=17;break}s.siteId=i.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}s.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return c=new Vd("/organizations/{organizationId}/customers/external-profile",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=tu(tu({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),tu(tu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=28,t.fetch(u);case 28:if(f=e.sent,!n){e.next=33;break}return e.abrupt("return",f);case 33:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=37;break}throw new us(f);case 37:return e.next=39,f.text();case 39:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return q.apply(this,arguments)})},{key:"getExternalProfile",value:(O=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0===i.externalId){e.next=17;break}s.externalId=i.externalId,e.next=22;break;case 17:if(void 0===a.externalId){e.next=21;break}s.externalId=a.externalId,e.next=22;break;case 21:throw new Error("Missing required query parameter: externalId");case 22:if(void 0===i.authenticationProviderId){e.next=26;break}s.authenticationProviderId=i.authenticationProviderId,e.next=31;break;case 26:if(void 0===a.authenticationProviderId){e.next=30;break}s.authenticationProviderId=a.authenticationProviderId,e.next=31;break;case 30:throw new Error("Missing required query parameter: authenticationProviderId");case 31:if(void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new Vd("/organizations/{organizationId}/customers/external-profile",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=tu(tu({},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),tu(tu({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=46,t.fetch(u);case 46:if(f=e.sent,!n){e.next=51;break}return e.abrupt("return",f);case 51:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=55;break}throw new us(f);case 55:return e.next=57,f.text();case 57:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return O.apply(this,arguments)})},{key:"getCustomer",value:(z=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.customerId){e.next=16;break}o.customerId=i.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}o.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return c=new Vd("/organizations/{organizationId}/customers/{customerId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=tu(tu({},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),tu(tu({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=37,t.fetch(u);case 37:if(f=e.sent,!n){e.next=42;break}return e.abrupt("return",f);case 42:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=46;break}throw new us(f);case 46:return e.next=48,f.text();case 48:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return z.apply(this,arguments)})},{key:"updateCustomer",value:(C=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.customerId){e.next=16;break}o.customerId=i.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}o.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return c=new Vd("/organizations/{organizationId}/customers/{customerId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=tu(tu({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),tu(tu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PATCH"})),e.next=37,t.fetch(u);case 37:if(f=e.sent,!n){e.next=42;break}return e.abrupt("return",f);case 42:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=46;break}throw new us(f);case 46:return e.next=48,f.text();case 48:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return C.apply(this,arguments)})},{key:"createCustomerAddress",value:(y=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.customerId){e.next=16;break}o.customerId=i.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}o.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return c=new Vd("/organizations/{organizationId}/customers/{customerId}/addresses",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=tu(tu({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),tu(tu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=37,t.fetch(u);case 37:if(f=e.sent,!n){e.next=42;break}return e.abrupt("return",f);case 42:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=46;break}throw new us(f);case 46:return e.next=48,f.text();case 48:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return y.apply(this,arguments)})},{key:"getCustomerAddress",value:(w=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.customerId){e.next=16;break}o.customerId=i.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}o.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===i.addressName){e.next=25;break}o.addressName=i.addressName,e.next=30;break;case 25:if(void 0===a.addressName){e.next=29;break}o.addressName=a.addressName,e.next=30;break;case 29:throw new Error("Missing required path parameter: addressName");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new Vd("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=tu(tu({},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),tu(tu({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=46,t.fetch(u);case 46:if(f=e.sent,!n){e.next=51;break}return e.abrupt("return",f);case 51:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=55;break}throw new us(f);case 55:return e.next=57,f.text();case 57:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return w.apply(this,arguments)})},{key:"removeCustomerAddress",value:(k=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.customerId){e.next=16;break}o.customerId=i.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}o.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===i.addressName){e.next=25;break}o.addressName=i.addressName,e.next=30;break;case 25:if(void 0===a.addressName){e.next=29;break}o.addressName=a.addressName,e.next=30;break;case 29:throw new Error("Missing required path parameter: addressName");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new Vd("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=tu(tu({},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),tu(tu({},this.clientConfig.fetchOptions),{},{headers:d,method:"DELETE"})),e.next=46,t.fetch(u);case 46:if(f=e.sent,!n){e.next=51;break}return e.abrupt("return",f);case 51:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=53;break}throw new us(f);case 53:case"end":return e.stop()}}),e,this)}))),function(e,t){return k.apply(this,arguments)})},{key:"updateCustomerAddress",value:(x=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.customerId){e.next=16;break}o.customerId=i.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}o.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===i.addressName){e.next=25;break}o.addressName=i.addressName,e.next=30;break;case 25:if(void 0===a.addressName){e.next=29;break}o.addressName=a.addressName,e.next=30;break;case 29:throw new Error("Missing required path parameter: addressName");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new Vd("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=tu(tu({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),tu(tu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PATCH"})),e.next=46,t.fetch(u);case 46:if(f=e.sent,!n){e.next=51;break}return e.abrupt("return",f);case 51:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=55;break}throw new us(f);case 55:return e.next=57,f.text();case 57:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return x.apply(this,arguments)})},{key:"getCustomerBaskets",value:(m=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.customerId){e.next=16;break}o.customerId=i.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}o.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return c=new Vd("/organizations/{organizationId}/customers/{customerId}/baskets",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=tu(tu({},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),tu(tu({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=37,t.fetch(u);case 37:if(f=e.sent,!n){e.next=42;break}return e.abrupt("return",f);case 42:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=46;break}throw new us(f);case 46:return e.next=48,f.text();case 48:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return m.apply(this,arguments)})},{key:"getCustomerOrders",value:(I=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.customerId){e.next=16;break}o.customerId=i.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}o.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(s={},void 0!==i.crossSites?s.crossSites=i.crossSites:void 0!==a.crossSites&&(s.crossSites=a.crossSites),void 0!==i.from?s.from=i.from:void 0!==a.from&&(s.from=a.from),void 0!==i.until?s.until=i.until:void 0!==a.until&&(s.until=a.until),void 0!==i.status?s.status=i.status:void 0!==a.status&&(s.status=a.status),void 0===i.siteId){e.next=30;break}s.siteId=i.siteId,e.next=35;break;case 30:if(void 0===a.siteId){e.next=34;break}s.siteId=a.siteId,e.next=35;break;case 34:throw new Error("Missing required query parameter: siteId");case 35:return void 0!==i.offset?s.offset=i.offset:void 0!==a.offset&&(s.offset=a.offset),void 0!==i.limit?s.limit=i.limit:void 0!==a.limit&&(s.limit=a.limit),c=new Vd("/organizations/{organizationId}/customers/{customerId}/orders",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=tu(tu({},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),tu(tu({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=43,t.fetch(u);case 43:if(f=e.sent,!n){e.next=48;break}return e.abrupt("return",f);case 48:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=52;break}throw new us(f);case 52:return e.next=54,f.text();case 54:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 56:case"end":return e.stop()}}),e,this)}))),function(e,t){return I.apply(this,arguments)})},{key:"updateCustomerPassword",value:(v=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.customerId){e.next=16;break}o.customerId=i.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}o.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return c=new Vd("/organizations/{organizationId}/customers/{customerId}/password",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=tu(tu({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),tu(tu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PUT"})),e.next=37,t.fetch(u);case 37:if(f=e.sent,!n){e.next=42;break}return e.abrupt("return",f);case 42:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=44;break}throw new us(f);case 44:case"end":return e.stop()}}),e,this)}))),function(e,t){return v.apply(this,arguments)})},{key:"createCustomerPaymentInstrument",value:(b=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.customerId){e.next=16;break}o.customerId=i.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}o.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return c=new Vd("/organizations/{organizationId}/customers/{customerId}/payment-instruments",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=tu(tu({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),tu(tu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=37,t.fetch(u);case 37:if(f=e.sent,!n){e.next=42;break}return e.abrupt("return",f);case 42:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=46;break}throw new us(f);case 46:return e.next=48,f.text();case 48:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"deleteCustomerPaymentInstrument",value:(g=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.customerId){e.next=16;break}o.customerId=i.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}o.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===i.paymentInstrumentId){e.next=25;break}o.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 25:if(void 0===a.paymentInstrumentId){e.next=29;break}o.paymentInstrumentId=a.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new Vd("/organizations/{organizationId}/customers/{customerId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=tu(tu({},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),tu(tu({},this.clientConfig.fetchOptions),{},{headers:d,method:"DELETE"})),e.next=46,t.fetch(u);case 46:if(f=e.sent,!n){e.next=51;break}return e.abrupt("return",f);case 51:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=53;break}throw new us(f);case 53:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"getCustomerPaymentInstrument",value:(l=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.customerId){e.next=16;break}o.customerId=i.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}o.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===i.paymentInstrumentId){e.next=25;break}o.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 25:if(void 0===a.paymentInstrumentId){e.next=29;break}o.paymentInstrumentId=a.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new Vd("/organizations/{organizationId}/customers/{customerId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=tu(tu({},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),tu(tu({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=46,t.fetch(u);case 46:if(f=e.sent,!n){e.next=51;break}return e.abrupt("return",f);case 51:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=55;break}throw new us(f);case 55:return e.next=57,f.text();case 57:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"getCustomerProductLists",value:(p=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.customerId){e.next=16;break}o.customerId=i.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}o.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return c=new Vd("/organizations/{organizationId}/customers/{customerId}/product-lists",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=tu(tu({},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),tu(tu({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=37,t.fetch(u);case 37:if(f=e.sent,!n){e.next=42;break}return e.abrupt("return",f);case 42:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=46;break}throw new us(f);case 46:return e.next=48,f.text();case 48:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"createCustomerProductList",value:(h=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.customerId){e.next=16;break}o.customerId=i.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}o.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return c=new Vd("/organizations/{organizationId}/customers/{customerId}/product-lists",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=tu(tu({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),tu(tu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=37,t.fetch(u);case 37:if(f=e.sent,!n){e.next=42;break}return e.abrupt("return",f);case 42:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=46;break}throw new us(f);case 46:return e.next=48,f.text();case 48:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"deleteCustomerProductList",value:(f=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.customerId){e.next=16;break}o.customerId=i.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}o.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===i.listId){e.next=25;break}o.listId=i.listId,e.next=30;break;case 25:if(void 0===a.listId){e.next=29;break}o.listId=a.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new Vd("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=tu(tu({},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),tu(tu({},this.clientConfig.fetchOptions),{},{headers:d,method:"DELETE"})),e.next=46,t.fetch(u);case 46:if(f=e.sent,!n){e.next=51;break}return e.abrupt("return",f);case 51:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=53;break}throw new us(f);case 53:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"getCustomerProductList",value:(u=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.customerId){e.next=16;break}o.customerId=i.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}o.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===i.listId){e.next=25;break}o.listId=i.listId,e.next=30;break;case 25:if(void 0===a.listId){e.next=29;break}o.listId=a.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new Vd("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=tu(tu({},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),tu(tu({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=46,t.fetch(u);case 46:if(f=e.sent,!n){e.next=51;break}return e.abrupt("return",f);case 51:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=55;break}throw new us(f);case 55:return e.next=57,f.text();case 57:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"updateCustomerProductList",value:(d=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.customerId){e.next=16;break}o.customerId=i.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}o.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===i.listId){e.next=25;break}o.listId=i.listId,e.next=30;break;case 25:if(void 0===a.listId){e.next=29;break}o.listId=a.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new Vd("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=tu(tu({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),tu(tu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PATCH"})),e.next=46,t.fetch(u);case 46:if(f=e.sent,!n){e.next=51;break}return e.abrupt("return",f);case 51:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=55;break}throw new us(f);case 55:return e.next=57,f.text();case 57:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"createCustomerProductListItem",value:(c=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.customerId){e.next=16;break}o.customerId=i.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}o.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===i.listId){e.next=25;break}o.listId=i.listId,e.next=30;break;case 25:if(void 0===a.listId){e.next=29;break}o.listId=a.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new Vd("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=tu(tu({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),tu(tu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=46,t.fetch(u);case 46:if(f=e.sent,!n){e.next=51;break}return e.abrupt("return",f);case 51:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=55;break}throw new us(f);case 55:return e.next=57,f.text();case 57:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"deleteCustomerProductListItem",value:(s=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.customerId){e.next=16;break}o.customerId=i.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}o.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===i.listId){e.next=25;break}o.listId=i.listId,e.next=30;break;case 25:if(void 0===a.listId){e.next=29;break}o.listId=a.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(void 0===i.itemId){e.next=34;break}o.itemId=i.itemId,e.next=39;break;case 34:if(void 0===a.itemId){e.next=38;break}o.itemId=a.itemId,e.next=39;break;case 38:throw new Error("Missing required path parameter: itemId");case 39:if(s={},void 0===i.siteId){e.next=44;break}s.siteId=i.siteId,e.next=49;break;case 44:if(void 0===a.siteId){e.next=48;break}s.siteId=a.siteId,e.next=49;break;case 48:throw new Error("Missing required query parameter: siteId");case 49:return c=new Vd("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=tu(tu({},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),tu(tu({},this.clientConfig.fetchOptions),{},{headers:d,method:"DELETE"})),e.next=55,t.fetch(u);case 55:if(f=e.sent,!n){e.next=60;break}return e.abrupt("return",f);case 60:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=62;break}throw new us(f);case 62:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"getCustomerProductListItem",value:(o=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.customerId){e.next=16;break}o.customerId=i.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}o.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===i.listId){e.next=25;break}o.listId=i.listId,e.next=30;break;case 25:if(void 0===a.listId){e.next=29;break}o.listId=a.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(void 0===i.itemId){e.next=34;break}o.itemId=i.itemId,e.next=39;break;case 34:if(void 0===a.itemId){e.next=38;break}o.itemId=a.itemId,e.next=39;break;case 38:throw new Error("Missing required path parameter: itemId");case 39:if(s={},void 0===i.siteId){e.next=44;break}s.siteId=i.siteId,e.next=49;break;case 44:if(void 0===a.siteId){e.next=48;break}s.siteId=a.siteId,e.next=49;break;case 48:throw new Error("Missing required query parameter: siteId");case 49:return c=new Vd("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=tu(tu({},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),tu(tu({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=55,t.fetch(u);case 55:if(f=e.sent,!n){e.next=60;break}return e.abrupt("return",f);case 60:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=64;break}throw new us(f);case 64:return e.next=66,f.text();case 66:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 68:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"updateCustomerProductListItem",value:(a=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.customerId){e.next=16;break}o.customerId=i.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}o.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===i.listId){e.next=25;break}o.listId=i.listId,e.next=30;break;case 25:if(void 0===a.listId){e.next=29;break}o.listId=a.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(void 0===i.itemId){e.next=34;break}o.itemId=i.itemId,e.next=39;break;case 34:if(void 0===a.itemId){e.next=38;break}o.itemId=a.itemId,e.next=39;break;case 38:throw new Error("Missing required path parameter: itemId");case 39:if(s={},void 0===i.siteId){e.next=44;break}s.siteId=i.siteId,e.next=49;break;case 44:if(void 0===a.siteId){e.next=48;break}s.siteId=a.siteId,e.next=49;break;case 48:throw new Error("Missing required query parameter: siteId");case 49:return c=new Vd("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=tu(tu({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),tu(tu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PATCH"})),e.next=55,t.fetch(u);case 55:if(f=e.sent,!n){e.next=60;break}return e.abrupt("return",f);case 60:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=64;break}throw new us(f);case 64:return e.next=66,f.text();case 66:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 68:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"getPublicProductListsBySearchTerm",value:(i=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0!==i.email?s.email=i.email:void 0!==a.email&&(s.email=a.email),void 0!==i.firstName?s.firstName=i.firstName:void 0!==a.firstName&&(s.firstName=a.firstName),void 0!==i.lastName?s.lastName=i.lastName:void 0!==a.lastName&&(s.lastName=a.lastName),void 0===i.siteId){e.next=20;break}s.siteId=i.siteId,e.next=25;break;case 20:if(void 0===a.siteId){e.next=24;break}s.siteId=a.siteId,e.next=25;break;case 24:throw new Error("Missing required query parameter: siteId");case 25:return c=new Vd("/organizations/{organizationId}/product-lists",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=tu(tu({},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),tu(tu({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=31,t.fetch(u);case 31:if(f=e.sent,!n){e.next=36;break}return e.abrupt("return",f);case 36:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=40;break}throw new us(f);case 40:return e.next=42,f.text();case 42:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 44:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getPublicProductList",value:(n=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.listId){e.next=16;break}o.listId=i.listId,e.next=21;break;case 16:if(void 0===a.listId){e.next=20;break}o.listId=a.listId,e.next=21;break;case 20:throw new Error("Missing required path parameter: listId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return c=new Vd("/organizations/{organizationId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=tu(tu({},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),tu(tu({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=37,t.fetch(u);case 37:if(f=e.sent,!n){e.next=42;break}return e.abrupt("return",f);case 42:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=46;break}throw new us(f);case 46:return e.next=48,f.text();case 48:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getProductListItem",value:(r=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.listId){e.next=16;break}o.listId=i.listId,e.next=21;break;case 16:if(void 0===a.listId){e.next=20;break}o.listId=a.listId,e.next=21;break;case 20:throw new Error("Missing required path parameter: listId");case 21:if(void 0===i.itemId){e.next=25;break}o.itemId=i.itemId,e.next=30;break;case 25:if(void 0===a.itemId){e.next=29;break}o.itemId=a.itemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: itemId");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return c=new Vd("/organizations/{organizationId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=tu(tu({},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),tu(tu({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=46,t.fetch(u);case 46:if(f=e.sent,!n){e.next=51;break}return e.abrupt("return",f);case 51:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=55;break}throw new us(f);case 55:return e.next=57,f.text();case 57:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})}]),e}();function nu(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 iu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?nu(Object(r),!0).forEach((function(t){ni(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}ni(ru,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/customer/shopper-customers/{version}");var au=function(){function e(t){ei(this,e),ni(this,"clientConfig",void 0);var r=iu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Po(r)}var r,n;return ri(e,[{key:"retrieveResults",value:(n=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.channelId){e.next=16;break}o.channelId=i.channelId,e.next=21;break;case 16:if(void 0===a.channelId){e.next=20;break}o.channelId=a.channelId,e.next=21;break;case 20:throw new Error("Missing required path parameter: channelId");case 21:if(s={},void 0===i.locale){e.next=26;break}s.locale=i.locale,e.next=31;break;case 26:if(void 0===a.locale){e.next=30;break}s.locale=a.locale,e.next=31;break;case 30:throw new Error("Missing required query parameter: locale");case 31:return void 0!==i.offset?s.offset=i.offset:void 0!==a.offset&&(s.offset=a.offset),void 0!==i.limit?s.limit=i.limit:void 0!==a.limit&&(s.limit=a.limit),c=new Vd("/organizations/{organizationId}/channels/{channelId}/results",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=iu(iu({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),iu(iu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=39,t.fetch(u);case 39:if(f=e.sent,!n){e.next=44;break}return e.abrupt("return",f);case 44:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=48;break}throw new us(f);case 48:return e.next=50,f.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getSuggestions",value:(r=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.channelId){e.next=16;break}o.channelId=i.channelId,e.next=21;break;case 16:if(void 0===a.channelId){e.next=20;break}o.channelId=a.channelId,e.next=21;break;case 20:throw new Error("Missing required path parameter: channelId");case 21:if(s={},void 0===i.suggestionTypes){e.next=26;break}s.suggestionTypes=i.suggestionTypes,e.next=31;break;case 26:if(void 0===a.suggestionTypes){e.next=30;break}s.suggestionTypes=a.suggestionTypes,e.next=31;break;case 30:throw new Error("Missing required query parameter: suggestionTypes");case 31:if(void 0!==i.searchText?s.searchText=i.searchText:void 0!==a.searchText&&(s.searchText=a.searchText),void 0===i.locale){e.next=36;break}s.locale=i.locale,e.next=41;break;case 36:if(void 0===a.locale){e.next=40;break}s.locale=a.locale,e.next=41;break;case 40:throw new Error("Missing required query parameter: locale");case 41:return c=new Vd("/organizations/{organizationId}/channels/{channelId}/suggestions",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=iu(iu({},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),iu(iu({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=47,t.fetch(u);case 47:if(f=e.sent,!n){e.next=52;break}return e.abrupt("return",f);case 52:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=56;break}throw new us(f);case 56:return e.next=58,f.text();case 58:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})}]),e}();function ou(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 su(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ou(Object(r),!0).forEach((function(t){ni(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ou(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}ni(au,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/discovery/query/{version}");var cu=function(){function e(t){ei(this,e),ni(this,"clientConfig",void 0);var r=su({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Po(r)}var r;return ri(e,[{key:"getGiftCertificate",value:(r=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0===i.siteId){e.next=17;break}s.siteId=i.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}s.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return c=new Vd("/organizations/{organizationId}/gift-certificate",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=su(su({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),su(su({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=28,t.fetch(u);case 28:if(f=e.sent,!n){e.next=33;break}return e.abrupt("return",f);case 33:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=37;break}throw new us(f);case 37:return e.next=39,f.text();case 39:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})}]),e}();function du(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?du(Object(r),!0).forEach((function(t){ni(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):du(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}ni(cu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/pricing/shopper-gift-certificates/{version}");var fu=function(){function e(t){ei(this,e),ni(this,"clientConfig",void 0);var r=uu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Po(r)}var r,n,i,a,o,s,c,d,u,f,h,p,l,g,b;return ri(e,[{key:"retrieveCredQualityUserInfo",value:(b=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0===i.username){e.next=17;break}s.username=i.username,e.next=22;break;case 17:if(void 0===a.username){e.next=21;break}s.username=a.username,e.next=22;break;case 21:throw new Error("Missing required query parameter: username");case 22:return c=new Vd("/organizations/{organizationId}/cred-qual/user",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=uu(uu({},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),uu(uu({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=28,t.fetch(u);case 28:if(f=e.sent,!n){e.next=33;break}return e.abrupt("return",f);case 33:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=37;break}throw new us(f);case 37:return e.next=39,f.text();case 39:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"authenticateCustomer",value:(g=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return s={},c=new Vd("/organizations/{organizationId}/oauth2/login",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=uu(uu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),uu(uu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=19,t.fetch(u);case 19:if(f=e.sent,!n){e.next=24;break}return e.abrupt("return",f);case 24:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=26;break}throw new us(f);case 26:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"authorizePasswordlessCustomer",value:(l=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return s={},c=new Vd("/organizations/{organizationId}/oauth2/passwordless/login",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=uu(uu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),uu(uu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=19,t.fetch(u);case 19:if(f=e.sent,!n){e.next=24;break}return e.abrupt("return",f);case 24:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=28;break}throw new us(f);case 28:return e.next=30,f.text();case 30:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"logoutCustomer",value:(p=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0===i.client_id){e.next=17;break}s.client_id=i.client_id,e.next=22;break;case 17:if(void 0===a.client_id){e.next=21;break}s.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===i.refresh_token){e.next=26;break}s.refresh_token=i.refresh_token,e.next=31;break;case 26:if(void 0===a.refresh_token){e.next=30;break}s.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!==i.channel_id?s.channel_id=i.channel_id:void 0!==a.channel_id&&(s.channel_id=a.channel_id),void 0!==i.hint?s.hint=i.hint:void 0!==a.hint&&(s.hint=a.hint),c=new Vd("/organizations/{organizationId}/oauth2/logout",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=uu(uu({},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),uu(uu({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=39,t.fetch(u);case 39:if(f=e.sent,!n){e.next=44;break}return e.abrupt("return",f);case 44:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=48;break}throw new us(f);case 48:return e.next=50,f.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"authorizeCustomer",value:(h=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0===i.redirect_uri){e.next=17;break}s.redirect_uri=i.redirect_uri,e.next=22;break;case 17:if(void 0===a.redirect_uri){e.next=21;break}s.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===i.response_type){e.next=26;break}s.response_type=i.response_type,e.next=31;break;case 26:if(void 0===a.response_type){e.next=30;break}s.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===i.client_id){e.next=35;break}s.client_id=i.client_id,e.next=40;break;case 35:if(void 0===a.client_id){e.next=39;break}s.client_id=a.client_id,e.next=40;break;case 39:throw new Error("Missing required query parameter: client_id");case 40:if(void 0!==i.scope?s.scope=i.scope:void 0!==a.scope&&(s.scope=a.scope),void 0!==i.state?s.state=i.state:void 0!==a.state&&(s.state=a.state),void 0!==i.usid?s.usid=i.usid:void 0!==a.usid&&(s.usid=a.usid),void 0!==i.hint?s.hint=i.hint:void 0!==a.hint&&(s.hint=a.hint),void 0!==i.channel_id?s.channel_id=i.channel_id:void 0!==a.channel_id&&(s.channel_id=a.channel_id),void 0===i.code_challenge){e.next=49;break}s.code_challenge=i.code_challenge,e.next=54;break;case 49:if(void 0===a.code_challenge){e.next=53;break}s.code_challenge=a.code_challenge,e.next=54;break;case 53:throw new Error("Missing required query parameter: code_challenge");case 54:return c=new Vd("/organizations/{organizationId}/oauth2/authorize",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=uu(uu({},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),uu(uu({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=60,t.fetch(u);case 60:if(f=e.sent,!n){e.next=65;break}return e.abrupt("return",f);case 65:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=67;break}throw new us(f);case 67:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"getAccessToken",value:(f=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return s={},c=new Vd("/organizations/{organizationId}/oauth2/token",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=uu(uu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),uu(uu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=19,t.fetch(u);case 19:if(f=e.sent,!n){e.next=24;break}return e.abrupt("return",f);case 24:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=28;break}throw new us(f);case 28:return e.next=30,f.text();case 30:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"getTrustedSystemAccessToken",value:(u=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return s={},c=new Vd("/organizations/{organizationId}/oauth2/trusted-system/token",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=uu(uu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),uu(uu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=19,t.fetch(u);case 19:if(f=e.sent,!n){e.next=24;break}return e.abrupt("return",f);case 24:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=28;break}throw new us(f);case 28:return e.next=30,f.text();case 30:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"getPasswordResetToken",value:(d=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return s={},c=new Vd("/organizations/{organizationId}/oauth2/password/reset",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=uu(uu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),uu(uu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=19,t.fetch(u);case 19:if(f=e.sent,!n){e.next=24;break}return e.abrupt("return",f);case 24:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=26;break}throw new us(f);case 26:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"resetPassword",value:(c=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return s={},c=new Vd("/organizations/{organizationId}/oauth2/password/action",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=uu(uu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),uu(uu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=19,t.fetch(u);case 19:if(f=e.sent,!n){e.next=24;break}return e.abrupt("return",f);case 24:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=26;break}throw new us(f);case 26:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"getPasswordLessAccessToken",value:(s=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return s={},c=new Vd("/organizations/{organizationId}/oauth2/passwordless/token",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=uu(uu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),uu(uu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=19,t.fetch(u);case 19:if(f=e.sent,!n){e.next=24;break}return e.abrupt("return",f);case 24:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=28;break}throw new us(f);case 28:return e.next=30,f.text();case 30:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"revokeToken",value:(o=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return s={},c=new Vd("/organizations/{organizationId}/oauth2/revoke",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=uu(uu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),uu(uu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=19,t.fetch(u);case 19:if(f=e.sent,!n){e.next=24;break}return e.abrupt("return",f);case 24:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=28;break}throw new us(f);case 28:return e.next=30,f.text();case 30:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"introspectToken",value:(a=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return s={},c=new Vd("/organizations/{organizationId}/oauth2/introspect",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=uu(uu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),uu(uu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=19,t.fetch(u);case 19:if(f=e.sent,!n){e.next=24;break}return e.abrupt("return",f);case 24:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=28;break}throw new us(f);case 28:return e.next=30,f.text();case 30:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"getUserInfo",value:(i=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return s={},void 0!==i.channel_id?s.channel_id=i.channel_id:void 0!==a.channel_id&&(s.channel_id=a.channel_id),c=new Vd("/organizations/{organizationId}/oauth2/userinfo",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=uu(uu({},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),uu(uu({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=20,t.fetch(u);case 20:if(f=e.sent,!n){e.next=25;break}return e.abrupt("return",f);case 25:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=29;break}throw new us(f);case 29:return e.next=31,f.text();case 31:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getWellknownOpenidConfiguration",value:(n=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return s={},c=new Vd("/organizations/{organizationId}/oauth2/.well-known/openid-configuration",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=uu(uu({},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),uu(uu({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=19,t.fetch(u);case 19:if(f=e.sent,!n){e.next=24;break}return e.abrupt("return",f);case 24:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=28;break}throw new us(f);case 28:return e.next=30,f.text();case 30:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getJwksUri",value:(r=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return s={},c=new Vd("/organizations/{organizationId}/oauth2/jwks",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=uu(uu({},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),uu(uu({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=19,t.fetch(u);case 19:if(f=e.sent,!n){e.next=24;break}return e.abrupt("return",f);case 24:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=28;break}throw new us(f);case 28:return e.next=30,f.text();case 30:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})}]),e}();function hu(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 pu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?hu(Object(r),!0).forEach((function(t){ni(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}ni(fu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/{version}");var lu=function(){function e(t){ei(this,e),ni(this,"clientConfig",void 0);var r=pu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Po(r)}var r,n,i,a,o,s,c;return ri(e,[{key:"createOrder",value:(c=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0===i.siteId){e.next=17;break}s.siteId=i.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}s.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new Vd("/organizations/{organizationId}/orders",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),pu(pu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=29,t.fetch(u);case 29:if(f=e.sent,!n){e.next=34;break}return e.abrupt("return",f);case 34:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=38;break}throw new us(f);case 38:return e.next=40,f.text();case 40:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 42:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"getOrder",value:(s=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.orderNo){e.next=16;break}o.orderNo=i.orderNo,e.next=21;break;case 16:if(void 0===a.orderNo){e.next=20;break}o.orderNo=a.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new Vd("/organizations/{organizationId}/orders/{orderNo}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=pu(pu({},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),pu(pu({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=38,t.fetch(u);case 38:if(f=e.sent,!n){e.next=43;break}return e.abrupt("return",f);case 43:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=47;break}throw new us(f);case 47:return e.next=49,f.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"createPaymentInstrumentForOrder",value:(o=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.orderNo){e.next=16;break}o.orderNo=i.orderNo,e.next=21;break;case 16:if(void 0===a.orderNo){e.next=20;break}o.orderNo=a.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new Vd("/organizations/{organizationId}/orders/{orderNo}/payment-instruments",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),pu(pu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"POST"})),e.next=38,t.fetch(u);case 38:if(f=e.sent,!n){e.next=43;break}return e.abrupt("return",f);case 43:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=47;break}throw new us(f);case 47:return e.next=49,f.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"removePaymentInstrumentFromOrder",value:(a=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.orderNo){e.next=16;break}o.orderNo=i.orderNo,e.next=21;break;case 16:if(void 0===a.orderNo){e.next=20;break}o.orderNo=a.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(void 0===i.paymentInstrumentId){e.next=25;break}o.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 25:if(void 0===a.paymentInstrumentId){e.next=29;break}o.paymentInstrumentId=a.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new Vd("/organizations/{organizationId}/orders/{orderNo}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=pu(pu({},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),pu(pu({},this.clientConfig.fetchOptions),{},{headers:d,method:"DELETE"})),e.next=47,t.fetch(u);case 47:if(f=e.sent,!n){e.next=52;break}return e.abrupt("return",f);case 52:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=56;break}throw new us(f);case 56:return e.next=58,f.text();case 58:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"updatePaymentInstrumentForOrder",value:(i=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.orderNo){e.next=16;break}o.orderNo=i.orderNo,e.next=21;break;case 16:if(void 0===a.orderNo){e.next=20;break}o.orderNo=a.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(void 0===i.paymentInstrumentId){e.next=25;break}o.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 25:if(void 0===a.paymentInstrumentId){e.next=29;break}o.paymentInstrumentId=a.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(s={},void 0===i.siteId){e.next=35;break}s.siteId=i.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}s.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new Vd("/organizations/{organizationId}/orders/{orderNo}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),pu(pu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(r.body,d),headers:d,method:"PATCH"})),e.next=47,t.fetch(u);case 47:if(f=e.sent,!n){e.next=52;break}return e.abrupt("return",f);case 52:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=56;break}throw new us(f);case 56:return e.next=58,f.text();case 58:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getPaymentMethodsForOrder",value:(n=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.orderNo){e.next=16;break}o.orderNo=i.orderNo,e.next=21;break;case 16:if(void 0===a.orderNo){e.next=20;break}o.orderNo=a.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new Vd("/organizations/{organizationId}/orders/{orderNo}/payment-methods",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=pu(pu({},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),pu(pu({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=38,t.fetch(u);case 38:if(f=e.sent,!n){e.next=43;break}return e.abrupt("return",f);case 43:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=47;break}throw new us(f);case 47:return e.next=49,f.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getTaxesFromOrder",value:(r=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.orderNo){e.next=16;break}o.orderNo=i.orderNo,e.next=21;break;case 16:if(void 0===a.orderNo){e.next=20;break}o.orderNo=a.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return c=new Vd("/organizations/{organizationId}/orders/{orderNo}/taxes",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=pu(pu({},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),pu(pu({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=37,t.fetch(u);case 37:if(f=e.sent,!n){e.next=42;break}return e.abrupt("return",f);case 42:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=46;break}throw new us(f);case 46:return e.next=48,f.text();case 48:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})}]),e}();function gu(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?gu(Object(r),!0).forEach((function(t){ni(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}ni(lu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-orders/{version}");var vu=function(){function e(t){ei(this,e),ni(this,"clientConfig",void 0);var r=bu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Po(r)}var r,n,i,a;return ri(e,[{key:"getProducts",value:(a=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0===i.ids){e.next=17;break}s.ids=i.ids,e.next=22;break;case 17:if(void 0===a.ids){e.next=21;break}s.ids=a.ids,e.next=22;break;case 21:throw new Error("Missing required query parameter: ids");case 22:if(void 0!==i.inventoryIds?s.inventoryIds=i.inventoryIds:void 0!==a.inventoryIds&&(s.inventoryIds=a.inventoryIds),void 0!==i.currency?s.currency=i.currency:void 0!==a.currency&&(s.currency=a.currency),void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),void 0!==i.allImages?s.allImages=i.allImages:void 0!==a.allImages&&(s.allImages=a.allImages),void 0!==i.perPricebook?s.perPricebook=i.perPricebook:void 0!==a.perPricebook&&(s.perPricebook=a.perPricebook),void 0===i.siteId){e.next=31;break}s.siteId=i.siteId,e.next=36;break;case 31:if(void 0===a.siteId){e.next=35;break}s.siteId=a.siteId,e.next=36;break;case 35:throw new Error("Missing required query parameter: siteId");case 36:return c=new Vd("/organizations/{organizationId}/products",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=bu(bu({},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),bu(bu({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=42,t.fetch(u);case 42:if(f=e.sent,!n){e.next=47;break}return e.abrupt("return",f);case 47:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=51;break}throw new us(f);case 51:return e.next=53,f.text();case 53:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 55:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"getProduct",value:(i=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.id){e.next=16;break}o.id=i.id,e.next=21;break;case 16:if(void 0===a.id){e.next=20;break}o.id=a.id,e.next=21;break;case 20:throw new Error("Missing required path parameter: id");case 21:if(s={},void 0!==i.inventoryIds?s.inventoryIds=i.inventoryIds:void 0!==a.inventoryIds&&(s.inventoryIds=a.inventoryIds),void 0!==i.currency?s.currency=i.currency:void 0!==a.currency&&(s.currency=a.currency),void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),void 0!==i.allImages?s.allImages=i.allImages:void 0!==a.allImages&&(s.allImages=a.allImages),void 0!==i.perPricebook?s.perPricebook=i.perPricebook:void 0!==a.perPricebook&&(s.perPricebook=a.perPricebook),void 0===i.siteId){e.next=31;break}s.siteId=i.siteId,e.next=36;break;case 31:if(void 0===a.siteId){e.next=35;break}s.siteId=a.siteId,e.next=36;break;case 35:throw new Error("Missing required query parameter: siteId");case 36:return c=new Vd("/organizations/{organizationId}/products/{id}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=bu(bu({},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),bu(bu({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=42,t.fetch(u);case 42:if(f=e.sent,!n){e.next=47;break}return e.abrupt("return",f);case 47:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=51;break}throw new us(f);case 51:return e.next=53,f.text();case 53:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 55:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getCategories",value:(n=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0===i.ids){e.next=17;break}s.ids=i.ids,e.next=22;break;case 17:if(void 0===a.ids){e.next=21;break}s.ids=a.ids,e.next=22;break;case 21:throw new Error("Missing required query parameter: ids");case 22:if(void 0!==i.levels?s.levels=i.levels:void 0!==a.levels&&(s.levels=a.levels),void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),void 0===i.siteId){e.next=28;break}s.siteId=i.siteId,e.next=33;break;case 28:if(void 0===a.siteId){e.next=32;break}s.siteId=a.siteId,e.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return c=new Vd("/organizations/{organizationId}/categories",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=bu(bu({},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),bu(bu({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=39,t.fetch(u);case 39:if(f=e.sent,!n){e.next=44;break}return e.abrupt("return",f);case 44:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=48;break}throw new us(f);case 48:return e.next=50,f.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getCategory",value:(r=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.id){e.next=16;break}o.id=i.id,e.next=21;break;case 16:if(void 0===a.id){e.next=20;break}o.id=a.id,e.next=21;break;case 20:throw new Error("Missing required path parameter: id");case 21:if(s={},void 0!==i.levels?s.levels=i.levels:void 0!==a.levels&&(s.levels=a.levels),void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),void 0===i.siteId){e.next=28;break}s.siteId=i.siteId,e.next=33;break;case 28:if(void 0===a.siteId){e.next=32;break}s.siteId=a.siteId,e.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return c=new Vd("/organizations/{organizationId}/categories/{id}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=bu(bu({},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),bu(bu({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=39,t.fetch(u);case 39:if(f=e.sent,!n){e.next=44;break}return e.abrupt("return",f);case 44:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=48;break}throw new us(f);case 48:return e.next=50,f.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})}]),e}();function Iu(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?Iu(Object(r),!0).forEach((function(t){ni(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Iu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}ni(vu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/product/shopper-products/{version}");var xu=function(){function e(t){ei(this,e),ni(this,"clientConfig",void 0);var r=mu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Po(r)}var r,n;return ri(e,[{key:"getPromotions",value:(n=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0===i.siteId){e.next=17;break}s.siteId=i.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}s.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:if(void 0===i.ids){e.next=26;break}s.ids=i.ids,e.next=31;break;case 26:if(void 0===a.ids){e.next=30;break}s.ids=a.ids,e.next=31;break;case 30:throw new Error("Missing required query parameter: ids");case 31:return void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new Vd("/organizations/{organizationId}/promotions",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=mu(mu({},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),mu(mu({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=38,t.fetch(u);case 38:if(f=e.sent,!n){e.next=43;break}return e.abrupt("return",f);case 43:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=47;break}throw new us(f);case 47:return e.next=49,f.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getPromotionsForCampaign",value:(r=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===i.campaignId){e.next=16;break}o.campaignId=i.campaignId,e.next=21;break;case 16:if(void 0===a.campaignId){e.next=20;break}o.campaignId=a.campaignId,e.next=21;break;case 20:throw new Error("Missing required path parameter: campaignId");case 21:if(s={},void 0===i.siteId){e.next=26;break}s.siteId=i.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}s.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==i.startDate?s.startDate=i.startDate:void 0!==a.startDate&&(s.startDate=a.startDate),void 0!==i.endDate?s.endDate=i.endDate:void 0!==a.endDate&&(s.endDate=a.endDate),void 0!==i.currency?s.currency=i.currency:void 0!==a.currency&&(s.currency=a.currency),c=new Vd("/organizations/{organizationId}/promotions/campaigns/{campaignId}",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=mu(mu({},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),mu(mu({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=40,t.fetch(u);case 40:if(f=e.sent,!n){e.next=45;break}return e.abrupt("return",f);case 45:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=49;break}throw new us(f);case 49:return e.next=51,f.text();case 51:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 53:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})}]),e}();ni(xu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/pricing/shopper-promotions/{version}");var ku=TypeError,wu=function(e,t){if(!delete e[t])throw ku("Cannot delete property "+$(t)+" of "+$(e))},yu=B.match(/firefox\/(\d+)/i),Cu=!!yu&&+yu[1],zu=/MSIE|Trident/.test(B),Ou=B.match(/AppleWebKit\/(\d+)\./),qu=!!Ou&&+Ou[1],Eu=[],Pu=w(Eu.sort),Su=w(Eu.push),Ru=d((function(){Eu.sort(void 0)})),ju=d((function(){Eu.sort(null)})),Tu=_n("sort"),Mu=!d((function(){if(F)return F<70;if(!(Cu&&Cu>3)){if(zu)return!0;if(qu)return qu<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++)Eu.push({k:t+n,v:r})}for(Eu.sort((function(e,t){return t.v-e.v})),n=0;n<Eu.length;n++)t=Eu[n].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}}));function Uu(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?Uu(Object(r),!0).forEach((function(t){ni(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Uu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Ut({target:"Array",proto:!0,forced:Ru||!ju||!Tu||!Mu},{sort:function(e){void 0!==e&&K(e);var t=ie(this);if(Mu)return void 0===e?Pu(t):Pu(t,e);var r,n,i=[],a=lt(t);for(n=0;n<a;n++)n in t&&Su(i,t[n]);for(Na(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;)wu(t,n++);return t}});var Bu=function(){function e(t){ei(this,e),ni(this,"clientConfig",void 0);var r=Au({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Po(r)}var r,n;return ri(e,[{key:"productSearch",value:(n=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0===i.siteId){e.next=17;break}s.siteId=i.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}s.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return void 0!==i.q?s.q=i.q:void 0!==a.q&&(s.q=a.q),void 0!==i.refine?s.refine=i.refine:void 0!==a.refine&&(s.refine=a.refine),void 0!==i.sort?s.sort=i.sort:void 0!==a.sort&&(s.sort=a.sort),void 0!==i.currency?s.currency=i.currency:void 0!==a.currency&&(s.currency=a.currency),void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),void 0!==i.offset?s.offset=i.offset:void 0!==a.offset&&(s.offset=a.offset),void 0!==i.limit?s.limit=i.limit:void 0!==a.limit&&(s.limit=a.limit),c=new Vd("/organizations/{organizationId}/product-search",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Au(Au({},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),Au(Au({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=35,t.fetch(u);case 35:if(f=e.sent,!n){e.next=40;break}return e.abrupt("return",f);case 40:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=44;break}throw new us(f);case 44:return e.next=46,f.text();case 46:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getSearchSuggestions",value:(r=Zn(Pi.mark((function e(r,n){var i,a,o,s,c,d,u,f,h;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.parameters)||{},a=this.clientConfig.parameters,o={shortCode:a.shortCode,version:a.version||"v1"},void 0===i.organizationId){e.next=7;break}o.organizationId=i.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}o.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(s={},void 0===i.siteId){e.next=17;break}s.siteId=i.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}s.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:if(void 0===i.q){e.next=26;break}s.q=i.q,e.next=31;break;case 26:if(void 0===a.q){e.next=30;break}s.q=a.q,e.next=31;break;case 30:throw new Error("Missing required query parameter: q");case 31:return void 0!==i.limit?s.limit=i.limit:void 0!==a.limit&&(s.limit=a.limit),void 0!==i.currency?s.currency=i.currency:void 0!==a.currency&&(s.currency=a.currency),void 0!==i.locale?s.locale=i.locale:void 0!==a.locale&&(s.locale=a.locale),c=new Vd("/organizations/{organizationId}/search-suggestions",this.clientConfig.baseUri,{pathParams:o,queryParams:s,origin:this.clientConfig.proxy}),d=Au(Au({},this.clientConfig.headers),null==r?void 0:r.headers),Ro||(d["user-agent"]=[d["user-agent"],Wd].join(" ")),u=new t.Request(c.toString(),Au(Au({},this.clientConfig.fetchOptions),{},{headers:d,method:"GET"})),e.next=40,t.fetch(u);case 40:if(f=e.sent,!n){e.next=45;break}return e.abrupt("return",f);case 45:if(!this.clientConfig.throwOnBadResponse||f.ok||304===f.status){e.next=49;break}throw new us(f);case 49:return e.next=51,f.text();case 51:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 53:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})}]),e}();ni(Bu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/search/shopper-search/{version}/");var Nu=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};Ts("search",(function(e,t,r){return[function(t){var r=S(this),n=null==t?void 0:Q(t,e);return n?p(n,t,r):new RegExp(t)[e](Vt(r))},function(e){var n=Pe(this),i=Vt(e),a=r(t,n,i);if(a.done)return a.value;var o=n.lastIndex;Nu(o,0)||(n.lastIndex=0);var s=Gs(n,i);return Nu(n.lastIndex,o)||(n.lastIndex=o),null===s?-1:s.index}]}));var _u=ge("iterator"),Lu=!1;try{var Du=0,Fu={next:function(){return{done:!!Du++}},return:function(){Lu=!0}};Fu[_u]=function(){return this},Array.from(Fu,(function(){throw 2}))}catch(e){}var Ju,Gu,Hu,Vu=function(e,t){if(!t&&!Lu)return!1;var r=!1;try{var n={};n[_u]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r},Wu="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView,$u=Te.f,Yu=rt.enforce,Ku=rt.get,Qu=c.Int8Array,Xu=Qu&&Qu.prototype,Zu=c.Uint8ClampedArray,ef=Zu&&Zu.prototype,tf=Qu&&Fi(Qu),rf=Xu&&Fi(Xu),nf=Object.prototype,af=c.TypeError,of=ge("toStringTag"),sf=ue("TYPED_ARRAY_TAG"),cf=Wu&&!!Qi&&"Opera"!==Gt(c.opera),df=!1,uf={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},ff={BigInt64Array:8,BigUint64Array:8},hf=function(e){var t=Fi(e);if(T(t)){var r=Ku(t);return r&&oe(r,"TypedArrayConstructor")?r.TypedArrayConstructor:hf(t)}},pf=function(e){if(!T(e))return!1;var t=Gt(e);return oe(uf,t)||oe(ff,t)};for(Ju in uf)(Hu=(Gu=c[Ju])&&Gu.prototype)?Yu(Hu).TypedArrayConstructor=Gu:cf=!1;for(Ju in ff)(Hu=(Gu=c[Ju])&&Gu.prototype)&&(Yu(Hu).TypedArrayConstructor=Gu);if((!cf||!j(tf)||tf===Function.prototype)&&(tf=function(){throw af("Incorrect invocation")},cf))for(Ju in uf)c[Ju]&&Qi(c[Ju],tf);if((!cf||!rf||rf===nf)&&(rf=tf.prototype,cf))for(Ju in uf)c[Ju]&&Qi(c[Ju].prototype,rf);if(cf&&Fi(ef)!==rf&&Qi(ef,rf),u&&!oe(rf,of))for(Ju in df=!0,$u(rf,of,{get:function(){return T(this)?this[sf]:void 0}}),uf)c[Ju]&&Me(c[Ju],sf,Ju);var lf={NATIVE_ARRAY_BUFFER_VIEWS:cf,TYPED_ARRAY_TAG:df&&sf,aTypedArray:function(e){if(pf(e))return e;throw af("Target is not a typed array")},aTypedArrayConstructor:function(e){if(j(e)&&(!Qi||A(tf,e)))return e;throw af($(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,r,n){if(u){if(r)for(var i in uf){var a=c[i];if(a&&oe(a.prototype,e))try{delete a.prototype[e]}catch(r){try{a.prototype[e]=t}catch(e){}}}rf[e]&&!r||it(rf,e,r?t:cf&&Xu[e]||t,n)}},exportTypedArrayStaticMethod:function(e,t,r){var n,i;if(u){if(Qi){if(r)for(n in uf)if((i=c[n])&&oe(i,e))try{delete i[e]}catch(e){}if(tf[e]&&!r)return;try{return it(tf,e,r?t:cf&&tf[e]||t)}catch(e){}}for(n in uf)!(i=c[n])||i[e]&&!r||it(i,e,t)}},getTypedArrayConstructor:hf,isView:function(e){if(!T(e))return!1;var t=Gt(e);return"DataView"===t||oe(uf,t)||oe(ff,t)},isTypedArray:pf,TypedArray:tf,TypedArrayPrototype:rf},gf=lf.NATIVE_ARRAY_BUFFER_VIEWS,bf=c.ArrayBuffer,vf=c.Int8Array,If=!gf||!d((function(){vf(1)}))||!d((function(){new vf(-1)}))||!Vu((function(e){new vf,new vf(null),new vf(1.5),new vf(e)}),!0)||d((function(){return 1!==new vf(new bf(2),1,void 0).length})),mf=RangeError,xf=function(e){if(void 0===e)return 0;var t=ct(e),r=pt(t);if(t!==r)throw mf("Wrong length or index");return r},kf=Array,wf=Math.abs,yf=Math.pow,Cf=Math.floor,zf=Math.log,Of=Math.LN2,qf=function(e,t,r){var n,i,a,o=kf(r),s=8*r-t-1,c=(1<<s)-1,d=c>>1,u=23===t?yf(2,-24)-yf(2,-77):0,f=e<0||0===e&&1/e<0?1:0,h=0;for((e=wf(e))!=e||e===1/0?(i=e!=e?1:0,n=c):(n=Cf(zf(e)/Of),e*(a=yf(2,-n))<1&&(n--,a*=2),(e+=n+d>=1?u/a:u*yf(2,1-d))*a>=2&&(n++,a/=2),n+d>=c?(i=0,n=c):n+d>=1?(i=(e*a-1)*yf(2,t),n+=d):(i=e*yf(2,d-1)*yf(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*f,o},Ef=function(e,t){var r,n=e.length,i=8*n-t-1,a=(1<<i)-1,o=a>>1,s=i-7,c=n-1,d=e[c--],u=127&d;for(d>>=7;s>0;)u=256*u+e[c--],s-=8;for(r=u&(1<<-s)-1,u>>=-s,s+=t;s>0;)r=256*r+e[c--],s-=8;if(0===u)u=1-o;else{if(u===a)return r?NaN:d?-1/0:1/0;r+=yf(2,t),u-=o}return(d?-1:1)*r*yf(2,u-t)},Pf=function(e){for(var t=ie(this),r=lt(t),n=arguments.length,i=ft(n>1?arguments[1]:void 0,r),a=n>2?arguments[2]:void 0,o=void 0===a?r:ft(a,r);o>i;)t[i++]=e;return t},Sf=wt.f,Rf=Te.f,jf=Ne.PROPER,Tf=Ne.CONFIGURABLE,Mf=rt.get,Uf=rt.set,Af=c.ArrayBuffer,Bf=Af,Nf=Bf&&Bf.prototype,_f=c.DataView,Lf=_f&&_f.prototype,Df=Object.prototype,Ff=c.Array,Jf=c.RangeError,Gf=w(Pf),Hf=w([].reverse),Vf=qf,Wf=Ef,$f=function(e){return[255&e]},Yf=function(e){return[255&e,e>>8&255]},Kf=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},Qf=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},Xf=function(e){return Vf(e,23,4)},Zf=function(e){return Vf(e,52,8)},eh=function(e,t){Rf(e.prototype,t,{get:function(){return Mf(this)[t]}})},th=function(e,t,r,n){var i=xf(r),a=Mf(e);if(i+t>a.byteLength)throw Jf("Wrong index");var o=Mf(a.buffer).bytes,s=i+a.byteOffset,c=ir(o,s,s+t);return n?c:Hf(c)},rh=function(e,t,r,n,i,a){var o=xf(r),s=Mf(e);if(o+t>s.byteLength)throw Jf("Wrong index");for(var c=Mf(s.buffer).bytes,d=o+s.byteOffset,u=n(+i),f=0;f<t;f++)c[d+f]=u[a?f:t-f-1]};if(Wu){var nh=jf&&"ArrayBuffer"!==Af.name;if(d((function(){Af(1)}))&&d((function(){new Af(-1)}))&&!d((function(){return new Af,new Af(1.5),new Af(NaN),nh&&!Tf})))nh&&Tf&&Me(Af,"name","ArrayBuffer");else{(Bf=function(e){return qa(this,Nf),new Af(xf(e))}).prototype=Nf;for(var ih,ah=Sf(Af),oh=0;ah.length>oh;)(ih=ah[oh++])in Bf||Me(Bf,ih,Af[ih]);Nf.constructor=Bf}Qi&&Fi(Lf)!==Df&&Qi(Lf,Df);var sh=new _f(new Bf(2)),ch=w(Lf.setInt8);sh.setInt8(0,2147483648),sh.setInt8(1,2147483649),!sh.getInt8(0)&&sh.getInt8(1)||za(Lf,{setInt8:function(e,t){ch(this,e,t<<24>>24)},setUint8:function(e,t){ch(this,e,t<<24>>24)}},{unsafe:!0})}else Nf=(Bf=function(e){qa(this,Nf);var t=xf(e);Uf(this,{bytes:Gf(Ff(t),0),byteLength:t}),u||(this.byteLength=t)}).prototype,Lf=(_f=function(e,t,r){qa(this,Lf),qa(e,Nf);var n=Mf(e).byteLength,i=ct(t);if(i<0||i>n)throw Jf("Wrong offset");if(i+(r=void 0===r?n-i:pt(r))>n)throw Jf("Wrong length");Uf(this,{buffer:e,byteLength:r,byteOffset:i}),u||(this.buffer=e,this.byteLength=r,this.byteOffset=i)}).prototype,u&&(eh(Bf,"byteLength"),eh(_f,"buffer"),eh(_f,"byteLength"),eh(_f,"byteOffset")),za(Lf,{getInt8:function(e){return th(this,1,e)[0]<<24>>24},getUint8:function(e){return th(this,1,e)[0]},getInt16:function(e){var t=th(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=th(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return Qf(th(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return Qf(th(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return Wf(th(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return Wf(th(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){rh(this,1,e,$f,t)},setUint8:function(e,t){rh(this,1,e,$f,t)},setInt16:function(e,t){rh(this,2,e,Yf,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){rh(this,2,e,Yf,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){rh(this,4,e,Kf,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){rh(this,4,e,Kf,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){rh(this,4,e,Xf,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){rh(this,8,e,Zf,t,arguments.length>2?arguments[2]:void 0)}});pr(Bf,"ArrayBuffer"),pr(_f,"DataView");var dh={ArrayBuffer:Bf,DataView:_f},uh=Math.floor,fh=Number.isInteger||function(e){return!T(e)&&isFinite(e)&&uh(e)===e},hh=RangeError,ph=RangeError,lh=function(e,t){var r=function(e){var t=ct(e);if(t<0)throw hh("The argument can't be less than 0");return t}(e);if(r%t)throw ph("Wrong offset");return r},gh=lf.aTypedArrayConstructor,bh=function(e){var t,r,n,i,a,o,s=Lo(this),c=ie(e),d=arguments.length,u=d>1?arguments[1]:void 0,f=void 0!==u,h=Pa(c);if(h&&!uc(h))for(o=(a=Ra(c,h)).next,c=[];!(i=p(o,a)).done;)c.push(i.value);for(f&&d>2&&(u=gr(u,arguments[2])),r=lt(c),n=new(gh(s))(r),t=0;r>t;t++)n[t]=f?u(c[t],t):c[t];return n},vh=ge("species"),Ih=function(e){var t=U(e),r=Te.f;u&&t&&!t[vh]&&r(t,vh,{configurable:!0,get:function(){return this}})};i((function(e){var t=wt.f,r=Rr.forEach,n=rt.get,i=rt.set,a=rt.enforce,o=Te.f,s=ze.f,d=Math.round,f=c.RangeError,h=dh.ArrayBuffer,l=h.prototype,g=dh.DataView,b=lf.NATIVE_ARRAY_BUFFER_VIEWS,I=lf.TYPED_ARRAY_TAG,m=lf.TypedArray,x=lf.TypedArrayPrototype,k=lf.aTypedArrayConstructor,w=lf.isTypedArray,y=function(e,t){k(e);for(var r=0,n=t.length,i=new e(n);n>r;)i[r]=t[r++];return i},C=function(e,t){o(e,t,{get:function(){return n(this)[t]}})},z=function(e){var t;return A(l,e)||"ArrayBuffer"==(t=Gt(e))||"SharedArrayBuffer"==t},O=function(e,t){return w(e)&&!V(t)&&t in e&&fh(+t)&&t>=0},q=function(e,t){return t=me(t),O(e,t)?v(2,e[t]):s(e,t)},E=function(e,t,r){return t=me(t),!(O(e,t)&&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?(b||(ze.f=q,Te.f=E,C(x,"buffer"),C(x,"byteOffset"),C(x,"byteLength"),C(x,"length")),Ut({target:"Object",stat:!0,forced:!b},{getOwnPropertyDescriptor:q,defineProperty:E}),e.exports=function(e,s,u){var l=e.match(/\d+$/)[0]/8,v=e+(u?"Clamped":"")+"Array",k="get"+e,C="set"+e,O=c[v],q=O,E=q&&q.prototype,P={},S=function(e,t){o(e,t,{get:function(){return function(e,t){var r=n(e);return r.view[k](t*l+r.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,r){var i=n(e);u&&(r=(r=d(r))<0?0:r>255?255:255&r),i.view[C](t*l+i.byteOffset,r,!0)}(this,t,e)},enumerable:!0})};b?If&&(q=s((function(e,t,r,n){return qa(e,E),function(e,t,r){var n,i;return Qi&&j(n=t.constructor)&&n!==r&&T(i=n.prototype)&&i!==r.prototype&&Qi(e,i),e}(T(t)?z(t)?void 0!==n?new O(t,lh(r,l),n):void 0!==r?new O(t,lh(r,l)):new O(t):w(t)?y(q,t):p(bh,q,t):new O(xf(t)),e,q)})),Qi&&Qi(q,m),r(t(O),(function(e){e in q||Me(q,e,O[e])})),q.prototype=E):(q=s((function(e,t,r,n){qa(e,E);var a,o,s,c=0,d=0;if(T(t)){if(!z(t))return w(t)?y(q,t):p(bh,q,t);a=t,d=lh(r,l);var u=t.byteLength;if(void 0===n){if(u%l)throw f("Wrong length");if((o=u-d)<0)throw f("Wrong length")}else if((o=pt(n)*l)+d>u)throw f("Wrong length");s=o/l}else s=xf(t),a=new h(o=s*l);for(i(e,{buffer:a,byteOffset:d,byteLength:o,length:s,view:new g(a)});c<s;)S(e,c++)})),Qi&&Qi(q,m),E=q.prototype=er(x)),E.constructor!==q&&Me(E,"constructor",q),a(E).TypedArrayConstructor=q,I&&Me(E,I,v);var R=q!=O;P[v]=q,Ut({global:!0,constructor:!0,forced:R,sham:!b},P),"BYTES_PER_ELEMENT"in q||Me(q,"BYTES_PER_ELEMENT",l),"BYTES_PER_ELEMENT"in E||Me(E,"BYTES_PER_ELEMENT",l),Ih(v)}):e.exports=function(){}}))("Uint8",(function(e){return function(t,r,n){return e(this,t,r,n)}}));var mh=Math.min,xh=w([].copyWithin||function(e,t){var r=ie(this),n=lt(r),i=ft(e,n),a=ft(t,n),o=arguments.length>2?arguments[2]:void 0,s=mh((void 0===o?n:ft(o,n))-a,n-i),c=1;for(a<i&&i<a+s&&(c=-1,a+=s-1,i+=s-1);s-- >0;)a in r?r[i]=r[a]:wu(r,i),i+=c,a+=c;return r}),kh=lf.aTypedArray;(0,lf.exportTypedArrayMethod)("copyWithin",(function(e,t){return xh(kh(this),e,t,arguments.length>2?arguments[2]:void 0)}));var wh=Rr.every,yh=lf.aTypedArray;(0,lf.exportTypedArrayMethod)("every",(function(e){return wh(yh(this),e,arguments.length>1?arguments[1]:void 0)}));var Ch=TypeError,zh=function(e){var t=Ie(e,"number");if("number"==typeof t)throw Ch("Can't convert number to bigint");return BigInt(t)},Oh=lf.aTypedArray,qh=lf.exportTypedArrayMethod,Eh=w("".slice);qh("fill",(function(e){var t=arguments.length;Oh(this);var r="Big"===Eh(Gt(this),0,3)?zh(e):+e;return p(Pf,this,r,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}),d((function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e})));var Ph=ge("species"),Sh=function(e,t){var r,n=Pe(e).constructor;return void 0===n||null==(r=Pe(n)[Ph])?t:Lo(r)},Rh=lf.aTypedArrayConstructor,jh=lf.getTypedArrayConstructor,Th=function(e){return Rh(Sh(e,jh(e)))},Mh=function(e,t){return function(e,t){for(var r=0,n=lt(t),i=new e(n);n>r;)i[r]=t[r++];return i}(Th(e),t)},Uh=Rr.filter,Ah=lf.aTypedArray;(0,lf.exportTypedArrayMethod)("filter",(function(e){var t=Uh(Ah(this),e,arguments.length>1?arguments[1]:void 0);return Mh(this,t)}));var Bh=Rr.find,Nh=lf.aTypedArray;(0,lf.exportTypedArrayMethod)("find",(function(e){return Bh(Nh(this),e,arguments.length>1?arguments[1]:void 0)}));var _h=Rr.findIndex,Lh=lf.aTypedArray;(0,lf.exportTypedArrayMethod)("findIndex",(function(e){return _h(Lh(this),e,arguments.length>1?arguments[1]:void 0)}));var Dh=Rr.forEach,Fh=lf.aTypedArray;(0,lf.exportTypedArrayMethod)("forEach",(function(e){Dh(Fh(this),e,arguments.length>1?arguments[1]:void 0)}));var Jh=bt.includes,Gh=lf.aTypedArray;(0,lf.exportTypedArrayMethod)("includes",(function(e){return Jh(Gh(this),e,arguments.length>1?arguments[1]:void 0)}));var Hh=bt.indexOf,Vh=lf.aTypedArray;(0,lf.exportTypedArrayMethod)("indexOf",(function(e){return Hh(Vh(this),e,arguments.length>1?arguments[1]:void 0)}));var Wh=ge("iterator"),$h=c.Uint8Array,Yh=w(ca.values),Kh=w(ca.keys),Qh=w(ca.entries),Xh=lf.aTypedArray,Zh=lf.exportTypedArrayMethod,ep=$h&&$h.prototype,tp=!d((function(){ep[Wh].call([1])})),rp=!!ep&&ep.values&&ep[Wh]===ep.values&&"values"===ep.values.name,np=function(){return Yh(Xh(this))};Zh("entries",(function(){return Qh(Xh(this))}),tp),Zh("keys",(function(){return Kh(Xh(this))}),tp),Zh("values",np,tp||!rp,{name:"values"}),Zh(Wh,np,tp||!rp,{name:"values"});var ip=lf.aTypedArray,ap=lf.exportTypedArrayMethod,op=w([].join);ap("join",(function(e){return op(ip(this),e)}));var sp=Math.min,cp=[].lastIndexOf,dp=!!cp&&1/[1].lastIndexOf(1,-0)<0,up=_n("lastIndexOf"),fp=dp||!up?function(e){if(dp)return hn(cp,this,arguments)||0;var t=R(this),r=lt(t),n=r-1;for(arguments.length>1&&(n=sp(n,ct(arguments[1]))),n<0&&(n=r+n);n>=0;n--)if(n in t&&t[n]===e)return n||0;return-1}:cp,hp=lf.aTypedArray;(0,lf.exportTypedArrayMethod)("lastIndexOf",(function(e){var t=arguments.length;return hn(fp,hp(this),t>1?[e,arguments[1]]:[e])}));var pp=Rr.map,lp=lf.aTypedArray;(0,lf.exportTypedArrayMethod)("map",(function(e){return pp(lp(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new(Th(e))(t)}))}));var gp=TypeError,bp=function(e){return function(t,r,n,i){K(r);var a=ie(t),o=E(a),s=lt(a),c=e?s-1:0,d=e?-1:1;if(n<2)for(;;){if(c in o){i=o[c],c+=d;break}if(c+=d,e?c<0:s<=c)throw gp("Reduce of empty array with no initial value")}for(;e?c>=0:s>c;c+=d)c in o&&(i=r(i,o[c],c,a));return i}},vp={left:bp(!1),right:bp(!0)},Ip=vp.left,mp=lf.aTypedArray;(0,lf.exportTypedArrayMethod)("reduce",(function(e){var t=arguments.length;return Ip(mp(this),e,t,t>1?arguments[1]:void 0)}));var xp=vp.right,kp=lf.aTypedArray;(0,lf.exportTypedArrayMethod)("reduceRight",(function(e){var t=arguments.length;return xp(kp(this),e,t,t>1?arguments[1]:void 0)}));var wp=lf.aTypedArray,yp=lf.exportTypedArrayMethod,Cp=Math.floor;yp("reverse",(function(){for(var e,t=wp(this).length,r=Cp(t/2),n=0;n<r;)e=this[n],this[n++]=this[--t],this[t]=e;return this}));var zp=c.RangeError,Op=c.Int8Array,qp=Op&&Op.prototype,Ep=qp&&qp.set,Pp=lf.aTypedArray,Sp=lf.exportTypedArrayMethod,Rp=!d((function(){var e=new Uint8ClampedArray(2);return p(Ep,e,{length:1,0:3},1),3!==e[1]})),jp=Rp&&lf.NATIVE_ARRAY_BUFFER_VIEWS&&d((function(){var e=new Op(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}));Sp("set",(function(e){Pp(this);var t=lh(arguments.length>1?arguments[1]:void 0,1),r=ie(e);if(Rp)return p(Ep,this,r,t);var n=this.length,i=lt(r),a=0;if(i+t>n)throw zp("Wrong length");for(;a<i;)this[t+a]=r[a++]}),!Rp||jp);var Tp=lf.aTypedArray;(0,lf.exportTypedArrayMethod)("slice",(function(e,t){for(var r=pn(Tp(this),e,t),n=Th(this),i=0,a=r.length,o=new n(a);a>i;)o[i]=r[i++];return o}),d((function(){new Int8Array(1).slice()})));var Mp=Rr.some,Up=lf.aTypedArray;(0,lf.exportTypedArrayMethod)("some",(function(e){return Mp(Up(this),e,arguments.length>1?arguments[1]:void 0)}));var Ap=lf.aTypedArray,Bp=lf.exportTypedArrayMethod,Np=c.Uint16Array,_p=Np&&w(Np.prototype.sort),Lp=!(!_p||d((function(){_p(new Np(2),null)}))&&d((function(){_p(new Np(2),{})}))),Dp=!!_p&&!d((function(){if(F)return F<74;if(Cu)return Cu<67;if(zu)return!0;if(qu)return qu<602;var e,t,r=new Np(516),n=Array(516);for(e=0;e<516;e++)t=e%4,r[e]=515-e,n[e]=e-2*t+3;for(_p(r,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(r[e]!==n[e])return!0}));Bp("sort",(function(e){return void 0!==e&&K(e),Dp?_p(this,e):Na(Ap(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))}),!Dp||Lp);var Fp=c.Int8Array,Jp=lf.aTypedArray,Gp=lf.exportTypedArrayMethod,Hp=[].toLocaleString,Vp=!!Fp&&d((function(){Hp.call(new Fp(1))}));Gp("toLocaleString",(function(){return hn(Hp,Vp?pn(Jp(this)):Jp(this),pn(arguments))}),d((function(){return[1,2].toLocaleString()!=new Fp([1,2]).toLocaleString()}))||!d((function(){Fp.prototype.toLocaleString.call([1,2])})));var Wp=lf.exportTypedArrayMethod,$p=c.Uint8Array,Yp=$p&&$p.prototype||{},Kp=[].toString,Qp=w([].join);d((function(){Kp.call({})}))&&(Kp=function(){return Qp(this)});var Xp=Yp.toString!=Kp;Wp("toString",Kp,Xp);var Zp,el,tl,rl,nl="process"==z(c.process),il=/(?:ipad|iphone|ipod).*applewebkit/i.test(B),al=c.setImmediate,ol=c.clearImmediate,sl=c.process,cl=c.Dispatch,dl=c.Function,ul=c.MessageChannel,fl=c.String,hl=0,pl={};try{Zp=c.location}catch(e){}var ll=function(e){if(oe(pl,e)){var t=pl[e];delete pl[e],t()}},gl=function(e){return function(){ll(e)}},bl=function(e){ll(e.data)},vl=function(e){c.postMessage(fl(e),Zp.protocol+"//"+Zp.host)};al&&ol||(al=function(e){Ta(arguments.length,1);var t=j(e)?e:dl(e),r=pn(arguments,1);return pl[++hl]=function(){hn(t,void 0,r)},el(hl),hl},ol=function(e){delete pl[e]},nl?el=function(e){sl.nextTick(gl(e))}:cl&&cl.now?el=function(e){cl.now(gl(e))}:ul&&!il?(rl=(tl=new ul).port2,tl.port1.onmessage=bl,el=gr(rl.postMessage,rl)):c.addEventListener&&j(c.postMessage)&&!c.importScripts&&Zp&&"file:"!==Zp.protocol&&!d(vl)?(el=vl,c.addEventListener("message",bl,!1)):el="onreadystatechange"in we("script")?function(e){$t.appendChild(we("script")).onreadystatechange=function(){$t.removeChild(this),ll(e)}}:function(e){setTimeout(gl(e),0)});var Il,ml,xl,kl,wl,yl,Cl,zl,Ol={set:al,clear:ol},ql=/ipad|iphone|ipod/i.test(B)&&void 0!==c.Pebble,El=/web0s(?!.*chrome)/i.test(B),Pl=ze.f,Sl=Ol.set,Rl=c.MutationObserver||c.WebKitMutationObserver,jl=c.document,Tl=c.process,Ml=c.Promise,Ul=Pl(c,"queueMicrotask"),Al=Ul&&Ul.value;Al||(Il=function(){var e,t;for(nl&&(e=Tl.domain)&&e.exit();ml;){t=ml.fn,ml=ml.next;try{t()}catch(e){throw ml?kl():xl=void 0,e}}xl=void 0,e&&e.enter()},il||nl||El||!Rl||!jl?!ql&&Ml&&Ml.resolve?((Cl=Ml.resolve(void 0)).constructor=Ml,zl=gr(Cl.then,Cl),kl=function(){zl(Il)}):nl?kl=function(){Tl.nextTick(Il)}:(Sl=gr(Sl,c),kl=function(){Sl(Il)}):(wl=!0,yl=jl.createTextNode(""),new Rl(Il).observe(yl,{characterData:!0}),kl=function(){yl.data=wl=!wl}));var Bl=Al||function(e){var t={fn:e,next:void 0};xl&&(xl.next=t),ml||(ml=t,kl()),xl=t},Nl=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},_l=function(){this.head=null,this.tail=null};_l.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 Ll=_l,Dl=c.Promise,Fl="object"==typeof window&&"object"!=typeof Deno;Dl&&Dl.prototype;var Jl,Gl,Hl,Vl=ge("species"),Wl=!1,$l=j(c.PromiseRejectionEvent),Yl={CONSTRUCTOR:Tt("Promise",(function(){var e=Je(Dl),t=e!==String(Dl);if(!t&&66===F)return!0;if(F>=51&&/native code/.test(e))return!1;var r=new Dl((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};return(r.constructor={})[Vl]=n,!(Wl=r.then((function(){}))instanceof n)||!t&&Fl&&!$l})),REJECTION_EVENT:$l,SUBCLASSING:Wl},Kl=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=K(t),this.reject=K(r)},Ql={f:function(e){return new Kl(e)}},Xl=Ol.set,Zl=Yl.CONSTRUCTOR,eg=Yl.REJECTION_EVENT,tg=Yl.SUBCLASSING,rg=rt.getterFor("Promise"),ng=rt.set,ig=Dl&&Dl.prototype,ag=Dl,og=ig,sg=c.TypeError,cg=c.document,dg=c.process,ug=Ql.f,fg=ug,hg=!!(cg&&cg.createEvent&&c.dispatchEvent),pg=function(e){var t;return!(!T(e)||!j(t=e.then))&&t},lg=function(e,t){var r,n,i,a=t.value,o=1==t.state,s=o?e.ok:e.fail,c=e.resolve,d=e.reject,u=e.domain;try{s?(o||(2===t.rejection&&mg(t),t.rejection=1),!0===s?r=a:(u&&u.enter(),r=s(a),u&&(u.exit(),i=!0)),r===e.promise?d(sg("Promise-chain cycle")):(n=pg(r))?p(n,r,c,d):c(r)):d(a)}catch(e){u&&!i&&u.exit(),d(e)}},gg=function(e,t){e.notified||(e.notified=!0,Bl((function(){for(var r,n=e.reactions;r=n.get();)lg(r,e);e.notified=!1,t&&!e.rejection&&vg(e)})))},bg=function(e,t,r){var n,i;hg?((n=cg.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),c.dispatchEvent(n)):n={promise:t,reason:r},!eg&&(i=c["on"+e])?i(n):"unhandledrejection"===e&&function(e,t){var r=c.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))}("Unhandled promise rejection",r)},vg=function(e){p(Xl,c,(function(){var t,r=e.facade,n=e.value;if(Ig(e)&&(t=Nl((function(){nl?dg.emit("unhandledRejection",n,r):bg("unhandledrejection",r,n)})),e.rejection=nl||Ig(e)?2:1,t.error))throw t.value}))},Ig=function(e){return 1!==e.rejection&&!e.parent},mg=function(e){p(Xl,c,(function(){var t=e.facade;nl?dg.emit("rejectionHandled",t):bg("rejectionhandled",t,e.value)}))},xg=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,gg(e,!0))},wg=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw sg("Promise can't be resolved itself");var n=pg(t);n?Bl((function(){var r={done:!1};try{p(n,t,xg(wg,r,e),xg(kg,r,e))}catch(t){kg(r,t,e)}})):(e.value=t,e.state=1,gg(e,!1))}catch(t){kg({done:!1},t,e)}}};if(Zl&&(og=(ag=function(e){qa(this,og),K(e),p(Jl,this);var t=rg(this);try{e(xg(wg,t),xg(kg,t))}catch(e){kg(t,e)}}).prototype,(Jl=function(e){ng(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:new Ll,rejection:!1,state:0,value:void 0})}).prototype=it(og,"then",(function(e,t){var r=rg(this),n=ug(Sh(this,ag));return r.parent=!0,n.ok=!j(e)||e,n.fail=j(t)&&t,n.domain=nl?dg.domain:void 0,0==r.state?r.reactions.add(n):Bl((function(){lg(n,r)})),n.promise})),Gl=function(){var e=new Jl,t=rg(e);this.promise=e,this.resolve=xg(wg,t),this.reject=xg(kg,t)},Ql.f=ug=function(e){return e===ag||void 0===e?new Gl(e):fg(e)},j(Dl)&&ig!==Object.prototype)){Hl=ig.then,tg||it(ig,"then",(function(e,t){var r=this;return new ag((function(e,t){p(Hl,r,e,t)})).then(e,t)}),{unsafe:!0});try{delete ig.constructor}catch(e){}Qi&&Qi(ig,og)}Ut({global:!0,constructor:!0,wrap:!0,forced:Zl},{Promise:ag}),pr(ag,"Promise",!1),Ih("Promise");var yg=TypeError,Cg=function(e,t){this.stopped=e,this.result=t},zg=Cg.prototype,Og=function(e,t,r){var n,i,a,o,s,c,d,u=r&&r.that,f=!(!r||!r.AS_ENTRIES),h=!(!r||!r.IS_RECORD),l=!(!r||!r.IS_ITERATOR),g=!(!r||!r.INTERRUPTED),b=gr(t,u),v=function(e){return n&&oc(n,"normal",e),new Cg(!0,e)},I=function(e){return f?(Pe(e),g?b(e[0],e[1],v):b(e[0],e[1])):g?b(e,v):b(e)};if(h)n=e.iterator;else if(l)n=e;else{if(!(i=Pa(e)))throw yg($(e)+" is not iterable");if(uc(i)){for(a=0,o=lt(e);o>a;a++)if((s=I(e[a]))&&A(zg,s))return s;return new Cg(!1)}n=Ra(e,i)}for(c=h?e.next:n.next;!(d=p(c,n)).done;){try{s=I(d.value)}catch(e){oc(n,"throw",e)}if("object"==typeof s&&s&&A(zg,s))return s}return new Cg(!1)},qg=Yl.CONSTRUCTOR||!Vu((function(e){Dl.all(e).then(void 0,(function(){}))}));Ut({target:"Promise",stat:!0,forced:qg},{all:function(e){var t=this,r=Ql.f(t),n=r.resolve,i=r.reject,a=Nl((function(){var r=K(t.resolve),a=[],o=0,s=1;Og(e,(function(e){var c=o++,d=!1;s++,p(r,t,e).then((function(e){d||(d=!0,a[c]=e,--s||n(a))}),i)})),--s||n(a)}));return a.error&&i(a.value),r.promise}});var Eg=Yl.CONSTRUCTOR,Pg=Dl&&Dl.prototype;if(Ut({target:"Promise",proto:!0,forced:Eg,real:!0},{catch:function(e){return this.then(void 0,e)}}),j(Dl)){var Sg=U("Promise").prototype.catch;Pg.catch!==Sg&&it(Pg,"catch",Sg,{unsafe:!0})}Ut({target:"Promise",stat:!0,forced:qg},{race:function(e){var t=this,r=Ql.f(t),n=r.reject,i=Nl((function(){var i=K(t.resolve);Og(e,(function(e){p(i,t,e).then(r.resolve,n)}))}));return i.error&&n(i.value),r.promise}}),Ut({target:"Promise",stat:!0,forced:Yl.CONSTRUCTOR},{reject:function(e){var t=Ql.f(this);return p(t.reject,void 0,e),t.promise}});var Rg=Yl.CONSTRUCTOR;function jg(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 Tg(e){return function(e){if(Array.isArray(e))return jg(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 jg(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)?jg(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.")}()}function Mg(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 Ug(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Mg(Object(r),!0).forEach((function(t){ni(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Mg(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}U("Promise"),Ut({target:"Promise",stat:!0,forced:Rg},{resolve:function(e){return function(e,t){if(Pe(e),T(t)&&t.constructor===e)return t;var r=Ql.f(e);return(0,r.resolve)(t),r.promise}(this,e)}});var Ag=Ro?btoa:function(e){return Buffer.from(e).toString("base64")},Bg=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}},Ng=function(){return r.nanoid(128)},_g=function(){var e=Zn(Pi.mark((function e(t){var r,n,i,a,o,s,c;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=function(e){return e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")},n="",!Ro||!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,Tg(new Uint8Array(o)))),n=r(s),e.next=16;break;case 12:return e.next=14,import("crypto");case 14:c=e.sent,n=r(c.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 Lg(e,t,r){return Dg.apply(this,arguments)}function Dg(){return(Dg=Zn(Pi.mark((function e(t,r,n){var i,a,o,s,c,d;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,_g(r);case 2:return a=e.sent,(o=new fu(t.clientConfig)).clientConfig.fetchOptions=Ug(Ug({},t.clientConfig.fetchOptions),{},{redirect:Ro?"follow":"manual"}),s={parameters:Ug(Ug({client_id:t.clientConfig.parameters.clientId,code_challenge:a},n.hint&&{hint:n.hint}),{},{organizationId:t.clientConfig.parameters.organizationId,redirect_uri:n.redirectURI,response_type:"code"},n.usid&&{usid:n.usid})},e.next=8,o.authorizeCustomer(s,!0);case 8:if(c=e.sent,d=(null===(i=c.headers)||void 0===i?void 0:i.get("location"))||c.url){e.next=12;break}throw new Error("Authorization failed");case 12:return e.abrupt("return",Ug({url:d},Bg(d)));case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Fg(){return(Fg=Zn(Pi.mark((function e(t,r){var n,i,a;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Ng(),e.next=3,Lg(t,n,Ug({redirectURI:r.redirectURI,hint:"guest"},r.usid&&{usid:r.usid}));case 3:return i=e.sent,a={client_id:t.clientConfig.parameters.clientId,code:i.code,code_verifier:n,grant_type:"authorization_code_pkce",redirect_uri:r.redirectURI,usid:i.usid},e.abrupt("return",t.getAccessToken({body:a}));case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Jg(){return(Jg=Zn(Pi.mark((function e(t,r,n){var i,a,o,s,c,d,u,f,h,p;return Pi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=Ng(),e.next=3,_g(a);case 3:return o=e.sent,(s=new fu(t.clientConfig)).clientConfig.fetchOptions=Ug(Ug({},t.clientConfig.fetchOptions),{},{redirect:Ro?"follow":"manual"}),c="Basic ".concat(Ag("".concat(r.username,":").concat(r.password))),d={headers:{Authorization:c},parameters:{organizationId:t.clientConfig.parameters.organizationId},body:Ug({redirect_uri:n.redirectURI,client_id:t.clientConfig.parameters.clientId,code_challenge:o,channel_id:t.clientConfig.parameters.siteId},n.usid&&{usid:n.usid})},e.next=10,s.authenticateCustomer(d,!0);case 10:if(303===(u=e.sent).status){e.next=13;break}throw new us(u);case 13:return f=(null===(i=u.headers)||void 0===i?void 0:i.get("location"))||u.url,h=Bg(f),p={client_id:t.clientConfig.parameters.clientId,code:h.code,code_verifier:a,grant_type:"authorization_code_pkce",organizationId:t.clientConfig.parameters.organizationId,redirect_uri:n.redirectURI,usid:h.usid},e.abrupt("return",t.getAccessToken({body:p}));case 17:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Gg=Object.freeze({__proto__:null,isBrowser:Ro,isNode:jo,stringToBase64:Ag,getCodeAndUsidFromUrl:Bg,createCodeVerifier:Ng,generateCodeChallenge:_g,authorize:Lg,loginGuestUser:function(e,t){return Fg.apply(this,arguments)},loginRegisteredUserB2C:function(e,t,r){return Jg.apply(this,arguments)},refreshAccessToken:function(e,t){var r={grant_type:"refresh_token",refresh_token:t.refreshToken,client_id:e.clientConfig.parameters.clientId};return e.getAccessToken({body:r})},logout:function(e,t){return e.logoutCustomer({parameters:{refresh_token:t.refreshToken,client_id:e.clientConfig.parameters.clientId,channel_id:e.clientConfig.parameters.siteId}})}});e.ClientConfig=Po,e.ShopperBaskets=Kd,e.ShopperContexts=Zd,e.ShopperCustomers=ru,e.ShopperDiscoverySearch=au,e.ShopperGiftCertificates=cu,e.ShopperLogin=fu,e.ShopperOrders=lu,e.ShopperProducts=vu,e.ShopperPromotions=xu,e.ShopperSearch=Bu,e.TemplateURL=Vd,e.helpers=Gg,Object.defineProperty(e,"__esModule",{value:!0})}));