commerce-sdk-isomorphic 1.10.4 → 1.11.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/CHANGELOG.md +8 -0
- package/README.md +31 -12
- package/lib/index.cjs.d.ts +1078 -36
- package/lib/index.cjs.js +1 -1
- package/lib/index.esm.d.ts +1078 -36
- package/lib/index.esm.js +1 -1
- package/package.json +1 -1
package/lib/index.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("nanoid")):"function"==typeof define&&define.amd?define(["exports","nanoid"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).CommerceSdk={},e.nanoid)}(this,(function(e,t){"use strict";var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e,t,r){return e(r={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&r.path)}},r.exports),r.exports}var i,a,o=function(e){return e&&e.Math==Math&&e},s=o("object"==typeof globalThis&&globalThis)||o("object"==typeof window&&window)||o("object"==typeof self&&self)||o("object"==typeof r&&r)||function(){return this}()||Function("return this")(),c=function(e){try{return!!e()}catch(e){return!0}},d=!c((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),u=!c((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),f=Function.prototype.call,h=u?f.bind(f):function(){return f.apply(f,arguments)},p={}.propertyIsEnumerable,l=Object.getOwnPropertyDescriptor,g={f:l&&!p.call({1:2},1)?function(e){var t=l(this,e);return!!t&&t.enumerable}:p},b=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},v=Function.prototype,I=v.bind,k=v.call,x=u&&I.bind(k,k),m=u?function(e){return e&&x(e)}:function(e){return e&&function(){return k.apply(e,arguments)}},w=m({}.toString),y=m("".slice),C=function(e){return y(w(e),8,-1)},z=Object,O=m("".split),E=c((function(){return!z("z").propertyIsEnumerable(0)}))?function(e){return"String"==C(e)?O(e,""):z(e)}:z,q=TypeError,P=function(e){if(null==e)throw q("Can't call method on "+e);return e},S=function(e){return E(P(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},R=function(e,t){return arguments.length<2?M(s[e]):s[e]&&s[e][t]},A=m({}.isPrototypeOf),U=R("navigator","userAgent")||"",B=s.process,N=s.Deno,_=B&&B.versions||N&&N.version,L=_&&_.v8;L&&(a=(i=L.split("."))[0]>0&&i[0]<4?1:+(i[0]+i[1])),!a&&U&&(!(i=U.match(/Edge\/(\d+)/))||i[1]>=74)&&(i=U.match(/Chrome\/(\d+)/))&&(a=+i[1]);var D=a,J=!!Object.getOwnPropertySymbols&&!c((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&D&&D<41})),F=J&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,G=Object,H=F?function(e){return"symbol"==typeof e}:function(e){var t=R("Symbol");return j(t)&&A(t.prototype,G(e))},V=String,W=function(e){try{return V(e)}catch(e){return"Object"}},$=TypeError,Y=function(e){if(j(e))return e;throw $(W(e)+" is not a function")},K=function(e,t){var r=e[t];return null==r?void 0:Y(r)},Q=TypeError,X=Object.defineProperty,Z=function(e,t){try{X(s,e,{value:t,configurable:!0,writable:!0})}catch(r){s[e]=t}return t},ee=s["__core-js_shared__"]||Z("__core-js_shared__",{}),te=n((function(e){(e.exports=function(e,t){return ee[e]||(ee[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"})})),re=Object,ne=function(e){return re(P(e))},ie=m({}.hasOwnProperty),ae=Object.hasOwn||function(e,t){return ie(ne(e),t)},oe=0,se=Math.random(),ce=m(1..toString),de=function(e){return"Symbol("+(void 0===e?"":e)+")_"+ce(++oe+se,36)},ue=te("wks"),fe=s.Symbol,he=fe&&fe.for,pe=F?fe:fe&&fe.withoutSetter||de,le=function(e){if(!ae(ue,e)||!J&&"string"!=typeof ue[e]){var t="Symbol."+e;J&&ae(fe,e)?ue[e]=fe[e]:ue[e]=F&&he?he(t):pe(t)}return ue[e]},ge=TypeError,be=le("toPrimitive"),ve=function(e,t){if(!T(e)||H(e))return e;var r,n=K(e,be);if(n){if(void 0===t&&(t="default"),r=h(n,e,t),!T(r)||H(r))return r;throw ge("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=h(r,e)))return n;if(j(r=e.valueOf)&&!T(n=h(r,e)))return n;if("string"!==t&&j(r=e.toString)&&!T(n=h(r,e)))return n;throw Q("Can't convert object to primitive value")}(e,t)},Ie=function(e){var t=ve(e,"string");return H(t)?t:t+""},ke=s.document,xe=T(ke)&&T(ke.createElement),me=function(e){return xe?ke.createElement(e):{}},we=!d&&!c((function(){return 7!=Object.defineProperty(me("div"),"a",{get:function(){return 7}}).a})),ye=Object.getOwnPropertyDescriptor,Ce={f:d?ye:function(e,t){if(e=S(e),t=Ie(t),we)try{return ye(e,t)}catch(e){}if(ae(e,t))return b(!h(g.f,e,t),e[t])}},ze=d&&c((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Oe=String,Ee=TypeError,qe=function(e){if(T(e))return e;throw Ee(Oe(e)+" is not an object")},Pe=TypeError,Se=Object.defineProperty,je=Object.getOwnPropertyDescriptor,Te={f:d?ze?function(e,t,r){if(qe(e),t=Ie(t),qe(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 Se(e,t,r)}:Se:function(e,t,r){if(qe(e),t=Ie(t),qe(r),we)try{return Se(e,t,r)}catch(e){}if("get"in r||"set"in r)throw Pe("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},Me=d?function(e,t,r){return Te.f(e,t,b(1,r))}:function(e,t,r){return e[t]=r,e},Re=Function.prototype,Ae=d&&Object.getOwnPropertyDescriptor,Ue=ae(Re,"name"),Be={EXISTS:Ue,PROPER:Ue&&"something"===function(){}.name,CONFIGURABLE:Ue&&(!d||d&&Ae(Re,"name").configurable)},Ne=m(Function.toString);j(ee.inspectSource)||(ee.inspectSource=function(e){return Ne(e)});var _e,Le,De,Je=ee.inspectSource,Fe=s.WeakMap,Ge=j(Fe)&&/native code/.test(Je(Fe)),He=te("keys"),Ve=function(e){return He[e]||(He[e]=de(e))},We={},$e=s.TypeError,Ye=s.WeakMap;if(Ge||ee.state){var Ke=ee.state||(ee.state=new Ye),Qe=m(Ke.get),Xe=m(Ke.has),Ze=m(Ke.set);_e=function(e,t){if(Xe(Ke,e))throw new $e("Object already initialized");return t.facade=e,Ze(Ke,e,t),t},Le=function(e){return Qe(Ke,e)||{}},De=function(e){return Xe(Ke,e)}}else{var et=Ve("state");We[et]=!0,_e=function(e,t){if(ae(e,et))throw new $e("Object already initialized");return t.facade=e,Me(e,et,t),t},Le=function(e){return ae(e,et)?e[et]:{}},De=function(e){return ae(e,et)}}var tt={set:_e,get:Le,has:De,enforce:function(e){return De(e)?Le(e):_e(e,{})},getterFor:function(e){return function(t){var r;if(!T(t)||(r=Le(t)).type!==e)throw $e("Incompatible receiver, "+e+" required");return r}}},rt=n((function(e){var t=Be.CONFIGURABLE,r=tt.enforce,n=tt.get,i=Object.defineProperty,a=d&&!c((function(){return 8!==i((function(){}),"length",{value:8}).length})),o=String(String).split("String"),s=e.exports=function(e,n,s){"Symbol("===String(n).slice(0,7)&&(n="["+String(n).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),s&&s.getter&&(n="get "+n),s&&s.setter&&(n="set "+n),(!ae(e,"name")||t&&e.name!==n)&&(d?i(e,"name",{value:n,configurable:!0}):e.name=n),a&&s&&ae(s,"arity")&&e.length!==s.arity&&i(e,"length",{value:s.arity});try{s&&ae(s,"constructor")&&s.constructor?d&&i(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var c=r(e);return ae(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")})),nt=function(e,t,r,n){n||(n={});var i=n.enumerable,a=void 0!==n.name?n.name:t;if(j(r)&&rt(r,a,n),n.global)i?e[t]=r:Z(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},it=Math.ceil,at=Math.floor,ot=Math.trunc||function(e){var t=+e;return(t>0?at:it)(t)},st=function(e){var t=+e;return t!=t||0===t?0:ot(t)},ct=Math.max,dt=Math.min,ut=function(e,t){var r=st(e);return r<0?ct(r+t,0):dt(r,t)},ft=Math.min,ht=function(e){return e>0?ft(st(e),9007199254740991):0},pt=function(e){return ht(e.length)},lt=function(e){return function(t,r,n){var i,a=S(t),o=pt(a),s=ut(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}},gt={includes:lt(!0),indexOf:lt(!1)},bt=gt.indexOf,vt=m([].push),It=function(e,t){var r,n=S(e),i=0,a=[];for(r in n)!ae(We,r)&&ae(n,r)&&vt(a,r);for(;t.length>i;)ae(n,r=t[i++])&&(~bt(a,r)||vt(a,r));return a},kt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],xt=kt.concat("length","prototype"),mt={f:Object.getOwnPropertyNames||function(e){return It(e,xt)}},wt={f:Object.getOwnPropertySymbols},yt=m([].concat),Ct=R("Reflect","ownKeys")||function(e){var t=mt.f(qe(e)),r=wt.f;return r?yt(t,r(e)):t},zt=function(e,t,r){for(var n=Ct(t),i=Te.f,a=Ce.f,o=0;o<n.length;o++){var s=n[o];ae(e,s)||r&&ae(r,s)||i(e,s,a(t,s))}},Ot=/#|\.prototype\./,Et=function(e,t){var r=Pt[qt(e)];return r==jt||r!=St&&(j(t)?c(t):!!t)},qt=Et.normalize=function(e){return String(e).replace(Ot,".").toLowerCase()},Pt=Et.data={},St=Et.NATIVE="N",jt=Et.POLYFILL="P",Tt=Et,Mt=Ce.f,Rt=function(e,t){var r,n,i,a,o,c=e.target,d=e.global,u=e.stat;if(r=d?s:u?s[c]||Z(c,{}):(s[c]||{}).prototype)for(n in t){if(a=t[n],i=e.dontCallGetSet?(o=Mt(r,n))&&o.value:r[n],!Tt(d?n:c+(u?".":"#")+n,e.forced)&&void 0!==i){if(typeof a==typeof i)continue;zt(a,i)}(e.sham||i&&i.sham)&&Me(a,"sham",!0),nt(r,n,a,e)}},At=Object.keys||function(e){return It(e,kt)},Ut=c((function(){At(1)}));Rt({target:"Object",stat:!0,forced:Ut},{keys:function(e){return At(ne(e))}});var Bt={};Bt[le("toStringTag")]="z";var Nt,_t="[object z]"===String(Bt),Lt=le("toStringTag"),Dt=Object,Jt="Arguments"==C(function(){return arguments}()),Ft=_t?C:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=Dt(e),Lt))?r:Jt?C(t):"Object"==(n=C(t))&&j(t.callee)?"Arguments":n},Gt=String,Ht=function(e){if("Symbol"===Ft(e))throw TypeError("Cannot convert a Symbol value to a string");return Gt(e)},Vt={f:d&&!ze?Object.defineProperties:function(e,t){qe(e);for(var r,n=S(t),i=At(t),a=i.length,o=0;a>o;)Te.f(e,r=i[o++],n[r]);return e}},Wt=R("document","documentElement"),$t=Ve("IE_PROTO"),Yt=function(){},Kt=function(e){return"<script>"+e+"<\/script>"},Qt=function(e){e.write(Kt("")),e.close();var t=e.parentWindow.Object;return e=null,t},Xt=function(){try{Nt=new ActiveXObject("htmlfile")}catch(e){}var e,t;Xt="undefined"!=typeof document?document.domain&&Nt?Qt(Nt):((t=me("iframe")).style.display="none",Wt.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(Kt("document.F=Object")),e.close(),e.F):Qt(Nt);for(var r=kt.length;r--;)delete Xt.prototype[kt[r]];return Xt()};We[$t]=!0;var Zt=Object.create||function(e,t){var r;return null!==e?(Yt.prototype=qe(e),r=new Yt,Yt.prototype=null,r[$t]=e):r=Xt(),void 0===t?r:Vt.f(r,t)},er=function(e,t,r){var n=Ie(t);n in e?Te.f(e,n,b(0,r)):e[n]=r},tr=Array,rr=Math.max,nr=function(e,t,r){for(var n=pt(e),i=ut(t,n),a=ut(void 0===r?n:r,n),o=tr(rr(a-i,0)),s=0;i<a;i++,s++)er(o,s,e[i]);return o.length=s,o},ir=mt.f,ar="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],or={f:function(e){return ar&&"Window"==C(e)?function(e){try{return ir(e)}catch(e){return nr(ar)}}(e):ir(S(e))}},sr={f:le},cr=s,dr=Te.f,ur=Te.f,fr=le("toStringTag"),hr=function(e,t,r){e&&!r&&(e=e.prototype),e&&!ae(e,fr)&&ur(e,fr,{configurable:!0,value:t})},pr=m(m.bind),lr=function(e,t){return Y(e),void 0===t?e:u?pr(e,t):function(){return e.apply(t,arguments)}},gr=Array.isArray||function(e){return"Array"==C(e)},br=function(){},vr=[],Ir=R("Reflect","construct"),kr=/^\s*(?:class|function)\b/,xr=m(kr.exec),mr=!kr.exec(br),wr=function(e){if(!j(e))return!1;try{return Ir(br,vr,e),!0}catch(e){return!1}},yr=function(e){if(!j(e))return!1;switch(Ft(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return mr||!!xr(kr,Je(e))}catch(e){return!0}};yr.sham=!0;var Cr=!Ir||c((function(){var e;return wr(wr.call)||!wr(Object)||!wr((function(){e=!0}))||e}))?yr:wr,zr=le("species"),Or=Array,Er=function(e,t){return new(function(e){var t;return gr(e)&&(t=e.constructor,(Cr(t)&&(t===Or||gr(t.prototype))||T(t)&&null===(t=t[zr]))&&(t=void 0)),void 0===t?Or:t}(e))(0===t?0:t)},qr=m([].push),Pr=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=ne(c),g=E(l),b=lr(d,u),v=pt(g),I=0,k=f||Er,x=t?k(c,v):r||o?k(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:qr(x,h)}else switch(e){case 4:return!1;case 7:qr(x,h)}return a?-1:n||i?i:x}},Sr={forEach:Pr(0),map:Pr(1),filter:Pr(2),some:Pr(3),every:Pr(4),find:Pr(5),findIndex:Pr(6),filterReject:Pr(7)},jr=Sr.forEach,Tr=Ve("hidden"),Mr=tt.set,Rr=tt.getterFor("Symbol"),Ar=Object.prototype,Ur=s.Symbol,Br=Ur&&Ur.prototype,Nr=s.TypeError,_r=s.QObject,Lr=Ce.f,Dr=Te.f,Jr=or.f,Fr=g.f,Gr=m([].push),Hr=te("symbols"),Vr=te("op-symbols"),Wr=te("wks"),$r=!_r||!_r.prototype||!_r.prototype.findChild,Yr=d&&c((function(){return 7!=Zt(Dr({},"a",{get:function(){return Dr(this,"a",{value:7}).a}})).a}))?function(e,t,r){var n=Lr(Ar,t);n&&delete Ar[t],Dr(e,t,r),n&&e!==Ar&&Dr(Ar,t,n)}:Dr,Kr=function(e,t){var r=Hr[e]=Zt(Br);return Mr(r,{type:"Symbol",tag:e,description:t}),d||(r.description=t),r},Qr=function(e,t,r){e===Ar&&Qr(Vr,t,r),qe(e);var n=Ie(t);return qe(r),ae(Hr,n)?(r.enumerable?(ae(e,Tr)&&e[Tr][n]&&(e[Tr][n]=!1),r=Zt(r,{enumerable:b(0,!1)})):(ae(e,Tr)||Dr(e,Tr,b(1,{})),e[Tr][n]=!0),Yr(e,n,r)):Dr(e,n,r)},Xr=function(e,t){qe(e);var r=S(t),n=At(r).concat(rn(r));return jr(n,(function(t){d&&!h(Zr,r,t)||Qr(e,t,r[t])})),e},Zr=function(e){var t=Ie(e),r=h(Fr,this,t);return!(this===Ar&&ae(Hr,t)&&!ae(Vr,t))&&(!(r||!ae(this,t)||!ae(Hr,t)||ae(this,Tr)&&this[Tr][t])||r)},en=function(e,t){var r=S(e),n=Ie(t);if(r!==Ar||!ae(Hr,n)||ae(Vr,n)){var i=Lr(r,n);return!i||!ae(Hr,n)||ae(r,Tr)&&r[Tr][n]||(i.enumerable=!0),i}},tn=function(e){var t=Jr(S(e)),r=[];return jr(t,(function(e){ae(Hr,e)||ae(We,e)||Gr(r,e)})),r},rn=function(e){var t=e===Ar,r=Jr(t?Vr:S(e)),n=[];return jr(r,(function(e){!ae(Hr,e)||t&&!ae(Ar,e)||Gr(n,Hr[e])})),n};J||(Br=(Ur=function(){if(A(Br,this))throw Nr("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?Ht(arguments[0]):void 0,t=de(e),r=function(e){this===Ar&&h(r,Vr,e),ae(this,Tr)&&ae(this[Tr],t)&&(this[Tr][t]=!1),Yr(this,t,b(1,e))};return d&&$r&&Yr(Ar,t,{configurable:!0,set:r}),Kr(t,e)}).prototype,nt(Br,"toString",(function(){return Rr(this).tag})),nt(Ur,"withoutSetter",(function(e){return Kr(de(e),e)})),g.f=Zr,Te.f=Qr,Vt.f=Xr,Ce.f=en,mt.f=or.f=tn,wt.f=rn,sr.f=function(e){return Kr(le(e),e)},d&&(Dr(Br,"description",{configurable:!0,get:function(){return Rr(this).description}}),nt(Ar,"propertyIsEnumerable",Zr,{unsafe:!0}))),Rt({global:!0,constructor:!0,wrap:!0,forced:!J,sham:!J},{Symbol:Ur}),jr(At(Wr),(function(e){!function(e){var t=cr.Symbol||(cr.Symbol={});ae(t,e)||dr(t,e,{value:sr.f(e)})}(e)})),Rt({target:"Symbol",stat:!0,forced:!J},{useSetter:function(){$r=!0},useSimple:function(){$r=!1}}),Rt({target:"Object",stat:!0,forced:!J,sham:!d},{create:function(e,t){return void 0===t?Zt(e):Xr(Zt(e),t)},defineProperty:Qr,defineProperties:Xr,getOwnPropertyDescriptor:en}),Rt({target:"Object",stat:!0,forced:!J},{getOwnPropertyNames:tn}),function(){var e=R("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,n=le("toPrimitive");t&&!t[n]&&nt(t,n,(function(e){return h(r,this)}),{arity:1})}(),hr(Ur,"Symbol"),We[Tr]=!0;var nn=J&&!!Symbol.for&&!!Symbol.keyFor,an=te("string-to-symbol-registry"),on=te("symbol-to-string-registry");Rt({target:"Symbol",stat:!0,forced:!nn},{for:function(e){var t=Ht(e);if(ae(an,t))return an[t];var r=R("Symbol")(t);return an[t]=r,on[r]=t,r}});var sn=te("symbol-to-string-registry");Rt({target:"Symbol",stat:!0,forced:!nn},{keyFor:function(e){if(!H(e))throw TypeError(W(e)+" is not a symbol");if(ae(sn,e))return sn[e]}});var cn=Function.prototype,dn=cn.apply,un=cn.call,fn="object"==typeof Reflect&&Reflect.apply||(u?un.bind(dn):function(){return un.apply(dn,arguments)}),hn=m([].slice),pn=R("JSON","stringify"),ln=m(/./.exec),gn=m("".charAt),bn=m("".charCodeAt),vn=m("".replace),In=m(1..toString),kn=/[\uD800-\uDFFF]/g,xn=/^[\uD800-\uDBFF]$/,mn=/^[\uDC00-\uDFFF]$/,wn=!J||c((function(){var e=R("Symbol")();return"[null]"!=pn([e])||"{}"!=pn({a:e})||"{}"!=pn(Object(e))})),yn=c((function(){return'"\\udf06\\ud834"'!==pn("\udf06\ud834")||'"\\udead"'!==pn("\udead")})),Cn=function(e,t){var r=hn(arguments),n=t;if((T(t)||void 0!==e)&&!H(e))return gr(t)||(t=function(e,t){if(j(n)&&(t=h(n,this,e,t)),!H(t))return t}),r[1]=t,fn(pn,null,r)},zn=function(e,t,r){var n=gn(r,t-1),i=gn(r,t+1);return ln(xn,e)&&!ln(mn,i)||ln(mn,e)&&!ln(xn,n)?"\\u"+In(bn(e,0),16):e};pn&&Rt({target:"JSON",stat:!0,arity:3,forced:wn||yn},{stringify:function(e,t,r){var n=hn(arguments),i=fn(wn?Cn:pn,null,n);return yn&&"string"==typeof i?vn(i,kn,zn):i}});var On=!J||c((function(){wt.f(1)}));Rt({target:"Object",stat:!0,forced:On},{getOwnPropertySymbols:function(e){var t=wt.f;return t?t(ne(e)):[]}});var En=le("species"),qn=function(e){return D>=51||!c((function(){var t=[];return(t.constructor={})[En]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Pn=Sr.filter,Sn=qn("filter");Rt({target:"Array",proto:!0,forced:!Sn},{filter:function(e){return Pn(this,e,arguments.length>1?arguments[1]:void 0)}});var jn=_t?{}.toString:function(){return"[object "+Ft(this)+"]"};_t||nt(Object.prototype,"toString",jn,{unsafe:!0});var Tn=Ce.f,Mn=c((function(){Tn(1)}));Rt({target:"Object",stat:!0,forced:!d||Mn,sham:!d},{getOwnPropertyDescriptor:function(e,t){return Tn(S(e),t)}});var Rn={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=me("span").classList,Un=An&&An.constructor&&An.constructor.prototype,Bn=Un===Object.prototype?void 0:Un,Nn=function(e,t){var r=[][e];return!!r&&c((function(){r.call(null,t||function(){return 1},1)}))},_n=Sr.forEach,Ln=Nn("forEach")?[].forEach:function(e){return _n(this,e,arguments.length>1?arguments[1]:void 0)},Dn=function(e){if(e&&e.forEach!==Ln)try{Me(e,"forEach",Ln)}catch(t){e.forEach=Ln}};for(var Jn in Rn)Rn[Jn]&&Dn(s[Jn]&&s[Jn].prototype);Dn(Bn),Rt({target:"Object",stat:!0,sham:!d},{getOwnPropertyDescriptors:function(e){for(var t,r,n=S(e),i=Ce.f,a=Ct(n),o={},s=0;a.length>s;)void 0!==(r=i(n,t=a[s++]))&&er(o,t,r);return o}});var Fn=Vt.f;Rt({target:"Object",stat:!0,forced:Object.defineProperties!==Fn,sham:!d},{defineProperties:Fn});var Gn=Te.f;Rt({target:"Object",stat:!0,forced:Object.defineProperty!==Gn,sham:!d},{defineProperty:Gn});var Hn=function(){var e=qe(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},Vn=RegExp.prototype,Wn=Be.PROPER,$n=RegExp.prototype.toString,Yn=c((function(){return"/a/b"!=$n.call({source:"a",flags:"b"})})),Kn=Wn&&"toString"!=$n.name;function Qn(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 Xn(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function o(e){Qn(a,n,i,o,s,"next",e)}function s(e){Qn(a,n,i,o,s,"throw",e)}o(void 0)}))}}function Zn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ei(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 ti(e,t,r){return t&&ei(e.prototype,t),r&&ei(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function ri(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}(Yn||Kn)&&nt(RegExp.prototype,"toString",(function(){var e=qe(this);return"/"+Ht(e.source)+"/"+Ht(function(e){var t=e.flags;return void 0!==t||"flags"in Vn||ae(e,"flags")||!A(Vn,e)?t:h(Hn,e)}(e))}),{unsafe:!0});var ni=Object.prototype,ii=ni.hasOwnProperty,ai="function"==typeof Symbol?Symbol:{},oi=ai.iterator||"@@iterator",si=ai.asyncIterator||"@@asyncIterator",ci=ai.toStringTag||"@@toStringTag";function di(e,t,r,n){var i=t&&t.prototype instanceof hi?t:hi,a=Object.create(i.prototype),o=new zi(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=wi(o,r);if(s){if(s===fi)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=ui(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===fi)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 ui(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}var fi={};function hi(){}function pi(){}function li(){}var gi={};gi[oi]=function(){return this};var bi=Object.getPrototypeOf,vi=bi&&bi(bi(Oi([])));vi&&vi!==ni&&ii.call(vi,oi)&&(gi=vi);var Ii=li.prototype=hi.prototype=Object.create(gi);function ki(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function xi(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===pi||"GeneratorFunction"===(t.displayName||t.name))}function mi(e,t){var r;this._invoke=function(n,i){function a(){return new t((function(r,a){!function r(n,i,a,o){var s=ui(e[n],e,i);if("throw"!==s.type){var c=s.arg,d=c.value;return d&&"object"==typeof d&&ii.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 wi(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,wi(e,t),"throw"===t.method))return fi;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return fi}var n=ui(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,fi;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,fi):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,fi)}function yi(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 Ci(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function zi(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(yi,this),this.reset(!0)}function Oi(e){if(e){var t=e[oi];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function t(){for(;++r<e.length;)if(ii.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return n.next=n}}return{next:Ei}}function Ei(){return{value:void 0,done:!0}}pi.prototype=Ii.constructor=li,li.constructor=pi,li[ci]=pi.displayName="GeneratorFunction",ki(mi.prototype),mi.prototype[si]=function(){return this},ki(Ii),Ii[ci]="Generator",Ii[oi]=function(){return this},Ii.toString=function(){return"[object Generator]"},zi.prototype={constructor:zi,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(Ci),!e)for(var t in this)"t"===t.charAt(0)&&ii.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var o=ii.call(i,"catchLoc"),s=ii.call(i,"finallyLoc");if(o&&s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&ii.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,fi):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),fi},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),Ci(r),fi}},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;Ci(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:Oi(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),fi}};var qi={wrap:di,isGeneratorFunction:xi,AsyncIterator:mi,mark:function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,li):(e.__proto__=li,ci in e||(e[ci]="GeneratorFunction")),e.prototype=Object.create(Ii),e},awrap:function(e){return{__await:e}},async:function(e,t,r,n,i){void 0===i&&(i=Promise);var a=new mi(di(e,t,r,n),i);return xi(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:Oi},Pi=Te.f,Si=le("unscopables"),ji=Array.prototype;null==ji[Si]&&Pi(ji,Si,{configurable:!0,value:Zt(null)});var Ti,Mi,Ri,Ai=function(e){ji[Si][e]=!0},Ui={},Bi=!c((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Ni=Ve("IE_PROTO"),_i=Object,Li=_i.prototype,Di=Bi?_i.getPrototypeOf:function(e){var t=ne(e);if(ae(t,Ni))return t[Ni];var r=t.constructor;return j(r)&&t instanceof r?r.prototype:t instanceof _i?Li:null},Ji=le("iterator"),Fi=!1;[].keys&&("next"in(Ri=[].keys())?(Mi=Di(Di(Ri)))!==Object.prototype&&(Ti=Mi):Fi=!0),(null==Ti||c((function(){var e={};return Ti[Ji].call(e)!==e})))&&(Ti={}),j(Ti[Ji])||nt(Ti,Ji,(function(){return this}));var Gi={IteratorPrototype:Ti,BUGGY_SAFARI_ITERATORS:Fi},Hi=Gi.IteratorPrototype,Vi=function(){return this},Wi=function(e,t,r,n){var i=t+" Iterator";return e.prototype=Zt(Hi,{next:b(+!n,r)}),hr(e,i,!1),Ui[i]=Vi,e},$i=String,Yi=TypeError,Ki=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=m(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),t=r instanceof Array}catch(e){}return function(r,n){return qe(r),function(e){if("object"==typeof e||j(e))return e;throw Yi("Can't set "+$i(e)+" as a prototype")}(n),t?e(r,n):r.__proto__=n,r}}():void 0),Qi=Be.PROPER,Xi=Be.CONFIGURABLE,Zi=Gi.IteratorPrototype,ea=Gi.BUGGY_SAFARI_ITERATORS,ta=le("iterator"),ra=function(){return this},na=function(e,t,r,n,i,a,o){Wi(r,t,n);var s,c,d,u=function(e){if(e===i&&b)return b;if(!ea&&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",p=!1,l=e.prototype,g=l[ta]||l["@@iterator"]||i&&l[i],b=!ea&&g||u(i),v="Array"==t&&l.entries||g;if(v&&(s=Di(v.call(new e)))!==Object.prototype&&s.next&&(Di(s)!==Zi&&(Ki?Ki(s,Zi):j(s[ta])||nt(s,ta,ra)),hr(s,f,!0)),Qi&&"values"==i&&g&&"values"!==g.name&&(Xi?Me(l,"name","values"):(p=!0,b=function(){return h(g,this)})),i)if(c={values:u("values"),keys:a?b:u("keys"),entries:u("entries")},o)for(d in c)(ea||p||!(d in l))&&nt(l,d,c[d]);else Rt({target:t,proto:!0,forced:ea||p},c);return l[ta]!==b&&nt(l,ta,b,{name:i}),Ui[t]=b,c},ia=Te.f,aa=tt.set,oa=tt.getterFor("Array Iterator"),sa=na(Array,"Array",(function(e,t){aa(this,{type:"Array Iterator",target:S(e),index:0,kind:t})}),(function(){var e=oa(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"),ca=Ui.Arguments=Ui.Array;if(Ai("keys"),Ai("values"),Ai("entries"),d&&"values"!==ca.name)try{ia(ca,"name",{value:"values"})}catch(e){}var da=m("".charAt),ua=m("".charCodeAt),fa=m("".slice),ha=function(e){return function(t,r){var n,i,a=Ht(P(t)),o=st(r),s=a.length;return o<0||o>=s?e?"":void 0:(n=ua(a,o))<55296||n>56319||o+1===s||(i=ua(a,o+1))<56320||i>57343?e?da(a,o):n:e?fa(a,o,o+2):i-56320+(n-55296<<10)+65536}},pa={codeAt:ha(!1),charAt:ha(!0)},la=pa.charAt,ga=tt.set,ba=tt.getterFor("String Iterator");na(String,"String",(function(e){ga(this,{type:"String Iterator",string:Ht(e),index:0})}),(function(){var e,t=ba(this),r=t.string,n=t.index;return n>=r.length?{value:void 0,done:!0}:(e=la(r,n),t.index+=e.length,{value:e,done:!1})}));var va=le("iterator"),Ia=le("toStringTag"),ka=sa.values,xa=function(e,t){if(e){if(e[va]!==ka)try{Me(e,va,ka)}catch(t){e[va]=ka}if(e[Ia]||Me(e,Ia,t),Rn[t])for(var r in sa)if(e[r]!==sa[r])try{Me(e,r,sa[r])}catch(t){e[r]=sa[r]}}};for(var ma in Rn)xa(s[ma]&&s[ma].prototype,ma);xa(Bn,"DOMTokenList");var wa=le("iterator"),ya=!c((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,r="";return e.pathname="c%20d",t.forEach((function(e,n){t.delete("b"),r+=n+e})),!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[wa]||"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})),Ca=function(e,t,r){for(var n in t)nt(e,n,t[n],r);return e},za=TypeError,Oa=function(e,t){if(A(t,e))return e;throw za("Incorrect invocation")},Ea=le("iterator"),qa=function(e){if(null!=e)return K(e,Ea)||K(e,"@@iterator")||Ui[Ft(e)]},Pa=TypeError,Sa=function(e,t){var r=arguments.length<2?qa(e):t;if(Y(r))return qe(h(r,e));throw Pa(W(e)+" is not iterable")},ja=TypeError,Ta=function(e,t){if(e<t)throw ja("Not enough arguments");return e},Ma=Math.floor,Ra=function(e,t){var r=e.length,n=Ma(r/2);return r<8?Aa(e,t):Ua(e,Ra(nr(e,0,n),t),Ra(nr(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},Ua=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},Ba=Ra,Na=le("iterator"),_a=tt.set,La=tt.getterFor("URLSearchParams"),Da=tt.getterFor("URLSearchParamsIterator"),Ja=Object.getOwnPropertyDescriptor,Fa=function(e){if(!d)return s[e];var t=Ja(s,e);return t&&t.value},Ga=Fa("fetch"),Ha=Fa("Request"),Va=Fa("Headers"),Wa=Ha&&Ha.prototype,$a=Va&&Va.prototype,Ya=s.RegExp,Ka=s.TypeError,Qa=s.decodeURIComponent,Xa=s.encodeURIComponent,Za=m("".charAt),eo=m([].join),to=m([].push),ro=m("".replace),no=m([].shift),io=m([].splice),ao=m("".split),oo=m("".slice),so=/\+/g,co=Array(4),uo=function(e){return co[e-1]||(co[e-1]=Ya("((?:%[\\da-f]{2}){"+e+"})","gi"))},fo=function(e){try{return Qa(e)}catch(t){return e}},ho=function(e){var t=ro(e,so," "),r=4;try{return Qa(t)}catch(e){for(;r;)t=ro(t,uo(r--),fo);return t}},po=/[!'()~]|%20/g,lo={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},go=function(e){return lo[e]},bo=function(e){return ro(Xa(e),po,go)},vo=Wi((function(e,t){_a(this,{type:"URLSearchParamsIterator",iterator:Sa(La(e).entries),kind:t})}),"Iterator",(function(){var e=Da(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),Io=function(e){this.entries=[],this.url=null,void 0!==e&&(T(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===Za(e,0)?oo(e,1):e:Ht(e)))};Io.prototype={type:"URLSearchParams",bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,r,n,i,a,o,s,c=qa(e);if(c)for(r=(t=Sa(e,c)).next;!(n=h(r,t)).done;){if(a=(i=Sa(qe(n.value))).next,(o=h(a,i)).done||(s=h(a,i)).done||!h(a,i).done)throw Ka("Expected sequence with length 2");to(this.entries,{key:Ht(o.value),value:Ht(s.value)})}else for(var d in e)ae(e,d)&&to(this.entries,{key:d,value:Ht(e[d])})},parseQuery:function(e){if(e)for(var t,r,n=ao(e,"&"),i=0;i<n.length;)(t=n[i++]).length&&(r=ao(t,"="),to(this.entries,{key:ho(no(r)),value:ho(eo(r,"="))}))},serialize:function(){for(var e,t=this.entries,r=[],n=0;n<t.length;)e=t[n++],to(r,bo(e.key)+"="+bo(e.value));return eo(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var ko=function(){Oa(this,xo);var e=arguments.length>0?arguments[0]:void 0;_a(this,new Io(e))},xo=ko.prototype;if(Ca(xo,{append:function(e,t){Ta(arguments.length,2);var r=La(this);to(r.entries,{key:Ht(e),value:Ht(t)}),r.updateURL()},delete:function(e){Ta(arguments.length,1);for(var t=La(this),r=t.entries,n=Ht(e),i=0;i<r.length;)r[i].key===n?io(r,i,1):i++;t.updateURL()},get:function(e){Ta(arguments.length,1);for(var t=La(this).entries,r=Ht(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=La(this).entries,r=Ht(e),n=[],i=0;i<t.length;i++)t[i].key===r&&to(n,t[i].value);return n},has:function(e){Ta(arguments.length,1);for(var t=La(this).entries,r=Ht(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=La(this),i=n.entries,a=!1,o=Ht(e),s=Ht(t),c=0;c<i.length;c++)(r=i[c]).key===o&&(a?io(i,c--,1):(a=!0,r.value=s));a||to(i,{key:o,value:s}),n.updateURL()},sort:function(){var e=La(this);Ba(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,r=La(this).entries,n=lr(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 vo(this,"keys")},values:function(){return new vo(this,"values")},entries:function(){return new vo(this,"entries")}},{enumerable:!0}),nt(xo,Na,xo.entries,{name:"entries"}),nt(xo,"toString",(function(){return La(this).serialize()}),{enumerable:!0}),hr(ko,"URLSearchParams"),Rt({global:!0,constructor:!0,forced:!ya},{URLSearchParams:ko}),!ya&&j(Va)){var mo=m($a.has),wo=m($a.set),yo=function(e){if(T(e)){var t,r=e.body;if("URLSearchParams"===Ft(r))return t=e.headers?new Va(e.headers):new Va,mo(t,"content-type")||wo(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),Zt(e,{body:b(0,Ht(r)),headers:b(0,t)})}return e};if(j(Ga)&&Rt({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return Ga(e,arguments.length>1?yo(arguments[1]):{})}}),j(Ha)){var Co=function(e){return Oa(this,Wa),new Ha(e,arguments.length>1?yo(arguments[1]):{})};Wa.constructor=Co,Co.prototype=Wa,Rt({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Co})}}var zo={URLSearchParams:ko,getState:La};function Oo(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?Oo(Object(r),!0).forEach((function(t){ri(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Oo(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var qo=ti((function e(t){if(Zn(this,e),ri(this,"baseUri",void 0),ri(this,"proxy",void 0),ri(this,"headers",void 0),ri(this,"parameters",void 0),ri(this,"fetchOptions",void 0),ri(this,"transformRequest",void 0),ri(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({credentials:"omit"},t.fetchOptions),this.transformRequest=t.transformRequest||e.defaults.transformRequest,t.baseUri&&(this.baseUri=t.baseUri),t.proxy&&(this.proxy=t.proxy),this.throwOnBadResponse=!!t.throwOnBadResponse}));function Po(e){return(Po="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)}ri(qo,"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}}}),Rt({global:!0},{globalThis:s});var So="object"===("undefined"==typeof window?"undefined":Po(window))&&"object"===Po(window.document),jo="object"===("undefined"==typeof process?"undefined":Po(process))&&"object"===Po(process.versions)&&"string"==typeof process.versions.node,To=So?window:globalThis,Mo="function"==typeof To.fetch,Ro=function(){if(jo)return require("node-fetch").default;if(!Mo)throw new Error("Bad environment: it is not a node environment but fetch is not defined");return To.fetch}(),Ao=Function,Uo=m([].concat),Bo=m([].join),No={},_o=function(e,t,r){if(!ae(No,t)){for(var n=[],i=0;i<t;i++)n[i]="a["+i+"]";No[t]=Ao("C,a","return new C("+Bo(n,",")+")")}return No[t](e,r)},Lo=u?Ao.bind:function(e){var t=Y(this),r=t.prototype,n=hn(arguments,1),i=function(){var r=Uo(n,hn(arguments));return this instanceof i?_o(t,r.length,r):t.apply(e,r)};return T(r)&&(i.prototype=r),i},Do=TypeError,Jo=function(e){if(Cr(e))return e;throw Do(W(e)+" is not a constructor")},Fo=R("Reflect","construct"),Go=Object.prototype,Ho=[].push,Vo=c((function(){function e(){}return!(Fo((function(){}),[],e)instanceof e)})),Wo=!c((function(){Fo((function(){}))})),$o=Vo||Wo;Rt({target:"Reflect",stat:!0,forced:$o,sham:$o},{construct:function(e,t){Jo(e),qe(t);var r=arguments.length<3?e:Jo(arguments[2]);if(Wo&&!Vo)return Fo(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 fn(Ho,n,t),new(fn(Lo,e,n))}var i=r.prototype,a=Zt(T(i)?i:Go),o=fn(e,a,t);return T(o)?o:a}});var Yo=TypeError,Ko=function(e){if(e>9007199254740991)throw Yo("Maximum allowed index exceeded");return e},Qo=le("isConcatSpreadable"),Xo=D>=51||!c((function(){var e=[];return e[Qo]=!1,e.concat()[0]!==e})),Zo=qn("concat"),es=function(e){if(!T(e))return!1;var t=e[Qo];return void 0!==t?!!t:gr(e)};function ts(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rs(e,t){return(rs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ns(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&&rs(e,t)}function is(e,t){if(t&&("object"===Po(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return ts(e)}function as(e){return(as=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function os(){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 ss(e,t,r){return(ss=os()?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&&rs(i,r.prototype),i}).apply(null,arguments)}function cs(e){var t="function"==typeof Map?new Map:void 0;return(cs=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 ss(e,arguments,as(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),rs(n,e)})(e)}function ds(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=as(e);if(t){var i=as(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return is(this,r)}}Rt({target:"Array",proto:!0,arity:1,forced:!Xo||!Zo},{concat:function(e){var t,r,n,i,a,o=ne(this),s=Er(o,0),c=0;for(t=-1,n=arguments.length;t<n;t++)if(es(a=-1===t?o:arguments[t]))for(i=pt(a),Ko(c+i),r=0;r<i;r++,c++)r in a&&er(s,c,a[r]);else Ko(c+1),er(s,c++,a);return s.length=c,s}});var us,fs,hs=function(e){ns(r,e);var t=ds(r);function r(e){var n;return Zn(this,r),ri(ts(n=t.call(this,"".concat(e.status," ").concat(e.statusText))),"response",void 0),n.response=e,n}return ti(r)}(cs(Error)),ps=s.RegExp,ls=c((function(){var e=ps("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),gs=ls||c((function(){return!ps("a","y").sticky})),bs={BROKEN_CARET:ls||c((function(){var e=ps("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:gs,UNSUPPORTED_Y:ls},vs=s.RegExp,Is=c((function(){var e=vs(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),ks=s.RegExp,xs=c((function(){var e=ks("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),ms=tt.get,ws=te("native-string-replace",String.prototype.replace),ys=RegExp.prototype.exec,Cs=ys,zs=m("".charAt),Os=m("".indexOf),Es=m("".replace),qs=m("".slice),Ps=(fs=/b*/g,h(ys,us=/a/,"a"),h(ys,fs,"a"),0!==us.lastIndex||0!==fs.lastIndex),Ss=bs.BROKEN_CARET,js=void 0!==/()??/.exec("")[1];(Ps||js||Ss||Is||xs)&&(Cs=function(e){var t,r,n,i,a,o,s,c=this,d=ms(c),u=Ht(e),f=d.raw;if(f)return f.lastIndex=c.lastIndex,t=h(Cs,f,u),c.lastIndex=f.lastIndex,t;var p=d.groups,l=Ss&&c.sticky,g=h(Hn,c),b=c.source,v=0,I=u;if(l&&(g=Es(g,"y",""),-1===Os(g,"g")&&(g+="g"),I=qs(u,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==zs(u,c.lastIndex-1))&&(b="(?: "+b+")",I=" "+I,v++),r=new RegExp("^(?:"+b+")",g)),js&&(r=new RegExp("^"+b+"$(?!\\s)",g)),Ps&&(n=c.lastIndex),i=h(ys,l?r:c,I),l?i?(i.input=qs(i.input,v),i[0]=qs(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),js&&i&&i.length>1&&h(ws,i[0],r,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(i[a]=void 0)})),i&&p)for(i.groups=o=Zt(null),a=0;a<p.length;a++)o[(s=p[a])[0]]=i[s[1]];return i});var Ts=Cs;Rt({target:"RegExp",proto:!0,forced:/./.exec!==Ts},{exec:Ts});var Ms=le("species"),Rs=RegExp.prototype,As=function(e,t,r,n){var i=le(e),a=!c((function(){var t={};return t[i]=function(){return 7},7!=""[e](t)})),o=a&&!c((function(){var t=!1,r=/a/;return"split"===e&&((r={}).constructor={},r.constructor[Ms]=function(){return r},r.flags="",r[i]=/./[i]),r.exec=function(){return t=!0,null},r[i](""),!t}));if(!a||!o||r){var s=m(/./[i]),d=t(i,""[e],(function(e,t,r,n,i){var o=m(e),c=t.exec;return c===Ts||c===Rs.exec?a&&!i?{done:!0,value:s(t,r,n)}:{done:!0,value:o(r,t,n)}:{done:!1}}));nt(String.prototype,e,d[0]),nt(Rs,i,d[1])}n&&Me(Rs[i],"sham",!0)},Us=pa.charAt,Bs=function(e,t,r){return t+(r?Us(e,t).length:1)},Ns=Math.floor,_s=m("".charAt),Ls=m("".replace),Ds=m("".slice),Js=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Fs=/\$([$&'`]|\d{1,2})/g,Gs=function(e,t,r,n,i,a){var o=r+e.length,s=n.length,c=Fs;return void 0!==i&&(i=ne(i),c=Js),Ls(a,c,(function(a,c){var d;switch(_s(c,0)){case"$":return"$";case"&":return e;case"`":return Ds(t,0,r);case"'":return Ds(t,o);case"<":d=i[Ds(c,1,-1)];break;default:var u=+c;if(0===u)return a;if(u>s){var f=Ns(u/10);return 0===f?a:f<=s?void 0===n[f-1]?_s(c,1):n[f-1]+_s(c,1):a}d=n[u-1]}return void 0===d?"":d}))},Hs=TypeError,Vs=function(e,t){var r=e.exec;if(j(r)){var n=h(r,e,t);return null!==n&&qe(n),n}if("RegExp"===C(e))return h(Ts,e,t);throw Hs("RegExp#exec called on incompatible receiver")},Ws=le("replace"),$s=Math.max,Ys=Math.min,Ks=m([].concat),Qs=m([].push),Xs=m("".indexOf),Zs=m("".slice),ec="$0"==="a".replace(/./,"$0"),tc=!!/./[Ws]&&""===/./[Ws]("a","$0");As("replace",(function(e,t,r){var n=tc?"$":"$0";return[function(e,r){var n=P(this),i=null==e?void 0:K(e,Ws);return i?h(i,e,n,r):h(t,Ht(n),e,r)},function(e,i){var a=qe(this),o=Ht(e);if("string"==typeof i&&-1===Xs(i,n)&&-1===Xs(i,"$<")){var s=r(t,a,o,i);if(s.done)return s.value}var c=j(i);c||(i=Ht(i));var d=a.global;if(d){var u=a.unicode;a.lastIndex=0}for(var f=[];;){var h=Vs(a,o);if(null===h)break;if(Qs(f,h),!d)break;""===Ht(h[0])&&(a.lastIndex=Bs(o,ht(a.lastIndex),u))}for(var p,l="",g=0,b=0;b<f.length;b++){for(var v=Ht((h=f[b])[0]),I=$s(Ys(st(h.index),o.length),0),k=[],x=1;x<h.length;x++)Qs(k,void 0===(p=h[x])?p:String(p));var m=h.groups;if(c){var w=Ks([v],k,I,o);void 0!==m&&Qs(w,m);var y=Ht(fn(i,void 0,w))}else y=Gs(v,o,I,k,m,i);I>=g&&(l+=Zs(o,g,I)+y,g=I+v.length)}return l+Zs(o,g)}]}),!!c((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!ec||tc);var rc,nc=function(e,t,r){return r.get&&rt(r.get,t,{getter:!0}),r.set&&rt(r.set,t,{setter:!0}),Te.f(e,t,r)},ic=Object.assign,ac=Object.defineProperty,oc=m([].concat),sc=!ic||c((function(){if(d&&1!==ic({b:1},ic(ac({},"a",{enumerable:!0,get:function(){ac(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!=ic({},e)[r]||"abcdefghijklmnopqrst"!=At(ic({},t)).join("")}))?function(e,t){for(var r=ne(e),n=arguments.length,i=1,a=wt.f,o=g.f;n>i;)for(var s,c=E(arguments[i++]),u=a?oc(At(c),a(c)):At(c),f=u.length,p=0;f>p;)s=u[p++],d&&!h(o,c,s)||(r[s]=c[s]);return r}:ic,cc=function(e,t,r){var n,i;qe(e);try{if(!(n=K(e,"return"))){if("throw"===t)throw r;return r}n=h(n,e)}catch(e){i=!0,n=e}if("throw"===t)throw r;if(i)throw n;return qe(n),r},dc=function(e,t,r,n){try{return n?t(qe(r)[0],r[1]):t(r)}catch(t){cc(e,"throw",t)}},uc=le("iterator"),fc=Array.prototype,hc=function(e){return void 0!==e&&(Ui.Array===e||fc[uc]===e)},pc=Array,lc=function(e){var t=ne(e),r=Cr(this),n=arguments.length,i=n>1?arguments[1]:void 0,a=void 0!==i;a&&(i=lr(i,n>2?arguments[2]:void 0));var o,s,c,d,u,f,p=qa(t),l=0;if(!p||this===pc&&hc(p))for(o=pt(t),s=r?new this(o):pc(o);o>l;l++)f=a?i(t[l],l):t[l],er(s,l,f);else for(u=(d=Sa(t,p)).next,s=r?new this:[];!(c=h(u,d)).done;l++)f=a?dc(d,i,[c.value,l],!0):c.value,er(s,l,f);return s.length=l,s},gc=/[^\0-\u007E]/,bc=/[.\u3002\uFF0E\uFF61]/g,vc="Overflow: input needs wider integers to process",Ic=RangeError,kc=m(bc.exec),xc=Math.floor,mc=String.fromCharCode,wc=m("".charCodeAt),yc=m([].join),Cc=m([].push),zc=m("".replace),Oc=m("".split),Ec=m("".toLowerCase),qc=function(e){return e+22+75*(e<26)},Pc=function(e,t,r){var n=0;for(e=r?xc(e/700):e>>1,e+=xc(e/t);e>455;)e=xc(e/35),n+=36;return xc(n+36*e/(e+38))},Sc=function(e){var t,r,n=[],i=(e=function(e){for(var t=[],r=0,n=e.length;r<n;){var i=wc(e,r++);if(i>=55296&&i<=56319&&r<n){var a=wc(e,r++);56320==(64512&a)?Cc(t,((1023&i)<<10)+(1023&a)+65536):(Cc(t,i),r--)}else Cc(t,i)}return t}(e)).length,a=128,o=0,s=72;for(t=0;t<e.length;t++)(r=e[t])<128&&Cc(n,mc(r));var c=n.length,d=c;for(c&&Cc(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>xc((2147483647-o)/f))throw Ic(vc);for(o+=(u-a)*f,a=u,t=0;t<e.length;t++){if((r=e[t])<a&&++o>2147483647)throw Ic(vc);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;Cc(n,mc(qc(l+g%b))),h=xc(g/b),p+=36}Cc(n,mc(qc(h))),s=Pc(o,f,d==c),o=0,d++}}o++,a++}return yc(n,"")},jc=pa.codeAt,Tc=tt.set,Mc=tt.getterFor("URL"),Rc=zo.URLSearchParams,Ac=zo.getState,Uc=s.URL,Bc=s.TypeError,Nc=s.parseInt,_c=Math.floor,Lc=Math.pow,Dc=m("".charAt),Jc=m(/./.exec),Fc=m([].join),Gc=m(1..toString),Hc=m([].pop),Vc=m([].push),Wc=m("".replace),$c=m([].shift),Yc=m("".split),Kc=m("".slice),Qc=m("".toLowerCase),Xc=m([].unshift),Zc=/[a-z]/i,ed=/[\d+-.a-z]/i,td=/\d/,rd=/^0x/i,nd=/^[0-7]+$/,id=/^\d+$/,ad=/^[\da-f]+$/i,od=/[\0\t\n\r #%/:<>?@[\\\]^|]/,sd=/[\0\t\n\r #/:<>?@[\\\]^|]/,cd=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,dd=/[\t\n\r]/g,ud=function(e){var t,r,n,i;if("number"==typeof e){for(t=[],r=0;r<4;r++)Xc(t,e%256),e=_c(e/256);return Fc(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+=Gc(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},fd={},hd=sc({},fd,{" ":1,'"':1,"<":1,">":1,"`":1}),pd=sc({},hd,{"#":1,"?":1,"{":1,"}":1}),ld=sc({},pd,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),gd=function(e,t){var r=jc(e,0);return r>32&&r<127&&!ae(t,e)?e:encodeURIComponent(e)},bd={ftp:21,file:null,http:80,https:443,ws:80,wss:443},vd=function(e,t){var r;return 2==e.length&&Jc(Zc,Dc(e,0))&&(":"==(r=Dc(e,1))||!t&&"|"==r)},Id=function(e){var t;return e.length>1&&vd(Kc(e,0,2))&&(2==e.length||"/"===(t=Dc(e,2))||"\\"===t||"?"===t||"#"===t)},kd=function(e){return"."===e||"%2e"===Qc(e)},xd={},md={},wd={},yd={},Cd={},zd={},Od={},Ed={},qd={},Pd={},Sd={},jd={},Td={},Md={},Rd={},Ad={},Ud={},Bd={},Nd={},_d={},Ld={},Dd=function(e,t,r){var n,i,a,o=Ht(e);if(t){if(i=this.parse(o))throw Bc(i);this.searchParams=null}else{if(void 0!==r&&(n=new Dd(r,!0)),i=this.parse(o,null,n))throw Bc(i);(a=Ac(new Rc)).bindURL(this),this.searchParams=a}};Dd.prototype={type:"URL",parse:function(e,t,r){var n,i,a,o,s,c=this,d=t||xd,u=0,f="",h=!1,p=!1,l=!1;for(e=Ht(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=Wc(e,cd,"")),e=Wc(e,dd,""),n=lc(e);u<=n.length;){switch(i=n[u],d){case xd:if(!i||!Jc(Zc,i)){if(t)return"Invalid scheme";d=wd;continue}f+=Qc(i),d=md;break;case md:if(i&&(Jc(ed,i)||"+"==i||"-"==i||"."==i))f+=Qc(i);else{if(":"!=i){if(t)return"Invalid scheme";f="",d=wd,u=0;continue}if(t&&(c.isSpecial()!=ae(bd,f)||"file"==f&&(c.includesCredentials()||null!==c.port)||"file"==c.scheme&&!c.host))return;if(c.scheme=f,t)return void(c.isSpecial()&&bd[c.scheme]==c.port&&(c.port=null));f="","file"==c.scheme?d=Md:c.isSpecial()&&r&&r.scheme==c.scheme?d=yd:c.isSpecial()?d=Ed:"/"==n[u+1]?(d=Cd,u++):(c.cannotBeABaseURL=!0,Vc(c.path,""),d=Nd)}break;case wd:if(!r||r.cannotBeABaseURL&&"#"!=i)return"Invalid scheme";if(r.cannotBeABaseURL&&"#"==i){c.scheme=r.scheme,c.path=nr(r.path),c.query=r.query,c.fragment="",c.cannotBeABaseURL=!0,d=Ld;break}d="file"==r.scheme?Md:zd;continue;case yd:if("/"!=i||"/"!=n[u+1]){d=zd;continue}d=qd,u++;break;case Cd:if("/"==i){d=Pd;break}d=Bd;continue;case zd:if(c.scheme=r.scheme,i==rc)c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=nr(r.path),c.query=r.query;else if("/"==i||"\\"==i&&c.isSpecial())d=Od;else if("?"==i)c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=nr(r.path),c.query="",d=_d;else{if("#"!=i){c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=nr(r.path),c.path.length--,d=Bd;continue}c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=nr(r.path),c.query=r.query,c.fragment="",d=Ld}break;case Od:if(!c.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,d=Bd;continue}d=Pd}else d=qd;break;case Ed:if(d=qd,"/"!=i||"/"!=Dc(f,u+1))continue;u++;break;case qd:if("/"!=i&&"\\"!=i){d=Pd;continue}break;case Pd:if("@"==i){h&&(f="%40"+f),h=!0,a=lc(f);for(var g=0;g<a.length;g++){var b=a[g];if(":"!=b||l){var v=gd(b,ld);l?c.password+=v:c.username+=v}else l=!0}f=""}else if(i==rc||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()){if(h&&""==f)return"Invalid authority";u-=lc(f).length+1,f="",d=Sd}else f+=i;break;case Sd:case jd:if(t&&"file"==c.scheme){d=Ad;continue}if(":"!=i||p){if(i==rc||"/"==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=Ud,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=Td,t==jd)return}break;case Td:if(!Jc(td,i)){if(i==rc||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()||t){if(""!=f){var I=Nc(f,10);if(I>65535)return"Invalid port";c.port=c.isSpecial()&&I===bd[c.scheme]?null:I,f=""}if(t)return;d=Ud;continue}return"Invalid port"}f+=i;break;case Md:if(c.scheme="file","/"==i||"\\"==i)d=Rd;else{if(!r||"file"!=r.scheme){d=Bd;continue}if(i==rc)c.host=r.host,c.path=nr(r.path),c.query=r.query;else if("?"==i)c.host=r.host,c.path=nr(r.path),c.query="",d=_d;else{if("#"!=i){Id(Fc(nr(n,u),""))||(c.host=r.host,c.path=nr(r.path),c.shortenPath()),d=Bd;continue}c.host=r.host,c.path=nr(r.path),c.query=r.query,c.fragment="",d=Ld}}break;case Rd:if("/"==i||"\\"==i){d=Ad;break}r&&"file"==r.scheme&&!Id(Fc(nr(n,u),""))&&(vd(r.path[0],!0)?Vc(c.path,r.path[0]):c.host=r.host),d=Bd;continue;case Ad:if(i==rc||"/"==i||"\\"==i||"?"==i||"#"==i){if(!t&&vd(f))d=Bd;else if(""==f){if(c.host="",t)return;d=Ud}else{if(o=c.parseHost(f))return o;if("localhost"==c.host&&(c.host=""),t)return;f="",d=Ud}continue}f+=i;break;case Ud:if(c.isSpecial()){if(d=Bd,"/"!=i&&"\\"!=i)continue}else if(t||"?"!=i)if(t||"#"!=i){if(i!=rc&&(d=Bd,"/"!=i))continue}else c.fragment="",d=Ld;else c.query="",d=_d;break;case Bd:if(i==rc||"/"==i||"\\"==i&&c.isSpecial()||!t&&("?"==i||"#"==i)){if(".."===(s=Qc(s=f))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(c.shortenPath(),"/"==i||"\\"==i&&c.isSpecial()||Vc(c.path,"")):kd(f)?"/"==i||"\\"==i&&c.isSpecial()||Vc(c.path,""):("file"==c.scheme&&!c.path.length&&vd(f)&&(c.host&&(c.host=""),f=Dc(f,0)+":"),Vc(c.path,f)),f="","file"==c.scheme&&(i==rc||"?"==i||"#"==i))for(;c.path.length>1&&""===c.path[0];)$c(c.path);"?"==i?(c.query="",d=_d):"#"==i&&(c.fragment="",d=Ld)}else f+=gd(i,pd);break;case Nd:"?"==i?(c.query="",d=_d):"#"==i?(c.fragment="",d=Ld):i!=rc&&(c.path[0]+=gd(i,fd));break;case _d:t||"#"!=i?i!=rc&&("'"==i&&c.isSpecial()?c.query+="%27":c.query+="#"==i?"%23":gd(i,fd)):(c.fragment="",d=Ld);break;case Ld:i!=rc&&(c.fragment+=gd(i,hd))}u++}},parseHost:function(e){var t,r,n;if("["==Dc(e,0)){if("]"!=Dc(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 Dc(e,f)};if(":"==h()){if(":"!=Dc(e,1))return;f+=2,u=++d}for(;h();){if(8==d)return;if(":"!=h()){for(t=r=0;r<4&&Jc(ad,h());)t=16*t+Nc(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(!Jc(td,h()))return;for(;Jc(td,h());){if(a=Nc(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}(Kc(e,1,-1))))return"Invalid host";this.host=t}else if(this.isSpecial()){if(e=function(e){var t,r,n=[],i=Oc(zc(Ec(e),bc,"."),".");for(t=0;t<i.length;t++)r=i[t],Cc(n,kc(gc,r)?"xn--"+Sc(r):r);return yc(n,".")}(e),Jc(od,e))return"Invalid host";if(null===(t=function(e){var t,r,n,i,a,o,s,c=Yc(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"==Dc(i,0)&&(a=Jc(rd,i)?16:8,i=Kc(i,8==a?1:2)),""===i)o=0;else{if(!Jc(10==a?id:8==a?nd:ad,i))return e;o=Nc(i,a)}Vc(r,o)}for(n=0;n<t;n++)if(o=r[n],n==t-1){if(o>=Lc(256,5-t))return null}else if(o>255)return null;for(s=Hc(r),n=0;n<r.length;n++)s+=r[n]*Lc(256,3-n);return s}(e)))return"Invalid host";this.host=t}else{if(Jc(sd,e))return"Invalid host";for(t="",r=lc(e),n=0;n<r.length;n++)t+=gd(r[n],fd);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return ae(bd,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&vd(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+=ud(i),null!==a&&(d+=":"+a)):"file"==t&&(d+="//"),d+=e.cannotBeABaseURL?o[0]:o.length?"/"+Fc(o,"/"):"",null!==s&&(d+="?"+s),null!==c&&(d+="#"+c),d},setHref:function(e){var t=this.parse(e);if(t)throw Bc(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new Jd(e.path[0]).origin}catch(e){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+ud(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(Ht(e)+":",xd)},getUsername:function(){return this.username},setUsername:function(e){var t=lc(Ht(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<t.length;r++)this.username+=gd(t[r],ld)}},getPassword:function(){return this.password},setPassword:function(e){var t=lc(Ht(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<t.length;r++)this.password+=gd(t[r],ld)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?ud(e):ud(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,Sd)},getHostname:function(){var e=this.host;return null===e?"":ud(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,jd)},getPort:function(){var e=this.port;return null===e?"":Ht(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=Ht(e))?this.port=null:this.parse(e,Td))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+Fc(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,Ud))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=Ht(e))?this.query=null:("?"==Dc(e,0)&&(e=Kc(e,1)),this.query="",this.parse(e,_d)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=Ht(e))?("#"==Dc(e,0)&&(e=Kc(e,1)),this.fragment="",this.parse(e,Ld)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var Jd=function(e){var t=Oa(this,Fd),r=Ta(arguments.length,1)>1?arguments[1]:void 0,n=Tc(t,new Dd(e,!1,r));d||(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())},Fd=Jd.prototype,Gd=function(e,t){return{get:function(){return Mc(this)[e]()},set:t&&function(e){return Mc(this)[t](e)},configurable:!0,enumerable:!0}};if(d&&(nc(Fd,"href",Gd("serialize","setHref")),nc(Fd,"origin",Gd("getOrigin")),nc(Fd,"protocol",Gd("getProtocol","setProtocol")),nc(Fd,"username",Gd("getUsername","setUsername")),nc(Fd,"password",Gd("getPassword","setPassword")),nc(Fd,"host",Gd("getHost","setHost")),nc(Fd,"hostname",Gd("getHostname","setHostname")),nc(Fd,"port",Gd("getPort","setPort")),nc(Fd,"pathname",Gd("getPathname","setPathname")),nc(Fd,"search",Gd("getSearch","setSearch")),nc(Fd,"searchParams",Gd("getSearchParams")),nc(Fd,"hash",Gd("getHash","setHash"))),nt(Fd,"toJSON",(function(){return Mc(this).serialize()}),{enumerable:!0}),nt(Fd,"toString",(function(){return Mc(this).serialize()}),{enumerable:!0}),Uc){var Hd=Uc.createObjectURL,Vd=Uc.revokeObjectURL;Hd&&nt(Jd,"createObjectURL",lr(Hd,Uc)),Vd&&nt(Jd,"revokeObjectURL",lr(Vd,Uc))}function Wd(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=as(e);if(t){var i=as(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return is(this,r)}}hr(Jd,"URL"),Rt({global:!0,constructor:!0,forced:!ya,sham:!d},{URL:Jd});var $d=function(e){ns(r,e);var t=Wd(r);function r(e,n,i){var a;return Zn(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 ti(r,[{key:"replaceOrigin",value:function(e){var t=new URL(e);this.protocol=t.protocol,this.host=t.host,this.pathname="".concat(t.pathname,"/").concat(this.pathname).replace(/\/\/+/g,"/")}},{key:"addQueryParams",value:function(e){var t=this;e&&Object.keys(e).forEach((function(r){var n=e[r];if(Array.isArray(n))if("refine"===r)for(var i=0;i<n.length;i+=1)t.searchParams.append(r,String(n[i]));else t.searchParams.append(r,n.join());else t.searchParams.append(r,String(n))}))}}],[{key:"renderTemplateUri",value:function(e,t){return t?e.replace(/\{([^\}]+)\}/g,(function(e,r){return String(t[r])})):e}}]),r}(cs(URL)),Yd="commerce-sdk-isomorphic@1.10.4";function Kd(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 Qd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Kd(Object(r),!0).forEach((function(t){ri(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Kd(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Xd=function(){function e(t){Zn(this,e),ri(this,"clientConfig",void 0);var r=Qd({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new qo(r)}var t,r,n,i,a,o,s,c,d,u,f,h,p,l,g,b,v,I,k,x,m,w,y,C,z,O,E,q,P,S,j,T,M,R,A,U;return ti(e,[{key:"createBasket",value:(U=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.taxMode?o.taxMode=n.taxMode:void 0!==i.taxMode&&(o.taxMode=i.taxMode),void 0===n.siteId){e.next=18;break}o.siteId=n.siteId,e.next=23;break;case 18:if(void 0===i.siteId){e.next=22;break}o.siteId=i.siteId,e.next=23;break;case 22:throw new Error("Missing required query parameter: siteId");case 23:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),s=new $d("/organizations/{organizationId}/baskets",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=30,Ro(s.toString(),d);case 30:if(u=e.sent,!r){e.next=35;break}return e.abrupt("return",u);case 35:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=39;break}throw new hs(u);case 39:return e.next=41,u.text();case 41:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 43:case"end":return e.stop()}}),e,this)}))),function(e,t){return U.apply(this,arguments)})},{key:"transferBasket",value:(A=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.overrideExisting?o.overrideExisting=n.overrideExisting:void 0!==i.overrideExisting&&(o.overrideExisting=i.overrideExisting),void 0===n.siteId){e.next=18;break}o.siteId=n.siteId,e.next=23;break;case 18:if(void 0===i.siteId){e.next=22;break}o.siteId=i.siteId,e.next=23;break;case 22:throw new Error("Missing required query parameter: siteId");case 23:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),s=new $d("/organizations/{organizationId}/baskets/actions/transfer",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{headers:c,method:"POST"}),e.next=30,Ro(s.toString(),d);case 30:if(u=e.sent,!r){e.next=35;break}return e.abrupt("return",u);case 35:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=39;break}throw new hs(u);case 39:return e.next=41,u.text();case 41:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 43:case"end":return e.stop()}}),e,this)}))),function(e,t){return A.apply(this,arguments)})},{key:"mergeBasket",value:(R=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.createDestinationBasket?o.createDestinationBasket=n.createDestinationBasket:void 0!==i.createDestinationBasket&&(o.createDestinationBasket=i.createDestinationBasket),void 0!==n.productItemMergeMode?o.productItemMergeMode=n.productItemMergeMode:void 0!==i.productItemMergeMode&&(o.productItemMergeMode=i.productItemMergeMode),void 0===n.siteId){e.next=19;break}o.siteId=n.siteId,e.next=24;break;case 19:if(void 0===i.siteId){e.next=23;break}o.siteId=i.siteId,e.next=24;break;case 23:throw new Error("Missing required query parameter: siteId");case 24:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),s=new $d("/organizations/{organizationId}/baskets/actions/merge",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{headers:c,method:"POST"}),e.next=31,Ro(s.toString(),d);case 31:if(u=e.sent,!r){e.next=36;break}return e.abrupt("return",u);case 36:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=40;break}throw new hs(u);case 40:return e.next=42,u.text();case 42:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 44:case"end":return e.stop()}}),e,this)}))),function(e,t){return R.apply(this,arguments)})},{key:"deleteBasket",value:(M=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return s=new $d("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=37,Ro(s.toString(),d);case 37:if(u=e.sent,!r){e.next=42;break}return e.abrupt("return",u);case 42:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=44;break}throw new hs(u);case 44:case"end":return e.stop()}}),e,this)}))),function(e,t){return M.apply(this,arguments)})},{key:"getBasket",value:(T=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),s=new $d("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=38,Ro(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new hs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return T.apply(this,arguments)})},{key:"updateBasket",value:(j=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),s=new $d("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=38,Ro(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new hs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return j.apply(this,arguments)})},{key:"updateAsAgentBasket",value:(S=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),s=new $d("/organizations/{organizationId}/baskets/{basketId}/agent",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{headers:c,method:"PUT"}),e.next=38,Ro(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new hs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return S.apply(this,arguments)})},{key:"updateBillingAddressForBasket",value:(P=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0!==n.useAsShipping?o.useAsShipping=n.useAsShipping:void 0!==i.useAsShipping&&(o.useAsShipping=i.useAsShipping),void 0!==n.removeExternalTax?o.removeExternalTax=n.removeExternalTax:void 0!==i.removeExternalTax&&(o.removeExternalTax=i.removeExternalTax),void 0===n.siteId){e.next=28;break}o.siteId=n.siteId,e.next=33;break;case 28:if(void 0===i.siteId){e.next=32;break}o.siteId=i.siteId,e.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),s=new $d("/organizations/{organizationId}/baskets/{basketId}/billing-address",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=40,Ro(s.toString(),d);case 40:if(u=e.sent,!r){e.next=45;break}return e.abrupt("return",u);case 45:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=49;break}throw new hs(u);case 49:return e.next=51,u.text();case 51:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 53:case"end":return e.stop()}}),e,this)}))),function(e,t){return P.apply(this,arguments)})},{key:"addCouponToBasket",value:(q=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),s=new $d("/organizations/{organizationId}/baskets/{basketId}/coupons",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=38,Ro(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new hs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return q.apply(this,arguments)})},{key:"removeCouponFromBasket",value:(E=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.couponItemId){e.next=25;break}a.couponItemId=n.couponItemId,e.next=30;break;case 25:if(void 0===i.couponItemId){e.next=29;break}a.couponItemId=i.couponItemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: couponItemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),s=new $d("/organizations/{organizationId}/baskets/{basketId}/coupons/{couponItemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=47,Ro(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=56;break}throw new hs(u);case 56:return e.next=58,u.text();case 58:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return E.apply(this,arguments)})},{key:"updateCustomerForBasket",value:(O=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),s=new $d("/organizations/{organizationId}/baskets/{basketId}/customer",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=38,Ro(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new hs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return O.apply(this,arguments)})},{key:"addGiftCertificateItemToBasket",value:(z=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),s=new $d("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=38,Ro(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new hs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return z.apply(this,arguments)})},{key:"removeGiftCertificateItemFromBasket",value:(C=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.giftCertificateItemId){e.next=25;break}a.giftCertificateItemId=n.giftCertificateItemId,e.next=30;break;case 25:if(void 0===i.giftCertificateItemId){e.next=29;break}a.giftCertificateItemId=i.giftCertificateItemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: giftCertificateItemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),s=new $d("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=47,Ro(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=56;break}throw new hs(u);case 56:return e.next=58,u.text();case 58:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return C.apply(this,arguments)})},{key:"updateGiftCertificateItemInBasket",value:(y=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.giftCertificateItemId){e.next=25;break}a.giftCertificateItemId=n.giftCertificateItemId,e.next=30;break;case 25:if(void 0===i.giftCertificateItemId){e.next=29;break}a.giftCertificateItemId=i.giftCertificateItemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: giftCertificateItemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),s=new $d("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=47,Ro(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=56;break}throw new hs(u);case 56:return e.next=58,u.text();case 58:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return y.apply(this,arguments)})},{key:"addItemToBasket",value:(w=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),s=new $d("/organizations/{organizationId}/baskets/{basketId}/items",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=38,Ro(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new hs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return w.apply(this,arguments)})},{key:"removeItemFromBasket",value:(m=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.itemId){e.next=25;break}a.itemId=n.itemId,e.next=30;break;case 25:if(void 0===i.itemId){e.next=29;break}a.itemId=i.itemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: itemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),s=new $d("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=47,Ro(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=56;break}throw new hs(u);case 56:return e.next=58,u.text();case 58:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return m.apply(this,arguments)})},{key:"updateItemInBasket",value:(x=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.itemId){e.next=25;break}a.itemId=n.itemId,e.next=30;break;case 25:if(void 0===i.itemId){e.next=29;break}a.itemId=i.itemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: itemId");case 30:if(o={},void 0!==n.removeExternalTax?o.removeExternalTax=n.removeExternalTax:void 0!==i.removeExternalTax&&(o.removeExternalTax=i.removeExternalTax),void 0===n.siteId){e.next=36;break}o.siteId=n.siteId,e.next=41;break;case 36:if(void 0===i.siteId){e.next=40;break}o.siteId=i.siteId,e.next=41;break;case 40:throw new Error("Missing required query parameter: siteId");case 41:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),s=new $d("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=48,Ro(s.toString(),d);case 48:if(u=e.sent,!r){e.next=53;break}return e.abrupt("return",u);case 53:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=57;break}throw new hs(u);case 57:return e.next=59,u.text();case 59:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return x.apply(this,arguments)})},{key:"addTaxesForBasketItem",value:(k=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.itemId){e.next=25;break}a.itemId=n.itemId,e.next=30;break;case 25:if(void 0===i.itemId){e.next=29;break}a.itemId=i.itemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: itemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return s=new $d("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}/taxes",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=46,Ro(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=53;break}throw new hs(u);case 53:case"end":return e.stop()}}),e,this)}))),function(e,t){return k.apply(this,arguments)})},{key:"addPaymentInstrumentToBasket",value:(I=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),s=new $d("/organizations/{organizationId}/baskets/{basketId}/payment-instruments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=38,Ro(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new hs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return I.apply(this,arguments)})},{key:"removePaymentInstrumentFromBasket",value:(v=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}a.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===i.paymentInstrumentId){e.next=29;break}a.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),s=new $d("/organizations/{organizationId}/baskets/{basketId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=47,Ro(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=56;break}throw new hs(u);case 56:return e.next=58,u.text();case 58:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return v.apply(this,arguments)})},{key:"updatePaymentInstrumentInBasket",value:(b=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}a.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===i.paymentInstrumentId){e.next=29;break}a.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(o={},void 0!==n.removeExternalTax?o.removeExternalTax=n.removeExternalTax:void 0!==i.removeExternalTax&&(o.removeExternalTax=i.removeExternalTax),void 0===n.siteId){e.next=36;break}o.siteId=n.siteId,e.next=41;break;case 36:if(void 0===i.siteId){e.next=40;break}o.siteId=i.siteId,e.next=41;break;case 40:throw new Error("Missing required query parameter: siteId");case 41:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),s=new $d("/organizations/{organizationId}/baskets/{basketId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=48,Ro(s.toString(),d);case 48:if(u=e.sent,!r){e.next=53;break}return e.abrupt("return",u);case 53:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=57;break}throw new hs(u);case 57:return e.next=59,u.text();case 59:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"getPaymentMethodsForBasket",value:(g=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),s=new $d("/organizations/{organizationId}/baskets/{basketId}/payment-methods",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=38,Ro(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new hs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"addPriceAdjustmentToBasket",value:(l=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),s=new $d("/organizations/{organizationId}/baskets/{basketId}/price-adjustments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=38,Ro(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new hs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"removePriceAdjustmentFromBasket",value:(p=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.priceAdjustmentId){e.next=25;break}a.priceAdjustmentId=n.priceAdjustmentId,e.next=30;break;case 25:if(void 0===i.priceAdjustmentId){e.next=29;break}a.priceAdjustmentId=i.priceAdjustmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: priceAdjustmentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),s=new $d("/organizations/{organizationId}/baskets/{basketId}/price-adjustments/{priceAdjustmentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=47,Ro(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=56;break}throw new hs(u);case 56:return e.next=58,u.text();case 58:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"updatePriceAdjustmentInBasket",value:(h=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.priceAdjustmentId){e.next=25;break}a.priceAdjustmentId=n.priceAdjustmentId,e.next=30;break;case 25:if(void 0===i.priceAdjustmentId){e.next=29;break}a.priceAdjustmentId=i.priceAdjustmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: priceAdjustmentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return s=new $d("/organizations/{organizationId}/baskets/{basketId}/price-adjustments/{priceAdjustmentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=46,Ro(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=55;break}throw new hs(u);case 55:return e.next=57,u.text();case 57:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"getPriceBooksForBasket",value:(f=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return s=new $d("/organizations/{organizationId}/baskets/{basketId}/price-books",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=37,Ro(s.toString(),d);case 37:if(u=e.sent,!r){e.next=42;break}return e.abrupt("return",u);case 42:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=46;break}throw new hs(u);case 46:return e.next=48,u.text();case 48:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"addPriceBooksToBasket",value:(u=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return s=new $d("/organizations/{organizationId}/baskets/{basketId}/price-books",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=37,Ro(s.toString(),d);case 37:if(u=e.sent,!r){e.next=42;break}return e.abrupt("return",u);case 42:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=44;break}throw new hs(u);case 44:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"createShipmentForBasket",value:(d=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),s=new $d("/organizations/{organizationId}/baskets/{basketId}/shipments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=38,Ro(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new hs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"removeShipmentFromBasket",value:(c=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.shipmentId){e.next=25;break}a.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===i.shipmentId){e.next=29;break}a.shipmentId=i.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),s=new $d("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=47,Ro(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=56;break}throw new hs(u);case 56:return e.next=58,u.text();case 58:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"updateShipmentForBasket",value:(s=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.shipmentId){e.next=25;break}a.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===i.shipmentId){e.next=29;break}a.shipmentId=i.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),s=new $d("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=47,Ro(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=56;break}throw new hs(u);case 56:return e.next=58,u.text();case 58:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"updateShippingAddressForShipment",value:(o=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.shipmentId){e.next=25;break}a.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===i.shipmentId){e.next=29;break}a.shipmentId=i.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(o={},void 0!==n.useAsBilling?o.useAsBilling=n.useAsBilling:void 0!==i.useAsBilling&&(o.useAsBilling=i.useAsBilling),void 0!==n.removeExternalTax?o.removeExternalTax=n.removeExternalTax:void 0!==i.removeExternalTax&&(o.removeExternalTax=i.removeExternalTax),void 0===n.siteId){e.next=37;break}o.siteId=n.siteId,e.next=42;break;case 37:if(void 0===i.siteId){e.next=41;break}o.siteId=i.siteId,e.next=42;break;case 41:throw new Error("Missing required query parameter: siteId");case 42:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),s=new $d("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-address",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=49,Ro(s.toString(),d);case 49:if(u=e.sent,!r){e.next=54;break}return e.abrupt("return",u);case 54:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=58;break}throw new hs(u);case 58:return e.next=60,u.text();case 60:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 62:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"updateShippingMethodForShipment",value:(a=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.shipmentId){e.next=25;break}a.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===i.shipmentId){e.next=29;break}a.shipmentId=i.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),s=new $d("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-method",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=47,Ro(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=56;break}throw new hs(u);case 56:return e.next=58,u.text();case 58:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"getShippingMethodsForShipment",value:(i=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.shipmentId){e.next=25;break}a.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===i.shipmentId){e.next=29;break}a.shipmentId=i.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),s=new $d("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-methods",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=47,Ro(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=56;break}throw new hs(u);case 56:return e.next=58,u.text();case 58:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"updateAsStorefrontBasket",value:(n=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0!==n.exchange?o.exchange=n.exchange:void 0!==i.exchange&&(o.exchange=i.exchange),void 0===n.siteId){e.next=27;break}o.siteId=n.siteId,e.next=32;break;case 27:if(void 0===i.siteId){e.next=31;break}o.siteId=i.siteId,e.next=32;break;case 31:throw new Error("Missing required query parameter: siteId");case 32:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),s=new $d("/organizations/{organizationId}/baskets/{basketId}/storefront",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{headers:c,method:"PUT"}),e.next=39,Ro(s.toString(),d);case 39:if(u=e.sent,!r){e.next=44;break}return e.abrupt("return",u);case 44:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=48;break}throw new hs(u);case 48:return e.next=50,u.text();case 50:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getTaxesFromBasket",value:(r=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return s=new $d("/organizations/{organizationId}/baskets/{basketId}/taxes",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=37,Ro(s.toString(),d);case 37:if(u=e.sent,!r){e.next=42;break}return e.abrupt("return",u);case 42:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=46;break}throw new hs(u);case 46:return e.next=48,u.text();case 48:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"addTaxesForBasket",value:(t=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return s=new $d("/organizations/{organizationId}/baskets/{basketId}/taxes",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=37,Ro(s.toString(),d);case 37:if(u=e.sent,!r){e.next=42;break}return e.abrupt("return",u);case 42:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=44;break}throw new hs(u);case 44:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function Zd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function eu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Zd(Object(r),!0).forEach((function(t){ri(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zd(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}ri(Xd,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-baskets/{version}");var tu=function(){function e(t){Zn(this,e),ri(this,"clientConfig",void 0);var r=eu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new qo(r)}var t,r,n,i;return ti(e,[{key:"getShopperContext",value:(i=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.usid){e.next=16;break}a.usid=n.usid,e.next=21;break;case 16:if(void 0===i.usid){e.next=20;break}a.usid=i.usid,e.next=21;break;case 20:throw new Error("Missing required path parameter: usid");case 21:return o={},void 0!==n.siteId?o.siteId=n.siteId:void 0!==i.siteId&&(o.siteId=i.siteId),s=new $d("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=eu(eu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=eu(eu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=29,Ro(s.toString(),d);case 29:if(u=e.sent,!r){e.next=34;break}return e.abrupt("return",u);case 34:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=38;break}throw new hs(u);case 38:return e.next=40,u.text();case 40:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 42:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"createShopperContext",value:(n=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.usid){e.next=16;break}a.usid=n.usid,e.next=21;break;case 16:if(void 0===i.usid){e.next=20;break}a.usid=i.usid,e.next=21;break;case 20:throw new Error("Missing required path parameter: usid");case 21:return o={},void 0!==n.siteId?o.siteId=n.siteId:void 0!==i.siteId&&(o.siteId=i.siteId),s=new $d("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=eu(eu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=eu(eu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=29,Ro(s.toString(),d);case 29:if(u=e.sent,!r){e.next=34;break}return e.abrupt("return",u);case 34:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=38;break}throw new hs(u);case 38:return e.next=40,u.text();case 40:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 42:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"deleteShopperContext",value:(r=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.usid){e.next=16;break}a.usid=n.usid,e.next=21;break;case 16:if(void 0===i.usid){e.next=20;break}a.usid=i.usid,e.next=21;break;case 20:throw new Error("Missing required path parameter: usid");case 21:return o={},void 0!==n.siteId?o.siteId=n.siteId:void 0!==i.siteId&&(o.siteId=i.siteId),s=new $d("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=eu(eu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=eu(eu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=29,Ro(s.toString(),d);case 29:if(u=e.sent,!r){e.next=34;break}return e.abrupt("return",u);case 34:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=36;break}throw new hs(u);case 36:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"updateShopperContext",value:(t=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.usid){e.next=16;break}a.usid=n.usid,e.next=21;break;case 16:if(void 0===i.usid){e.next=20;break}a.usid=i.usid,e.next=21;break;case 20:throw new Error("Missing required path parameter: usid");case 21:return o={},void 0!==n.siteId?o.siteId=n.siteId:void 0!==i.siteId&&(o.siteId=i.siteId),s=new $d("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=eu(eu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=eu(eu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=29,Ro(s.toString(),d);case 29:if(u=e.sent,!r){e.next=34;break}return e.abrupt("return",u);case 34:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=38;break}throw new hs(u);case 38:return e.next=40,u.text();case 40:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 42:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function ru(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function nu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ru(Object(r),!0).forEach((function(t){ri(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ru(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}ri(tu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/shopper/shopper-context/{version}");var iu=function(){function e(t){Zn(this,e),ri(this,"clientConfig",void 0);var r=nu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new qo(r)}var t,r,n,i,a,o,s,c,d,u,f,h,p,l,g,b,v,I,k,x,m,w,y,C,z,O,E,q,P,S,j,T;return ti(e,[{key:"registerCustomer",value:(T=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return s=new $d("/organizations/{organizationId}/customers",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=28,Ro(s.toString(),d);case 28:if(u=e.sent,!r){e.next=33;break}return e.abrupt("return",u);case 33:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=37;break}throw new hs(u);case 37:return e.next=39,u.text();case 39:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return T.apply(this,arguments)})},{key:"invalidateCustomerAuth",value:(j=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return s=new $d("/organizations/{organizationId}/customers/actions/logout",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=28,Ro(s.toString(),d);case 28:if(u=e.sent,!r){e.next=33;break}return e.abrupt("return",u);case 33:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=35;break}throw new hs(u);case 35:case"end":return e.stop()}}),e,this)}))),function(e,t){return j.apply(this,arguments)})},{key:"authorizeCustomer",value:(S=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.clientId){e.next=17;break}o.clientId=n.clientId,e.next=22;break;case 17:if(void 0===i.clientId){e.next=21;break}o.clientId=i.clientId,e.next=22;break;case 21:throw new Error("Missing required query parameter: clientId");case 22:if(void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return s=new $d("/organizations/{organizationId}/customers/actions/login",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=37,Ro(s.toString(),d);case 37:if(u=e.sent,!r){e.next=42;break}return e.abrupt("return",u);case 42:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=46;break}throw new hs(u);case 46:return e.next=48,u.text();case 48:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return S.apply(this,arguments)})},{key:"authorizeTrustedSystem",value:(P=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return s=new $d("/organizations/{organizationId}/customers/trusted-system/actions/login",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=28,Ro(s.toString(),d);case 28:if(u=e.sent,!r){e.next=33;break}return e.abrupt("return",u);case 33:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=37;break}throw new hs(u);case 37:return e.next=39,u.text();case 39:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return P.apply(this,arguments)})},{key:"resetPassword",value:(q=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return s=new $d("/organizations/{organizationId}/customers/password/actions/reset",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=28,Ro(s.toString(),d);case 28:if(u=e.sent,!r){e.next=33;break}return e.abrupt("return",u);case 33:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=35;break}throw new hs(u);case 35:case"end":return e.stop()}}),e,this)}))),function(e,t){return q.apply(this,arguments)})},{key:"getResetPasswordToken",value:(E=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return s=new $d("/organizations/{organizationId}/customers/password/actions/create-reset-token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=28,Ro(s.toString(),d);case 28:if(u=e.sent,!r){e.next=33;break}return e.abrupt("return",u);case 33:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=37;break}throw new hs(u);case 37:return e.next=39,u.text();case 39:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return E.apply(this,arguments)})},{key:"registerExternalProfile",value:(O=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return s=new $d("/organizations/{organizationId}/customers/external-profile",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=28,Ro(s.toString(),d);case 28:if(u=e.sent,!r){e.next=33;break}return e.abrupt("return",u);case 33:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=37;break}throw new hs(u);case 37:return e.next=39,u.text();case 39:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return O.apply(this,arguments)})},{key:"getExternalProfile",value:(z=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.externalId){e.next=17;break}o.externalId=n.externalId,e.next=22;break;case 17:if(void 0===i.externalId){e.next=21;break}o.externalId=i.externalId,e.next=22;break;case 21:throw new Error("Missing required query parameter: externalId");case 22:if(void 0===n.authenticationProviderId){e.next=26;break}o.authenticationProviderId=n.authenticationProviderId,e.next=31;break;case 26:if(void 0===i.authenticationProviderId){e.next=30;break}o.authenticationProviderId=i.authenticationProviderId,e.next=31;break;case 30:throw new Error("Missing required query parameter: authenticationProviderId");case 31:if(void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return s=new $d("/organizations/{organizationId}/customers/external-profile",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=46,Ro(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=55;break}throw new hs(u);case 55:return e.next=57,u.text();case 57:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return z.apply(this,arguments)})},{key:"getCustomer",value:(C=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return s=new $d("/organizations/{organizationId}/customers/{customerId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=37,Ro(s.toString(),d);case 37:if(u=e.sent,!r){e.next=42;break}return e.abrupt("return",u);case 42:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=46;break}throw new hs(u);case 46:return e.next=48,u.text();case 48:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return C.apply(this,arguments)})},{key:"updateCustomer",value:(y=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return s=new $d("/organizations/{organizationId}/customers/{customerId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=37,Ro(s.toString(),d);case 37:if(u=e.sent,!r){e.next=42;break}return e.abrupt("return",u);case 42:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=46;break}throw new hs(u);case 46:return e.next=48,u.text();case 48:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return y.apply(this,arguments)})},{key:"createCustomerAddress",value:(w=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return s=new $d("/organizations/{organizationId}/customers/{customerId}/addresses",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=37,Ro(s.toString(),d);case 37:if(u=e.sent,!r){e.next=42;break}return e.abrupt("return",u);case 42:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=46;break}throw new hs(u);case 46:return e.next=48,u.text();case 48:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return w.apply(this,arguments)})},{key:"getCustomerAddress",value:(m=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.addressName){e.next=25;break}a.addressName=n.addressName,e.next=30;break;case 25:if(void 0===i.addressName){e.next=29;break}a.addressName=i.addressName,e.next=30;break;case 29:throw new Error("Missing required path parameter: addressName");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return s=new $d("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=46,Ro(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=55;break}throw new hs(u);case 55:return e.next=57,u.text();case 57:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return m.apply(this,arguments)})},{key:"removeCustomerAddress",value:(x=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.addressName){e.next=25;break}a.addressName=n.addressName,e.next=30;break;case 25:if(void 0===i.addressName){e.next=29;break}a.addressName=i.addressName,e.next=30;break;case 29:throw new Error("Missing required path parameter: addressName");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return s=new $d("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=46,Ro(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=53;break}throw new hs(u);case 53:case"end":return e.stop()}}),e,this)}))),function(e,t){return x.apply(this,arguments)})},{key:"updateCustomerAddress",value:(k=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.addressName){e.next=25;break}a.addressName=n.addressName,e.next=30;break;case 25:if(void 0===i.addressName){e.next=29;break}a.addressName=i.addressName,e.next=30;break;case 29:throw new Error("Missing required path parameter: addressName");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return s=new $d("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=46,Ro(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=55;break}throw new hs(u);case 55:return e.next=57,u.text();case 57:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return k.apply(this,arguments)})},{key:"getCustomerBaskets",value:(I=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return s=new $d("/organizations/{organizationId}/customers/{customerId}/baskets",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=37,Ro(s.toString(),d);case 37:if(u=e.sent,!r){e.next=42;break}return e.abrupt("return",u);case 42:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=46;break}throw new hs(u);case 46:return e.next=48,u.text();case 48:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return I.apply(this,arguments)})},{key:"getCustomerOrders",value:(v=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0!==n.crossSites?o.crossSites=n.crossSites:void 0!==i.crossSites&&(o.crossSites=i.crossSites),void 0!==n.from?o.from=n.from:void 0!==i.from&&(o.from=i.from),void 0!==n.until?o.until=n.until:void 0!==i.until&&(o.until=i.until),void 0!==n.status?o.status=n.status:void 0!==i.status&&(o.status=i.status),void 0===n.siteId){e.next=30;break}o.siteId=n.siteId,e.next=35;break;case 30:if(void 0===i.siteId){e.next=34;break}o.siteId=i.siteId,e.next=35;break;case 34:throw new Error("Missing required query parameter: siteId");case 35:return void 0!==n.offset?o.offset=n.offset:void 0!==i.offset&&(o.offset=i.offset),void 0!==n.limit?o.limit=n.limit:void 0!==i.limit&&(o.limit=i.limit),s=new $d("/organizations/{organizationId}/customers/{customerId}/orders",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=43,Ro(s.toString(),d);case 43:if(u=e.sent,!r){e.next=48;break}return e.abrupt("return",u);case 48:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=52;break}throw new hs(u);case 52:return e.next=54,u.text();case 54:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 56:case"end":return e.stop()}}),e,this)}))),function(e,t){return v.apply(this,arguments)})},{key:"updateCustomerPassword",value:(b=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return s=new $d("/organizations/{organizationId}/customers/{customerId}/password",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=37,Ro(s.toString(),d);case 37:if(u=e.sent,!r){e.next=42;break}return e.abrupt("return",u);case 42:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=44;break}throw new hs(u);case 44:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"createCustomerPaymentInstrument",value:(g=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return s=new $d("/organizations/{organizationId}/customers/{customerId}/payment-instruments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=37,Ro(s.toString(),d);case 37:if(u=e.sent,!r){e.next=42;break}return e.abrupt("return",u);case 42:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=46;break}throw new hs(u);case 46:return e.next=48,u.text();case 48:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"deleteCustomerPaymentInstrument",value:(l=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}a.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===i.paymentInstrumentId){e.next=29;break}a.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return s=new $d("/organizations/{organizationId}/customers/{customerId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=46,Ro(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=53;break}throw new hs(u);case 53:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"getCustomerPaymentInstrument",value:(p=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}a.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===i.paymentInstrumentId){e.next=29;break}a.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return s=new $d("/organizations/{organizationId}/customers/{customerId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=46,Ro(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=55;break}throw new hs(u);case 55:return e.next=57,u.text();case 57:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"getCustomerProductLists",value:(h=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return s=new $d("/organizations/{organizationId}/customers/{customerId}/product-lists",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=37,Ro(s.toString(),d);case 37:if(u=e.sent,!r){e.next=42;break}return e.abrupt("return",u);case 42:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=46;break}throw new hs(u);case 46:return e.next=48,u.text();case 48:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"createCustomerProductList",value:(f=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return s=new $d("/organizations/{organizationId}/customers/{customerId}/product-lists",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=37,Ro(s.toString(),d);case 37:if(u=e.sent,!r){e.next=42;break}return e.abrupt("return",u);case 42:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=46;break}throw new hs(u);case 46:return e.next=48,u.text();case 48:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"deleteCustomerProductList",value:(u=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}a.listId=n.listId,e.next=30;break;case 25:if(void 0===i.listId){e.next=29;break}a.listId=i.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return s=new $d("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=46,Ro(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=53;break}throw new hs(u);case 53:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"getCustomerProductList",value:(d=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}a.listId=n.listId,e.next=30;break;case 25:if(void 0===i.listId){e.next=29;break}a.listId=i.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return s=new $d("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=46,Ro(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=55;break}throw new hs(u);case 55:return e.next=57,u.text();case 57:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"updateCustomerProductList",value:(c=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}a.listId=n.listId,e.next=30;break;case 25:if(void 0===i.listId){e.next=29;break}a.listId=i.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return s=new $d("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=46,Ro(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=55;break}throw new hs(u);case 55:return e.next=57,u.text();case 57:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"createCustomerProductListItem",value:(s=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}a.listId=n.listId,e.next=30;break;case 25:if(void 0===i.listId){e.next=29;break}a.listId=i.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return s=new $d("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=46,Ro(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=55;break}throw new hs(u);case 55:return e.next=57,u.text();case 57:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"deleteCustomerProductListItem",value:(o=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}a.listId=n.listId,e.next=30;break;case 25:if(void 0===i.listId){e.next=29;break}a.listId=i.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(void 0===n.itemId){e.next=34;break}a.itemId=n.itemId,e.next=39;break;case 34:if(void 0===i.itemId){e.next=38;break}a.itemId=i.itemId,e.next=39;break;case 38:throw new Error("Missing required path parameter: itemId");case 39:if(o={},void 0===n.siteId){e.next=44;break}o.siteId=n.siteId,e.next=49;break;case 44:if(void 0===i.siteId){e.next=48;break}o.siteId=i.siteId,e.next=49;break;case 48:throw new Error("Missing required query parameter: siteId");case 49:return s=new $d("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=55,Ro(s.toString(),d);case 55:if(u=e.sent,!r){e.next=60;break}return e.abrupt("return",u);case 60:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=62;break}throw new hs(u);case 62:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"getCustomerProductListItem",value:(a=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}a.listId=n.listId,e.next=30;break;case 25:if(void 0===i.listId){e.next=29;break}a.listId=i.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(void 0===n.itemId){e.next=34;break}a.itemId=n.itemId,e.next=39;break;case 34:if(void 0===i.itemId){e.next=38;break}a.itemId=i.itemId,e.next=39;break;case 38:throw new Error("Missing required path parameter: itemId");case 39:if(o={},void 0===n.siteId){e.next=44;break}o.siteId=n.siteId,e.next=49;break;case 44:if(void 0===i.siteId){e.next=48;break}o.siteId=i.siteId,e.next=49;break;case 48:throw new Error("Missing required query parameter: siteId");case 49:return s=new $d("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=55,Ro(s.toString(),d);case 55:if(u=e.sent,!r){e.next=60;break}return e.abrupt("return",u);case 60:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=64;break}throw new hs(u);case 64:return e.next=66,u.text();case 66:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 68:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"updateCustomerProductListItem",value:(i=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}a.listId=n.listId,e.next=30;break;case 25:if(void 0===i.listId){e.next=29;break}a.listId=i.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(void 0===n.itemId){e.next=34;break}a.itemId=n.itemId,e.next=39;break;case 34:if(void 0===i.itemId){e.next=38;break}a.itemId=i.itemId,e.next=39;break;case 38:throw new Error("Missing required path parameter: itemId");case 39:if(o={},void 0===n.siteId){e.next=44;break}o.siteId=n.siteId,e.next=49;break;case 44:if(void 0===i.siteId){e.next=48;break}o.siteId=i.siteId,e.next=49;break;case 48:throw new Error("Missing required query parameter: siteId");case 49:return s=new $d("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=55,Ro(s.toString(),d);case 55:if(u=e.sent,!r){e.next=60;break}return e.abrupt("return",u);case 60:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=64;break}throw new hs(u);case 64:return e.next=66,u.text();case 66:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 68:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getPublicProductListsBySearchTerm",value:(n=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.email?o.email=n.email:void 0!==i.email&&(o.email=i.email),void 0!==n.firstName?o.firstName=n.firstName:void 0!==i.firstName&&(o.firstName=i.firstName),void 0!==n.lastName?o.lastName=n.lastName:void 0!==i.lastName&&(o.lastName=i.lastName),void 0===n.siteId){e.next=20;break}o.siteId=n.siteId,e.next=25;break;case 20:if(void 0===i.siteId){e.next=24;break}o.siteId=i.siteId,e.next=25;break;case 24:throw new Error("Missing required query parameter: siteId");case 25:return s=new $d("/organizations/{organizationId}/product-lists",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=31,Ro(s.toString(),d);case 31:if(u=e.sent,!r){e.next=36;break}return e.abrupt("return",u);case 36:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=40;break}throw new hs(u);case 40:return e.next=42,u.text();case 42:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 44:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getPublicProductList",value:(r=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.listId){e.next=16;break}a.listId=n.listId,e.next=21;break;case 16:if(void 0===i.listId){e.next=20;break}a.listId=i.listId,e.next=21;break;case 20:throw new Error("Missing required path parameter: listId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return s=new $d("/organizations/{organizationId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=37,Ro(s.toString(),d);case 37:if(u=e.sent,!r){e.next=42;break}return e.abrupt("return",u);case 42:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=46;break}throw new hs(u);case 46:return e.next=48,u.text();case 48:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getProductListItem",value:(t=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.listId){e.next=16;break}a.listId=n.listId,e.next=21;break;case 16:if(void 0===i.listId){e.next=20;break}a.listId=i.listId,e.next=21;break;case 20:throw new Error("Missing required path parameter: listId");case 21:if(void 0===n.itemId){e.next=25;break}a.itemId=n.itemId,e.next=30;break;case 25:if(void 0===i.itemId){e.next=29;break}a.itemId=i.itemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: itemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return s=new $d("/organizations/{organizationId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=46,Ro(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=55;break}throw new hs(u);case 55:return e.next=57,u.text();case 57:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function au(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ou(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?au(Object(r),!0).forEach((function(t){ri(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):au(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}ri(iu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/customer/shopper-customers/{version}");var su=function(){function e(t){Zn(this,e),ri(this,"clientConfig",void 0);var r=ou({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new qo(r)}var t,r;return ti(e,[{key:"retrieveResults",value:(r=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.channelId){e.next=16;break}a.channelId=n.channelId,e.next=21;break;case 16:if(void 0===i.channelId){e.next=20;break}a.channelId=i.channelId,e.next=21;break;case 20:throw new Error("Missing required path parameter: channelId");case 21:if(o={},void 0===n.locale){e.next=26;break}o.locale=n.locale,e.next=31;break;case 26:if(void 0===i.locale){e.next=30;break}o.locale=i.locale,e.next=31;break;case 30:throw new Error("Missing required query parameter: locale");case 31:return void 0!==n.offset?o.offset=n.offset:void 0!==i.offset&&(o.offset=i.offset),void 0!==n.limit?o.limit=n.limit:void 0!==i.limit&&(o.limit=i.limit),s=new $d("/organizations/{organizationId}/channels/{channelId}/results",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ou(ou({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=ou(ou({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=39,Ro(s.toString(),d);case 39:if(u=e.sent,!r){e.next=44;break}return e.abrupt("return",u);case 44:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=48;break}throw new hs(u);case 48:return e.next=50,u.text();case 50:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getSuggestions",value:(t=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.channelId){e.next=16;break}a.channelId=n.channelId,e.next=21;break;case 16:if(void 0===i.channelId){e.next=20;break}a.channelId=i.channelId,e.next=21;break;case 20:throw new Error("Missing required path parameter: channelId");case 21:if(o={},void 0===n.suggestionTypes){e.next=26;break}o.suggestionTypes=n.suggestionTypes,e.next=31;break;case 26:if(void 0===i.suggestionTypes){e.next=30;break}o.suggestionTypes=i.suggestionTypes,e.next=31;break;case 30:throw new Error("Missing required query parameter: suggestionTypes");case 31:if(void 0!==n.searchText?o.searchText=n.searchText:void 0!==i.searchText&&(o.searchText=i.searchText),void 0===n.locale){e.next=36;break}o.locale=n.locale,e.next=41;break;case 36:if(void 0===i.locale){e.next=40;break}o.locale=i.locale,e.next=41;break;case 40:throw new Error("Missing required query parameter: locale");case 41:return s=new $d("/organizations/{organizationId}/channels/{channelId}/suggestions",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ou(ou({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=ou(ou({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=47,Ro(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=56;break}throw new hs(u);case 56:return e.next=58,u.text();case 58:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function cu(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 du(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?cu(Object(r),!0).forEach((function(t){ri(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}ri(su,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/discovery/query/{version}");var uu=function(){function e(t){Zn(this,e),ri(this,"clientConfig",void 0);var r=du({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new qo(r)}var t,r;return ti(e,[{key:"getPages",value:(r=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.categoryId?o.categoryId=n.categoryId:void 0!==i.categoryId&&(o.categoryId=i.categoryId),void 0!==n.productId?o.productId=n.productId:void 0!==i.productId&&(o.productId=i.productId),void 0===n.aspectTypeId){e.next=19;break}o.aspectTypeId=n.aspectTypeId,e.next=24;break;case 19:if(void 0===i.aspectTypeId){e.next=23;break}o.aspectTypeId=i.aspectTypeId,e.next=24;break;case 23:throw new Error("Missing required query parameter: aspectTypeId");case 24:if(void 0!==n.aspectAttributes?o.aspectAttributes=n.aspectAttributes:void 0!==i.aspectAttributes&&(o.aspectAttributes=i.aspectAttributes),void 0!==n.parameters?o.parameters=n.parameters:void 0!==i.parameters&&(o.parameters=i.parameters),void 0===n.siteId){e.next=30;break}o.siteId=n.siteId,e.next=35;break;case 30:if(void 0===i.siteId){e.next=34;break}o.siteId=i.siteId,e.next=35;break;case 34:throw new Error("Missing required query parameter: siteId");case 35:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),s=new $d("/organizations/{organizationId}/pages",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=du(du({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=du(du({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=42,Ro(s.toString(),d);case 42:if(u=e.sent,!r){e.next=47;break}return e.abrupt("return",u);case 47:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=51;break}throw new hs(u);case 51:return e.next=53,u.text();case 53:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 55:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getPage",value:(t=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.pageId){e.next=16;break}a.pageId=n.pageId,e.next=21;break;case 16:if(void 0===i.pageId){e.next=20;break}a.pageId=i.pageId,e.next=21;break;case 20:throw new Error("Missing required path parameter: pageId");case 21:if(o={},void 0!==n.aspectAttributes?o.aspectAttributes=n.aspectAttributes:void 0!==i.aspectAttributes&&(o.aspectAttributes=i.aspectAttributes),void 0!==n.parameters?o.parameters=n.parameters:void 0!==i.parameters&&(o.parameters=i.parameters),void 0===n.siteId){e.next=28;break}o.siteId=n.siteId,e.next=33;break;case 28:if(void 0===i.siteId){e.next=32;break}o.siteId=i.siteId,e.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),s=new $d("/organizations/{organizationId}/pages/{pageId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=du(du({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=du(du({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=40,Ro(s.toString(),d);case 40:if(u=e.sent,!r){e.next=45;break}return e.abrupt("return",u);case 45:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=49;break}throw new hs(u);case 49:return e.next=51,u.text();case 51:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 53:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function fu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function hu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?fu(Object(r),!0).forEach((function(t){ri(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}ri(uu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/experience/shopper-experience/{version}");var pu=function(){function e(t){Zn(this,e),ri(this,"clientConfig",void 0);var r=hu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new qo(r)}var t;return ti(e,[{key:"getGiftCertificate",value:(t=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return s=new $d("/organizations/{organizationId}/gift-certificate",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=hu(hu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=hu(hu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=28,Ro(s.toString(),d);case 28:if(u=e.sent,!r){e.next=33;break}return e.abrupt("return",u);case 33:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=37;break}throw new hs(u);case 37:return e.next=39,u.text();case 39:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 41:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function lu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function gu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?lu(Object(r),!0).forEach((function(t){ri(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}ri(pu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/pricing/shopper-gift-certificates/{version}");var bu=function(){function e(t){Zn(this,e),ri(this,"clientConfig",void 0);var r=gu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new qo(r)}var t,r,n,i,a,o,s,c,d,u,f,h,p,l,g,b,v;return ti(e,[{key:"authenticateCustomer",value:(v=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},s=new $d("/organizations/{organizationId}/oauth2/login",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=gu(gu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=gu(gu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=19,Ro(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=26;break}throw new hs(u);case 26:case"end":return e.stop()}}),e,this)}))),function(e,t){return v.apply(this,arguments)})},{key:"authorizePasswordlessCustomer",value:(b=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},s=new $d("/organizations/{organizationId}/oauth2/passwordless/login",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=gu(gu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=gu(gu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=19,Ro(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=28;break}throw new hs(u);case 28:return e.next=30,u.text();case 30:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"logoutCustomer",value:(g=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.client_id){e.next=17;break}o.client_id=n.client_id,e.next=22;break;case 17:if(void 0===i.client_id){e.next=21;break}o.client_id=i.client_id,e.next=22;break;case 21:throw new Error("Missing required query parameter: client_id");case 22:if(void 0===n.refresh_token){e.next=26;break}o.refresh_token=n.refresh_token,e.next=31;break;case 26:if(void 0===i.refresh_token){e.next=30;break}o.refresh_token=i.refresh_token,e.next=31;break;case 30:throw new Error("Missing required query parameter: refresh_token");case 31:return void 0!==n.channel_id?o.channel_id=n.channel_id:void 0!==i.channel_id&&(o.channel_id=i.channel_id),void 0!==n.hint?o.hint=n.hint:void 0!==i.hint&&(o.hint=i.hint),s=new $d("/organizations/{organizationId}/oauth2/logout",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=gu(gu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=gu(gu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=39,Ro(s.toString(),d);case 39:if(u=e.sent,!r){e.next=44;break}return e.abrupt("return",u);case 44:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=48;break}throw new hs(u);case 48:return e.next=50,u.text();case 50:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"authorizeCustomer",value:(l=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.redirect_uri){e.next=17;break}o.redirect_uri=n.redirect_uri,e.next=22;break;case 17:if(void 0===i.redirect_uri){e.next=21;break}o.redirect_uri=i.redirect_uri,e.next=22;break;case 21:throw new Error("Missing required query parameter: redirect_uri");case 22:if(void 0===n.response_type){e.next=26;break}o.response_type=n.response_type,e.next=31;break;case 26:if(void 0===i.response_type){e.next=30;break}o.response_type=i.response_type,e.next=31;break;case 30:throw new Error("Missing required query parameter: response_type");case 31:if(void 0===n.client_id){e.next=35;break}o.client_id=n.client_id,e.next=40;break;case 35:if(void 0===i.client_id){e.next=39;break}o.client_id=i.client_id,e.next=40;break;case 39:throw new Error("Missing required query parameter: client_id");case 40:if(void 0!==n.scope?o.scope=n.scope:void 0!==i.scope&&(o.scope=i.scope),void 0!==n.state?o.state=n.state:void 0!==i.state&&(o.state=i.state),void 0!==n.usid?o.usid=n.usid:void 0!==i.usid&&(o.usid=i.usid),void 0!==n.hint?o.hint=n.hint:void 0!==i.hint&&(o.hint=i.hint),void 0!==n.channel_id?o.channel_id=n.channel_id:void 0!==i.channel_id&&(o.channel_id=i.channel_id),void 0===n.code_challenge){e.next=49;break}o.code_challenge=n.code_challenge,e.next=54;break;case 49:if(void 0===i.code_challenge){e.next=53;break}o.code_challenge=i.code_challenge,e.next=54;break;case 53:throw new Error("Missing required query parameter: code_challenge");case 54:return s=new $d("/organizations/{organizationId}/oauth2/authorize",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=gu(gu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=gu(gu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=60,Ro(s.toString(),d);case 60:if(u=e.sent,!r){e.next=65;break}return e.abrupt("return",u);case 65:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=67;break}throw new hs(u);case 67:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"getAccessToken",value:(p=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},s=new $d("/organizations/{organizationId}/oauth2/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=gu(gu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=gu(gu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=19,Ro(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=28;break}throw new hs(u);case 28:return e.next=30,u.text();case 30:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"getSessionBridgeAccessToken",value:(h=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},s=new $d("/organizations/{organizationId}/oauth2/session-bridge/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=gu(gu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=gu(gu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=19,Ro(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=28;break}throw new hs(u);case 28:return e.next=30,u.text();case 30:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"getTrustedSystemAccessToken",value:(f=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},s=new $d("/organizations/{organizationId}/oauth2/trusted-system/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=gu(gu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=gu(gu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=19,Ro(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=28;break}throw new hs(u);case 28:return e.next=30,u.text();case 30:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"getTrustedAgentAuthorizationToken",value:(u=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.client_id){e.next=17;break}o.client_id=n.client_id,e.next=22;break;case 17:if(void 0===i.client_id){e.next=21;break}o.client_id=i.client_id,e.next=22;break;case 21:throw new Error("Missing required query parameter: client_id");case 22:if(void 0===n.channel_id){e.next=26;break}o.channel_id=n.channel_id,e.next=31;break;case 26:if(void 0===i.channel_id){e.next=30;break}o.channel_id=i.channel_id,e.next=31;break;case 30:throw new Error("Missing required query parameter: channel_id");case 31:if(void 0===n.code_challenge){e.next=35;break}o.code_challenge=n.code_challenge,e.next=40;break;case 35:if(void 0===i.code_challenge){e.next=39;break}o.code_challenge=i.code_challenge,e.next=40;break;case 39:throw new Error("Missing required query parameter: code_challenge");case 40:if(void 0===n.login_id){e.next=44;break}o.login_id=n.login_id,e.next=49;break;case 44:if(void 0===i.login_id){e.next=48;break}o.login_id=i.login_id,e.next=49;break;case 48:throw new Error("Missing required query parameter: login_id");case 49:if(void 0===n.idp_origin){e.next=53;break}o.idp_origin=n.idp_origin,e.next=58;break;case 53:if(void 0===i.idp_origin){e.next=57;break}o.idp_origin=i.idp_origin,e.next=58;break;case 57:throw new Error("Missing required query parameter: idp_origin");case 58:if(void 0===n.redirect_uri){e.next=62;break}o.redirect_uri=n.redirect_uri,e.next=67;break;case 62:if(void 0===i.redirect_uri){e.next=66;break}o.redirect_uri=i.redirect_uri,e.next=67;break;case 66:throw new Error("Missing required query parameter: redirect_uri");case 67:if(void 0===n.response_type){e.next=71;break}o.response_type=n.response_type,e.next=76;break;case 71:if(void 0===i.response_type){e.next=75;break}o.response_type=i.response_type,e.next=76;break;case 75:throw new Error("Missing required query parameter: response_type");case 76:return s=new $d("/organizations/{organizationId}/oauth2/trusted-agent/authorize",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=gu(gu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=gu(gu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=82,Ro(s.toString(),d);case 82:if(u=e.sent,!r){e.next=87;break}return e.abrupt("return",u);case 87:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=89;break}throw new hs(u);case 89:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"getTrustedAgentAccessToken",value:(d=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},s=new $d("/organizations/{organizationId}/oauth2/trusted-agent/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=gu(gu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=gu(gu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=19,Ro(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=28;break}throw new hs(u);case 28:return e.next=30,u.text();case 30:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"getPasswordResetToken",value:(c=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},s=new $d("/organizations/{organizationId}/oauth2/password/reset",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=gu(gu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=gu(gu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=19,Ro(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=26;break}throw new hs(u);case 26:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"resetPassword",value:(s=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},s=new $d("/organizations/{organizationId}/oauth2/password/action",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=gu(gu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=gu(gu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=19,Ro(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=26;break}throw new hs(u);case 26:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"getPasswordLessAccessToken",value:(o=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},s=new $d("/organizations/{organizationId}/oauth2/passwordless/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=gu(gu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=gu(gu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=19,Ro(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=28;break}throw new hs(u);case 28:return e.next=30,u.text();case 30:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"revokeToken",value:(a=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},s=new $d("/organizations/{organizationId}/oauth2/revoke",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=gu(gu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=gu(gu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=19,Ro(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=28;break}throw new hs(u);case 28:return e.next=30,u.text();case 30:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"introspectToken",value:(i=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},s=new $d("/organizations/{organizationId}/oauth2/introspect",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=gu(gu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=gu(gu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=19,Ro(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=28;break}throw new hs(u);case 28:return e.next=30,u.text();case 30:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getUserInfo",value:(n=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},void 0!==n.channel_id?o.channel_id=n.channel_id:void 0!==i.channel_id&&(o.channel_id=i.channel_id),s=new $d("/organizations/{organizationId}/oauth2/userinfo",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=gu(gu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=gu(gu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=20,Ro(s.toString(),d);case 20:if(u=e.sent,!r){e.next=25;break}return e.abrupt("return",u);case 25:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=29;break}throw new hs(u);case 29:return e.next=31,u.text();case 31:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getWellknownOpenidConfiguration",value:(r=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},s=new $d("/organizations/{organizationId}/oauth2/.well-known/openid-configuration",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=gu(gu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=gu(gu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=19,Ro(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=28;break}throw new hs(u);case 28:return e.next=30,u.text();case 30:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getJwksUri",value:(t=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},s=new $d("/organizations/{organizationId}/oauth2/jwks",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=gu(gu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=gu(gu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=19,Ro(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=28;break}throw new hs(u);case 28:return e.next=30,u.text();case 30:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function vu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Iu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?vu(Object(r),!0).forEach((function(t){ri(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}ri(bu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/{version}");var ku=function(){function e(t){Zn(this,e),ri(this,"clientConfig",void 0);var r=Iu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new qo(r)}var t,r,n,i,a,o,s;return ti(e,[{key:"createOrder",value:(s=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),s=new $d("/organizations/{organizationId}/orders",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Iu(Iu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Iu(Iu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=29,Ro(s.toString(),d);case 29:if(u=e.sent,!r){e.next=34;break}return e.abrupt("return",u);case 34:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=38;break}throw new hs(u);case 38:return e.next=40,u.text();case 40:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 42:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"getOrder",value:(o=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}a.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===i.orderNo){e.next=20;break}a.orderNo=i.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),s=new $d("/organizations/{organizationId}/orders/{orderNo}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Iu(Iu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Iu(Iu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=38,Ro(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new hs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"createPaymentInstrumentForOrder",value:(a=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}a.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===i.orderNo){e.next=20;break}a.orderNo=i.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),s=new $d("/organizations/{organizationId}/orders/{orderNo}/payment-instruments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Iu(Iu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Iu(Iu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=38,Ro(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new hs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"removePaymentInstrumentFromOrder",value:(i=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}a.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===i.orderNo){e.next=20;break}a.orderNo=i.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}a.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===i.paymentInstrumentId){e.next=29;break}a.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),s=new $d("/organizations/{organizationId}/orders/{orderNo}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Iu(Iu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Iu(Iu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=47,Ro(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=56;break}throw new hs(u);case 56:return e.next=58,u.text();case 58:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"updatePaymentInstrumentForOrder",value:(n=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}a.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===i.orderNo){e.next=20;break}a.orderNo=i.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}a.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===i.paymentInstrumentId){e.next=29;break}a.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),s=new $d("/organizations/{organizationId}/orders/{orderNo}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Iu(Iu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Iu(Iu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=47,Ro(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=56;break}throw new hs(u);case 56:return e.next=58,u.text();case 58:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getPaymentMethodsForOrder",value:(r=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}a.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===i.orderNo){e.next=20;break}a.orderNo=i.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),s=new $d("/organizations/{organizationId}/orders/{orderNo}/payment-methods",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Iu(Iu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Iu(Iu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=38,Ro(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new hs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getTaxesFromOrder",value:(t=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}a.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===i.orderNo){e.next=20;break}a.orderNo=i.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return s=new $d("/organizations/{organizationId}/orders/{orderNo}/taxes",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Iu(Iu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Iu(Iu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=37,Ro(s.toString(),d);case 37:if(u=e.sent,!r){e.next=42;break}return e.abrupt("return",u);case 42:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=46;break}throw new hs(u);case 46:return e.next=48,u.text();case 48:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function xu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function mu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?xu(Object(r),!0).forEach((function(t){ri(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}ri(ku,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-orders/{version}");var wu=function(){function e(t){Zn(this,e),ri(this,"clientConfig",void 0);var r=mu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new qo(r)}var t,r,n,i;return ti(e,[{key:"getProducts",value:(i=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.select?o.select=n.select:void 0!==i.select&&(o.select=i.select),void 0===n.ids){e.next=18;break}o.ids=n.ids,e.next=23;break;case 18:if(void 0===i.ids){e.next=22;break}o.ids=i.ids,e.next=23;break;case 22:throw new Error("Missing required query parameter: ids");case 23:if(void 0!==n.inventoryIds?o.inventoryIds=n.inventoryIds:void 0!==i.inventoryIds&&(o.inventoryIds=i.inventoryIds),void 0!==n.currency?o.currency=n.currency:void 0!==i.currency&&(o.currency=i.currency),void 0!==n.expand?o.expand=n.expand:void 0!==i.expand&&(o.expand=i.expand),void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),void 0!==n.allImages?o.allImages=n.allImages:void 0!==i.allImages&&(o.allImages=i.allImages),void 0!==n.perPricebook?o.perPricebook=n.perPricebook:void 0!==i.perPricebook&&(o.perPricebook=i.perPricebook),void 0===n.siteId){e.next=33;break}o.siteId=n.siteId,e.next=38;break;case 33:if(void 0===i.siteId){e.next=37;break}o.siteId=i.siteId,e.next=38;break;case 37:throw new Error("Missing required query parameter: siteId");case 38:return s=new $d("/organizations/{organizationId}/products",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=mu(mu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=mu(mu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=44,Ro(s.toString(),d);case 44:if(u=e.sent,!r){e.next=49;break}return e.abrupt("return",u);case 49:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=53;break}throw new hs(u);case 53:return e.next=55,u.text();case 55:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 57:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getProduct",value:(n=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.id){e.next=16;break}a.id=n.id,e.next=21;break;case 16:if(void 0===i.id){e.next=20;break}a.id=i.id,e.next=21;break;case 20:throw new Error("Missing required path parameter: id");case 21:if(o={},void 0!==n.select?o.select=n.select:void 0!==i.select&&(o.select=i.select),void 0!==n.inventoryIds?o.inventoryIds=n.inventoryIds:void 0!==i.inventoryIds&&(o.inventoryIds=i.inventoryIds),void 0!==n.currency?o.currency=n.currency:void 0!==i.currency&&(o.currency=i.currency),void 0!==n.expand?o.expand=n.expand:void 0!==i.expand&&(o.expand=i.expand),void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),void 0!==n.allImages?o.allImages=n.allImages:void 0!==i.allImages&&(o.allImages=i.allImages),void 0!==n.perPricebook?o.perPricebook=n.perPricebook:void 0!==i.perPricebook&&(o.perPricebook=i.perPricebook),void 0===n.siteId){e.next=33;break}o.siteId=n.siteId,e.next=38;break;case 33:if(void 0===i.siteId){e.next=37;break}o.siteId=i.siteId,e.next=38;break;case 37:throw new Error("Missing required query parameter: siteId");case 38:return s=new $d("/organizations/{organizationId}/products/{id}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=mu(mu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=mu(mu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=44,Ro(s.toString(),d);case 44:if(u=e.sent,!r){e.next=49;break}return e.abrupt("return",u);case 49:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=53;break}throw new hs(u);case 53:return e.next=55,u.text();case 55:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 57:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getCategories",value:(r=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.ids){e.next=17;break}o.ids=n.ids,e.next=22;break;case 17:if(void 0===i.ids){e.next=21;break}o.ids=i.ids,e.next=22;break;case 21:throw new Error("Missing required query parameter: ids");case 22:if(void 0!==n.levels?o.levels=n.levels:void 0!==i.levels&&(o.levels=i.levels),void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),void 0===n.siteId){e.next=28;break}o.siteId=n.siteId,e.next=33;break;case 28:if(void 0===i.siteId){e.next=32;break}o.siteId=i.siteId,e.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return s=new $d("/organizations/{organizationId}/categories",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=mu(mu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=mu(mu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=39,Ro(s.toString(),d);case 39:if(u=e.sent,!r){e.next=44;break}return e.abrupt("return",u);case 44:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=48;break}throw new hs(u);case 48:return e.next=50,u.text();case 50:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getCategory",value:(t=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.id){e.next=16;break}a.id=n.id,e.next=21;break;case 16:if(void 0===i.id){e.next=20;break}a.id=i.id,e.next=21;break;case 20:throw new Error("Missing required path parameter: id");case 21:if(o={},void 0!==n.levels?o.levels=n.levels:void 0!==i.levels&&(o.levels=i.levels),void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),void 0===n.siteId){e.next=28;break}o.siteId=n.siteId,e.next=33;break;case 28:if(void 0===i.siteId){e.next=32;break}o.siteId=i.siteId,e.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return s=new $d("/organizations/{organizationId}/categories/{id}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=mu(mu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=mu(mu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=39,Ro(s.toString(),d);case 39:if(u=e.sent,!r){e.next=44;break}return e.abrupt("return",u);case 44:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=48;break}throw new hs(u);case 48:return e.next=50,u.text();case 50:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function yu(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 Cu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?yu(Object(r),!0).forEach((function(t){ri(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}ri(wu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/product/shopper-products/{version}");var zu=function(){function e(t){Zn(this,e),ri(this,"clientConfig",void 0);var r=Cu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new qo(r)}var t,r;return ti(e,[{key:"getPromotions",value:(r=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:if(void 0===n.ids){e.next=26;break}o.ids=n.ids,e.next=31;break;case 26:if(void 0===i.ids){e.next=30;break}o.ids=i.ids,e.next=31;break;case 30:throw new Error("Missing required query parameter: ids");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),s=new $d("/organizations/{organizationId}/promotions",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Cu(Cu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Cu(Cu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=38,Ro(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new hs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getPromotionsForCampaign",value:(t=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.campaignId){e.next=16;break}a.campaignId=n.campaignId,e.next=21;break;case 16:if(void 0===i.campaignId){e.next=20;break}a.campaignId=i.campaignId,e.next=21;break;case 20:throw new Error("Missing required path parameter: campaignId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.startDate?o.startDate=n.startDate:void 0!==i.startDate&&(o.startDate=i.startDate),void 0!==n.endDate?o.endDate=n.endDate:void 0!==i.endDate&&(o.endDate=i.endDate),void 0!==n.currency?o.currency=n.currency:void 0!==i.currency&&(o.currency=i.currency),s=new $d("/organizations/{organizationId}/promotions/campaigns/{campaignId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Cu(Cu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Cu(Cu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=40,Ro(s.toString(),d);case 40:if(u=e.sent,!r){e.next=45;break}return e.abrupt("return",u);case 45:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=49;break}throw new hs(u);case 49:return e.next=51,u.text();case 51:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 53:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();ri(zu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/pricing/shopper-promotions/{version}");var Ou=TypeError,Eu=function(e,t){if(!delete e[t])throw Ou("Cannot delete property "+W(t)+" of "+W(e))},qu=U.match(/firefox\/(\d+)/i),Pu=!!qu&&+qu[1],Su=/MSIE|Trident/.test(U),ju=U.match(/AppleWebKit\/(\d+)\./),Tu=!!ju&&+ju[1],Mu=[],Ru=m(Mu.sort),Au=m(Mu.push),Uu=c((function(){Mu.sort(void 0)})),Bu=c((function(){Mu.sort(null)})),Nu=Nn("sort"),_u=!c((function(){if(D)return D<70;if(!(Pu&&Pu>3)){if(Su)return!0;if(Tu)return Tu<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++)Mu.push({k:t+n,v:r})}for(Mu.sort((function(e,t){return t.v-e.v})),n=0;n<Mu.length;n++)t=Mu[n].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}}));function Lu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Du(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Lu(Object(r),!0).forEach((function(t){ri(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Lu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Rt({target:"Array",proto:!0,forced:Uu||!Bu||!Nu||!_u},{sort:function(e){void 0!==e&&Y(e);var t=ne(this);if(_u)return void 0===e?Ru(t):Ru(t,e);var r,n,i=[],a=pt(t);for(n=0;n<a;n++)n in t&&Au(i,t[n]);for(Ba(i,function(e){return function(t,r){return void 0===r?-1:void 0===t?1:void 0!==e?+e(t,r)||0:Ht(t)>Ht(r)?1:-1}}(e)),r=i.length,n=0;n<r;)t[n]=i[n++];for(;n<a;)Eu(t,n++);return t}});var Ju=function(){function e(t){Zn(this,e),ri(this,"clientConfig",void 0);var r=Du({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new qo(r)}var t,r;return ti(e,[{key:"productSearch",value:(r=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return void 0!==n.q?o.q=n.q:void 0!==i.q&&(o.q=i.q),void 0!==n.refine?o.refine=n.refine:void 0!==i.refine&&(o.refine=i.refine),void 0!==n.sort?o.sort=n.sort:void 0!==i.sort&&(o.sort=i.sort),void 0!==n.currency?o.currency=n.currency:void 0!==i.currency&&(o.currency=i.currency),void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),void 0!==n.expand?o.expand=n.expand:void 0!==i.expand&&(o.expand=i.expand),void 0!==n.offset?o.offset=n.offset:void 0!==i.offset&&(o.offset=i.offset),void 0!==n.limit?o.limit=n.limit:void 0!==i.limit&&(o.limit=i.limit),s=new $d("/organizations/{organizationId}/product-search",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Du(Du({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Du(Du({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=36,Ro(s.toString(),d);case 36:if(u=e.sent,!r){e.next=41;break}return e.abrupt("return",u);case 41:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=45;break}throw new hs(u);case 45:return e.next=47,u.text();case 47:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getSearchSuggestions",value:(t=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:if(void 0===n.q){e.next=26;break}o.q=n.q,e.next=31;break;case 26:if(void 0===i.q){e.next=30;break}o.q=i.q,e.next=31;break;case 30:throw new Error("Missing required query parameter: q");case 31:return void 0!==n.limit?o.limit=n.limit:void 0!==i.limit&&(o.limit=i.limit),void 0!==n.currency?o.currency=n.currency:void 0!==i.currency&&(o.currency=i.currency),void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),s=new $d("/organizations/{organizationId}/search-suggestions",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Du(Du({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Du(Du({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=40,Ro(s.toString(),d);case 40:if(u=e.sent,!r){e.next=45;break}return e.abrupt("return",u);case 45:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=49;break}throw new hs(u);case 49:return e.next=51,u.text();case 51:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 53:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();ri(Ju,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/search/shopper-search/{version}/");var Fu=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};As("search",(function(e,t,r){return[function(t){var r=P(this),n=null==t?void 0:K(t,e);return n?h(n,t,r):new RegExp(t)[e](Ht(r))},function(e){var n=qe(this),i=Ht(e),a=r(t,n,i);if(a.done)return a.value;var o=n.lastIndex;Fu(o,0)||(n.lastIndex=0);var s=Vs(n,i);return Fu(n.lastIndex,o)||(n.lastIndex=o),null===s?-1:s.index}]}));var Gu=le("iterator"),Hu=!1;try{var Vu=0,Wu={next:function(){return{done:!!Vu++}},return:function(){Hu=!0}};Wu[Gu]=function(){return this},Array.from(Wu,(function(){throw 2}))}catch(e){}var $u,Yu,Ku,Qu=function(e,t){if(!t&&!Hu)return!1;var r=!1;try{var n={};n[Gu]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r},Xu="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView,Zu=Te.f,ef=tt.enforce,tf=tt.get,rf=s.Int8Array,nf=rf&&rf.prototype,af=s.Uint8ClampedArray,of=af&&af.prototype,sf=rf&&Di(rf),cf=nf&&Di(nf),df=Object.prototype,uf=s.TypeError,ff=le("toStringTag"),hf=de("TYPED_ARRAY_TAG"),pf=Xu&&!!Ki&&"Opera"!==Ft(s.opera),lf=!1,gf={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},bf={BigInt64Array:8,BigUint64Array:8},vf=function(e){var t=Di(e);if(T(t)){var r=tf(t);return r&&ae(r,"TypedArrayConstructor")?r.TypedArrayConstructor:vf(t)}},If=function(e){if(!T(e))return!1;var t=Ft(e);return ae(gf,t)||ae(bf,t)};for($u in gf)(Ku=(Yu=s[$u])&&Yu.prototype)?ef(Ku).TypedArrayConstructor=Yu:pf=!1;for($u in bf)(Ku=(Yu=s[$u])&&Yu.prototype)&&(ef(Ku).TypedArrayConstructor=Yu);if((!pf||!j(sf)||sf===Function.prototype)&&(sf=function(){throw uf("Incorrect invocation")},pf))for($u in gf)s[$u]&&Ki(s[$u],sf);if((!pf||!cf||cf===df)&&(cf=sf.prototype,pf))for($u in gf)s[$u]&&Ki(s[$u].prototype,cf);if(pf&&Di(of)!==cf&&Ki(of,cf),d&&!ae(cf,ff))for($u in lf=!0,Zu(cf,ff,{get:function(){return T(this)?this[hf]:void 0}}),gf)s[$u]&&Me(s[$u],hf,$u);var kf={NATIVE_ARRAY_BUFFER_VIEWS:pf,TYPED_ARRAY_TAG:lf&&hf,aTypedArray:function(e){if(If(e))return e;throw uf("Target is not a typed array")},aTypedArrayConstructor:function(e){if(j(e)&&(!Ki||A(sf,e)))return e;throw uf(W(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,r,n){if(d){if(r)for(var i in gf){var a=s[i];if(a&&ae(a.prototype,e))try{delete a.prototype[e]}catch(r){try{a.prototype[e]=t}catch(e){}}}cf[e]&&!r||nt(cf,e,r?t:pf&&nf[e]||t,n)}},exportTypedArrayStaticMethod:function(e,t,r){var n,i;if(d){if(Ki){if(r)for(n in gf)if((i=s[n])&&ae(i,e))try{delete i[e]}catch(e){}if(sf[e]&&!r)return;try{return nt(sf,e,r?t:pf&&sf[e]||t)}catch(e){}}for(n in gf)!(i=s[n])||i[e]&&!r||nt(i,e,t)}},getTypedArrayConstructor:vf,isView:function(e){if(!T(e))return!1;var t=Ft(e);return"DataView"===t||ae(gf,t)||ae(bf,t)},isTypedArray:If,TypedArray:sf,TypedArrayPrototype:cf},xf=kf.NATIVE_ARRAY_BUFFER_VIEWS,mf=s.ArrayBuffer,wf=s.Int8Array,yf=!xf||!c((function(){wf(1)}))||!c((function(){new wf(-1)}))||!Qu((function(e){new wf,new wf(null),new wf(1.5),new wf(e)}),!0)||c((function(){return 1!==new wf(new mf(2),1,void 0).length})),Cf=RangeError,zf=function(e){if(void 0===e)return 0;var t=st(e),r=ht(t);if(t!==r)throw Cf("Wrong length or index");return r},Of=Array,Ef=Math.abs,qf=Math.pow,Pf=Math.floor,Sf=Math.log,jf=Math.LN2,Tf=function(e,t,r){var n,i,a,o=Of(r),s=8*r-t-1,c=(1<<s)-1,d=c>>1,u=23===t?qf(2,-24)-qf(2,-77):0,f=e<0||0===e&&1/e<0?1:0,h=0;for((e=Ef(e))!=e||e===1/0?(i=e!=e?1:0,n=c):(n=Pf(Sf(e)/jf),e*(a=qf(2,-n))<1&&(n--,a*=2),(e+=n+d>=1?u/a:u*qf(2,1-d))*a>=2&&(n++,a/=2),n+d>=c?(i=0,n=c):n+d>=1?(i=(e*a-1)*qf(2,t),n+=d):(i=e*qf(2,d-1)*qf(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},Mf=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+=qf(2,t),u-=o}return(d?-1:1)*r*qf(2,u-t)},Rf=function(e){for(var t=ne(this),r=pt(t),n=arguments.length,i=ut(n>1?arguments[1]:void 0,r),a=n>2?arguments[2]:void 0,o=void 0===a?r:ut(a,r);o>i;)t[i++]=e;return t},Af=mt.f,Uf=Te.f,Bf=Be.PROPER,Nf=Be.CONFIGURABLE,_f=tt.get,Lf=tt.set,Df=s.ArrayBuffer,Jf=Df,Ff=Jf&&Jf.prototype,Gf=s.DataView,Hf=Gf&&Gf.prototype,Vf=Object.prototype,Wf=s.Array,$f=s.RangeError,Yf=m(Rf),Kf=m([].reverse),Qf=Tf,Xf=Mf,Zf=function(e){return[255&e]},eh=function(e){return[255&e,e>>8&255]},th=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},rh=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},nh=function(e){return Qf(e,23,4)},ih=function(e){return Qf(e,52,8)},ah=function(e,t){Uf(e.prototype,t,{get:function(){return _f(this)[t]}})},oh=function(e,t,r,n){var i=zf(r),a=_f(e);if(i+t>a.byteLength)throw $f("Wrong index");var o=_f(a.buffer).bytes,s=i+a.byteOffset,c=nr(o,s,s+t);return n?c:Kf(c)},sh=function(e,t,r,n,i,a){var o=zf(r),s=_f(e);if(o+t>s.byteLength)throw $f("Wrong index");for(var c=_f(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(Xu){var ch=Bf&&"ArrayBuffer"!==Df.name;if(c((function(){Df(1)}))&&c((function(){new Df(-1)}))&&!c((function(){return new Df,new Df(1.5),new Df(NaN),ch&&!Nf})))ch&&Nf&&Me(Df,"name","ArrayBuffer");else{(Jf=function(e){return Oa(this,Ff),new Df(zf(e))}).prototype=Ff;for(var dh,uh=Af(Df),fh=0;uh.length>fh;)(dh=uh[fh++])in Jf||Me(Jf,dh,Df[dh]);Ff.constructor=Jf}Ki&&Di(Hf)!==Vf&&Ki(Hf,Vf);var hh=new Gf(new Jf(2)),ph=m(Hf.setInt8);hh.setInt8(0,2147483648),hh.setInt8(1,2147483649),!hh.getInt8(0)&&hh.getInt8(1)||Ca(Hf,{setInt8:function(e,t){ph(this,e,t<<24>>24)},setUint8:function(e,t){ph(this,e,t<<24>>24)}},{unsafe:!0})}else Ff=(Jf=function(e){Oa(this,Ff);var t=zf(e);Lf(this,{bytes:Yf(Wf(t),0),byteLength:t}),d||(this.byteLength=t)}).prototype,Hf=(Gf=function(e,t,r){Oa(this,Hf),Oa(e,Ff);var n=_f(e).byteLength,i=st(t);if(i<0||i>n)throw $f("Wrong offset");if(i+(r=void 0===r?n-i:ht(r))>n)throw $f("Wrong length");Lf(this,{buffer:e,byteLength:r,byteOffset:i}),d||(this.buffer=e,this.byteLength=r,this.byteOffset=i)}).prototype,d&&(ah(Jf,"byteLength"),ah(Gf,"buffer"),ah(Gf,"byteLength"),ah(Gf,"byteOffset")),Ca(Hf,{getInt8:function(e){return oh(this,1,e)[0]<<24>>24},getUint8:function(e){return oh(this,1,e)[0]},getInt16:function(e){var t=oh(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=oh(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return rh(oh(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return rh(oh(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return Xf(oh(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return Xf(oh(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){sh(this,1,e,Zf,t)},setUint8:function(e,t){sh(this,1,e,Zf,t)},setInt16:function(e,t){sh(this,2,e,eh,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){sh(this,2,e,eh,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){sh(this,4,e,th,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){sh(this,4,e,th,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){sh(this,4,e,nh,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){sh(this,8,e,ih,t,arguments.length>2?arguments[2]:void 0)}});hr(Jf,"ArrayBuffer"),hr(Gf,"DataView");var lh={ArrayBuffer:Jf,DataView:Gf},gh=Math.floor,bh=Number.isInteger||function(e){return!T(e)&&isFinite(e)&&gh(e)===e},vh=RangeError,Ih=RangeError,kh=function(e,t){var r=function(e){var t=st(e);if(t<0)throw vh("The argument can't be less than 0");return t}(e);if(r%t)throw Ih("Wrong offset");return r},xh=kf.aTypedArrayConstructor,mh=function(e){var t,r,n,i,a,o,s=Jo(this),c=ne(e),d=arguments.length,u=d>1?arguments[1]:void 0,f=void 0!==u,p=qa(c);if(p&&!hc(p))for(o=(a=Sa(c,p)).next,c=[];!(i=h(o,a)).done;)c.push(i.value);for(f&&d>2&&(u=lr(u,arguments[2])),r=pt(c),n=new(xh(s))(r),t=0;r>t;t++)n[t]=f?u(c[t],t):c[t];return n},wh=le("species"),yh=function(e){var t=R(e),r=Te.f;d&&t&&!t[wh]&&r(t,wh,{configurable:!0,get:function(){return this}})};n((function(e){var t=mt.f,r=Sr.forEach,n=tt.get,i=tt.set,a=tt.enforce,o=Te.f,c=Ce.f,u=Math.round,f=s.RangeError,p=lh.ArrayBuffer,l=p.prototype,g=lh.DataView,v=kf.NATIVE_ARRAY_BUFFER_VIEWS,I=kf.TYPED_ARRAY_TAG,k=kf.TypedArray,x=kf.TypedArrayPrototype,m=kf.aTypedArrayConstructor,w=kf.isTypedArray,y=function(e,t){m(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=Ft(e))||"SharedArrayBuffer"==t},O=function(e,t){return w(e)&&!H(t)&&t in e&&bh(+t)&&t>=0},E=function(e,t){return t=Ie(t),O(e,t)?b(2,e[t]):c(e,t)},q=function(e,t,r){return t=Ie(t),!(O(e,t)&&T(r)&&ae(r,"value"))||ae(r,"get")||ae(r,"set")||r.configurable||ae(r,"writable")&&!r.writable||ae(r,"enumerable")&&!r.enumerable?o(e,t,r):(e[t]=r.value,e)};d?(v||(Ce.f=E,Te.f=q,C(x,"buffer"),C(x,"byteOffset"),C(x,"byteLength"),C(x,"length")),Rt({target:"Object",stat:!0,forced:!v},{getOwnPropertyDescriptor:E,defineProperty:q}),e.exports=function(e,c,d){var l=e.match(/\d+$/)[0]/8,b=e+(d?"Clamped":"")+"Array",m="get"+e,C="set"+e,O=s[b],E=O,q=E&&E.prototype,P={},S=function(e,t){o(e,t,{get:function(){return function(e,t){var r=n(e);return r.view[m](t*l+r.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,r){var i=n(e);d&&(r=(r=u(r))<0?0:r>255?255:255&r),i.view[C](t*l+i.byteOffset,r,!0)}(this,t,e)},enumerable:!0})};v?yf&&(E=c((function(e,t,r,n){return Oa(e,q),function(e,t,r){var n,i;return Ki&&j(n=t.constructor)&&n!==r&&T(i=n.prototype)&&i!==r.prototype&&Ki(e,i),e}(T(t)?z(t)?void 0!==n?new O(t,kh(r,l),n):void 0!==r?new O(t,kh(r,l)):new O(t):w(t)?y(E,t):h(mh,E,t):new O(zf(t)),e,E)})),Ki&&Ki(E,k),r(t(O),(function(e){e in E||Me(E,e,O[e])})),E.prototype=q):(E=c((function(e,t,r,n){Oa(e,q);var a,o,s,c=0,d=0;if(T(t)){if(!z(t))return w(t)?y(E,t):h(mh,E,t);a=t,d=kh(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=ht(n)*l)+d>u)throw f("Wrong length");s=o/l}else s=zf(t),a=new p(o=s*l);for(i(e,{buffer:a,byteOffset:d,byteLength:o,length:s,view:new g(a)});c<s;)S(e,c++)})),Ki&&Ki(E,k),q=E.prototype=Zt(x)),q.constructor!==E&&Me(q,"constructor",E),a(q).TypedArrayConstructor=E,I&&Me(q,I,b);var M=E!=O;P[b]=E,Rt({global:!0,constructor:!0,forced:M,sham:!v},P),"BYTES_PER_ELEMENT"in E||Me(E,"BYTES_PER_ELEMENT",l),"BYTES_PER_ELEMENT"in q||Me(q,"BYTES_PER_ELEMENT",l),yh(b)}):e.exports=function(){}}))("Uint8",(function(e){return function(t,r,n){return e(this,t,r,n)}}));var Ch=Math.min,zh=m([].copyWithin||function(e,t){var r=ne(this),n=pt(r),i=ut(e,n),a=ut(t,n),o=arguments.length>2?arguments[2]:void 0,s=Ch((void 0===o?n:ut(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]:Eu(r,i),i+=c,a+=c;return r}),Oh=kf.aTypedArray;(0,kf.exportTypedArrayMethod)("copyWithin",(function(e,t){return zh(Oh(this),e,t,arguments.length>2?arguments[2]:void 0)}));var Eh=Sr.every,qh=kf.aTypedArray;(0,kf.exportTypedArrayMethod)("every",(function(e){return Eh(qh(this),e,arguments.length>1?arguments[1]:void 0)}));var Ph=TypeError,Sh=function(e){var t=ve(e,"number");if("number"==typeof t)throw Ph("Can't convert number to bigint");return BigInt(t)},jh=kf.aTypedArray,Th=kf.exportTypedArrayMethod,Mh=m("".slice);Th("fill",(function(e){var t=arguments.length;jh(this);var r="Big"===Mh(Ft(this),0,3)?Sh(e):+e;return h(Rf,this,r,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}),c((function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e})));var Rh=le("species"),Ah=function(e,t){var r,n=qe(e).constructor;return void 0===n||null==(r=qe(n)[Rh])?t:Jo(r)},Uh=kf.aTypedArrayConstructor,Bh=kf.getTypedArrayConstructor,Nh=function(e){return Uh(Ah(e,Bh(e)))},_h=function(e,t){return function(e,t){for(var r=0,n=pt(t),i=new e(n);n>r;)i[r]=t[r++];return i}(Nh(e),t)},Lh=Sr.filter,Dh=kf.aTypedArray;(0,kf.exportTypedArrayMethod)("filter",(function(e){var t=Lh(Dh(this),e,arguments.length>1?arguments[1]:void 0);return _h(this,t)}));var Jh=Sr.find,Fh=kf.aTypedArray;(0,kf.exportTypedArrayMethod)("find",(function(e){return Jh(Fh(this),e,arguments.length>1?arguments[1]:void 0)}));var Gh=Sr.findIndex,Hh=kf.aTypedArray;(0,kf.exportTypedArrayMethod)("findIndex",(function(e){return Gh(Hh(this),e,arguments.length>1?arguments[1]:void 0)}));var Vh=Sr.forEach,Wh=kf.aTypedArray;(0,kf.exportTypedArrayMethod)("forEach",(function(e){Vh(Wh(this),e,arguments.length>1?arguments[1]:void 0)}));var $h=gt.includes,Yh=kf.aTypedArray;(0,kf.exportTypedArrayMethod)("includes",(function(e){return $h(Yh(this),e,arguments.length>1?arguments[1]:void 0)}));var Kh=gt.indexOf,Qh=kf.aTypedArray;(0,kf.exportTypedArrayMethod)("indexOf",(function(e){return Kh(Qh(this),e,arguments.length>1?arguments[1]:void 0)}));var Xh=le("iterator"),Zh=s.Uint8Array,ep=m(sa.values),tp=m(sa.keys),rp=m(sa.entries),np=kf.aTypedArray,ip=kf.exportTypedArrayMethod,ap=Zh&&Zh.prototype,op=!c((function(){ap[Xh].call([1])})),sp=!!ap&&ap.values&&ap[Xh]===ap.values&&"values"===ap.values.name,cp=function(){return ep(np(this))};ip("entries",(function(){return rp(np(this))}),op),ip("keys",(function(){return tp(np(this))}),op),ip("values",cp,op||!sp,{name:"values"}),ip(Xh,cp,op||!sp,{name:"values"});var dp=kf.aTypedArray,up=kf.exportTypedArrayMethod,fp=m([].join);up("join",(function(e){return fp(dp(this),e)}));var hp=Math.min,pp=[].lastIndexOf,lp=!!pp&&1/[1].lastIndexOf(1,-0)<0,gp=Nn("lastIndexOf"),bp=lp||!gp?function(e){if(lp)return fn(pp,this,arguments)||0;var t=S(this),r=pt(t),n=r-1;for(arguments.length>1&&(n=hp(n,st(arguments[1]))),n<0&&(n=r+n);n>=0;n--)if(n in t&&t[n]===e)return n||0;return-1}:pp,vp=kf.aTypedArray;(0,kf.exportTypedArrayMethod)("lastIndexOf",(function(e){var t=arguments.length;return fn(bp,vp(this),t>1?[e,arguments[1]]:[e])}));var Ip=Sr.map,kp=kf.aTypedArray;(0,kf.exportTypedArrayMethod)("map",(function(e){return Ip(kp(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new(Nh(e))(t)}))}));var xp=TypeError,mp=function(e){return function(t,r,n,i){Y(r);var a=ne(t),o=E(a),s=pt(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 xp("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}},wp={left:mp(!1),right:mp(!0)},yp=wp.left,Cp=kf.aTypedArray;(0,kf.exportTypedArrayMethod)("reduce",(function(e){var t=arguments.length;return yp(Cp(this),e,t,t>1?arguments[1]:void 0)}));var zp=wp.right,Op=kf.aTypedArray;(0,kf.exportTypedArrayMethod)("reduceRight",(function(e){var t=arguments.length;return zp(Op(this),e,t,t>1?arguments[1]:void 0)}));var Ep=kf.aTypedArray,qp=kf.exportTypedArrayMethod,Pp=Math.floor;qp("reverse",(function(){for(var e,t=Ep(this).length,r=Pp(t/2),n=0;n<r;)e=this[n],this[n++]=this[--t],this[t]=e;return this}));var Sp=s.RangeError,jp=s.Int8Array,Tp=jp&&jp.prototype,Mp=Tp&&Tp.set,Rp=kf.aTypedArray,Ap=kf.exportTypedArrayMethod,Up=!c((function(){var e=new Uint8ClampedArray(2);return h(Mp,e,{length:1,0:3},1),3!==e[1]})),Bp=Up&&kf.NATIVE_ARRAY_BUFFER_VIEWS&&c((function(){var e=new jp(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}));Ap("set",(function(e){Rp(this);var t=kh(arguments.length>1?arguments[1]:void 0,1),r=ne(e);if(Up)return h(Mp,this,r,t);var n=this.length,i=pt(r),a=0;if(i+t>n)throw Sp("Wrong length");for(;a<i;)this[t+a]=r[a++]}),!Up||Bp);var Np=kf.aTypedArray;(0,kf.exportTypedArrayMethod)("slice",(function(e,t){for(var r=hn(Np(this),e,t),n=Nh(this),i=0,a=r.length,o=new n(a);a>i;)o[i]=r[i++];return o}),c((function(){new Int8Array(1).slice()})));var _p=Sr.some,Lp=kf.aTypedArray;(0,kf.exportTypedArrayMethod)("some",(function(e){return _p(Lp(this),e,arguments.length>1?arguments[1]:void 0)}));var Dp=kf.aTypedArray,Jp=kf.exportTypedArrayMethod,Fp=s.Uint16Array,Gp=Fp&&m(Fp.prototype.sort),Hp=!(!Gp||c((function(){Gp(new Fp(2),null)}))&&c((function(){Gp(new Fp(2),{})}))),Vp=!!Gp&&!c((function(){if(D)return D<74;if(Pu)return Pu<67;if(Su)return!0;if(Tu)return Tu<602;var e,t,r=new Fp(516),n=Array(516);for(e=0;e<516;e++)t=e%4,r[e]=515-e,n[e]=e-2*t+3;for(Gp(r,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(r[e]!==n[e])return!0}));Jp("sort",(function(e){return void 0!==e&&Y(e),Vp?Gp(this,e):Ba(Dp(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))}),!Vp||Hp);var Wp=s.Int8Array,$p=kf.aTypedArray,Yp=kf.exportTypedArrayMethod,Kp=[].toLocaleString,Qp=!!Wp&&c((function(){Kp.call(new Wp(1))}));Yp("toLocaleString",(function(){return fn(Kp,Qp?hn($p(this)):$p(this),hn(arguments))}),c((function(){return[1,2].toLocaleString()!=new Wp([1,2]).toLocaleString()}))||!c((function(){Wp.prototype.toLocaleString.call([1,2])})));var Xp=kf.exportTypedArrayMethod,Zp=s.Uint8Array,el=Zp&&Zp.prototype||{},tl=[].toString,rl=m([].join);c((function(){tl.call({})}))&&(tl=function(){return rl(this)});var nl=el.toString!=tl;Xp("toString",tl,nl);var il,al,ol,sl,cl="process"==C(s.process),dl=/(?:ipad|iphone|ipod).*applewebkit/i.test(U),ul=s.setImmediate,fl=s.clearImmediate,hl=s.process,pl=s.Dispatch,ll=s.Function,gl=s.MessageChannel,bl=s.String,vl=0,Il={};try{il=s.location}catch(e){}var kl=function(e){if(ae(Il,e)){var t=Il[e];delete Il[e],t()}},xl=function(e){return function(){kl(e)}},ml=function(e){kl(e.data)},wl=function(e){s.postMessage(bl(e),il.protocol+"//"+il.host)};ul&&fl||(ul=function(e){Ta(arguments.length,1);var t=j(e)?e:ll(e),r=hn(arguments,1);return Il[++vl]=function(){fn(t,void 0,r)},al(vl),vl},fl=function(e){delete Il[e]},cl?al=function(e){hl.nextTick(xl(e))}:pl&&pl.now?al=function(e){pl.now(xl(e))}:gl&&!dl?(sl=(ol=new gl).port2,ol.port1.onmessage=ml,al=lr(sl.postMessage,sl)):s.addEventListener&&j(s.postMessage)&&!s.importScripts&&il&&"file:"!==il.protocol&&!c(wl)?(al=wl,s.addEventListener("message",ml,!1)):al="onreadystatechange"in me("script")?function(e){Wt.appendChild(me("script")).onreadystatechange=function(){Wt.removeChild(this),kl(e)}}:function(e){setTimeout(xl(e),0)});var yl,Cl,zl,Ol,El,ql,Pl,Sl,jl={set:ul,clear:fl},Tl=/ipad|iphone|ipod/i.test(U)&&void 0!==s.Pebble,Ml=/web0s(?!.*chrome)/i.test(U),Rl=Ce.f,Al=jl.set,Ul=s.MutationObserver||s.WebKitMutationObserver,Bl=s.document,Nl=s.process,_l=s.Promise,Ll=Rl(s,"queueMicrotask"),Dl=Ll&&Ll.value;Dl||(yl=function(){var e,t;for(cl&&(e=Nl.domain)&&e.exit();Cl;){t=Cl.fn,Cl=Cl.next;try{t()}catch(e){throw Cl?Ol():zl=void 0,e}}zl=void 0,e&&e.enter()},dl||cl||Ml||!Ul||!Bl?!Tl&&_l&&_l.resolve?((Pl=_l.resolve(void 0)).constructor=_l,Sl=lr(Pl.then,Pl),Ol=function(){Sl(yl)}):cl?Ol=function(){Nl.nextTick(yl)}:(Al=lr(Al,s),Ol=function(){Al(yl)}):(El=!0,ql=Bl.createTextNode(""),new Ul(yl).observe(ql,{characterData:!0}),Ol=function(){ql.data=El=!El}));var Jl=Dl||function(e){var t={fn:e,next:void 0};zl&&(zl.next=t),Cl||(Cl=t,Ol()),zl=t},Fl=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},Gl=function(){this.head=null,this.tail=null};Gl.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 Hl=Gl,Vl=s.Promise,Wl="object"==typeof window&&"object"!=typeof Deno;Vl&&Vl.prototype;var $l,Yl,Kl,Ql=le("species"),Xl=!1,Zl=j(s.PromiseRejectionEvent),eg={CONSTRUCTOR:Tt("Promise",(function(){var e=Je(Vl),t=e!==String(Vl);if(!t&&66===D)return!0;if(D>=51&&/native code/.test(e))return!1;var r=new Vl((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};return(r.constructor={})[Ql]=n,!(Xl=r.then((function(){}))instanceof n)||!t&&Wl&&!Zl})),REJECTION_EVENT:Zl,SUBCLASSING:Xl},tg=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=Y(t),this.reject=Y(r)},rg={f:function(e){return new tg(e)}},ng=jl.set,ig=eg.CONSTRUCTOR,ag=eg.REJECTION_EVENT,og=eg.SUBCLASSING,sg=tt.getterFor("Promise"),cg=tt.set,dg=Vl&&Vl.prototype,ug=Vl,fg=dg,hg=s.TypeError,pg=s.document,lg=s.process,gg=rg.f,bg=gg,vg=!!(pg&&pg.createEvent&&s.dispatchEvent),Ig=function(e){var t;return!(!T(e)||!j(t=e.then))&&t},kg=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&&Cg(t),t.rejection=1),!0===s?r=a:(u&&u.enter(),r=s(a),u&&(u.exit(),i=!0)),r===e.promise?d(hg("Promise-chain cycle")):(n=Ig(r))?h(n,r,c,d):c(r)):d(a)}catch(e){u&&!i&&u.exit(),d(e)}},xg=function(e,t){e.notified||(e.notified=!0,Jl((function(){for(var r,n=e.reactions;r=n.get();)kg(r,e);e.notified=!1,t&&!e.rejection&&wg(e)})))},mg=function(e,t,r){var n,i;vg?((n=pg.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),s.dispatchEvent(n)):n={promise:t,reason:r},!ag&&(i=s["on"+e])?i(n):"unhandledrejection"===e&&function(e,t){var r=s.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))}("Unhandled promise rejection",r)},wg=function(e){h(ng,s,(function(){var t,r=e.facade,n=e.value;if(yg(e)&&(t=Fl((function(){cl?lg.emit("unhandledRejection",n,r):mg("unhandledrejection",r,n)})),e.rejection=cl||yg(e)?2:1,t.error))throw t.value}))},yg=function(e){return 1!==e.rejection&&!e.parent},Cg=function(e){h(ng,s,(function(){var t=e.facade;cl?lg.emit("rejectionHandled",t):mg("rejectionhandled",t,e.value)}))},zg=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,xg(e,!0))},Eg=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw hg("Promise can't be resolved itself");var n=Ig(t);n?Jl((function(){var r={done:!1};try{h(n,t,zg(Eg,r,e),zg(Og,r,e))}catch(t){Og(r,t,e)}})):(e.value=t,e.state=1,xg(e,!1))}catch(t){Og({done:!1},t,e)}}};if(ig&&(fg=(ug=function(e){Oa(this,fg),Y(e),h($l,this);var t=sg(this);try{e(zg(Eg,t),zg(Og,t))}catch(e){Og(t,e)}}).prototype,($l=function(e){cg(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:new Hl,rejection:!1,state:0,value:void 0})}).prototype=nt(fg,"then",(function(e,t){var r=sg(this),n=gg(Ah(this,ug));return r.parent=!0,n.ok=!j(e)||e,n.fail=j(t)&&t,n.domain=cl?lg.domain:void 0,0==r.state?r.reactions.add(n):Jl((function(){kg(n,r)})),n.promise})),Yl=function(){var e=new $l,t=sg(e);this.promise=e,this.resolve=zg(Eg,t),this.reject=zg(Og,t)},rg.f=gg=function(e){return e===ug||void 0===e?new Yl(e):bg(e)},j(Vl)&&dg!==Object.prototype)){Kl=dg.then,og||nt(dg,"then",(function(e,t){var r=this;return new ug((function(e,t){h(Kl,r,e,t)})).then(e,t)}),{unsafe:!0});try{delete dg.constructor}catch(e){}Ki&&Ki(dg,fg)}Rt({global:!0,constructor:!0,wrap:!0,forced:ig},{Promise:ug}),hr(ug,"Promise",!1),yh("Promise");var qg=TypeError,Pg=function(e,t){this.stopped=e,this.result=t},Sg=Pg.prototype,jg=function(e,t,r){var n,i,a,o,s,c,d,u=r&&r.that,f=!(!r||!r.AS_ENTRIES),p=!(!r||!r.IS_RECORD),l=!(!r||!r.IS_ITERATOR),g=!(!r||!r.INTERRUPTED),b=lr(t,u),v=function(e){return n&&cc(n,"normal",e),new Pg(!0,e)},I=function(e){return f?(qe(e),g?b(e[0],e[1],v):b(e[0],e[1])):g?b(e,v):b(e)};if(p)n=e.iterator;else if(l)n=e;else{if(!(i=qa(e)))throw qg(W(e)+" is not iterable");if(hc(i)){for(a=0,o=pt(e);o>a;a++)if((s=I(e[a]))&&A(Sg,s))return s;return new Pg(!1)}n=Sa(e,i)}for(c=p?e.next:n.next;!(d=h(c,n)).done;){try{s=I(d.value)}catch(e){cc(n,"throw",e)}if("object"==typeof s&&s&&A(Sg,s))return s}return new Pg(!1)},Tg=eg.CONSTRUCTOR||!Qu((function(e){Vl.all(e).then(void 0,(function(){}))}));Rt({target:"Promise",stat:!0,forced:Tg},{all:function(e){var t=this,r=rg.f(t),n=r.resolve,i=r.reject,a=Fl((function(){var r=Y(t.resolve),a=[],o=0,s=1;jg(e,(function(e){var c=o++,d=!1;s++,h(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 Mg=eg.CONSTRUCTOR,Rg=Vl&&Vl.prototype;if(Rt({target:"Promise",proto:!0,forced:Mg,real:!0},{catch:function(e){return this.then(void 0,e)}}),j(Vl)){var Ag=R("Promise").prototype.catch;Rg.catch!==Ag&&nt(Rg,"catch",Ag,{unsafe:!0})}Rt({target:"Promise",stat:!0,forced:Tg},{race:function(e){var t=this,r=rg.f(t),n=r.reject,i=Fl((function(){var i=Y(t.resolve);jg(e,(function(e){h(i,t,e).then(r.resolve,n)}))}));return i.error&&n(i.value),r.promise}}),Rt({target:"Promise",stat:!0,forced:eg.CONSTRUCTOR},{reject:function(e){var t=rg.f(this);return h(t.reject,void 0,e),t.promise}});var Ug=eg.CONSTRUCTOR;function Bg(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 Ng(e){return function(e){if(Array.isArray(e))return Bg(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 Bg(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)?Bg(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 _g(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 Lg(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_g(Object(r),!0).forEach((function(t){ri(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_g(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}R("Promise"),Rt({target:"Promise",stat:!0,forced:Ug},{resolve:function(e){return function(e,t){if(qe(e),T(t)&&t.constructor===e)return t;var r=rg.f(e);return(0,r.resolve)(t),r.promise}(this,e)}}),Rt({target:"Object",stat:!0},{fromEntries:function(e){var t={};return jg(e,(function(e,r){er(t,e,r)}),{AS_ENTRIES:!0}),t}});var Dg=So?btoa:function(e){return Buffer.from(e).toString("base64")},Jg=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}},Fg=function(){return t.nanoid(128)},Gg=function(){var e=Xn(qi.mark((function e(t){var r,n,i,a,o,s,c;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=function(e){return e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")},n="",!So||!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,Ng(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 Hg(e,t,r){return Vg.apply(this,arguments)}function Vg(){return(Vg=Xn(qi.mark((function e(t,r,n){var i,a,o,s,c,d,u,f;return qi.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 bu(t.clientConfig)).clientConfig.fetchOptions=Lg(Lg({},t.clientConfig.fetchOptions),{},{redirect:So?"follow":"manual"}),s={parameters:Lg(Lg({client_id:t.clientConfig.parameters.clientId,channel_id:t.clientConfig.parameters.siteId,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,u=new URL(d),f=Object.fromEntries(u.searchParams.entries()),!(c.status>=400||f.error)){e.next=14;break}throw new hs(c);case 14:return e.abrupt("return",Lg({url:d},Jg(d)));case 15:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Wg(){return(Wg=Xn(qi.mark((function e(t,r){var n,i,a;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Fg(),e.next=3,Hg(t,n,Lg({redirectURI:r.redirectURI,hint:"guest"},r.usid&&{usid:r.usid}));case 3:return i=e.sent,a={client_id:t.clientConfig.parameters.clientId,channel_id:t.clientConfig.parameters.siteId,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 $g(){return($g=Xn(qi.mark((function e(t,r,n){var i,a,o,s,c,d,u,f,h,p,l,g;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=Fg(),e.next=3,Gg(a);case 3:return o=e.sent,(s=new bu(t.clientConfig)).clientConfig.fetchOptions=Lg(Lg({},t.clientConfig.fetchOptions),{},{redirect:So?"follow":"manual"}),c="Basic ".concat(Dg("".concat(r.username,":").concat(r.password))),d={headers:{Authorization:c},parameters:{organizationId:t.clientConfig.parameters.organizationId},body:Lg({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(u=e.sent,f=(null===(i=u.headers)||void 0===i?void 0:i.get("location"))||u.url,h=new URL(f),p=Object.fromEntries(h.searchParams.entries()),!(u.status>=400||p.error)){e.next=16;break}throw new hs(u);case 16:return l=Jg(f),g={client_id:t.clientConfig.parameters.clientId,channel_id:t.clientConfig.parameters.siteId,code:l.code,code_verifier:a,grant_type:"authorization_code_pkce",organizationId:t.clientConfig.parameters.organizationId,redirect_uri:n.redirectURI,usid:l.usid},e.abrupt("return",t.getAccessToken({body:g}));case 19:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Yg=Object.freeze({__proto__:null,isBrowser:So,isNode:jo,globalObject:To,hasFetchAvailable:Mo,fetch:Ro,stringToBase64:Dg,getCodeAndUsidFromUrl:Jg,createCodeVerifier:Fg,generateCodeChallenge:Gg,authorize:Hg,loginGuestUser:function(e,t){return Wg.apply(this,arguments)},loginRegisteredUserB2C:function(e,t,r){return $g.apply(this,arguments)},refreshAccessToken:function(e,t){var r={grant_type:"refresh_token",refresh_token:t.refreshToken,client_id:e.clientConfig.parameters.clientId,channel_id:e.clientConfig.parameters.siteId};return e.getAccessToken({body:r})},logout:function(e,t){return e.logoutCustomer({headers:{Authorization:"Bearer ".concat(t.accessToken)},parameters:{refresh_token:t.refreshToken,client_id:e.clientConfig.parameters.clientId,channel_id:e.clientConfig.parameters.siteId}})}});e.ClientConfig=qo,e.ShopperBaskets=Xd,e.ShopperContexts=tu,e.ShopperCustomers=iu,e.ShopperDiscoverySearch=su,e.ShopperExperience=uu,e.ShopperGiftCertificates=pu,e.ShopperLogin=bu,e.ShopperOrders=ku,e.ShopperProducts=wu,e.ShopperPromotions=zu,e.ShopperSearch=Ju,e.TemplateURL=$d,e.helpers=Yg,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("nanoid")):"function"==typeof define&&define.amd?define(["exports","nanoid"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).CommerceSdk={},e.nanoid)}(this,(function(e,t){"use strict";var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e,t,r){return e(r={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&r.path)}},r.exports),r.exports}var i,a,o=function(e){return e&&e.Math==Math&&e},s=o("object"==typeof globalThis&&globalThis)||o("object"==typeof window&&window)||o("object"==typeof self&&self)||o("object"==typeof r&&r)||function(){return this}()||Function("return this")(),c=function(e){try{return!!e()}catch(e){return!0}},d=!c((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),u=!c((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),h=Function.prototype.call,f=u?h.bind(h):function(){return h.apply(h,arguments)},p={}.propertyIsEnumerable,l=Object.getOwnPropertyDescriptor,g={f:l&&!p.call({1:2},1)?function(e){var t=l(this,e);return!!t&&t.enumerable}:p},b=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},v=Function.prototype,I=v.bind,k=v.call,m=u&&I.bind(k,k),x=u?function(e){return e&&m(e)}:function(e){return e&&function(){return k.apply(e,arguments)}},y=x({}.toString),w=x("".slice),C=function(e){return w(y(e),8,-1)},O=Object,z=x("".split),P=c((function(){return!O("z").propertyIsEnumerable(0)}))?function(e){return"String"==C(e)?z(e,""):O(e)}:O,E=TypeError,q=function(e){if(null==e)throw E("Can't call method on "+e);return e},j=function(e){return P(q(e))},S=function(e){return"function"==typeof e},T=function(e){return"object"==typeof e?null!==e:S(e)},M=function(e){return S(e)?e:void 0},R=function(e,t){return arguments.length<2?M(s[e]):s[e]&&s[e][t]},_=x({}.isPrototypeOf),A=R("navigator","userAgent")||"",U=s.process,B=s.Deno,N=U&&U.versions||B&&B.version,L=N&&N.v8;L&&(a=(i=L.split("."))[0]>0&&i[0]<4?1:+(i[0]+i[1])),!a&&A&&(!(i=A.match(/Edge\/(\d+)/))||i[1]>=74)&&(i=A.match(/Chrome\/(\d+)/))&&(a=+i[1]);var W=a,D=!!Object.getOwnPropertySymbols&&!c((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&W&&W<41})),J=D&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,F=Object,G=J?function(e){return"symbol"==typeof e}:function(e){var t=R("Symbol");return S(t)&&_(t.prototype,F(e))},H=String,V=function(e){try{return H(e)}catch(e){return"Object"}},$=TypeError,Y=function(e){if(S(e))return e;throw $(V(e)+" is not a function")},K=function(e,t){var r=e[t];return null==r?void 0:Y(r)},Q=TypeError,X=Object.defineProperty,Z=function(e,t){try{X(s,e,{value:t,configurable:!0,writable:!0})}catch(r){s[e]=t}return t},ee=s["__core-js_shared__"]||Z("__core-js_shared__",{}),te=n((function(e){(e.exports=function(e,t){return ee[e]||(ee[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"})})),re=Object,ne=function(e){return re(q(e))},ie=x({}.hasOwnProperty),ae=Object.hasOwn||function(e,t){return ie(ne(e),t)},oe=0,se=Math.random(),ce=x(1..toString),de=function(e){return"Symbol("+(void 0===e?"":e)+")_"+ce(++oe+se,36)},ue=te("wks"),he=s.Symbol,fe=he&&he.for,pe=J?he:he&&he.withoutSetter||de,le=function(e){if(!ae(ue,e)||!D&&"string"!=typeof ue[e]){var t="Symbol."+e;D&&ae(he,e)?ue[e]=he[e]:ue[e]=J&&fe?fe(t):pe(t)}return ue[e]},ge=TypeError,be=le("toPrimitive"),ve=function(e,t){if(!T(e)||G(e))return e;var r,n=K(e,be);if(n){if(void 0===t&&(t="default"),r=f(n,e,t),!T(r)||G(r))return r;throw ge("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var r,n;if("string"===t&&S(r=e.toString)&&!T(n=f(r,e)))return n;if(S(r=e.valueOf)&&!T(n=f(r,e)))return n;if("string"!==t&&S(r=e.toString)&&!T(n=f(r,e)))return n;throw Q("Can't convert object to primitive value")}(e,t)},Ie=function(e){var t=ve(e,"string");return G(t)?t:t+""},ke=s.document,me=T(ke)&&T(ke.createElement),xe=function(e){return me?ke.createElement(e):{}},ye=!d&&!c((function(){return 7!=Object.defineProperty(xe("div"),"a",{get:function(){return 7}}).a})),we=Object.getOwnPropertyDescriptor,Ce={f:d?we:function(e,t){if(e=j(e),t=Ie(t),ye)try{return we(e,t)}catch(e){}if(ae(e,t))return b(!f(g.f,e,t),e[t])}},Oe=d&&c((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),ze=String,Pe=TypeError,Ee=function(e){if(T(e))return e;throw Pe(ze(e)+" is not an object")},qe=TypeError,je=Object.defineProperty,Se=Object.getOwnPropertyDescriptor,Te={f:d?Oe?function(e,t,r){if(Ee(e),t=Ie(t),Ee(r),"function"==typeof e&&"prototype"===t&&"value"in r&&"writable"in r&&!r.writable){var n=Se(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 je(e,t,r)}:je:function(e,t,r){if(Ee(e),t=Ie(t),Ee(r),ye)try{return je(e,t,r)}catch(e){}if("get"in r||"set"in r)throw qe("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},Me=d?function(e,t,r){return Te.f(e,t,b(1,r))}:function(e,t,r){return e[t]=r,e},Re=Function.prototype,_e=d&&Object.getOwnPropertyDescriptor,Ae=ae(Re,"name"),Ue={EXISTS:Ae,PROPER:Ae&&"something"===function(){}.name,CONFIGURABLE:Ae&&(!d||d&&_e(Re,"name").configurable)},Be=x(Function.toString);S(ee.inspectSource)||(ee.inspectSource=function(e){return Be(e)});var Ne,Le,We,De=ee.inspectSource,Je=s.WeakMap,Fe=S(Je)&&/native code/.test(De(Je)),Ge=te("keys"),He=function(e){return Ge[e]||(Ge[e]=de(e))},Ve={},$e=s.TypeError,Ye=s.WeakMap;if(Fe||ee.state){var Ke=ee.state||(ee.state=new Ye),Qe=x(Ke.get),Xe=x(Ke.has),Ze=x(Ke.set);Ne=function(e,t){if(Xe(Ke,e))throw new $e("Object already initialized");return t.facade=e,Ze(Ke,e,t),t},Le=function(e){return Qe(Ke,e)||{}},We=function(e){return Xe(Ke,e)}}else{var et=He("state");Ve[et]=!0,Ne=function(e,t){if(ae(e,et))throw new $e("Object already initialized");return t.facade=e,Me(e,et,t),t},Le=function(e){return ae(e,et)?e[et]:{}},We=function(e){return ae(e,et)}}var tt={set:Ne,get:Le,has:We,enforce:function(e){return We(e)?Le(e):Ne(e,{})},getterFor:function(e){return function(t){var r;if(!T(t)||(r=Le(t)).type!==e)throw $e("Incompatible receiver, "+e+" required");return r}}},rt=n((function(e){var t=Ue.CONFIGURABLE,r=tt.enforce,n=tt.get,i=Object.defineProperty,a=d&&!c((function(){return 8!==i((function(){}),"length",{value:8}).length})),o=String(String).split("String"),s=e.exports=function(e,n,s){"Symbol("===String(n).slice(0,7)&&(n="["+String(n).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),s&&s.getter&&(n="get "+n),s&&s.setter&&(n="set "+n),(!ae(e,"name")||t&&e.name!==n)&&(d?i(e,"name",{value:n,configurable:!0}):e.name=n),a&&s&&ae(s,"arity")&&e.length!==s.arity&&i(e,"length",{value:s.arity});try{s&&ae(s,"constructor")&&s.constructor?d&&i(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var c=r(e);return ae(c,"source")||(c.source=o.join("string"==typeof n?n:"")),e};Function.prototype.toString=s((function(){return S(this)&&n(this).source||De(this)}),"toString")})),nt=function(e,t,r,n){n||(n={});var i=n.enumerable,a=void 0!==n.name?n.name:t;if(S(r)&&rt(r,a,n),n.global)i?e[t]=r:Z(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},it=Math.ceil,at=Math.floor,ot=Math.trunc||function(e){var t=+e;return(t>0?at:it)(t)},st=function(e){var t=+e;return t!=t||0===t?0:ot(t)},ct=Math.max,dt=Math.min,ut=function(e,t){var r=st(e);return r<0?ct(r+t,0):dt(r,t)},ht=Math.min,ft=function(e){return e>0?ht(st(e),9007199254740991):0},pt=function(e){return ft(e.length)},lt=function(e){return function(t,r,n){var i,a=j(t),o=pt(a),s=ut(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}},gt={includes:lt(!0),indexOf:lt(!1)},bt=gt.indexOf,vt=x([].push),It=function(e,t){var r,n=j(e),i=0,a=[];for(r in n)!ae(Ve,r)&&ae(n,r)&&vt(a,r);for(;t.length>i;)ae(n,r=t[i++])&&(~bt(a,r)||vt(a,r));return a},kt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],mt=kt.concat("length","prototype"),xt={f:Object.getOwnPropertyNames||function(e){return It(e,mt)}},yt={f:Object.getOwnPropertySymbols},wt=x([].concat),Ct=R("Reflect","ownKeys")||function(e){var t=xt.f(Ee(e)),r=yt.f;return r?wt(t,r(e)):t},Ot=function(e,t,r){for(var n=Ct(t),i=Te.f,a=Ce.f,o=0;o<n.length;o++){var s=n[o];ae(e,s)||r&&ae(r,s)||i(e,s,a(t,s))}},zt=/#|\.prototype\./,Pt=function(e,t){var r=qt[Et(e)];return r==St||r!=jt&&(S(t)?c(t):!!t)},Et=Pt.normalize=function(e){return String(e).replace(zt,".").toLowerCase()},qt=Pt.data={},jt=Pt.NATIVE="N",St=Pt.POLYFILL="P",Tt=Pt,Mt=Ce.f,Rt=function(e,t){var r,n,i,a,o,c=e.target,d=e.global,u=e.stat;if(r=d?s:u?s[c]||Z(c,{}):(s[c]||{}).prototype)for(n in t){if(a=t[n],i=e.dontCallGetSet?(o=Mt(r,n))&&o.value:r[n],!Tt(d?n:c+(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),nt(r,n,a,e)}},_t=Object.keys||function(e){return It(e,kt)},At=c((function(){_t(1)}));Rt({target:"Object",stat:!0,forced:At},{keys:function(e){return _t(ne(e))}});var Ut={};Ut[le("toStringTag")]="z";var Bt,Nt="[object z]"===String(Ut),Lt=le("toStringTag"),Wt=Object,Dt="Arguments"==C(function(){return arguments}()),Jt=Nt?C:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=Wt(e),Lt))?r:Dt?C(t):"Object"==(n=C(t))&&S(t.callee)?"Arguments":n},Ft=String,Gt=function(e){if("Symbol"===Jt(e))throw TypeError("Cannot convert a Symbol value to a string");return Ft(e)},Ht={f:d&&!Oe?Object.defineProperties:function(e,t){Ee(e);for(var r,n=j(t),i=_t(t),a=i.length,o=0;a>o;)Te.f(e,r=i[o++],n[r]);return e}},Vt=R("document","documentElement"),$t=He("IE_PROTO"),Yt=function(){},Kt=function(e){return"<script>"+e+"<\/script>"},Qt=function(e){e.write(Kt("")),e.close();var t=e.parentWindow.Object;return e=null,t},Xt=function(){try{Bt=new ActiveXObject("htmlfile")}catch(e){}var e,t;Xt="undefined"!=typeof document?document.domain&&Bt?Qt(Bt):((t=xe("iframe")).style.display="none",Vt.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(Kt("document.F=Object")),e.close(),e.F):Qt(Bt);for(var r=kt.length;r--;)delete Xt.prototype[kt[r]];return Xt()};Ve[$t]=!0;var Zt=Object.create||function(e,t){var r;return null!==e?(Yt.prototype=Ee(e),r=new Yt,Yt.prototype=null,r[$t]=e):r=Xt(),void 0===t?r:Ht.f(r,t)},er=function(e,t,r){var n=Ie(t);n in e?Te.f(e,n,b(0,r)):e[n]=r},tr=Array,rr=Math.max,nr=function(e,t,r){for(var n=pt(e),i=ut(t,n),a=ut(void 0===r?n:r,n),o=tr(rr(a-i,0)),s=0;i<a;i++,s++)er(o,s,e[i]);return o.length=s,o},ir=xt.f,ar="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],or={f:function(e){return ar&&"Window"==C(e)?function(e){try{return ir(e)}catch(e){return nr(ar)}}(e):ir(j(e))}},sr={f:le},cr=s,dr=Te.f,ur=Te.f,hr=le("toStringTag"),fr=function(e,t,r){e&&!r&&(e=e.prototype),e&&!ae(e,hr)&&ur(e,hr,{configurable:!0,value:t})},pr=x(x.bind),lr=function(e,t){return Y(e),void 0===t?e:u?pr(e,t):function(){return e.apply(t,arguments)}},gr=Array.isArray||function(e){return"Array"==C(e)},br=function(){},vr=[],Ir=R("Reflect","construct"),kr=/^\s*(?:class|function)\b/,mr=x(kr.exec),xr=!kr.exec(br),yr=function(e){if(!S(e))return!1;try{return Ir(br,vr,e),!0}catch(e){return!1}},wr=function(e){if(!S(e))return!1;switch(Jt(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return xr||!!mr(kr,De(e))}catch(e){return!0}};wr.sham=!0;var Cr=!Ir||c((function(){var e;return yr(yr.call)||!yr(Object)||!yr((function(){e=!0}))||e}))?wr:yr,Or=le("species"),zr=Array,Pr=function(e,t){return new(function(e){var t;return gr(e)&&(t=e.constructor,(Cr(t)&&(t===zr||gr(t.prototype))||T(t)&&null===(t=t[Or]))&&(t=void 0)),void 0===t?zr:t}(e))(0===t?0:t)},Er=x([].push),qr=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,h){for(var f,p,l=ne(c),g=P(l),b=lr(d,u),v=pt(g),I=0,k=h||Pr,m=t?k(c,v):r||o?k(c,0):void 0;v>I;I++)if((s||I in g)&&(p=b(f=g[I],I,l),e))if(t)m[I]=p;else if(p)switch(e){case 3:return!0;case 5:return f;case 6:return I;case 2:Er(m,f)}else switch(e){case 4:return!1;case 7:Er(m,f)}return a?-1:n||i?i:m}},jr={forEach:qr(0),map:qr(1),filter:qr(2),some:qr(3),every:qr(4),find:qr(5),findIndex:qr(6),filterReject:qr(7)},Sr=jr.forEach,Tr=He("hidden"),Mr=tt.set,Rr=tt.getterFor("Symbol"),_r=Object.prototype,Ar=s.Symbol,Ur=Ar&&Ar.prototype,Br=s.TypeError,Nr=s.QObject,Lr=Ce.f,Wr=Te.f,Dr=or.f,Jr=g.f,Fr=x([].push),Gr=te("symbols"),Hr=te("op-symbols"),Vr=te("wks"),$r=!Nr||!Nr.prototype||!Nr.prototype.findChild,Yr=d&&c((function(){return 7!=Zt(Wr({},"a",{get:function(){return Wr(this,"a",{value:7}).a}})).a}))?function(e,t,r){var n=Lr(_r,t);n&&delete _r[t],Wr(e,t,r),n&&e!==_r&&Wr(_r,t,n)}:Wr,Kr=function(e,t){var r=Gr[e]=Zt(Ur);return Mr(r,{type:"Symbol",tag:e,description:t}),d||(r.description=t),r},Qr=function(e,t,r){e===_r&&Qr(Hr,t,r),Ee(e);var n=Ie(t);return Ee(r),ae(Gr,n)?(r.enumerable?(ae(e,Tr)&&e[Tr][n]&&(e[Tr][n]=!1),r=Zt(r,{enumerable:b(0,!1)})):(ae(e,Tr)||Wr(e,Tr,b(1,{})),e[Tr][n]=!0),Yr(e,n,r)):Wr(e,n,r)},Xr=function(e,t){Ee(e);var r=j(t),n=_t(r).concat(rn(r));return Sr(n,(function(t){d&&!f(Zr,r,t)||Qr(e,t,r[t])})),e},Zr=function(e){var t=Ie(e),r=f(Jr,this,t);return!(this===_r&&ae(Gr,t)&&!ae(Hr,t))&&(!(r||!ae(this,t)||!ae(Gr,t)||ae(this,Tr)&&this[Tr][t])||r)},en=function(e,t){var r=j(e),n=Ie(t);if(r!==_r||!ae(Gr,n)||ae(Hr,n)){var i=Lr(r,n);return!i||!ae(Gr,n)||ae(r,Tr)&&r[Tr][n]||(i.enumerable=!0),i}},tn=function(e){var t=Dr(j(e)),r=[];return Sr(t,(function(e){ae(Gr,e)||ae(Ve,e)||Fr(r,e)})),r},rn=function(e){var t=e===_r,r=Dr(t?Hr:j(e)),n=[];return Sr(r,(function(e){!ae(Gr,e)||t&&!ae(_r,e)||Fr(n,Gr[e])})),n};D||(Ur=(Ar=function(){if(_(Ur,this))throw Br("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?Gt(arguments[0]):void 0,t=de(e),r=function(e){this===_r&&f(r,Hr,e),ae(this,Tr)&&ae(this[Tr],t)&&(this[Tr][t]=!1),Yr(this,t,b(1,e))};return d&&$r&&Yr(_r,t,{configurable:!0,set:r}),Kr(t,e)}).prototype,nt(Ur,"toString",(function(){return Rr(this).tag})),nt(Ar,"withoutSetter",(function(e){return Kr(de(e),e)})),g.f=Zr,Te.f=Qr,Ht.f=Xr,Ce.f=en,xt.f=or.f=tn,yt.f=rn,sr.f=function(e){return Kr(le(e),e)},d&&(Wr(Ur,"description",{configurable:!0,get:function(){return Rr(this).description}}),nt(_r,"propertyIsEnumerable",Zr,{unsafe:!0}))),Rt({global:!0,constructor:!0,wrap:!0,forced:!D,sham:!D},{Symbol:Ar}),Sr(_t(Vr),(function(e){!function(e){var t=cr.Symbol||(cr.Symbol={});ae(t,e)||dr(t,e,{value:sr.f(e)})}(e)})),Rt({target:"Symbol",stat:!0,forced:!D},{useSetter:function(){$r=!0},useSimple:function(){$r=!1}}),Rt({target:"Object",stat:!0,forced:!D,sham:!d},{create:function(e,t){return void 0===t?Zt(e):Xr(Zt(e),t)},defineProperty:Qr,defineProperties:Xr,getOwnPropertyDescriptor:en}),Rt({target:"Object",stat:!0,forced:!D},{getOwnPropertyNames:tn}),function(){var e=R("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,n=le("toPrimitive");t&&!t[n]&&nt(t,n,(function(e){return f(r,this)}),{arity:1})}(),fr(Ar,"Symbol"),Ve[Tr]=!0;var nn=D&&!!Symbol.for&&!!Symbol.keyFor,an=te("string-to-symbol-registry"),on=te("symbol-to-string-registry");Rt({target:"Symbol",stat:!0,forced:!nn},{for:function(e){var t=Gt(e);if(ae(an,t))return an[t];var r=R("Symbol")(t);return an[t]=r,on[r]=t,r}});var sn=te("symbol-to-string-registry");Rt({target:"Symbol",stat:!0,forced:!nn},{keyFor:function(e){if(!G(e))throw TypeError(V(e)+" is not a symbol");if(ae(sn,e))return sn[e]}});var cn=Function.prototype,dn=cn.apply,un=cn.call,hn="object"==typeof Reflect&&Reflect.apply||(u?un.bind(dn):function(){return un.apply(dn,arguments)}),fn=x([].slice),pn=R("JSON","stringify"),ln=x(/./.exec),gn=x("".charAt),bn=x("".charCodeAt),vn=x("".replace),In=x(1..toString),kn=/[\uD800-\uDFFF]/g,mn=/^[\uD800-\uDBFF]$/,xn=/^[\uDC00-\uDFFF]$/,yn=!D||c((function(){var e=R("Symbol")();return"[null]"!=pn([e])||"{}"!=pn({a:e})||"{}"!=pn(Object(e))})),wn=c((function(){return'"\\udf06\\ud834"'!==pn("\udf06\ud834")||'"\\udead"'!==pn("\udead")})),Cn=function(e,t){var r=fn(arguments),n=t;if((T(t)||void 0!==e)&&!G(e))return gr(t)||(t=function(e,t){if(S(n)&&(t=f(n,this,e,t)),!G(t))return t}),r[1]=t,hn(pn,null,r)},On=function(e,t,r){var n=gn(r,t-1),i=gn(r,t+1);return ln(mn,e)&&!ln(xn,i)||ln(xn,e)&&!ln(mn,n)?"\\u"+In(bn(e,0),16):e};pn&&Rt({target:"JSON",stat:!0,arity:3,forced:yn||wn},{stringify:function(e,t,r){var n=fn(arguments),i=hn(yn?Cn:pn,null,n);return wn&&"string"==typeof i?vn(i,kn,On):i}});var zn=!D||c((function(){yt.f(1)}));Rt({target:"Object",stat:!0,forced:zn},{getOwnPropertySymbols:function(e){var t=yt.f;return t?t(ne(e)):[]}});var Pn=le("species"),En=function(e){return W>=51||!c((function(){var t=[];return(t.constructor={})[Pn]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},qn=jr.filter,jn=En("filter");Rt({target:"Array",proto:!0,forced:!jn},{filter:function(e){return qn(this,e,arguments.length>1?arguments[1]:void 0)}});var Sn=Nt?{}.toString:function(){return"[object "+Jt(this)+"]"};Nt||nt(Object.prototype,"toString",Sn,{unsafe:!0});var Tn=Ce.f,Mn=c((function(){Tn(1)}));Rt({target:"Object",stat:!0,forced:!d||Mn,sham:!d},{getOwnPropertyDescriptor:function(e,t){return Tn(j(e),t)}});var Rn={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},_n=xe("span").classList,An=_n&&_n.constructor&&_n.constructor.prototype,Un=An===Object.prototype?void 0:An,Bn=function(e,t){var r=[][e];return!!r&&c((function(){r.call(null,t||function(){return 1},1)}))},Nn=jr.forEach,Ln=Bn("forEach")?[].forEach:function(e){return Nn(this,e,arguments.length>1?arguments[1]:void 0)},Wn=function(e){if(e&&e.forEach!==Ln)try{Me(e,"forEach",Ln)}catch(t){e.forEach=Ln}};for(var Dn in Rn)Rn[Dn]&&Wn(s[Dn]&&s[Dn].prototype);Wn(Un),Rt({target:"Object",stat:!0,sham:!d},{getOwnPropertyDescriptors:function(e){for(var t,r,n=j(e),i=Ce.f,a=Ct(n),o={},s=0;a.length>s;)void 0!==(r=i(n,t=a[s++]))&&er(o,t,r);return o}});var Jn=Ht.f;Rt({target:"Object",stat:!0,forced:Object.defineProperties!==Jn,sham:!d},{defineProperties:Jn});var Fn=Te.f;Rt({target:"Object",stat:!0,forced:Object.defineProperty!==Fn,sham:!d},{defineProperty:Fn});var Gn,Hn=le("match"),Vn=TypeError,$n=function(e){if(function(e){var t;return T(e)&&(void 0!==(t=e[Hn])?!!t:"RegExp"==C(e))}(e))throw Vn("The method doesn't accept regular expressions");return e},Yn=le("match"),Kn=Ce.f,Qn=x("".startsWith),Xn=x("".slice),Zn=Math.min,ei=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[Yn]=!1,"/./"[e](t)}catch(e){}}return!1}("startsWith"),ti=!(ei||(Gn=Kn(String.prototype,"startsWith"),!Gn||Gn.writable));Rt({target:"String",proto:!0,forced:!ti&&!ei},{startsWith:function(e){var t=Gt(q(this));$n(e);var r=ft(Zn(arguments.length>1?arguments[1]:void 0,t.length)),n=Gt(e);return Qn?Qn(t,n,r):Xn(t,r,r+n.length)===n}});var ri=function(){var e=Ee(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},ni=RegExp.prototype,ii=Ue.PROPER,ai=RegExp.prototype.toString,oi=c((function(){return"/a/b"!=ai.call({source:"a",flags:"b"})})),si=ii&&"toString"!=ai.name;function ci(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 di(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function o(e){ci(a,n,i,o,s,"next",e)}function s(e){ci(a,n,i,o,s,"throw",e)}o(void 0)}))}}function ui(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hi(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function fi(e,t,r){return t&&hi(e.prototype,t),r&&hi(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function pi(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}(oi||si)&&nt(RegExp.prototype,"toString",(function(){var e=Ee(this);return"/"+Gt(e.source)+"/"+Gt(function(e){var t=e.flags;return void 0!==t||"flags"in ni||ae(e,"flags")||!_(ni,e)?t:f(ri,e)}(e))}),{unsafe:!0});var li=Object.prototype,gi=li.hasOwnProperty,bi="function"==typeof Symbol?Symbol:{},vi=bi.iterator||"@@iterator",Ii=bi.asyncIterator||"@@asyncIterator",ki=bi.toStringTag||"@@toStringTag";function mi(e,t,r,n){var i=t&&t.prototype instanceof wi?t:wi,a=Object.create(i.prototype),o=new Ai(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 Bi()}for(r.method=i,r.arg=a;;){var o=r.delegate;if(o){var s=Mi(o,r);if(s){if(s===yi)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=xi(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===yi)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 xi(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}var yi={};function wi(){}function Ci(){}function Oi(){}var zi={};zi[vi]=function(){return this};var Pi=Object.getPrototypeOf,Ei=Pi&&Pi(Pi(Ui([])));Ei&&Ei!==li&&gi.call(Ei,vi)&&(zi=Ei);var qi=Oi.prototype=wi.prototype=Object.create(zi);function ji(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function Si(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===Ci||"GeneratorFunction"===(t.displayName||t.name))}function Ti(e,t){var r;this._invoke=function(n,i){function a(){return new t((function(r,a){!function r(n,i,a,o){var s=xi(e[n],e,i);if("throw"!==s.type){var c=s.arg,d=c.value;return d&&"object"==typeof d&&gi.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 Mi(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,Mi(e,t),"throw"===t.method))return yi;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return yi}var n=xi(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,yi;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,yi):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,yi)}function Ri(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 _i(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function Ai(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(Ri,this),this.reset(!0)}function Ui(e){if(e){var t=e[vi];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function t(){for(;++r<e.length;)if(gi.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:Bi}}function Bi(){return{value:void 0,done:!0}}Ci.prototype=qi.constructor=Oi,Oi.constructor=Ci,Oi[ki]=Ci.displayName="GeneratorFunction",ji(Ti.prototype),Ti.prototype[Ii]=function(){return this},ji(qi),qi[ki]="Generator",qi[vi]=function(){return this},qi.toString=function(){return"[object Generator]"},Ai.prototype={constructor:Ai,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(_i),!e)for(var t in this)"t"===t.charAt(0)&&gi.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=gi.call(i,"catchLoc"),s=gi.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&&gi.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,yi):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),yi},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),_i(r),yi}},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;_i(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:Ui(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),yi}};var Ni={wrap:mi,isGeneratorFunction:Si,AsyncIterator:Ti,mark:function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,Oi):(e.__proto__=Oi,ki in e||(e[ki]="GeneratorFunction")),e.prototype=Object.create(qi),e},awrap:function(e){return{__await:e}},async:function(e,t,r,n,i){void 0===i&&(i=Promise);var a=new Ti(mi(e,t,r,n),i);return Si(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:Ui},Li=Te.f,Wi=le("unscopables"),Di=Array.prototype;null==Di[Wi]&&Li(Di,Wi,{configurable:!0,value:Zt(null)});var Ji,Fi,Gi,Hi=function(e){Di[Wi][e]=!0},Vi={},$i=!c((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Yi=He("IE_PROTO"),Ki=Object,Qi=Ki.prototype,Xi=$i?Ki.getPrototypeOf:function(e){var t=ne(e);if(ae(t,Yi))return t[Yi];var r=t.constructor;return S(r)&&t instanceof r?r.prototype:t instanceof Ki?Qi:null},Zi=le("iterator"),ea=!1;[].keys&&("next"in(Gi=[].keys())?(Fi=Xi(Xi(Gi)))!==Object.prototype&&(Ji=Fi):ea=!0),(null==Ji||c((function(){var e={};return Ji[Zi].call(e)!==e})))&&(Ji={}),S(Ji[Zi])||nt(Ji,Zi,(function(){return this}));var ta={IteratorPrototype:Ji,BUGGY_SAFARI_ITERATORS:ea},ra=ta.IteratorPrototype,na=function(){return this},ia=function(e,t,r,n){var i=t+" Iterator";return e.prototype=Zt(ra,{next:b(+!n,r)}),fr(e,i,!1),Vi[i]=na,e},aa=String,oa=TypeError,sa=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=x(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),t=r instanceof Array}catch(e){}return function(r,n){return Ee(r),function(e){if("object"==typeof e||S(e))return e;throw oa("Can't set "+aa(e)+" as a prototype")}(n),t?e(r,n):r.__proto__=n,r}}():void 0),ca=Ue.PROPER,da=Ue.CONFIGURABLE,ua=ta.IteratorPrototype,ha=ta.BUGGY_SAFARI_ITERATORS,fa=le("iterator"),pa=function(){return this},la=function(e,t,r,n,i,a,o){ia(r,t,n);var s,c,d,u=function(e){if(e===i&&b)return b;if(!ha&&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)}},h=t+" Iterator",p=!1,l=e.prototype,g=l[fa]||l["@@iterator"]||i&&l[i],b=!ha&&g||u(i),v="Array"==t&&l.entries||g;if(v&&(s=Xi(v.call(new e)))!==Object.prototype&&s.next&&(Xi(s)!==ua&&(sa?sa(s,ua):S(s[fa])||nt(s,fa,pa)),fr(s,h,!0)),ca&&"values"==i&&g&&"values"!==g.name&&(da?Me(l,"name","values"):(p=!0,b=function(){return f(g,this)})),i)if(c={values:u("values"),keys:a?b:u("keys"),entries:u("entries")},o)for(d in c)(ha||p||!(d in l))&&nt(l,d,c[d]);else Rt({target:t,proto:!0,forced:ha||p},c);return l[fa]!==b&&nt(l,fa,b,{name:i}),Vi[t]=b,c},ga=Te.f,ba=tt.set,va=tt.getterFor("Array Iterator"),Ia=la(Array,"Array",(function(e,t){ba(this,{type:"Array Iterator",target:j(e),index:0,kind:t})}),(function(){var e=va(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:t[n],done:!1}:{value:[n,t[n]],done:!1}}),"values"),ka=Vi.Arguments=Vi.Array;if(Hi("keys"),Hi("values"),Hi("entries"),d&&"values"!==ka.name)try{ga(ka,"name",{value:"values"})}catch(e){}var ma=x("".charAt),xa=x("".charCodeAt),ya=x("".slice),wa=function(e){return function(t,r){var n,i,a=Gt(q(t)),o=st(r),s=a.length;return o<0||o>=s?e?"":void 0:(n=xa(a,o))<55296||n>56319||o+1===s||(i=xa(a,o+1))<56320||i>57343?e?ma(a,o):n:e?ya(a,o,o+2):i-56320+(n-55296<<10)+65536}},Ca={codeAt:wa(!1),charAt:wa(!0)},Oa=Ca.charAt,za=tt.set,Pa=tt.getterFor("String Iterator");la(String,"String",(function(e){za(this,{type:"String Iterator",string:Gt(e),index:0})}),(function(){var e,t=Pa(this),r=t.string,n=t.index;return n>=r.length?{value:void 0,done:!0}:(e=Oa(r,n),t.index+=e.length,{value:e,done:!1})}));var Ea=le("iterator"),qa=le("toStringTag"),ja=Ia.values,Sa=function(e,t){if(e){if(e[Ea]!==ja)try{Me(e,Ea,ja)}catch(t){e[Ea]=ja}if(e[qa]||Me(e,qa,t),Rn[t])for(var r in Ia)if(e[r]!==Ia[r])try{Me(e,r,Ia[r])}catch(t){e[r]=Ia[r]}}};for(var Ta in Rn)Sa(s[Ta]&&s[Ta].prototype,Ta);Sa(Un,"DOMTokenList");var Ma=le("iterator"),Ra=!c((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,r="";return e.pathname="c%20d",t.forEach((function(e,n){t.delete("b"),r+=n+e})),!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[Ma]||"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})),_a=function(e,t,r){for(var n in t)nt(e,n,t[n],r);return e},Aa=TypeError,Ua=function(e,t){if(_(t,e))return e;throw Aa("Incorrect invocation")},Ba=le("iterator"),Na=function(e){if(null!=e)return K(e,Ba)||K(e,"@@iterator")||Vi[Jt(e)]},La=TypeError,Wa=function(e,t){var r=arguments.length<2?Na(e):t;if(Y(r))return Ee(f(r,e));throw La(V(e)+" is not iterable")},Da=TypeError,Ja=function(e,t){if(e<t)throw Da("Not enough arguments");return e},Fa=Math.floor,Ga=function(e,t){var r=e.length,n=Fa(r/2);return r<8?Ha(e,t):Va(e,Ga(nr(e,0,n),t),Ga(nr(e,n),t),t)},Ha=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},Va=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},$a=Ga,Ya=le("iterator"),Ka=tt.set,Qa=tt.getterFor("URLSearchParams"),Xa=tt.getterFor("URLSearchParamsIterator"),Za=Object.getOwnPropertyDescriptor,eo=function(e){if(!d)return s[e];var t=Za(s,e);return t&&t.value},to=eo("fetch"),ro=eo("Request"),no=eo("Headers"),io=ro&&ro.prototype,ao=no&&no.prototype,oo=s.RegExp,so=s.TypeError,co=s.decodeURIComponent,uo=s.encodeURIComponent,ho=x("".charAt),fo=x([].join),po=x([].push),lo=x("".replace),go=x([].shift),bo=x([].splice),vo=x("".split),Io=x("".slice),ko=/\+/g,mo=Array(4),xo=function(e){return mo[e-1]||(mo[e-1]=oo("((?:%[\\da-f]{2}){"+e+"})","gi"))},yo=function(e){try{return co(e)}catch(t){return e}},wo=function(e){var t=lo(e,ko," "),r=4;try{return co(t)}catch(e){for(;r;)t=lo(t,xo(r--),yo);return t}},Co=/[!'()~]|%20/g,Oo={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},zo=function(e){return Oo[e]},Po=function(e){return lo(uo(e),Co,zo)},Eo=ia((function(e,t){Ka(this,{type:"URLSearchParamsIterator",iterator:Wa(Qa(e).entries),kind:t})}),"Iterator",(function(){var e=Xa(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),qo=function(e){this.entries=[],this.url=null,void 0!==e&&(T(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===ho(e,0)?Io(e,1):e:Gt(e)))};qo.prototype={type:"URLSearchParams",bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,r,n,i,a,o,s,c=Na(e);if(c)for(r=(t=Wa(e,c)).next;!(n=f(r,t)).done;){if(a=(i=Wa(Ee(n.value))).next,(o=f(a,i)).done||(s=f(a,i)).done||!f(a,i).done)throw so("Expected sequence with length 2");po(this.entries,{key:Gt(o.value),value:Gt(s.value)})}else for(var d in e)ae(e,d)&&po(this.entries,{key:d,value:Gt(e[d])})},parseQuery:function(e){if(e)for(var t,r,n=vo(e,"&"),i=0;i<n.length;)(t=n[i++]).length&&(r=vo(t,"="),po(this.entries,{key:wo(go(r)),value:wo(fo(r,"="))}))},serialize:function(){for(var e,t=this.entries,r=[],n=0;n<t.length;)e=t[n++],po(r,Po(e.key)+"="+Po(e.value));return fo(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var jo=function(){Ua(this,So);var e=arguments.length>0?arguments[0]:void 0;Ka(this,new qo(e))},So=jo.prototype;if(_a(So,{append:function(e,t){Ja(arguments.length,2);var r=Qa(this);po(r.entries,{key:Gt(e),value:Gt(t)}),r.updateURL()},delete:function(e){Ja(arguments.length,1);for(var t=Qa(this),r=t.entries,n=Gt(e),i=0;i<r.length;)r[i].key===n?bo(r,i,1):i++;t.updateURL()},get:function(e){Ja(arguments.length,1);for(var t=Qa(this).entries,r=Gt(e),n=0;n<t.length;n++)if(t[n].key===r)return t[n].value;return null},getAll:function(e){Ja(arguments.length,1);for(var t=Qa(this).entries,r=Gt(e),n=[],i=0;i<t.length;i++)t[i].key===r&&po(n,t[i].value);return n},has:function(e){Ja(arguments.length,1);for(var t=Qa(this).entries,r=Gt(e),n=0;n<t.length;)if(t[n++].key===r)return!0;return!1},set:function(e,t){Ja(arguments.length,1);for(var r,n=Qa(this),i=n.entries,a=!1,o=Gt(e),s=Gt(t),c=0;c<i.length;c++)(r=i[c]).key===o&&(a?bo(i,c--,1):(a=!0,r.value=s));a||po(i,{key:o,value:s}),n.updateURL()},sort:function(){var e=Qa(this);$a(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,r=Qa(this).entries,n=lr(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 Eo(this,"keys")},values:function(){return new Eo(this,"values")},entries:function(){return new Eo(this,"entries")}},{enumerable:!0}),nt(So,Ya,So.entries,{name:"entries"}),nt(So,"toString",(function(){return Qa(this).serialize()}),{enumerable:!0}),fr(jo,"URLSearchParams"),Rt({global:!0,constructor:!0,forced:!Ra},{URLSearchParams:jo}),!Ra&&S(no)){var To=x(ao.has),Mo=x(ao.set),Ro=function(e){if(T(e)){var t,r=e.body;if("URLSearchParams"===Jt(r))return t=e.headers?new no(e.headers):new no,To(t,"content-type")||Mo(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),Zt(e,{body:b(0,Gt(r)),headers:b(0,t)})}return e};if(S(to)&&Rt({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return to(e,arguments.length>1?Ro(arguments[1]):{})}}),S(ro)){var _o=function(e){return Ua(this,io),new ro(e,arguments.length>1?Ro(arguments[1]):{})};io.constructor=_o,_o.prototype=io,Rt({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:_o})}}var Ao={URLSearchParams:jo,getState:Qa};function Uo(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 Bo(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Uo(Object(r),!0).forEach((function(t){pi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Uo(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var No=fi((function e(t){if(ui(this,e),pi(this,"baseUri",void 0),pi(this,"proxy",void 0),pi(this,"headers",void 0),pi(this,"parameters",void 0),pi(this,"fetchOptions",void 0),pi(this,"transformRequest",void 0),pi(this,"throwOnBadResponse",void 0),this.headers=Bo({},t.headers),this.parameters=Bo({},t.parameters),!this.parameters.shortCode)throw new Error("Missing required parameter: shortCode");this.fetchOptions=Bo({credentials:"omit"},t.fetchOptions),this.transformRequest=t.transformRequest||e.defaults.transformRequest,t.baseUri&&(this.baseUri=t.baseUri),t.proxy&&(this.proxy=t.proxy),this.throwOnBadResponse=!!t.throwOnBadResponse}));function Lo(e){return(Lo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}pi(No,"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}}}),Rt({global:!0},{globalThis:s});var Wo="object"===("undefined"==typeof window?"undefined":Lo(window))&&"object"===Lo(window.document),Do="object"===("undefined"==typeof process?"undefined":Lo(process))&&"object"===Lo(process.versions)&&"string"==typeof process.versions.node,Jo=Wo?window:globalThis,Fo="function"==typeof Jo.fetch,Go=function(){if(Do)return require("node-fetch").default;if(!Fo)throw new Error("Bad environment: it is not a node environment but fetch is not defined");return Jo.fetch}(),Ho=Function,Vo=x([].concat),$o=x([].join),Yo={},Ko=function(e,t,r){if(!ae(Yo,t)){for(var n=[],i=0;i<t;i++)n[i]="a["+i+"]";Yo[t]=Ho("C,a","return new C("+$o(n,",")+")")}return Yo[t](e,r)},Qo=u?Ho.bind:function(e){var t=Y(this),r=t.prototype,n=fn(arguments,1),i=function(){var r=Vo(n,fn(arguments));return this instanceof i?Ko(t,r.length,r):t.apply(e,r)};return T(r)&&(i.prototype=r),i},Xo=TypeError,Zo=function(e){if(Cr(e))return e;throw Xo(V(e)+" is not a constructor")},es=R("Reflect","construct"),ts=Object.prototype,rs=[].push,ns=c((function(){function e(){}return!(es((function(){}),[],e)instanceof e)})),is=!c((function(){es((function(){}))})),as=ns||is;Rt({target:"Reflect",stat:!0,forced:as,sham:as},{construct:function(e,t){Zo(e),Ee(t);var r=arguments.length<3?e:Zo(arguments[2]);if(is&&!ns)return es(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(rs,n,t),new(hn(Qo,e,n))}var i=r.prototype,a=Zt(T(i)?i:ts),o=hn(e,a,t);return T(o)?o:a}});var os=TypeError,ss=function(e){if(e>9007199254740991)throw os("Maximum allowed index exceeded");return e},cs=le("isConcatSpreadable"),ds=W>=51||!c((function(){var e=[];return e[cs]=!1,e.concat()[0]!==e})),us=En("concat"),hs=function(e){if(!T(e))return!1;var t=e[cs];return void 0!==t?!!t:gr(e)};function fs(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ps(e,t){return(ps=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ls(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&&ps(e,t)}function gs(e,t){if(t&&("object"===Lo(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return fs(e)}function bs(e){return(bs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function vs(){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 Is(e,t,r){return(Is=vs()?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&&ps(i,r.prototype),i}).apply(null,arguments)}function ks(e){var t="function"==typeof Map?new Map:void 0;return(ks=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 Is(e,arguments,bs(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),ps(n,e)})(e)}function ms(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=bs(e);if(t){var i=bs(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return gs(this,r)}}Rt({target:"Array",proto:!0,arity:1,forced:!ds||!us},{concat:function(e){var t,r,n,i,a,o=ne(this),s=Pr(o,0),c=0;for(t=-1,n=arguments.length;t<n;t++)if(hs(a=-1===t?o:arguments[t]))for(i=pt(a),ss(c+i),r=0;r<i;r++,c++)r in a&&er(s,c,a[r]);else ss(c+1),er(s,c++,a);return s.length=c,s}});var xs,ys,ws=function(e){ls(r,e);var t=ms(r);function r(e){var n;return ui(this,r),pi(fs(n=t.call(this,"".concat(e.status," ").concat(e.statusText))),"response",void 0),n.response=e,n}return fi(r)}(ks(Error)),Cs=s.RegExp,Os=c((function(){var e=Cs("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),zs=Os||c((function(){return!Cs("a","y").sticky})),Ps={BROKEN_CARET:Os||c((function(){var e=Cs("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:zs,UNSUPPORTED_Y:Os},Es=s.RegExp,qs=c((function(){var e=Es(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),js=s.RegExp,Ss=c((function(){var e=js("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),Ts=tt.get,Ms=te("native-string-replace",String.prototype.replace),Rs=RegExp.prototype.exec,_s=Rs,As=x("".charAt),Us=x("".indexOf),Bs=x("".replace),Ns=x("".slice),Ls=(ys=/b*/g,f(Rs,xs=/a/,"a"),f(Rs,ys,"a"),0!==xs.lastIndex||0!==ys.lastIndex),Ws=Ps.BROKEN_CARET,Ds=void 0!==/()??/.exec("")[1];(Ls||Ds||Ws||qs||Ss)&&(_s=function(e){var t,r,n,i,a,o,s,c=this,d=Ts(c),u=Gt(e),h=d.raw;if(h)return h.lastIndex=c.lastIndex,t=f(_s,h,u),c.lastIndex=h.lastIndex,t;var p=d.groups,l=Ws&&c.sticky,g=f(ri,c),b=c.source,v=0,I=u;if(l&&(g=Bs(g,"y",""),-1===Us(g,"g")&&(g+="g"),I=Ns(u,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==As(u,c.lastIndex-1))&&(b="(?: "+b+")",I=" "+I,v++),r=new RegExp("^(?:"+b+")",g)),Ds&&(r=new RegExp("^"+b+"$(?!\\s)",g)),Ls&&(n=c.lastIndex),i=f(Rs,l?r:c,I),l?i?(i.input=Ns(i.input,v),i[0]=Ns(i[0],v),i.index=c.lastIndex,c.lastIndex+=i[0].length):c.lastIndex=0:Ls&&i&&(c.lastIndex=c.global?i.index+i[0].length:n),Ds&&i&&i.length>1&&f(Ms,i[0],r,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(i[a]=void 0)})),i&&p)for(i.groups=o=Zt(null),a=0;a<p.length;a++)o[(s=p[a])[0]]=i[s[1]];return i});var Js=_s;Rt({target:"RegExp",proto:!0,forced:/./.exec!==Js},{exec:Js});var Fs=le("species"),Gs=RegExp.prototype,Hs=function(e,t,r,n){var i=le(e),a=!c((function(){var t={};return t[i]=function(){return 7},7!=""[e](t)})),o=a&&!c((function(){var t=!1,r=/a/;return"split"===e&&((r={}).constructor={},r.constructor[Fs]=function(){return r},r.flags="",r[i]=/./[i]),r.exec=function(){return t=!0,null},r[i](""),!t}));if(!a||!o||r){var s=x(/./[i]),d=t(i,""[e],(function(e,t,r,n,i){var o=x(e),c=t.exec;return c===Js||c===Gs.exec?a&&!i?{done:!0,value:s(t,r,n)}:{done:!0,value:o(r,t,n)}:{done:!1}}));nt(String.prototype,e,d[0]),nt(Gs,i,d[1])}n&&Me(Gs[i],"sham",!0)},Vs=Ca.charAt,$s=function(e,t,r){return t+(r?Vs(e,t).length:1)},Ys=Math.floor,Ks=x("".charAt),Qs=x("".replace),Xs=x("".slice),Zs=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,ec=/\$([$&'`]|\d{1,2})/g,tc=function(e,t,r,n,i,a){var o=r+e.length,s=n.length,c=ec;return void 0!==i&&(i=ne(i),c=Zs),Qs(a,c,(function(a,c){var d;switch(Ks(c,0)){case"$":return"$";case"&":return e;case"`":return Xs(t,0,r);case"'":return Xs(t,o);case"<":d=i[Xs(c,1,-1)];break;default:var u=+c;if(0===u)return a;if(u>s){var h=Ys(u/10);return 0===h?a:h<=s?void 0===n[h-1]?Ks(c,1):n[h-1]+Ks(c,1):a}d=n[u-1]}return void 0===d?"":d}))},rc=TypeError,nc=function(e,t){var r=e.exec;if(S(r)){var n=f(r,e,t);return null!==n&&Ee(n),n}if("RegExp"===C(e))return f(Js,e,t);throw rc("RegExp#exec called on incompatible receiver")},ic=le("replace"),ac=Math.max,oc=Math.min,sc=x([].concat),cc=x([].push),dc=x("".indexOf),uc=x("".slice),hc="$0"==="a".replace(/./,"$0"),fc=!!/./[ic]&&""===/./[ic]("a","$0");Hs("replace",(function(e,t,r){var n=fc?"$":"$0";return[function(e,r){var n=q(this),i=null==e?void 0:K(e,ic);return i?f(i,e,n,r):f(t,Gt(n),e,r)},function(e,i){var a=Ee(this),o=Gt(e);if("string"==typeof i&&-1===dc(i,n)&&-1===dc(i,"$<")){var s=r(t,a,o,i);if(s.done)return s.value}var c=S(i);c||(i=Gt(i));var d=a.global;if(d){var u=a.unicode;a.lastIndex=0}for(var h=[];;){var f=nc(a,o);if(null===f)break;if(cc(h,f),!d)break;""===Gt(f[0])&&(a.lastIndex=$s(o,ft(a.lastIndex),u))}for(var p,l="",g=0,b=0;b<h.length;b++){for(var v=Gt((f=h[b])[0]),I=ac(oc(st(f.index),o.length),0),k=[],m=1;m<f.length;m++)cc(k,void 0===(p=f[m])?p:String(p));var x=f.groups;if(c){var y=sc([v],k,I,o);void 0!==x&&cc(y,x);var w=Gt(hn(i,void 0,y))}else w=tc(v,o,I,k,x,i);I>=g&&(l+=uc(o,g,I)+w,g=I+v.length)}return l+uc(o,g)}]}),!!c((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!hc||fc);var pc,lc=function(e,t,r){return r.get&&rt(r.get,t,{getter:!0}),r.set&&rt(r.set,t,{setter:!0}),Te.f(e,t,r)},gc=Object.assign,bc=Object.defineProperty,vc=x([].concat),Ic=!gc||c((function(){if(d&&1!==gc({b:1},gc(bc({},"a",{enumerable:!0,get:function(){bc(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!=gc({},e)[r]||"abcdefghijklmnopqrst"!=_t(gc({},t)).join("")}))?function(e,t){for(var r=ne(e),n=arguments.length,i=1,a=yt.f,o=g.f;n>i;)for(var s,c=P(arguments[i++]),u=a?vc(_t(c),a(c)):_t(c),h=u.length,p=0;h>p;)s=u[p++],d&&!f(o,c,s)||(r[s]=c[s]);return r}:gc,kc=function(e,t,r){var n,i;Ee(e);try{if(!(n=K(e,"return"))){if("throw"===t)throw r;return r}n=f(n,e)}catch(e){i=!0,n=e}if("throw"===t)throw r;if(i)throw n;return Ee(n),r},mc=function(e,t,r,n){try{return n?t(Ee(r)[0],r[1]):t(r)}catch(t){kc(e,"throw",t)}},xc=le("iterator"),yc=Array.prototype,wc=function(e){return void 0!==e&&(Vi.Array===e||yc[xc]===e)},Cc=Array,Oc=function(e){var t=ne(e),r=Cr(this),n=arguments.length,i=n>1?arguments[1]:void 0,a=void 0!==i;a&&(i=lr(i,n>2?arguments[2]:void 0));var o,s,c,d,u,h,p=Na(t),l=0;if(!p||this===Cc&&wc(p))for(o=pt(t),s=r?new this(o):Cc(o);o>l;l++)h=a?i(t[l],l):t[l],er(s,l,h);else for(u=(d=Wa(t,p)).next,s=r?new this:[];!(c=f(u,d)).done;l++)h=a?mc(d,i,[c.value,l],!0):c.value,er(s,l,h);return s.length=l,s},zc=/[^\0-\u007E]/,Pc=/[.\u3002\uFF0E\uFF61]/g,Ec="Overflow: input needs wider integers to process",qc=RangeError,jc=x(Pc.exec),Sc=Math.floor,Tc=String.fromCharCode,Mc=x("".charCodeAt),Rc=x([].join),_c=x([].push),Ac=x("".replace),Uc=x("".split),Bc=x("".toLowerCase),Nc=function(e){return e+22+75*(e<26)},Lc=function(e,t,r){var n=0;for(e=r?Sc(e/700):e>>1,e+=Sc(e/t);e>455;)e=Sc(e/35),n+=36;return Sc(n+36*e/(e+38))},Wc=function(e){var t,r,n=[],i=(e=function(e){for(var t=[],r=0,n=e.length;r<n;){var i=Mc(e,r++);if(i>=55296&&i<=56319&&r<n){var a=Mc(e,r++);56320==(64512&a)?_c(t,((1023&i)<<10)+(1023&a)+65536):(_c(t,i),r--)}else _c(t,i)}return t}(e)).length,a=128,o=0,s=72;for(t=0;t<e.length;t++)(r=e[t])<128&&_c(n,Tc(r));var c=n.length,d=c;for(c&&_c(n,"-");d<i;){var u=2147483647;for(t=0;t<e.length;t++)(r=e[t])>=a&&r<u&&(u=r);var h=d+1;if(u-a>Sc((2147483647-o)/h))throw qc(Ec);for(o+=(u-a)*h,a=u,t=0;t<e.length;t++){if((r=e[t])<a&&++o>2147483647)throw qc(Ec);if(r==a){for(var f=o,p=36;;){var l=p<=s?1:p>=s+26?26:p-s;if(f<l)break;var g=f-l,b=36-l;_c(n,Tc(Nc(l+g%b))),f=Sc(g/b),p+=36}_c(n,Tc(Nc(f))),s=Lc(o,h,d==c),o=0,d++}}o++,a++}return Rc(n,"")},Dc=Ca.codeAt,Jc=tt.set,Fc=tt.getterFor("URL"),Gc=Ao.URLSearchParams,Hc=Ao.getState,Vc=s.URL,$c=s.TypeError,Yc=s.parseInt,Kc=Math.floor,Qc=Math.pow,Xc=x("".charAt),Zc=x(/./.exec),ed=x([].join),td=x(1..toString),rd=x([].pop),nd=x([].push),id=x("".replace),ad=x([].shift),od=x("".split),sd=x("".slice),cd=x("".toLowerCase),dd=x([].unshift),ud=/[a-z]/i,hd=/[\d+-.a-z]/i,fd=/\d/,pd=/^0x/i,ld=/^[0-7]+$/,gd=/^\d+$/,bd=/^[\da-f]+$/i,vd=/[\0\t\n\r #%/:<>?@[\\\]^|]/,Id=/[\0\t\n\r #/:<>?@[\\\]^|]/,kd=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,md=/[\t\n\r]/g,xd=function(e){var t,r,n,i;if("number"==typeof e){for(t=[],r=0;r<4;r++)dd(t,e%256),e=Kc(e/256);return ed(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+=td(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},yd={},wd=Ic({},yd,{" ":1,'"':1,"<":1,">":1,"`":1}),Cd=Ic({},wd,{"#":1,"?":1,"{":1,"}":1}),Od=Ic({},Cd,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),zd=function(e,t){var r=Dc(e,0);return r>32&&r<127&&!ae(t,e)?e:encodeURIComponent(e)},Pd={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Ed=function(e,t){var r;return 2==e.length&&Zc(ud,Xc(e,0))&&(":"==(r=Xc(e,1))||!t&&"|"==r)},qd=function(e){var t;return e.length>1&&Ed(sd(e,0,2))&&(2==e.length||"/"===(t=Xc(e,2))||"\\"===t||"?"===t||"#"===t)},jd=function(e){return"."===e||"%2e"===cd(e)},Sd={},Td={},Md={},Rd={},_d={},Ad={},Ud={},Bd={},Nd={},Ld={},Wd={},Dd={},Jd={},Fd={},Gd={},Hd={},Vd={},$d={},Yd={},Kd={},Qd={},Xd=function(e,t,r){var n,i,a,o=Gt(e);if(t){if(i=this.parse(o))throw $c(i);this.searchParams=null}else{if(void 0!==r&&(n=new Xd(r,!0)),i=this.parse(o,null,n))throw $c(i);(a=Hc(new Gc)).bindURL(this),this.searchParams=a}};Xd.prototype={type:"URL",parse:function(e,t,r){var n,i,a,o,s,c=this,d=t||Sd,u=0,h="",f=!1,p=!1,l=!1;for(e=Gt(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=id(e,kd,"")),e=id(e,md,""),n=Oc(e);u<=n.length;){switch(i=n[u],d){case Sd:if(!i||!Zc(ud,i)){if(t)return"Invalid scheme";d=Md;continue}h+=cd(i),d=Td;break;case Td:if(i&&(Zc(hd,i)||"+"==i||"-"==i||"."==i))h+=cd(i);else{if(":"!=i){if(t)return"Invalid scheme";h="",d=Md,u=0;continue}if(t&&(c.isSpecial()!=ae(Pd,h)||"file"==h&&(c.includesCredentials()||null!==c.port)||"file"==c.scheme&&!c.host))return;if(c.scheme=h,t)return void(c.isSpecial()&&Pd[c.scheme]==c.port&&(c.port=null));h="","file"==c.scheme?d=Fd:c.isSpecial()&&r&&r.scheme==c.scheme?d=Rd:c.isSpecial()?d=Bd:"/"==n[u+1]?(d=_d,u++):(c.cannotBeABaseURL=!0,nd(c.path,""),d=Yd)}break;case Md:if(!r||r.cannotBeABaseURL&&"#"!=i)return"Invalid scheme";if(r.cannotBeABaseURL&&"#"==i){c.scheme=r.scheme,c.path=nr(r.path),c.query=r.query,c.fragment="",c.cannotBeABaseURL=!0,d=Qd;break}d="file"==r.scheme?Fd:Ad;continue;case Rd:if("/"!=i||"/"!=n[u+1]){d=Ad;continue}d=Nd,u++;break;case _d:if("/"==i){d=Ld;break}d=$d;continue;case Ad:if(c.scheme=r.scheme,i==pc)c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=nr(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=nr(r.path),c.query="",d=Kd;else{if("#"!=i){c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=nr(r.path),c.path.length--,d=$d;continue}c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=nr(r.path),c.query=r.query,c.fragment="",d=Qd}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=$d;continue}d=Ld}else d=Nd;break;case Bd:if(d=Nd,"/"!=i||"/"!=Xc(h,u+1))continue;u++;break;case Nd:if("/"!=i&&"\\"!=i){d=Ld;continue}break;case Ld:if("@"==i){f&&(h="%40"+h),f=!0,a=Oc(h);for(var g=0;g<a.length;g++){var b=a[g];if(":"!=b||l){var v=zd(b,Od);l?c.password+=v:c.username+=v}else l=!0}h=""}else if(i==pc||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()){if(f&&""==h)return"Invalid authority";u-=Oc(h).length+1,h="",d=Wd}else h+=i;break;case Wd:case Dd:if(t&&"file"==c.scheme){d=Hd;continue}if(":"!=i||p){if(i==pc||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()){if(c.isSpecial()&&""==h)return"Invalid host";if(t&&""==h&&(c.includesCredentials()||null!==c.port))return;if(o=c.parseHost(h))return o;if(h="",d=Vd,t)return;continue}"["==i?p=!0:"]"==i&&(p=!1),h+=i}else{if(""==h)return"Invalid host";if(o=c.parseHost(h))return o;if(h="",d=Jd,t==Dd)return}break;case Jd:if(!Zc(fd,i)){if(i==pc||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()||t){if(""!=h){var I=Yc(h,10);if(I>65535)return"Invalid port";c.port=c.isSpecial()&&I===Pd[c.scheme]?null:I,h=""}if(t)return;d=Vd;continue}return"Invalid port"}h+=i;break;case Fd:if(c.scheme="file","/"==i||"\\"==i)d=Gd;else{if(!r||"file"!=r.scheme){d=$d;continue}if(i==pc)c.host=r.host,c.path=nr(r.path),c.query=r.query;else if("?"==i)c.host=r.host,c.path=nr(r.path),c.query="",d=Kd;else{if("#"!=i){qd(ed(nr(n,u),""))||(c.host=r.host,c.path=nr(r.path),c.shortenPath()),d=$d;continue}c.host=r.host,c.path=nr(r.path),c.query=r.query,c.fragment="",d=Qd}}break;case Gd:if("/"==i||"\\"==i){d=Hd;break}r&&"file"==r.scheme&&!qd(ed(nr(n,u),""))&&(Ed(r.path[0],!0)?nd(c.path,r.path[0]):c.host=r.host),d=$d;continue;case Hd:if(i==pc||"/"==i||"\\"==i||"?"==i||"#"==i){if(!t&&Ed(h))d=$d;else if(""==h){if(c.host="",t)return;d=Vd}else{if(o=c.parseHost(h))return o;if("localhost"==c.host&&(c.host=""),t)return;h="",d=Vd}continue}h+=i;break;case Vd:if(c.isSpecial()){if(d=$d,"/"!=i&&"\\"!=i)continue}else if(t||"?"!=i)if(t||"#"!=i){if(i!=pc&&(d=$d,"/"!=i))continue}else c.fragment="",d=Qd;else c.query="",d=Kd;break;case $d:if(i==pc||"/"==i||"\\"==i&&c.isSpecial()||!t&&("?"==i||"#"==i)){if(".."===(s=cd(s=h))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(c.shortenPath(),"/"==i||"\\"==i&&c.isSpecial()||nd(c.path,"")):jd(h)?"/"==i||"\\"==i&&c.isSpecial()||nd(c.path,""):("file"==c.scheme&&!c.path.length&&Ed(h)&&(c.host&&(c.host=""),h=Xc(h,0)+":"),nd(c.path,h)),h="","file"==c.scheme&&(i==pc||"?"==i||"#"==i))for(;c.path.length>1&&""===c.path[0];)ad(c.path);"?"==i?(c.query="",d=Kd):"#"==i&&(c.fragment="",d=Qd)}else h+=zd(i,Cd);break;case Yd:"?"==i?(c.query="",d=Kd):"#"==i?(c.fragment="",d=Qd):i!=pc&&(c.path[0]+=zd(i,yd));break;case Kd:t||"#"!=i?i!=pc&&("'"==i&&c.isSpecial()?c.query+="%27":c.query+="#"==i?"%23":zd(i,yd)):(c.fragment="",d=Qd);break;case Qd:i!=pc&&(c.fragment+=zd(i,wd))}u++}},parseHost:function(e){var t,r,n;if("["==Xc(e,0)){if("]"!=Xc(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,h=0,f=function(){return Xc(e,h)};if(":"==f()){if(":"!=Xc(e,1))return;h+=2,u=++d}for(;f();){if(8==d)return;if(":"!=f()){for(t=r=0;r<4&&Zc(bd,f());)t=16*t+Yc(f(),16),h++,r++;if("."==f()){if(0==r)return;if(h-=r,d>6)return;for(n=0;f();){if(i=null,n>0){if(!("."==f()&&n<4))return;h++}if(!Zc(fd,f()))return;for(;Zc(fd,f());){if(a=Yc(f(),10),null===i)i=a;else{if(0==i)return;i=10*i+a}if(i>255)return;h++}c[d]=256*c[d]+i,2!=++n&&4!=n||d++}if(4!=n)return;break}if(":"==f()){if(h++,!f())return}else if(f())return;c[d++]=t}else{if(null!==u)return;h++,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}(sd(e,1,-1))))return"Invalid host";this.host=t}else if(this.isSpecial()){if(e=function(e){var t,r,n=[],i=Uc(Ac(Bc(e),Pc,"."),".");for(t=0;t<i.length;t++)r=i[t],_c(n,jc(zc,r)?"xn--"+Wc(r):r);return Rc(n,".")}(e),Zc(vd,e))return"Invalid host";if(null===(t=function(e){var t,r,n,i,a,o,s,c=od(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"==Xc(i,0)&&(a=Zc(pd,i)?16:8,i=sd(i,8==a?1:2)),""===i)o=0;else{if(!Zc(10==a?gd:8==a?ld:bd,i))return e;o=Yc(i,a)}nd(r,o)}for(n=0;n<t;n++)if(o=r[n],n==t-1){if(o>=Qc(256,5-t))return null}else if(o>255)return null;for(s=rd(r),n=0;n<r.length;n++)s+=r[n]*Qc(256,3-n);return s}(e)))return"Invalid host";this.host=t}else{if(Zc(Id,e))return"Invalid host";for(t="",r=Oc(e),n=0;n<r.length;n++)t+=zd(r[n],yd);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return ae(Pd,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&Ed(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+=xd(i),null!==a&&(d+=":"+a)):"file"==t&&(d+="//"),d+=e.cannotBeABaseURL?o[0]:o.length?"/"+ed(o,"/"):"",null!==s&&(d+="?"+s),null!==c&&(d+="#"+c),d},setHref:function(e){var t=this.parse(e);if(t)throw $c(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new Zd(e.path[0]).origin}catch(e){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+xd(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(Gt(e)+":",Sd)},getUsername:function(){return this.username},setUsername:function(e){var t=Oc(Gt(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<t.length;r++)this.username+=zd(t[r],Od)}},getPassword:function(){return this.password},setPassword:function(e){var t=Oc(Gt(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<t.length;r++)this.password+=zd(t[r],Od)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?xd(e):xd(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,Wd)},getHostname:function(){var e=this.host;return null===e?"":xd(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,Dd)},getPort:function(){var e=this.port;return null===e?"":Gt(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=Gt(e))?this.port=null:this.parse(e,Jd))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+ed(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,Vd))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=Gt(e))?this.query=null:("?"==Xc(e,0)&&(e=sd(e,1)),this.query="",this.parse(e,Kd)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=Gt(e))?("#"==Xc(e,0)&&(e=sd(e,1)),this.fragment="",this.parse(e,Qd)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var Zd=function(e){var t=Ua(this,eu),r=Ja(arguments.length,1)>1?arguments[1]:void 0,n=Jc(t,new Xd(e,!1,r));d||(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())},eu=Zd.prototype,tu=function(e,t){return{get:function(){return Fc(this)[e]()},set:t&&function(e){return Fc(this)[t](e)},configurable:!0,enumerable:!0}};if(d&&(lc(eu,"href",tu("serialize","setHref")),lc(eu,"origin",tu("getOrigin")),lc(eu,"protocol",tu("getProtocol","setProtocol")),lc(eu,"username",tu("getUsername","setUsername")),lc(eu,"password",tu("getPassword","setPassword")),lc(eu,"host",tu("getHost","setHost")),lc(eu,"hostname",tu("getHostname","setHostname")),lc(eu,"port",tu("getPort","setPort")),lc(eu,"pathname",tu("getPathname","setPathname")),lc(eu,"search",tu("getSearch","setSearch")),lc(eu,"searchParams",tu("getSearchParams")),lc(eu,"hash",tu("getHash","setHash"))),nt(eu,"toJSON",(function(){return Fc(this).serialize()}),{enumerable:!0}),nt(eu,"toString",(function(){return Fc(this).serialize()}),{enumerable:!0}),Vc){var ru=Vc.createObjectURL,nu=Vc.revokeObjectURL;ru&&nt(Zd,"createObjectURL",lr(ru,Vc)),nu&&nt(Zd,"revokeObjectURL",lr(nu,Vc))}function iu(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=bs(e);if(t){var i=bs(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return gs(this,r)}}fr(Zd,"URL"),Rt({global:!0,constructor:!0,forced:!Ra,sham:!d},{URL:Zd});var au=function(e){ls(r,e);var t=iu(r);function r(e,n,i){var a;return ui(this,r),(a=t.call(this,r.renderTemplateUri("".concat(n,"/").concat(e).replace(/\/\/+/g,"/"),null==i?void 0:i.pathParams))).addQueryParams(null==i?void 0:i.queryParams),null!=i&&i.origin&&a.replaceOrigin(null==i?void 0:i.origin),a}return fi(r,[{key:"replaceOrigin",value:function(e){var t=new URL(e);this.protocol=t.protocol,this.host=t.host,this.pathname="".concat(t.pathname,"/").concat(this.pathname).replace(/\/\/+/g,"/")}},{key:"addQueryParams",value:function(e){var t=this;e&&Object.keys(e).forEach((function(r){var n=e[r];if(Array.isArray(n))if("refine"===r)for(var i=0;i<n.length;i+=1)t.searchParams.append(r,String(n[i]));else t.searchParams.append(r,n.join());else t.searchParams.append(r,String(n))}))}}],[{key:"renderTemplateUri",value:function(e,t){return t?e.replace(/\{([^\}]+)\}/g,(function(e,r){return String(t[r])})):e}}]),r}(ks(URL)),ou="commerce-sdk-isomorphic@1.11.0";function su(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 cu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?su(Object(r),!0).forEach((function(t){pi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):su(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var du=function(){function e(t){ui(this,e),pi(this,"clientConfig",void 0);var r=cu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t,r,n,i,a,o,s,c,d,u,h,f,p,l,g,b,v,I,k,m,x,y,w,C,O,z,P,E,q,j,S,T,M,R,_,A;return fi(e,[{key:"createBasket",value:(A=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.taxMode?o.taxMode=n.taxMode:void 0!==i.taxMode&&(o.taxMode=i.taxMode),void 0!==n.temporary?o.temporary=n.temporary:void 0!==i.temporary&&(o.temporary=i.temporary),void 0===n.siteId){e.next=19;break}o.siteId=n.siteId,e.next=24;break;case 19:if(void 0===i.siteId){e.next=23;break}o.siteId=i.siteId,e.next=24;break;case 23:throw new Error("Missing required query parameter: siteId");case 24:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=32,Go(s.toString(),d);case 32:if(u=e.sent,!r){e.next=37;break}return e.abrupt("return",u);case 37:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=41;break}throw new ws(u);case 41:return e.next=43,u.text();case 43:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 45:case"end":return e.stop()}}),e,this)}))),function(e,t){return A.apply(this,arguments)})},{key:"transferBasket",value:(_=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.overrideExisting?o.overrideExisting=n.overrideExisting:void 0!==i.overrideExisting&&(o.overrideExisting=i.overrideExisting),void 0===n.siteId){e.next=18;break}o.siteId=n.siteId,e.next=23;break;case 18:if(void 0===i.siteId){e.next=22;break}o.siteId=i.siteId,e.next=23;break;case 22:throw new Error("Missing required query parameter: siteId");case 23:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/actions/transfer",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{headers:c,method:"POST"}),e.next=31,Go(s.toString(),d);case 31:if(u=e.sent,!r){e.next=36;break}return e.abrupt("return",u);case 36:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=40;break}throw new ws(u);case 40:return e.next=42,u.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 _.apply(this,arguments)})},{key:"mergeBasket",value:(R=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.createDestinationBasket?o.createDestinationBasket=n.createDestinationBasket:void 0!==i.createDestinationBasket&&(o.createDestinationBasket=i.createDestinationBasket),void 0!==n.productItemMergeMode?o.productItemMergeMode=n.productItemMergeMode:void 0!==i.productItemMergeMode&&(o.productItemMergeMode=i.productItemMergeMode),void 0===n.siteId){e.next=19;break}o.siteId=n.siteId,e.next=24;break;case 19:if(void 0===i.siteId){e.next=23;break}o.siteId=i.siteId,e.next=24;break;case 23:throw new Error("Missing required query parameter: siteId");case 24:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/actions/merge",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{headers:c,method:"POST"}),e.next=32,Go(s.toString(),d);case 32:if(u=e.sent,!r){e.next=37;break}return e.abrupt("return",u);case 37:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=41;break}throw new ws(u);case 41:return e.next=43,u.text();case 43:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 45:case"end":return e.stop()}}),e,this)}))),function(e,t){return R.apply(this,arguments)})},{key:"deleteBasket",value:(M=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=38,Go(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=45;break}throw new ws(u);case 45:case"end":return e.stop()}}),e,this)}))),function(e,t){return M.apply(this,arguments)})},{key:"getBasket",value:(T=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=39,Go(s.toString(),d);case 39:if(u=e.sent,!r){e.next=44;break}return e.abrupt("return",u);case 44:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=48;break}throw new ws(u);case 48:return e.next=50,u.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 T.apply(this,arguments)})},{key:"updateBasket",value:(S=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=39,Go(s.toString(),d);case 39:if(u=e.sent,!r){e.next=44;break}return e.abrupt("return",u);case 44:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=48;break}throw new ws(u);case 48:return e.next=50,u.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 S.apply(this,arguments)})},{key:"updateAsAgentBasket",value:(j=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}/agent",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{headers:c,method:"PUT"}),e.next=39,Go(s.toString(),d);case 39:if(u=e.sent,!r){e.next=44;break}return e.abrupt("return",u);case 44:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=48;break}throw new ws(u);case 48:return e.next=50,u.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 j.apply(this,arguments)})},{key:"updateBillingAddressForBasket",value:(q=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0!==n.useAsShipping?o.useAsShipping=n.useAsShipping:void 0!==i.useAsShipping&&(o.useAsShipping=i.useAsShipping),void 0!==n.removeExternalTax?o.removeExternalTax=n.removeExternalTax:void 0!==i.removeExternalTax&&(o.removeExternalTax=i.removeExternalTax),void 0===n.siteId){e.next=28;break}o.siteId=n.siteId,e.next=33;break;case 28:if(void 0===i.siteId){e.next=32;break}o.siteId=i.siteId,e.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}/billing-address",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=41,Go(s.toString(),d);case 41:if(u=e.sent,!r){e.next=46;break}return e.abrupt("return",u);case 46:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=50;break}throw new ws(u);case 50:return e.next=52,u.text();case 52:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 54:case"end":return e.stop()}}),e,this)}))),function(e,t){return q.apply(this,arguments)})},{key:"addCouponToBasket",value:(E=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}/coupons",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=39,Go(s.toString(),d);case 39:if(u=e.sent,!r){e.next=44;break}return e.abrupt("return",u);case 44:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=48;break}throw new ws(u);case 48:return e.next=50,u.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 E.apply(this,arguments)})},{key:"removeCouponFromBasket",value:(P=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.couponItemId){e.next=25;break}a.couponItemId=n.couponItemId,e.next=30;break;case 25:if(void 0===i.couponItemId){e.next=29;break}a.couponItemId=i.couponItemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: couponItemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}/coupons/{couponItemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=48,Go(s.toString(),d);case 48:if(u=e.sent,!r){e.next=53;break}return e.abrupt("return",u);case 53:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=57;break}throw new ws(u);case 57:return e.next=59,u.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:"updateCustomerForBasket",value:(z=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}/customer",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=39,Go(s.toString(),d);case 39:if(u=e.sent,!r){e.next=44;break}return e.abrupt("return",u);case 44:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=48;break}throw new ws(u);case 48:return e.next=50,u.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 z.apply(this,arguments)})},{key:"addGiftCertificateItemToBasket",value:(O=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=39,Go(s.toString(),d);case 39:if(u=e.sent,!r){e.next=44;break}return e.abrupt("return",u);case 44:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=48;break}throw new ws(u);case 48:return e.next=50,u.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 O.apply(this,arguments)})},{key:"removeGiftCertificateItemFromBasket",value:(C=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.giftCertificateItemId){e.next=25;break}a.giftCertificateItemId=n.giftCertificateItemId,e.next=30;break;case 25:if(void 0===i.giftCertificateItemId){e.next=29;break}a.giftCertificateItemId=i.giftCertificateItemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: giftCertificateItemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=48,Go(s.toString(),d);case 48:if(u=e.sent,!r){e.next=53;break}return e.abrupt("return",u);case 53:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=57;break}throw new ws(u);case 57:return e.next=59,u.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 C.apply(this,arguments)})},{key:"updateGiftCertificateItemInBasket",value:(w=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.giftCertificateItemId){e.next=25;break}a.giftCertificateItemId=n.giftCertificateItemId,e.next=30;break;case 25:if(void 0===i.giftCertificateItemId){e.next=29;break}a.giftCertificateItemId=i.giftCertificateItemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: giftCertificateItemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=48,Go(s.toString(),d);case 48:if(u=e.sent,!r){e.next=53;break}return e.abrupt("return",u);case 53:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=57;break}throw new ws(u);case 57:return e.next=59,u.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 w.apply(this,arguments)})},{key:"addItemToBasket",value:(y=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}/items",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=39,Go(s.toString(),d);case 39:if(u=e.sent,!r){e.next=44;break}return e.abrupt("return",u);case 44:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=48;break}throw new ws(u);case 48:return e.next=50,u.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 y.apply(this,arguments)})},{key:"removeItemFromBasket",value:(x=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.itemId){e.next=25;break}a.itemId=n.itemId,e.next=30;break;case 25:if(void 0===i.itemId){e.next=29;break}a.itemId=i.itemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: itemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=48,Go(s.toString(),d);case 48:if(u=e.sent,!r){e.next=53;break}return e.abrupt("return",u);case 53:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=57;break}throw new ws(u);case 57:return e.next=59,u.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 x.apply(this,arguments)})},{key:"updateItemInBasket",value:(m=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.itemId){e.next=25;break}a.itemId=n.itemId,e.next=30;break;case 25:if(void 0===i.itemId){e.next=29;break}a.itemId=i.itemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: itemId");case 30:if(o={},void 0!==n.removeExternalTax?o.removeExternalTax=n.removeExternalTax:void 0!==i.removeExternalTax&&(o.removeExternalTax=i.removeExternalTax),void 0===n.siteId){e.next=36;break}o.siteId=n.siteId,e.next=41;break;case 36:if(void 0===i.siteId){e.next=40;break}o.siteId=i.siteId,e.next=41;break;case 40:throw new Error("Missing required query parameter: siteId");case 41:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=49,Go(s.toString(),d);case 49:if(u=e.sent,!r){e.next=54;break}return e.abrupt("return",u);case 54:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=58;break}throw new ws(u);case 58:return e.next=60,u.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 m.apply(this,arguments)})},{key:"addTaxesForBasketItem",value:(k=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.itemId){e.next=25;break}a.itemId=n.itemId,e.next=30;break;case 25:if(void 0===i.itemId){e.next=29;break}a.itemId=i.itemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: itemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}/taxes",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=47,Go(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=54;break}throw new ws(u);case 54:case"end":return e.stop()}}),e,this)}))),function(e,t){return k.apply(this,arguments)})},{key:"addPaymentInstrumentToBasket",value:(I=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}/payment-instruments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=39,Go(s.toString(),d);case 39:if(u=e.sent,!r){e.next=44;break}return e.abrupt("return",u);case 44:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=48;break}throw new ws(u);case 48:return e.next=50,u.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 I.apply(this,arguments)})},{key:"removePaymentInstrumentFromBasket",value:(v=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}a.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===i.paymentInstrumentId){e.next=29;break}a.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=48,Go(s.toString(),d);case 48:if(u=e.sent,!r){e.next=53;break}return e.abrupt("return",u);case 53:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=57;break}throw new ws(u);case 57:return e.next=59,u.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:"updatePaymentInstrumentInBasket",value:(b=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}a.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===i.paymentInstrumentId){e.next=29;break}a.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(o={},void 0!==n.removeExternalTax?o.removeExternalTax=n.removeExternalTax:void 0!==i.removeExternalTax&&(o.removeExternalTax=i.removeExternalTax),void 0===n.siteId){e.next=36;break}o.siteId=n.siteId,e.next=41;break;case 36:if(void 0===i.siteId){e.next=40;break}o.siteId=i.siteId,e.next=41;break;case 40:throw new Error("Missing required query parameter: siteId");case 41:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=49,Go(s.toString(),d);case 49:if(u=e.sent,!r){e.next=54;break}return e.abrupt("return",u);case 54:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=58;break}throw new ws(u);case 58:return e.next=60,u.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 b.apply(this,arguments)})},{key:"getPaymentMethodsForBasket",value:(g=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}/payment-methods",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=39,Go(s.toString(),d);case 39:if(u=e.sent,!r){e.next=44;break}return e.abrupt("return",u);case 44:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=48;break}throw new ws(u);case 48:return e.next=50,u.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 g.apply(this,arguments)})},{key:"addPriceAdjustmentToBasket",value:(l=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}/price-adjustments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=39,Go(s.toString(),d);case 39:if(u=e.sent,!r){e.next=44;break}return e.abrupt("return",u);case 44:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=48;break}throw new ws(u);case 48:return e.next=50,u.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 l.apply(this,arguments)})},{key:"removePriceAdjustmentFromBasket",value:(p=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.priceAdjustmentId){e.next=25;break}a.priceAdjustmentId=n.priceAdjustmentId,e.next=30;break;case 25:if(void 0===i.priceAdjustmentId){e.next=29;break}a.priceAdjustmentId=i.priceAdjustmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: priceAdjustmentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}/price-adjustments/{priceAdjustmentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=48,Go(s.toString(),d);case 48:if(u=e.sent,!r){e.next=53;break}return e.abrupt("return",u);case 53:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=57;break}throw new ws(u);case 57:return e.next=59,u.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:"updatePriceAdjustmentInBasket",value:(f=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.priceAdjustmentId){e.next=25;break}a.priceAdjustmentId=n.priceAdjustmentId,e.next=30;break;case 25:if(void 0===i.priceAdjustmentId){e.next=29;break}a.priceAdjustmentId=i.priceAdjustmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: priceAdjustmentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}/price-adjustments/{priceAdjustmentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=47,Go(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=56;break}throw new ws(u);case 56:return e.next=58,u.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 f.apply(this,arguments)})},{key:"getPriceBooksForBasket",value:(h=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}/price-books",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=38,Go(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new ws(u);case 47:return e.next=49,u.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:"addPriceBooksToBasket",value:(u=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}/price-books",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=38,Go(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=45;break}throw new ws(u);case 45:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"createShipmentForBasket",value:(d=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}/shipments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=39,Go(s.toString(),d);case 39:if(u=e.sent,!r){e.next=44;break}return e.abrupt("return",u);case 44:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=48;break}throw new ws(u);case 48:return e.next=50,u.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 d.apply(this,arguments)})},{key:"removeShipmentFromBasket",value:(c=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.shipmentId){e.next=25;break}a.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===i.shipmentId){e.next=29;break}a.shipmentId=i.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=48,Go(s.toString(),d);case 48:if(u=e.sent,!r){e.next=53;break}return e.abrupt("return",u);case 53:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=57;break}throw new ws(u);case 57:return e.next=59,u.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 c.apply(this,arguments)})},{key:"updateShipmentForBasket",value:(s=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.shipmentId){e.next=25;break}a.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===i.shipmentId){e.next=29;break}a.shipmentId=i.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=48,Go(s.toString(),d);case 48:if(u=e.sent,!r){e.next=53;break}return e.abrupt("return",u);case 53:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=57;break}throw new ws(u);case 57:return e.next=59,u.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 s.apply(this,arguments)})},{key:"updateShippingAddressForShipment",value:(o=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.shipmentId){e.next=25;break}a.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===i.shipmentId){e.next=29;break}a.shipmentId=i.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(o={},void 0!==n.useAsBilling?o.useAsBilling=n.useAsBilling:void 0!==i.useAsBilling&&(o.useAsBilling=i.useAsBilling),void 0!==n.removeExternalTax?o.removeExternalTax=n.removeExternalTax:void 0!==i.removeExternalTax&&(o.removeExternalTax=i.removeExternalTax),void 0===n.siteId){e.next=37;break}o.siteId=n.siteId,e.next=42;break;case 37:if(void 0===i.siteId){e.next=41;break}o.siteId=i.siteId,e.next=42;break;case 41:throw new Error("Missing required query parameter: siteId");case 42:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-address",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=50,Go(s.toString(),d);case 50:if(u=e.sent,!r){e.next=55;break}return e.abrupt("return",u);case 55:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=59;break}throw new ws(u);case 59:return e.next=61,u.text();case 61:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 63:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"updateShippingMethodForShipment",value:(a=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.shipmentId){e.next=25;break}a.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===i.shipmentId){e.next=29;break}a.shipmentId=i.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-method",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=48,Go(s.toString(),d);case 48:if(u=e.sent,!r){e.next=53;break}return e.abrupt("return",u);case 53:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=57;break}throw new ws(u);case 57:return e.next=59,u.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 a.apply(this,arguments)})},{key:"getShippingMethodsForShipment",value:(i=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.shipmentId){e.next=25;break}a.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===i.shipmentId){e.next=29;break}a.shipmentId=i.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-methods",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=48,Go(s.toString(),d);case 48:if(u=e.sent,!r){e.next=53;break}return e.abrupt("return",u);case 53:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=57;break}throw new ws(u);case 57:return e.next=59,u.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 i.apply(this,arguments)})},{key:"updateAsStorefrontBasket",value:(n=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0!==n.exchange?o.exchange=n.exchange:void 0!==i.exchange&&(o.exchange=i.exchange),void 0===n.siteId){e.next=27;break}o.siteId=n.siteId,e.next=32;break;case 27:if(void 0===i.siteId){e.next=31;break}o.siteId=i.siteId,e.next=32;break;case 31:throw new Error("Missing required query parameter: siteId");case 32:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}/storefront",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{headers:c,method:"PUT"}),e.next=40,Go(s.toString(),d);case 40:if(u=e.sent,!r){e.next=45;break}return e.abrupt("return",u);case 45:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=49;break}throw new ws(u);case 49:return e.next=51,u.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 n.apply(this,arguments)})},{key:"getTaxesFromBasket",value:(r=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}/taxes",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=38,Go(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new ws(u);case 47:return e.next=49,u.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 r.apply(this,arguments)})},{key:"addTaxesForBasket",value:(t=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}/taxes",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=cu(cu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=cu(cu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=38,Go(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=45;break}throw new ws(u);case 45:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();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 hu(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){pi(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}pi(du,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-baskets/{version}");var fu=function(){function e(t){ui(this,e),pi(this,"clientConfig",void 0);var r=hu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t,r,n,i;return fi(e,[{key:"getShopperContext",value:(i=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.usid){e.next=16;break}a.usid=n.usid,e.next=21;break;case 16:if(void 0===i.usid){e.next=20;break}a.usid=i.usid,e.next=21;break;case 20:throw new Error("Missing required path parameter: usid");case 21:return o={},void 0!==n.siteId?o.siteId=n.siteId:void 0!==i.siteId&&(o.siteId=i.siteId),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=hu(hu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=hu(hu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=30,Go(s.toString(),d);case 30:if(u=e.sent,!r){e.next=35;break}return e.abrupt("return",u);case 35:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=39;break}throw new ws(u);case 39:return e.next=41,u.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 i.apply(this,arguments)})},{key:"createShopperContext",value:(n=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.usid){e.next=16;break}a.usid=n.usid,e.next=21;break;case 16:if(void 0===i.usid){e.next=20;break}a.usid=i.usid,e.next=21;break;case 20:throw new Error("Missing required path parameter: usid");case 21:return o={},void 0!==n.siteId?o.siteId=n.siteId:void 0!==i.siteId&&(o.siteId=i.siteId),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=hu(hu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=hu(hu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=30,Go(s.toString(),d);case 30:if(u=e.sent,!r){e.next=35;break}return e.abrupt("return",u);case 35:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=39;break}throw new ws(u);case 39:return e.next=41,u.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 n.apply(this,arguments)})},{key:"deleteShopperContext",value:(r=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.usid){e.next=16;break}a.usid=n.usid,e.next=21;break;case 16:if(void 0===i.usid){e.next=20;break}a.usid=i.usid,e.next=21;break;case 20:throw new Error("Missing required path parameter: usid");case 21:return o={},void 0!==n.siteId?o.siteId=n.siteId:void 0!==i.siteId&&(o.siteId=i.siteId),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=hu(hu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=hu(hu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=30,Go(s.toString(),d);case 30:if(u=e.sent,!r){e.next=35;break}return e.abrupt("return",u);case 35:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=37;break}throw new ws(u);case 37:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"updateShopperContext",value:(t=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.usid){e.next=16;break}a.usid=n.usid,e.next=21;break;case 16:if(void 0===i.usid){e.next=20;break}a.usid=i.usid,e.next=21;break;case 20:throw new Error("Missing required path parameter: usid");case 21:return o={},void 0!==n.siteId?o.siteId=n.siteId:void 0!==i.siteId&&(o.siteId=i.siteId),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=hu(hu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=hu(hu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=30,Go(s.toString(),d);case 30:if(u=e.sent,!r){e.next=35;break}return e.abrupt("return",u);case 35:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=39;break}throw new ws(u);case 39:return e.next=41,u.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,r){return t.apply(this,arguments)})}]),e}();function pu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function lu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?pu(Object(r),!0).forEach((function(t){pi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}pi(fu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/shopper/shopper-context/{version}");var gu=function(){function e(t){ui(this,e),pi(this,"clientConfig",void 0);var r=lu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t,r,n,i,a,o,s,c,d,u,h,f,p,l,g,b,v,I,k,m,x,y,w,C,O,z,P,E,q,j,S,T;return fi(e,[{key:"registerCustomer",value:(T=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/customers",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=29,Go(s.toString(),d);case 29:if(u=e.sent,!r){e.next=34;break}return e.abrupt("return",u);case 34:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=38;break}throw new ws(u);case 38:return e.next=40,u.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 T.apply(this,arguments)})},{key:"invalidateCustomerAuth",value:(S=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/customers/actions/logout",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=29,Go(s.toString(),d);case 29:if(u=e.sent,!r){e.next=34;break}return e.abrupt("return",u);case 34:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=36;break}throw new ws(u);case 36:case"end":return e.stop()}}),e,this)}))),function(e,t){return S.apply(this,arguments)})},{key:"authorizeCustomer",value:(j=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.clientId){e.next=17;break}o.clientId=n.clientId,e.next=22;break;case 17:if(void 0===i.clientId){e.next=21;break}o.clientId=i.clientId,e.next=22;break;case 21:throw new Error("Missing required query parameter: clientId");case 22:if(void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/customers/actions/login",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=38,Go(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new ws(u);case 47:return e.next=49,u.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 j.apply(this,arguments)})},{key:"authorizeTrustedSystem",value:(q=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/customers/trusted-system/actions/login",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=29,Go(s.toString(),d);case 29:if(u=e.sent,!r){e.next=34;break}return e.abrupt("return",u);case 34:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=38;break}throw new ws(u);case 38:return e.next=40,u.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 q.apply(this,arguments)})},{key:"resetPassword",value:(E=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/customers/password/actions/reset",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=29,Go(s.toString(),d);case 29:if(u=e.sent,!r){e.next=34;break}return e.abrupt("return",u);case 34:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=36;break}throw new ws(u);case 36:case"end":return e.stop()}}),e,this)}))),function(e,t){return E.apply(this,arguments)})},{key:"getResetPasswordToken",value:(P=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/customers/password/actions/create-reset-token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=29,Go(s.toString(),d);case 29:if(u=e.sent,!r){e.next=34;break}return e.abrupt("return",u);case 34:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=38;break}throw new ws(u);case 38:return e.next=40,u.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 P.apply(this,arguments)})},{key:"registerExternalProfile",value:(z=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/customers/external-profile",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=29,Go(s.toString(),d);case 29:if(u=e.sent,!r){e.next=34;break}return e.abrupt("return",u);case 34:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=38;break}throw new ws(u);case 38:return e.next=40,u.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 z.apply(this,arguments)})},{key:"getExternalProfile",value:(O=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.externalId){e.next=17;break}o.externalId=n.externalId,e.next=22;break;case 17:if(void 0===i.externalId){e.next=21;break}o.externalId=i.externalId,e.next=22;break;case 21:throw new Error("Missing required query parameter: externalId");case 22:if(void 0===n.authenticationProviderId){e.next=26;break}o.authenticationProviderId=n.authenticationProviderId,e.next=31;break;case 26:if(void 0===i.authenticationProviderId){e.next=30;break}o.authenticationProviderId=i.authenticationProviderId,e.next=31;break;case 30:throw new Error("Missing required query parameter: authenticationProviderId");case 31:if(void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/customers/external-profile",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=47,Go(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=56;break}throw new ws(u);case 56:return e.next=58,u.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 O.apply(this,arguments)})},{key:"getCustomer",value:(C=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/customers/{customerId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=38,Go(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new ws(u);case 47:return e.next=49,u.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 C.apply(this,arguments)})},{key:"updateCustomer",value:(w=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/customers/{customerId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=38,Go(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new ws(u);case 47:return e.next=49,u.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:"createCustomerAddress",value:(y=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/customers/{customerId}/addresses",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=38,Go(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new ws(u);case 47:return e.next=49,u.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:"getCustomerAddress",value:(x=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.addressName){e.next=25;break}a.addressName=n.addressName,e.next=30;break;case 25:if(void 0===i.addressName){e.next=29;break}a.addressName=i.addressName,e.next=30;break;case 29:throw new Error("Missing required path parameter: addressName");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=47,Go(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=56;break}throw new ws(u);case 56:return e.next=58,u.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:"removeCustomerAddress",value:(m=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.addressName){e.next=25;break}a.addressName=n.addressName,e.next=30;break;case 25:if(void 0===i.addressName){e.next=29;break}a.addressName=i.addressName,e.next=30;break;case 29:throw new Error("Missing required path parameter: addressName");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=47,Go(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=54;break}throw new ws(u);case 54:case"end":return e.stop()}}),e,this)}))),function(e,t){return m.apply(this,arguments)})},{key:"updateCustomerAddress",value:(k=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.addressName){e.next=25;break}a.addressName=n.addressName,e.next=30;break;case 25:if(void 0===i.addressName){e.next=29;break}a.addressName=i.addressName,e.next=30;break;case 29:throw new Error("Missing required path parameter: addressName");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=47,Go(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=56;break}throw new ws(u);case 56:return e.next=58,u.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 k.apply(this,arguments)})},{key:"getCustomerBaskets",value:(I=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/customers/{customerId}/baskets",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=38,Go(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new ws(u);case 47:return e.next=49,u.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 I.apply(this,arguments)})},{key:"getCustomerOrders",value:(v=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0!==n.crossSites?o.crossSites=n.crossSites:void 0!==i.crossSites&&(o.crossSites=i.crossSites),void 0!==n.from?o.from=n.from:void 0!==i.from&&(o.from=i.from),void 0!==n.until?o.until=n.until:void 0!==i.until&&(o.until=i.until),void 0!==n.status?o.status=n.status:void 0!==i.status&&(o.status=i.status),void 0===n.siteId){e.next=30;break}o.siteId=n.siteId,e.next=35;break;case 30:if(void 0===i.siteId){e.next=34;break}o.siteId=i.siteId,e.next=35;break;case 34:throw new Error("Missing required query parameter: siteId");case 35:return void 0!==n.offset?o.offset=n.offset:void 0!==i.offset&&(o.offset=i.offset),void 0!==n.limit?o.limit=n.limit:void 0!==i.limit&&(o.limit=i.limit),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/customers/{customerId}/orders",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=44,Go(s.toString(),d);case 44:if(u=e.sent,!r){e.next=49;break}return e.abrupt("return",u);case 49:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=53;break}throw new ws(u);case 53:return e.next=55,u.text();case 55:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 57:case"end":return e.stop()}}),e,this)}))),function(e,t){return v.apply(this,arguments)})},{key:"updateCustomerPassword",value:(b=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/customers/{customerId}/password",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=38,Go(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=45;break}throw new ws(u);case 45:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"createCustomerPaymentInstrument",value:(g=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/customers/{customerId}/payment-instruments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=38,Go(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new ws(u);case 47:return e.next=49,u.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:"deleteCustomerPaymentInstrument",value:(l=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}a.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===i.paymentInstrumentId){e.next=29;break}a.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/customers/{customerId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=47,Go(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=54;break}throw new ws(u);case 54:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"getCustomerPaymentInstrument",value:(p=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}a.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===i.paymentInstrumentId){e.next=29;break}a.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/customers/{customerId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=47,Go(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=56;break}throw new ws(u);case 56:return e.next=58,u.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 p.apply(this,arguments)})},{key:"getCustomerProductLists",value:(f=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/customers/{customerId}/product-lists",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=38,Go(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new ws(u);case 47:return e.next=49,u.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 f.apply(this,arguments)})},{key:"createCustomerProductList",value:(h=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/customers/{customerId}/product-lists",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=38,Go(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new ws(u);case 47:return e.next=49,u.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:"deleteCustomerProductList",value:(u=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}a.listId=n.listId,e.next=30;break;case 25:if(void 0===i.listId){e.next=29;break}a.listId=i.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=47,Go(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=54;break}throw new ws(u);case 54:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"getCustomerProductList",value:(d=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}a.listId=n.listId,e.next=30;break;case 25:if(void 0===i.listId){e.next=29;break}a.listId=i.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=47,Go(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=56;break}throw new ws(u);case 56:return e.next=58,u.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 d.apply(this,arguments)})},{key:"updateCustomerProductList",value:(c=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}a.listId=n.listId,e.next=30;break;case 25:if(void 0===i.listId){e.next=29;break}a.listId=i.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=47,Go(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=56;break}throw new ws(u);case 56:return e.next=58,u.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 c.apply(this,arguments)})},{key:"createCustomerProductListItem",value:(s=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}a.listId=n.listId,e.next=30;break;case 25:if(void 0===i.listId){e.next=29;break}a.listId=i.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=47,Go(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=56;break}throw new ws(u);case 56:return e.next=58,u.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:"deleteCustomerProductListItem",value:(o=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}a.listId=n.listId,e.next=30;break;case 25:if(void 0===i.listId){e.next=29;break}a.listId=i.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(void 0===n.itemId){e.next=34;break}a.itemId=n.itemId,e.next=39;break;case 34:if(void 0===i.itemId){e.next=38;break}a.itemId=i.itemId,e.next=39;break;case 38:throw new Error("Missing required path parameter: itemId");case 39:if(o={},void 0===n.siteId){e.next=44;break}o.siteId=n.siteId,e.next=49;break;case 44:if(void 0===i.siteId){e.next=48;break}o.siteId=i.siteId,e.next=49;break;case 48:throw new Error("Missing required query parameter: siteId");case 49:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=56,Go(s.toString(),d);case 56:if(u=e.sent,!r){e.next=61;break}return e.abrupt("return",u);case 61:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=63;break}throw new ws(u);case 63:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"getCustomerProductListItem",value:(a=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}a.listId=n.listId,e.next=30;break;case 25:if(void 0===i.listId){e.next=29;break}a.listId=i.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(void 0===n.itemId){e.next=34;break}a.itemId=n.itemId,e.next=39;break;case 34:if(void 0===i.itemId){e.next=38;break}a.itemId=i.itemId,e.next=39;break;case 38:throw new Error("Missing required path parameter: itemId");case 39:if(o={},void 0===n.siteId){e.next=44;break}o.siteId=n.siteId,e.next=49;break;case 44:if(void 0===i.siteId){e.next=48;break}o.siteId=i.siteId,e.next=49;break;case 48:throw new Error("Missing required query parameter: siteId");case 49:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=56,Go(s.toString(),d);case 56:if(u=e.sent,!r){e.next=61;break}return e.abrupt("return",u);case 61:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=65;break}throw new ws(u);case 65:return e.next=67,u.text();case 67:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 69:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"updateCustomerProductListItem",value:(i=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}a.listId=n.listId,e.next=30;break;case 25:if(void 0===i.listId){e.next=29;break}a.listId=i.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(void 0===n.itemId){e.next=34;break}a.itemId=n.itemId,e.next=39;break;case 34:if(void 0===i.itemId){e.next=38;break}a.itemId=i.itemId,e.next=39;break;case 38:throw new Error("Missing required path parameter: itemId");case 39:if(o={},void 0===n.siteId){e.next=44;break}o.siteId=n.siteId,e.next=49;break;case 44:if(void 0===i.siteId){e.next=48;break}o.siteId=i.siteId,e.next=49;break;case 48:throw new Error("Missing required query parameter: siteId");case 49:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=56,Go(s.toString(),d);case 56:if(u=e.sent,!r){e.next=61;break}return e.abrupt("return",u);case 61:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=65;break}throw new ws(u);case 65:return e.next=67,u.text();case 67:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 69:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getPublicProductListsBySearchTerm",value:(n=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.email?o.email=n.email:void 0!==i.email&&(o.email=i.email),void 0!==n.firstName?o.firstName=n.firstName:void 0!==i.firstName&&(o.firstName=i.firstName),void 0!==n.lastName?o.lastName=n.lastName:void 0!==i.lastName&&(o.lastName=i.lastName),void 0===n.siteId){e.next=20;break}o.siteId=n.siteId,e.next=25;break;case 20:if(void 0===i.siteId){e.next=24;break}o.siteId=i.siteId,e.next=25;break;case 24:throw new Error("Missing required query parameter: siteId");case 25:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/product-lists",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=32,Go(s.toString(),d);case 32:if(u=e.sent,!r){e.next=37;break}return e.abrupt("return",u);case 37:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=41;break}throw new ws(u);case 41:return e.next=43,u.text();case 43:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 45:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getPublicProductList",value:(r=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.listId){e.next=16;break}a.listId=n.listId,e.next=21;break;case 16:if(void 0===i.listId){e.next=20;break}a.listId=i.listId,e.next=21;break;case 20:throw new Error("Missing required path parameter: listId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=38,Go(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new ws(u);case 47:return e.next=49,u.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 r.apply(this,arguments)})},{key:"getProductListItem",value:(t=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.listId){e.next=16;break}a.listId=n.listId,e.next=21;break;case 16:if(void 0===i.listId){e.next=20;break}a.listId=i.listId,e.next=21;break;case 20:throw new Error("Missing required path parameter: listId");case 21:if(void 0===n.itemId){e.next=25;break}a.itemId=n.itemId,e.next=30;break;case 25:if(void 0===i.itemId){e.next=29;break}a.itemId=i.itemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: itemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=lu(lu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=lu(lu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=47,Go(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=56;break}throw new ws(u);case 56:return e.next=58,u.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,r){return t.apply(this,arguments)})}]),e}();function bu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function vu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?bu(Object(r),!0).forEach((function(t){pi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}pi(gu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/customer/shopper-customers/{version}");var Iu=function(){function e(t){ui(this,e),pi(this,"clientConfig",void 0);var r=vu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t,r;return fi(e,[{key:"retrieveResults",value:(r=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.channelId){e.next=16;break}a.channelId=n.channelId,e.next=21;break;case 16:if(void 0===i.channelId){e.next=20;break}a.channelId=i.channelId,e.next=21;break;case 20:throw new Error("Missing required path parameter: channelId");case 21:if(o={},void 0===n.locale){e.next=26;break}o.locale=n.locale,e.next=31;break;case 26:if(void 0===i.locale){e.next=30;break}o.locale=i.locale,e.next=31;break;case 30:throw new Error("Missing required query parameter: locale");case 31:return void 0!==n.offset?o.offset=n.offset:void 0!==i.offset&&(o.offset=i.offset),void 0!==n.limit?o.limit=n.limit:void 0!==i.limit&&(o.limit=i.limit),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/channels/{channelId}/results",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=vu(vu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=vu(vu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=40,Go(s.toString(),d);case 40:if(u=e.sent,!r){e.next=45;break}return e.abrupt("return",u);case 45:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=49;break}throw new ws(u);case 49:return e.next=51,u.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)})},{key:"getSuggestions",value:(t=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.channelId){e.next=16;break}a.channelId=n.channelId,e.next=21;break;case 16:if(void 0===i.channelId){e.next=20;break}a.channelId=i.channelId,e.next=21;break;case 20:throw new Error("Missing required path parameter: channelId");case 21:if(o={},void 0===n.suggestionTypes){e.next=26;break}o.suggestionTypes=n.suggestionTypes,e.next=31;break;case 26:if(void 0===i.suggestionTypes){e.next=30;break}o.suggestionTypes=i.suggestionTypes,e.next=31;break;case 30:throw new Error("Missing required query parameter: suggestionTypes");case 31:if(void 0!==n.searchText?o.searchText=n.searchText:void 0!==i.searchText&&(o.searchText=i.searchText),void 0===n.locale){e.next=36;break}o.locale=n.locale,e.next=41;break;case 36:if(void 0===i.locale){e.next=40;break}o.locale=i.locale,e.next=41;break;case 40:throw new Error("Missing required query parameter: locale");case 41:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/channels/{channelId}/suggestions",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=vu(vu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=vu(vu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=48,Go(s.toString(),d);case 48:if(u=e.sent,!r){e.next=53;break}return e.abrupt("return",u);case 53:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=57;break}throw new ws(u);case 57:return e.next=59,u.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,r){return t.apply(this,arguments)})}]),e}();function ku(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function mu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ku(Object(r),!0).forEach((function(t){pi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ku(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}pi(Iu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/discovery/query/{version}");var xu=function(){function e(t){ui(this,e),pi(this,"clientConfig",void 0);var r=mu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t,r;return fi(e,[{key:"getPages",value:(r=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.categoryId?o.categoryId=n.categoryId:void 0!==i.categoryId&&(o.categoryId=i.categoryId),void 0!==n.productId?o.productId=n.productId:void 0!==i.productId&&(o.productId=i.productId),void 0===n.aspectTypeId){e.next=19;break}o.aspectTypeId=n.aspectTypeId,e.next=24;break;case 19:if(void 0===i.aspectTypeId){e.next=23;break}o.aspectTypeId=i.aspectTypeId,e.next=24;break;case 23:throw new Error("Missing required query parameter: aspectTypeId");case 24:if(void 0!==n.aspectAttributes?o.aspectAttributes=n.aspectAttributes:void 0!==i.aspectAttributes&&(o.aspectAttributes=i.aspectAttributes),void 0!==n.parameters?o.parameters=n.parameters:void 0!==i.parameters&&(o.parameters=i.parameters),void 0===n.siteId){e.next=30;break}o.siteId=n.siteId,e.next=35;break;case 30:if(void 0===i.siteId){e.next=34;break}o.siteId=i.siteId,e.next=35;break;case 34:throw new Error("Missing required query parameter: siteId");case 35:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/pages",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=mu(mu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=mu(mu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=43,Go(s.toString(),d);case 43:if(u=e.sent,!r){e.next=48;break}return e.abrupt("return",u);case 48:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=52;break}throw new ws(u);case 52:return e.next=54,u.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 r.apply(this,arguments)})},{key:"getPage",value:(t=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.pageId){e.next=16;break}a.pageId=n.pageId,e.next=21;break;case 16:if(void 0===i.pageId){e.next=20;break}a.pageId=i.pageId,e.next=21;break;case 20:throw new Error("Missing required path parameter: pageId");case 21:if(o={},void 0!==n.aspectAttributes?o.aspectAttributes=n.aspectAttributes:void 0!==i.aspectAttributes&&(o.aspectAttributes=i.aspectAttributes),void 0!==n.parameters?o.parameters=n.parameters:void 0!==i.parameters&&(o.parameters=i.parameters),void 0===n.siteId){e.next=28;break}o.siteId=n.siteId,e.next=33;break;case 28:if(void 0===i.siteId){e.next=32;break}o.siteId=i.siteId,e.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/pages/{pageId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=mu(mu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=mu(mu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=41,Go(s.toString(),d);case 41:if(u=e.sent,!r){e.next=46;break}return e.abrupt("return",u);case 46:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=50;break}throw new ws(u);case 50:return e.next=52,u.text();case 52:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 54:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function yu(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 wu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?yu(Object(r),!0).forEach((function(t){pi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}pi(xu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/experience/shopper-experience/{version}");var Cu=function(){function e(t){ui(this,e),pi(this,"clientConfig",void 0);var r=wu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t;return fi(e,[{key:"getGiftCertificate",value:(t=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/gift-certificate",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=wu(wu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=wu(wu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=29,Go(s.toString(),d);case 29:if(u=e.sent,!r){e.next=34;break}return e.abrupt("return",u);case 34:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=38;break}throw new ws(u);case 38:return e.next=40,u.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,r){return t.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 zu(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){pi(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}pi(Cu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/pricing/shopper-gift-certificates/{version}");var Pu=function(){function e(t){ui(this,e),pi(this,"clientConfig",void 0);var r=zu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t,r,n,i,a,o,s,c,d,u,h,f,p,l,g,b,v;return fi(e,[{key:"authenticateCustomer",value:(v=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/oauth2/login",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=zu(zu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=zu(zu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=20,Go(s.toString(),d);case 20:if(u=e.sent,!r){e.next=25;break}return e.abrupt("return",u);case 25:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=27;break}throw new ws(u);case 27:case"end":return e.stop()}}),e,this)}))),function(e,t){return v.apply(this,arguments)})},{key:"authorizePasswordlessCustomer",value:(b=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/oauth2/passwordless/login",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=zu(zu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=zu(zu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=20,Go(s.toString(),d);case 20:if(u=e.sent,!r){e.next=25;break}return e.abrupt("return",u);case 25:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=29;break}throw new ws(u);case 29:return e.next=31,u.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 b.apply(this,arguments)})},{key:"logoutCustomer",value:(g=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.client_id){e.next=17;break}o.client_id=n.client_id,e.next=22;break;case 17:if(void 0===i.client_id){e.next=21;break}o.client_id=i.client_id,e.next=22;break;case 21:throw new Error("Missing required query parameter: client_id");case 22:if(void 0===n.refresh_token){e.next=26;break}o.refresh_token=n.refresh_token,e.next=31;break;case 26:if(void 0===i.refresh_token){e.next=30;break}o.refresh_token=i.refresh_token,e.next=31;break;case 30:throw new Error("Missing required query parameter: refresh_token");case 31:return void 0!==n.channel_id?o.channel_id=n.channel_id:void 0!==i.channel_id&&(o.channel_id=i.channel_id),void 0!==n.hint?o.hint=n.hint:void 0!==i.hint&&(o.hint=i.hint),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/oauth2/logout",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=zu(zu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=zu(zu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=40,Go(s.toString(),d);case 40:if(u=e.sent,!r){e.next=45;break}return e.abrupt("return",u);case 45:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=49;break}throw new ws(u);case 49:return e.next=51,u.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 g.apply(this,arguments)})},{key:"authorizeCustomer",value:(l=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.redirect_uri){e.next=17;break}o.redirect_uri=n.redirect_uri,e.next=22;break;case 17:if(void 0===i.redirect_uri){e.next=21;break}o.redirect_uri=i.redirect_uri,e.next=22;break;case 21:throw new Error("Missing required query parameter: redirect_uri");case 22:if(void 0===n.response_type){e.next=26;break}o.response_type=n.response_type,e.next=31;break;case 26:if(void 0===i.response_type){e.next=30;break}o.response_type=i.response_type,e.next=31;break;case 30:throw new Error("Missing required query parameter: response_type");case 31:if(void 0===n.client_id){e.next=35;break}o.client_id=n.client_id,e.next=40;break;case 35:if(void 0===i.client_id){e.next=39;break}o.client_id=i.client_id,e.next=40;break;case 39:throw new Error("Missing required query parameter: client_id");case 40:if(void 0!==n.scope?o.scope=n.scope:void 0!==i.scope&&(o.scope=i.scope),void 0!==n.state?o.state=n.state:void 0!==i.state&&(o.state=i.state),void 0!==n.usid?o.usid=n.usid:void 0!==i.usid&&(o.usid=i.usid),void 0!==n.hint?o.hint=n.hint:void 0!==i.hint&&(o.hint=i.hint),void 0!==n.channel_id?o.channel_id=n.channel_id:void 0!==i.channel_id&&(o.channel_id=i.channel_id),void 0===n.code_challenge){e.next=49;break}o.code_challenge=n.code_challenge,e.next=54;break;case 49:if(void 0===i.code_challenge){e.next=53;break}o.code_challenge=i.code_challenge,e.next=54;break;case 53:throw new Error("Missing required query parameter: code_challenge");case 54:return void 0!==n.ui_locales?o.ui_locales=n.ui_locales:void 0!==i.ui_locales&&(o.ui_locales=i.ui_locales),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/oauth2/authorize",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=zu(zu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=zu(zu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=62,Go(s.toString(),d);case 62:if(u=e.sent,!r){e.next=67;break}return e.abrupt("return",u);case 67:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=69;break}throw new ws(u);case 69:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"getAccessToken",value:(p=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/oauth2/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=zu(zu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=zu(zu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=20,Go(s.toString(),d);case 20:if(u=e.sent,!r){e.next=25;break}return e.abrupt("return",u);case 25:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=29;break}throw new ws(u);case 29:return e.next=31,u.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 p.apply(this,arguments)})},{key:"getSessionBridgeAccessToken",value:(f=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/oauth2/session-bridge/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=zu(zu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=zu(zu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=20,Go(s.toString(),d);case 20:if(u=e.sent,!r){e.next=25;break}return e.abrupt("return",u);case 25:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=29;break}throw new ws(u);case 29:return e.next=31,u.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 f.apply(this,arguments)})},{key:"getTrustedSystemAccessToken",value:(h=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/oauth2/trusted-system/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=zu(zu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=zu(zu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=20,Go(s.toString(),d);case 20:if(u=e.sent,!r){e.next=25;break}return e.abrupt("return",u);case 25:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=29;break}throw new ws(u);case 29:return e.next=31,u.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 h.apply(this,arguments)})},{key:"getTrustedAgentAuthorizationToken",value:(u=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.client_id){e.next=17;break}o.client_id=n.client_id,e.next=22;break;case 17:if(void 0===i.client_id){e.next=21;break}o.client_id=i.client_id,e.next=22;break;case 21:throw new Error("Missing required query parameter: client_id");case 22:if(void 0===n.channel_id){e.next=26;break}o.channel_id=n.channel_id,e.next=31;break;case 26:if(void 0===i.channel_id){e.next=30;break}o.channel_id=i.channel_id,e.next=31;break;case 30:throw new Error("Missing required query parameter: channel_id");case 31:if(void 0===n.code_challenge){e.next=35;break}o.code_challenge=n.code_challenge,e.next=40;break;case 35:if(void 0===i.code_challenge){e.next=39;break}o.code_challenge=i.code_challenge,e.next=40;break;case 39:throw new Error("Missing required query parameter: code_challenge");case 40:if(void 0===n.login_id){e.next=44;break}o.login_id=n.login_id,e.next=49;break;case 44:if(void 0===i.login_id){e.next=48;break}o.login_id=i.login_id,e.next=49;break;case 48:throw new Error("Missing required query parameter: login_id");case 49:if(void 0===n.idp_origin){e.next=53;break}o.idp_origin=n.idp_origin,e.next=58;break;case 53:if(void 0===i.idp_origin){e.next=57;break}o.idp_origin=i.idp_origin,e.next=58;break;case 57:throw new Error("Missing required query parameter: idp_origin");case 58:if(void 0===n.redirect_uri){e.next=62;break}o.redirect_uri=n.redirect_uri,e.next=67;break;case 62:if(void 0===i.redirect_uri){e.next=66;break}o.redirect_uri=i.redirect_uri,e.next=67;break;case 66:throw new Error("Missing required query parameter: redirect_uri");case 67:if(void 0===n.response_type){e.next=71;break}o.response_type=n.response_type,e.next=76;break;case 71:if(void 0===i.response_type){e.next=75;break}o.response_type=i.response_type,e.next=76;break;case 75:throw new Error("Missing required query parameter: response_type");case 76:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/oauth2/trusted-agent/authorize",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=zu(zu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=zu(zu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=83,Go(s.toString(),d);case 83:if(u=e.sent,!r){e.next=88;break}return e.abrupt("return",u);case 88:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=90;break}throw new ws(u);case 90:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"getTrustedAgentAccessToken",value:(d=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/oauth2/trusted-agent/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=zu(zu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=zu(zu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=20,Go(s.toString(),d);case 20:if(u=e.sent,!r){e.next=25;break}return e.abrupt("return",u);case 25:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=29;break}throw new ws(u);case 29:return e.next=31,u.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 d.apply(this,arguments)})},{key:"getPasswordResetToken",value:(c=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/oauth2/password/reset",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=zu(zu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=zu(zu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=20,Go(s.toString(),d);case 20:if(u=e.sent,!r){e.next=25;break}return e.abrupt("return",u);case 25:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=27;break}throw new ws(u);case 27:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"resetPassword",value:(s=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/oauth2/password/action",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=zu(zu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=zu(zu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=20,Go(s.toString(),d);case 20:if(u=e.sent,!r){e.next=25;break}return e.abrupt("return",u);case 25:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=27;break}throw new ws(u);case 27:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"getPasswordLessAccessToken",value:(o=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/oauth2/passwordless/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=zu(zu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=zu(zu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=20,Go(s.toString(),d);case 20:if(u=e.sent,!r){e.next=25;break}return e.abrupt("return",u);case 25:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=29;break}throw new ws(u);case 29:return e.next=31,u.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 o.apply(this,arguments)})},{key:"revokeToken",value:(a=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/oauth2/revoke",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=zu(zu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=zu(zu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=20,Go(s.toString(),d);case 20:if(u=e.sent,!r){e.next=25;break}return e.abrupt("return",u);case 25:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=29;break}throw new ws(u);case 29:return e.next=31,u.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 a.apply(this,arguments)})},{key:"introspectToken",value:(i=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/oauth2/introspect",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=zu(zu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=zu(zu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=20,Go(s.toString(),d);case 20:if(u=e.sent,!r){e.next=25;break}return e.abrupt("return",u);case 25:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=29;break}throw new ws(u);case 29:return e.next=31,u.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:"getUserInfo",value:(n=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},void 0!==n.channel_id?o.channel_id=n.channel_id:void 0!==i.channel_id&&(o.channel_id=i.channel_id),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/oauth2/userinfo",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=zu(zu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=zu(zu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=21,Go(s.toString(),d);case 21:if(u=e.sent,!r){e.next=26;break}return e.abrupt("return",u);case 26:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=30;break}throw new ws(u);case 30:return e.next=32,u.text();case 32:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 34:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getWellknownOpenidConfiguration",value:(r=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/oauth2/.well-known/openid-configuration",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=zu(zu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=zu(zu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=20,Go(s.toString(),d);case 20:if(u=e.sent,!r){e.next=25;break}return e.abrupt("return",u);case 25:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=29;break}throw new ws(u);case 29:return e.next=31,u.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 r.apply(this,arguments)})},{key:"getJwksUri",value:(t=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/oauth2/jwks",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=zu(zu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=zu(zu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=20,Go(s.toString(),d);case 20:if(u=e.sent,!r){e.next=25;break}return e.abrupt("return",u);case 25:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=29;break}throw new ws(u);case 29:return e.next=31,u.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,r){return t.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 qu(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){pi(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}pi(Pu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/{version}");var ju=function(){function e(t){ui(this,e),pi(this,"clientConfig",void 0);var r=qu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t,r,n,i,a,o,s;return fi(e,[{key:"createOrder",value:(s=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/orders",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=qu(qu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=qu(qu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=30,Go(s.toString(),d);case 30:if(u=e.sent,!r){e.next=35;break}return e.abrupt("return",u);case 35:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=39;break}throw new ws(u);case 39:return e.next=41,u.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:"getOrder",value:(o=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}a.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===i.orderNo){e.next=20;break}a.orderNo=i.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/orders/{orderNo}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=qu(qu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=qu(qu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=39,Go(s.toString(),d);case 39:if(u=e.sent,!r){e.next=44;break}return e.abrupt("return",u);case 44:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=48;break}throw new ws(u);case 48:return e.next=50,u.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 o.apply(this,arguments)})},{key:"createPaymentInstrumentForOrder",value:(a=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}a.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===i.orderNo){e.next=20;break}a.orderNo=i.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/orders/{orderNo}/payment-instruments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=qu(qu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=qu(qu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=39,Go(s.toString(),d);case 39:if(u=e.sent,!r){e.next=44;break}return e.abrupt("return",u);case 44:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=48;break}throw new ws(u);case 48:return e.next=50,u.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 a.apply(this,arguments)})},{key:"removePaymentInstrumentFromOrder",value:(i=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}a.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===i.orderNo){e.next=20;break}a.orderNo=i.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}a.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===i.paymentInstrumentId){e.next=29;break}a.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/orders/{orderNo}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=qu(qu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=qu(qu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=48,Go(s.toString(),d);case 48:if(u=e.sent,!r){e.next=53;break}return e.abrupt("return",u);case 53:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=57;break}throw new ws(u);case 57:return e.next=59,u.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 i.apply(this,arguments)})},{key:"updatePaymentInstrumentForOrder",value:(n=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}a.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===i.orderNo){e.next=20;break}a.orderNo=i.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}a.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===i.paymentInstrumentId){e.next=29;break}a.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/orders/{orderNo}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=qu(qu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=qu(qu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=48,Go(s.toString(),d);case 48:if(u=e.sent,!r){e.next=53;break}return e.abrupt("return",u);case 53:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=57;break}throw new ws(u);case 57:return e.next=59,u.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 n.apply(this,arguments)})},{key:"getPaymentMethodsForOrder",value:(r=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}a.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===i.orderNo){e.next=20;break}a.orderNo=i.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/orders/{orderNo}/payment-methods",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=qu(qu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=qu(qu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=39,Go(s.toString(),d);case 39:if(u=e.sent,!r){e.next=44;break}return e.abrupt("return",u);case 44:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=48;break}throw new ws(u);case 48:return e.next=50,u.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)})},{key:"getTaxesFromOrder",value:(t=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}a.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===i.orderNo){e.next=20;break}a.orderNo=i.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/orders/{orderNo}/taxes",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=qu(qu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=qu(qu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=38,Go(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new ws(u);case 47:return e.next=49,u.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,r){return t.apply(this,arguments)})}]),e}();function Su(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?Su(Object(r),!0).forEach((function(t){pi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Su(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}pi(ju,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-orders/{version}");var Mu=function(){function e(t){ui(this,e),pi(this,"clientConfig",void 0);var r=Tu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t,r,n,i;return fi(e,[{key:"getProducts",value:(i=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.select?o.select=n.select:void 0!==i.select&&(o.select=i.select),void 0===n.ids){e.next=18;break}o.ids=n.ids,e.next=23;break;case 18:if(void 0===i.ids){e.next=22;break}o.ids=i.ids,e.next=23;break;case 22:throw new Error("Missing required query parameter: ids");case 23:if(void 0!==n.inventoryIds?o.inventoryIds=n.inventoryIds:void 0!==i.inventoryIds&&(o.inventoryIds=i.inventoryIds),void 0!==n.currency?o.currency=n.currency:void 0!==i.currency&&(o.currency=i.currency),void 0!==n.expand?o.expand=n.expand:void 0!==i.expand&&(o.expand=i.expand),void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),void 0!==n.allImages?o.allImages=n.allImages:void 0!==i.allImages&&(o.allImages=i.allImages),void 0!==n.perPricebook?o.perPricebook=n.perPricebook:void 0!==i.perPricebook&&(o.perPricebook=i.perPricebook),void 0===n.siteId){e.next=33;break}o.siteId=n.siteId,e.next=38;break;case 33:if(void 0===i.siteId){e.next=37;break}o.siteId=i.siteId,e.next=38;break;case 37:throw new Error("Missing required query parameter: siteId");case 38:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/products",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Tu(Tu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=Tu(Tu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=45,Go(s.toString(),d);case 45:if(u=e.sent,!r){e.next=50;break}return e.abrupt("return",u);case 50:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=54;break}throw new ws(u);case 54:return e.next=56,u.text();case 56:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 58:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getProduct",value:(n=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.id){e.next=16;break}a.id=n.id,e.next=21;break;case 16:if(void 0===i.id){e.next=20;break}a.id=i.id,e.next=21;break;case 20:throw new Error("Missing required path parameter: id");case 21:if(o={},void 0!==n.select?o.select=n.select:void 0!==i.select&&(o.select=i.select),void 0!==n.inventoryIds?o.inventoryIds=n.inventoryIds:void 0!==i.inventoryIds&&(o.inventoryIds=i.inventoryIds),void 0!==n.currency?o.currency=n.currency:void 0!==i.currency&&(o.currency=i.currency),void 0!==n.expand?o.expand=n.expand:void 0!==i.expand&&(o.expand=i.expand),void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),void 0!==n.allImages?o.allImages=n.allImages:void 0!==i.allImages&&(o.allImages=i.allImages),void 0!==n.perPricebook?o.perPricebook=n.perPricebook:void 0!==i.perPricebook&&(o.perPricebook=i.perPricebook),void 0===n.siteId){e.next=33;break}o.siteId=n.siteId,e.next=38;break;case 33:if(void 0===i.siteId){e.next=37;break}o.siteId=i.siteId,e.next=38;break;case 37:throw new Error("Missing required query parameter: siteId");case 38:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/products/{id}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Tu(Tu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=Tu(Tu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=45,Go(s.toString(),d);case 45:if(u=e.sent,!r){e.next=50;break}return e.abrupt("return",u);case 50:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=54;break}throw new ws(u);case 54:return e.next=56,u.text();case 56:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 58:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getCategories",value:(r=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.ids){e.next=17;break}o.ids=n.ids,e.next=22;break;case 17:if(void 0===i.ids){e.next=21;break}o.ids=i.ids,e.next=22;break;case 21:throw new Error("Missing required query parameter: ids");case 22:if(void 0!==n.levels?o.levels=n.levels:void 0!==i.levels&&(o.levels=i.levels),void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),void 0===n.siteId){e.next=28;break}o.siteId=n.siteId,e.next=33;break;case 28:if(void 0===i.siteId){e.next=32;break}o.siteId=i.siteId,e.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/categories",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Tu(Tu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=Tu(Tu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=40,Go(s.toString(),d);case 40:if(u=e.sent,!r){e.next=45;break}return e.abrupt("return",u);case 45:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=49;break}throw new ws(u);case 49:return e.next=51,u.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)})},{key:"getCategory",value:(t=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.id){e.next=16;break}a.id=n.id,e.next=21;break;case 16:if(void 0===i.id){e.next=20;break}a.id=i.id,e.next=21;break;case 20:throw new Error("Missing required path parameter: id");case 21:if(o={},void 0!==n.levels?o.levels=n.levels:void 0!==i.levels&&(o.levels=i.levels),void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),void 0===n.siteId){e.next=28;break}o.siteId=n.siteId,e.next=33;break;case 28:if(void 0===i.siteId){e.next=32;break}o.siteId=i.siteId,e.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/categories/{id}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Tu(Tu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=Tu(Tu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=40,Go(s.toString(),d);case 40:if(u=e.sent,!r){e.next=45;break}return e.abrupt("return",u);case 45:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=49;break}throw new ws(u);case 49:return e.next=51,u.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,r){return t.apply(this,arguments)})}]),e}();function Ru(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ru(Object(r),!0).forEach((function(t){pi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ru(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}pi(Mu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/product/shopper-products/{version}");var Au=function(){function e(t){ui(this,e),pi(this,"clientConfig",void 0);var r=_u({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t,r;return fi(e,[{key:"getPromotions",value:(r=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:if(void 0===n.ids){e.next=26;break}o.ids=n.ids,e.next=31;break;case 26:if(void 0===i.ids){e.next=30;break}o.ids=i.ids,e.next=31;break;case 30:throw new Error("Missing required query parameter: ids");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/promotions",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=_u(_u({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=_u(_u({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=39,Go(s.toString(),d);case 39:if(u=e.sent,!r){e.next=44;break}return e.abrupt("return",u);case 44:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=48;break}throw new ws(u);case 48:return e.next=50,u.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)})},{key:"getPromotionsForCampaign",value:(t=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.campaignId){e.next=16;break}a.campaignId=n.campaignId,e.next=21;break;case 16:if(void 0===i.campaignId){e.next=20;break}a.campaignId=i.campaignId,e.next=21;break;case 20:throw new Error("Missing required path parameter: campaignId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.startDate?o.startDate=n.startDate:void 0!==i.startDate&&(o.startDate=i.startDate),void 0!==n.endDate?o.endDate=n.endDate:void 0!==i.endDate&&(o.endDate=i.endDate),void 0!==n.currency?o.currency=n.currency:void 0!==i.currency&&(o.currency=i.currency),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/promotions/campaigns/{campaignId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=_u(_u({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=_u(_u({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=41,Go(s.toString(),d);case 41:if(u=e.sent,!r){e.next=46;break}return e.abrupt("return",u);case 46:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=50;break}throw new ws(u);case 50:return e.next=52,u.text();case 52:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 54:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();pi(Au,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/pricing/shopper-promotions/{version}");var Uu=TypeError,Bu=function(e,t){if(!delete e[t])throw Uu("Cannot delete property "+V(t)+" of "+V(e))},Nu=A.match(/firefox\/(\d+)/i),Lu=!!Nu&&+Nu[1],Wu=/MSIE|Trident/.test(A),Du=A.match(/AppleWebKit\/(\d+)\./),Ju=!!Du&&+Du[1],Fu=[],Gu=x(Fu.sort),Hu=x(Fu.push),Vu=c((function(){Fu.sort(void 0)})),$u=c((function(){Fu.sort(null)})),Yu=Bn("sort"),Ku=!c((function(){if(W)return W<70;if(!(Lu&&Lu>3)){if(Wu)return!0;if(Ju)return Ju<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++)Fu.push({k:t+n,v:r})}for(Fu.sort((function(e,t){return t.v-e.v})),n=0;n<Fu.length;n++)t=Fu[n].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}}));function Qu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Xu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Qu(Object(r),!0).forEach((function(t){pi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Rt({target:"Array",proto:!0,forced:Vu||!$u||!Yu||!Ku},{sort:function(e){void 0!==e&&Y(e);var t=ne(this);if(Ku)return void 0===e?Gu(t):Gu(t,e);var r,n,i=[],a=pt(t);for(n=0;n<a;n++)n in t&&Hu(i,t[n]);for($a(i,function(e){return function(t,r){return void 0===r?-1:void 0===t?1:void 0!==e?+e(t,r)||0:Gt(t)>Gt(r)?1:-1}}(e)),r=i.length,n=0;n<r;)t[n]=i[n++];for(;n<a;)Bu(t,n++);return t}});var Zu=function(){function e(t){ui(this,e),pi(this,"clientConfig",void 0);var r=Xu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t,r;return fi(e,[{key:"productSearch",value:(r=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return void 0!==n.q?o.q=n.q:void 0!==i.q&&(o.q=i.q),void 0!==n.refine?o.refine=n.refine:void 0!==i.refine&&(o.refine=i.refine),void 0!==n.sort?o.sort=n.sort:void 0!==i.sort&&(o.sort=i.sort),void 0!==n.currency?o.currency=n.currency:void 0!==i.currency&&(o.currency=i.currency),void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),void 0!==n.expand?o.expand=n.expand:void 0!==i.expand&&(o.expand=i.expand),void 0!==n.offset?o.offset=n.offset:void 0!==i.offset&&(o.offset=i.offset),void 0!==n.limit?o.limit=n.limit:void 0!==i.limit&&(o.limit=i.limit),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/product-search",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Xu(Xu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=Xu(Xu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=37,Go(s.toString(),d);case 37:if(u=e.sent,!r){e.next=42;break}return e.abrupt("return",u);case 42:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=46;break}throw new ws(u);case 46:return e.next=48,u.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:"getSearchSuggestions",value:(t=di(Ni.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:if(void 0===n.q){e.next=26;break}o.q=n.q,e.next=31;break;case 26:if(void 0===i.q){e.next=30;break}o.q=i.q,e.next=31;break;case 30:throw new Error("Missing required query parameter: q");case 31:return void 0!==n.limit?o.limit=n.limit:void 0!==i.limit&&(o.limit=i.limit),void 0!==n.currency?o.currency=n.currency:void 0!==i.currency&&(o.currency=i.currency),void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new au("/organizations/{organizationId}/search-suggestions",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Xu(Xu({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=Xu(Xu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=41,Go(s.toString(),d);case 41:if(u=e.sent,!r){e.next=46;break}return e.abrupt("return",u);case 46:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=50;break}throw new ws(u);case 50:return e.next=52,u.text();case 52:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 54:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();pi(Zu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/search/shopper-search/{version}/");var eh=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};Hs("search",(function(e,t,r){return[function(t){var r=q(this),n=null==t?void 0:K(t,e);return n?f(n,t,r):new RegExp(t)[e](Gt(r))},function(e){var n=Ee(this),i=Gt(e),a=r(t,n,i);if(a.done)return a.value;var o=n.lastIndex;eh(o,0)||(n.lastIndex=0);var s=nc(n,i);return eh(n.lastIndex,o)||(n.lastIndex=o),null===s?-1:s.index}]}));var th=le("iterator"),rh=!1;try{var nh=0,ih={next:function(){return{done:!!nh++}},return:function(){rh=!0}};ih[th]=function(){return this},Array.from(ih,(function(){throw 2}))}catch(e){}var ah,oh,sh,ch=function(e,t){if(!t&&!rh)return!1;var r=!1;try{var n={};n[th]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r},dh="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView,uh=Te.f,hh=tt.enforce,fh=tt.get,ph=s.Int8Array,lh=ph&&ph.prototype,gh=s.Uint8ClampedArray,bh=gh&&gh.prototype,vh=ph&&Xi(ph),Ih=lh&&Xi(lh),kh=Object.prototype,mh=s.TypeError,xh=le("toStringTag"),yh=de("TYPED_ARRAY_TAG"),wh=dh&&!!sa&&"Opera"!==Jt(s.opera),Ch=!1,Oh={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},zh={BigInt64Array:8,BigUint64Array:8},Ph=function(e){var t=Xi(e);if(T(t)){var r=fh(t);return r&&ae(r,"TypedArrayConstructor")?r.TypedArrayConstructor:Ph(t)}},Eh=function(e){if(!T(e))return!1;var t=Jt(e);return ae(Oh,t)||ae(zh,t)};for(ah in Oh)(sh=(oh=s[ah])&&oh.prototype)?hh(sh).TypedArrayConstructor=oh:wh=!1;for(ah in zh)(sh=(oh=s[ah])&&oh.prototype)&&(hh(sh).TypedArrayConstructor=oh);if((!wh||!S(vh)||vh===Function.prototype)&&(vh=function(){throw mh("Incorrect invocation")},wh))for(ah in Oh)s[ah]&&sa(s[ah],vh);if((!wh||!Ih||Ih===kh)&&(Ih=vh.prototype,wh))for(ah in Oh)s[ah]&&sa(s[ah].prototype,Ih);if(wh&&Xi(bh)!==Ih&&sa(bh,Ih),d&&!ae(Ih,xh))for(ah in Ch=!0,uh(Ih,xh,{get:function(){return T(this)?this[yh]:void 0}}),Oh)s[ah]&&Me(s[ah],yh,ah);var qh={NATIVE_ARRAY_BUFFER_VIEWS:wh,TYPED_ARRAY_TAG:Ch&&yh,aTypedArray:function(e){if(Eh(e))return e;throw mh("Target is not a typed array")},aTypedArrayConstructor:function(e){if(S(e)&&(!sa||_(vh,e)))return e;throw mh(V(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,r,n){if(d){if(r)for(var i in Oh){var a=s[i];if(a&&ae(a.prototype,e))try{delete a.prototype[e]}catch(r){try{a.prototype[e]=t}catch(e){}}}Ih[e]&&!r||nt(Ih,e,r?t:wh&&lh[e]||t,n)}},exportTypedArrayStaticMethod:function(e,t,r){var n,i;if(d){if(sa){if(r)for(n in Oh)if((i=s[n])&&ae(i,e))try{delete i[e]}catch(e){}if(vh[e]&&!r)return;try{return nt(vh,e,r?t:wh&&vh[e]||t)}catch(e){}}for(n in Oh)!(i=s[n])||i[e]&&!r||nt(i,e,t)}},getTypedArrayConstructor:Ph,isView:function(e){if(!T(e))return!1;var t=Jt(e);return"DataView"===t||ae(Oh,t)||ae(zh,t)},isTypedArray:Eh,TypedArray:vh,TypedArrayPrototype:Ih},jh=qh.NATIVE_ARRAY_BUFFER_VIEWS,Sh=s.ArrayBuffer,Th=s.Int8Array,Mh=!jh||!c((function(){Th(1)}))||!c((function(){new Th(-1)}))||!ch((function(e){new Th,new Th(null),new Th(1.5),new Th(e)}),!0)||c((function(){return 1!==new Th(new Sh(2),1,void 0).length})),Rh=RangeError,_h=function(e){if(void 0===e)return 0;var t=st(e),r=ft(t);if(t!==r)throw Rh("Wrong length or index");return r},Ah=Array,Uh=Math.abs,Bh=Math.pow,Nh=Math.floor,Lh=Math.log,Wh=Math.LN2,Dh=function(e,t,r){var n,i,a,o=Ah(r),s=8*r-t-1,c=(1<<s)-1,d=c>>1,u=23===t?Bh(2,-24)-Bh(2,-77):0,h=e<0||0===e&&1/e<0?1:0,f=0;for((e=Uh(e))!=e||e===1/0?(i=e!=e?1:0,n=c):(n=Nh(Lh(e)/Wh),e*(a=Bh(2,-n))<1&&(n--,a*=2),(e+=n+d>=1?u/a:u*Bh(2,1-d))*a>=2&&(n++,a/=2),n+d>=c?(i=0,n=c):n+d>=1?(i=(e*a-1)*Bh(2,t),n+=d):(i=e*Bh(2,d-1)*Bh(2,t),n=0));t>=8;)o[f++]=255&i,i/=256,t-=8;for(n=n<<t|i,s+=t;s>0;)o[f++]=255&n,n/=256,s-=8;return o[--f]|=128*h,o},Jh=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+=Bh(2,t),u-=o}return(d?-1:1)*r*Bh(2,u-t)},Fh=function(e){for(var t=ne(this),r=pt(t),n=arguments.length,i=ut(n>1?arguments[1]:void 0,r),a=n>2?arguments[2]:void 0,o=void 0===a?r:ut(a,r);o>i;)t[i++]=e;return t},Gh=xt.f,Hh=Te.f,Vh=Ue.PROPER,$h=Ue.CONFIGURABLE,Yh=tt.get,Kh=tt.set,Qh=s.ArrayBuffer,Xh=Qh,Zh=Xh&&Xh.prototype,ef=s.DataView,tf=ef&&ef.prototype,rf=Object.prototype,nf=s.Array,af=s.RangeError,of=x(Fh),sf=x([].reverse),cf=Dh,df=Jh,uf=function(e){return[255&e]},hf=function(e){return[255&e,e>>8&255]},ff=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},pf=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},lf=function(e){return cf(e,23,4)},gf=function(e){return cf(e,52,8)},bf=function(e,t){Hh(e.prototype,t,{get:function(){return Yh(this)[t]}})},vf=function(e,t,r,n){var i=_h(r),a=Yh(e);if(i+t>a.byteLength)throw af("Wrong index");var o=Yh(a.buffer).bytes,s=i+a.byteOffset,c=nr(o,s,s+t);return n?c:sf(c)},If=function(e,t,r,n,i,a){var o=_h(r),s=Yh(e);if(o+t>s.byteLength)throw af("Wrong index");for(var c=Yh(s.buffer).bytes,d=o+s.byteOffset,u=n(+i),h=0;h<t;h++)c[d+h]=u[a?h:t-h-1]};if(dh){var kf=Vh&&"ArrayBuffer"!==Qh.name;if(c((function(){Qh(1)}))&&c((function(){new Qh(-1)}))&&!c((function(){return new Qh,new Qh(1.5),new Qh(NaN),kf&&!$h})))kf&&$h&&Me(Qh,"name","ArrayBuffer");else{(Xh=function(e){return Ua(this,Zh),new Qh(_h(e))}).prototype=Zh;for(var mf,xf=Gh(Qh),yf=0;xf.length>yf;)(mf=xf[yf++])in Xh||Me(Xh,mf,Qh[mf]);Zh.constructor=Xh}sa&&Xi(tf)!==rf&&sa(tf,rf);var wf=new ef(new Xh(2)),Cf=x(tf.setInt8);wf.setInt8(0,2147483648),wf.setInt8(1,2147483649),!wf.getInt8(0)&&wf.getInt8(1)||_a(tf,{setInt8:function(e,t){Cf(this,e,t<<24>>24)},setUint8:function(e,t){Cf(this,e,t<<24>>24)}},{unsafe:!0})}else Zh=(Xh=function(e){Ua(this,Zh);var t=_h(e);Kh(this,{bytes:of(nf(t),0),byteLength:t}),d||(this.byteLength=t)}).prototype,tf=(ef=function(e,t,r){Ua(this,tf),Ua(e,Zh);var n=Yh(e).byteLength,i=st(t);if(i<0||i>n)throw af("Wrong offset");if(i+(r=void 0===r?n-i:ft(r))>n)throw af("Wrong length");Kh(this,{buffer:e,byteLength:r,byteOffset:i}),d||(this.buffer=e,this.byteLength=r,this.byteOffset=i)}).prototype,d&&(bf(Xh,"byteLength"),bf(ef,"buffer"),bf(ef,"byteLength"),bf(ef,"byteOffset")),_a(tf,{getInt8:function(e){return vf(this,1,e)[0]<<24>>24},getUint8:function(e){return vf(this,1,e)[0]},getInt16:function(e){var t=vf(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=vf(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return pf(vf(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return pf(vf(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return df(vf(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return df(vf(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){If(this,1,e,uf,t)},setUint8:function(e,t){If(this,1,e,uf,t)},setInt16:function(e,t){If(this,2,e,hf,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){If(this,2,e,hf,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){If(this,4,e,ff,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){If(this,4,e,ff,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){If(this,4,e,lf,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){If(this,8,e,gf,t,arguments.length>2?arguments[2]:void 0)}});fr(Xh,"ArrayBuffer"),fr(ef,"DataView");var Of={ArrayBuffer:Xh,DataView:ef},zf=Math.floor,Pf=Number.isInteger||function(e){return!T(e)&&isFinite(e)&&zf(e)===e},Ef=RangeError,qf=RangeError,jf=function(e,t){var r=function(e){var t=st(e);if(t<0)throw Ef("The argument can't be less than 0");return t}(e);if(r%t)throw qf("Wrong offset");return r},Sf=qh.aTypedArrayConstructor,Tf=function(e){var t,r,n,i,a,o,s=Zo(this),c=ne(e),d=arguments.length,u=d>1?arguments[1]:void 0,h=void 0!==u,p=Na(c);if(p&&!wc(p))for(o=(a=Wa(c,p)).next,c=[];!(i=f(o,a)).done;)c.push(i.value);for(h&&d>2&&(u=lr(u,arguments[2])),r=pt(c),n=new(Sf(s))(r),t=0;r>t;t++)n[t]=h?u(c[t],t):c[t];return n},Mf=le("species"),Rf=function(e){var t=R(e),r=Te.f;d&&t&&!t[Mf]&&r(t,Mf,{configurable:!0,get:function(){return this}})};n((function(e){var t=xt.f,r=jr.forEach,n=tt.get,i=tt.set,a=tt.enforce,o=Te.f,c=Ce.f,u=Math.round,h=s.RangeError,p=Of.ArrayBuffer,l=p.prototype,g=Of.DataView,v=qh.NATIVE_ARRAY_BUFFER_VIEWS,I=qh.TYPED_ARRAY_TAG,k=qh.TypedArray,m=qh.TypedArrayPrototype,x=qh.aTypedArrayConstructor,y=qh.isTypedArray,w=function(e,t){x(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]}})},O=function(e){var t;return _(l,e)||"ArrayBuffer"==(t=Jt(e))||"SharedArrayBuffer"==t},z=function(e,t){return y(e)&&!G(t)&&t in e&&Pf(+t)&&t>=0},P=function(e,t){return t=Ie(t),z(e,t)?b(2,e[t]):c(e,t)},E=function(e,t,r){return t=Ie(t),!(z(e,t)&&T(r)&&ae(r,"value"))||ae(r,"get")||ae(r,"set")||r.configurable||ae(r,"writable")&&!r.writable||ae(r,"enumerable")&&!r.enumerable?o(e,t,r):(e[t]=r.value,e)};d?(v||(Ce.f=P,Te.f=E,C(m,"buffer"),C(m,"byteOffset"),C(m,"byteLength"),C(m,"length")),Rt({target:"Object",stat:!0,forced:!v},{getOwnPropertyDescriptor:P,defineProperty:E}),e.exports=function(e,c,d){var l=e.match(/\d+$/)[0]/8,b=e+(d?"Clamped":"")+"Array",x="get"+e,C="set"+e,z=s[b],P=z,E=P&&P.prototype,q={},j=function(e,t){o(e,t,{get:function(){return function(e,t){var r=n(e);return r.view[x](t*l+r.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,r){var i=n(e);d&&(r=(r=u(r))<0?0:r>255?255:255&r),i.view[C](t*l+i.byteOffset,r,!0)}(this,t,e)},enumerable:!0})};v?Mh&&(P=c((function(e,t,r,n){return Ua(e,E),function(e,t,r){var n,i;return sa&&S(n=t.constructor)&&n!==r&&T(i=n.prototype)&&i!==r.prototype&&sa(e,i),e}(T(t)?O(t)?void 0!==n?new z(t,jf(r,l),n):void 0!==r?new z(t,jf(r,l)):new z(t):y(t)?w(P,t):f(Tf,P,t):new z(_h(t)),e,P)})),sa&&sa(P,k),r(t(z),(function(e){e in P||Me(P,e,z[e])})),P.prototype=E):(P=c((function(e,t,r,n){Ua(e,E);var a,o,s,c=0,d=0;if(T(t)){if(!O(t))return y(t)?w(P,t):f(Tf,P,t);a=t,d=jf(r,l);var u=t.byteLength;if(void 0===n){if(u%l)throw h("Wrong length");if((o=u-d)<0)throw h("Wrong length")}else if((o=ft(n)*l)+d>u)throw h("Wrong length");s=o/l}else s=_h(t),a=new p(o=s*l);for(i(e,{buffer:a,byteOffset:d,byteLength:o,length:s,view:new g(a)});c<s;)j(e,c++)})),sa&&sa(P,k),E=P.prototype=Zt(m)),E.constructor!==P&&Me(E,"constructor",P),a(E).TypedArrayConstructor=P,I&&Me(E,I,b);var M=P!=z;q[b]=P,Rt({global:!0,constructor:!0,forced:M,sham:!v},q),"BYTES_PER_ELEMENT"in P||Me(P,"BYTES_PER_ELEMENT",l),"BYTES_PER_ELEMENT"in E||Me(E,"BYTES_PER_ELEMENT",l),Rf(b)}):e.exports=function(){}}))("Uint8",(function(e){return function(t,r,n){return e(this,t,r,n)}}));var _f=Math.min,Af=x([].copyWithin||function(e,t){var r=ne(this),n=pt(r),i=ut(e,n),a=ut(t,n),o=arguments.length>2?arguments[2]:void 0,s=_f((void 0===o?n:ut(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]:Bu(r,i),i+=c,a+=c;return r}),Uf=qh.aTypedArray;(0,qh.exportTypedArrayMethod)("copyWithin",(function(e,t){return Af(Uf(this),e,t,arguments.length>2?arguments[2]:void 0)}));var Bf=jr.every,Nf=qh.aTypedArray;(0,qh.exportTypedArrayMethod)("every",(function(e){return Bf(Nf(this),e,arguments.length>1?arguments[1]:void 0)}));var Lf=TypeError,Wf=function(e){var t=ve(e,"number");if("number"==typeof t)throw Lf("Can't convert number to bigint");return BigInt(t)},Df=qh.aTypedArray,Jf=qh.exportTypedArrayMethod,Ff=x("".slice);Jf("fill",(function(e){var t=arguments.length;Df(this);var r="Big"===Ff(Jt(this),0,3)?Wf(e):+e;return f(Fh,this,r,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}),c((function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e})));var Gf=le("species"),Hf=function(e,t){var r,n=Ee(e).constructor;return void 0===n||null==(r=Ee(n)[Gf])?t:Zo(r)},Vf=qh.aTypedArrayConstructor,$f=qh.getTypedArrayConstructor,Yf=function(e){return Vf(Hf(e,$f(e)))},Kf=function(e,t){return function(e,t){for(var r=0,n=pt(t),i=new e(n);n>r;)i[r]=t[r++];return i}(Yf(e),t)},Qf=jr.filter,Xf=qh.aTypedArray;(0,qh.exportTypedArrayMethod)("filter",(function(e){var t=Qf(Xf(this),e,arguments.length>1?arguments[1]:void 0);return Kf(this,t)}));var Zf=jr.find,ep=qh.aTypedArray;(0,qh.exportTypedArrayMethod)("find",(function(e){return Zf(ep(this),e,arguments.length>1?arguments[1]:void 0)}));var tp=jr.findIndex,rp=qh.aTypedArray;(0,qh.exportTypedArrayMethod)("findIndex",(function(e){return tp(rp(this),e,arguments.length>1?arguments[1]:void 0)}));var np=jr.forEach,ip=qh.aTypedArray;(0,qh.exportTypedArrayMethod)("forEach",(function(e){np(ip(this),e,arguments.length>1?arguments[1]:void 0)}));var ap=gt.includes,op=qh.aTypedArray;(0,qh.exportTypedArrayMethod)("includes",(function(e){return ap(op(this),e,arguments.length>1?arguments[1]:void 0)}));var sp=gt.indexOf,cp=qh.aTypedArray;(0,qh.exportTypedArrayMethod)("indexOf",(function(e){return sp(cp(this),e,arguments.length>1?arguments[1]:void 0)}));var dp=le("iterator"),up=s.Uint8Array,hp=x(Ia.values),fp=x(Ia.keys),pp=x(Ia.entries),lp=qh.aTypedArray,gp=qh.exportTypedArrayMethod,bp=up&&up.prototype,vp=!c((function(){bp[dp].call([1])})),Ip=!!bp&&bp.values&&bp[dp]===bp.values&&"values"===bp.values.name,kp=function(){return hp(lp(this))};gp("entries",(function(){return pp(lp(this))}),vp),gp("keys",(function(){return fp(lp(this))}),vp),gp("values",kp,vp||!Ip,{name:"values"}),gp(dp,kp,vp||!Ip,{name:"values"});var mp=qh.aTypedArray,xp=qh.exportTypedArrayMethod,yp=x([].join);xp("join",(function(e){return yp(mp(this),e)}));var wp=Math.min,Cp=[].lastIndexOf,Op=!!Cp&&1/[1].lastIndexOf(1,-0)<0,zp=Bn("lastIndexOf"),Pp=Op||!zp?function(e){if(Op)return hn(Cp,this,arguments)||0;var t=j(this),r=pt(t),n=r-1;for(arguments.length>1&&(n=wp(n,st(arguments[1]))),n<0&&(n=r+n);n>=0;n--)if(n in t&&t[n]===e)return n||0;return-1}:Cp,Ep=qh.aTypedArray;(0,qh.exportTypedArrayMethod)("lastIndexOf",(function(e){var t=arguments.length;return hn(Pp,Ep(this),t>1?[e,arguments[1]]:[e])}));var qp=jr.map,jp=qh.aTypedArray;(0,qh.exportTypedArrayMethod)("map",(function(e){return qp(jp(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new(Yf(e))(t)}))}));var Sp=TypeError,Tp=function(e){return function(t,r,n,i){Y(r);var a=ne(t),o=P(a),s=pt(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 Sp("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}},Mp={left:Tp(!1),right:Tp(!0)},Rp=Mp.left,_p=qh.aTypedArray;(0,qh.exportTypedArrayMethod)("reduce",(function(e){var t=arguments.length;return Rp(_p(this),e,t,t>1?arguments[1]:void 0)}));var Ap=Mp.right,Up=qh.aTypedArray;(0,qh.exportTypedArrayMethod)("reduceRight",(function(e){var t=arguments.length;return Ap(Up(this),e,t,t>1?arguments[1]:void 0)}));var Bp=qh.aTypedArray,Np=qh.exportTypedArrayMethod,Lp=Math.floor;Np("reverse",(function(){for(var e,t=Bp(this).length,r=Lp(t/2),n=0;n<r;)e=this[n],this[n++]=this[--t],this[t]=e;return this}));var Wp=s.RangeError,Dp=s.Int8Array,Jp=Dp&&Dp.prototype,Fp=Jp&&Jp.set,Gp=qh.aTypedArray,Hp=qh.exportTypedArrayMethod,Vp=!c((function(){var e=new Uint8ClampedArray(2);return f(Fp,e,{length:1,0:3},1),3!==e[1]})),$p=Vp&&qh.NATIVE_ARRAY_BUFFER_VIEWS&&c((function(){var e=new Dp(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}));Hp("set",(function(e){Gp(this);var t=jf(arguments.length>1?arguments[1]:void 0,1),r=ne(e);if(Vp)return f(Fp,this,r,t);var n=this.length,i=pt(r),a=0;if(i+t>n)throw Wp("Wrong length");for(;a<i;)this[t+a]=r[a++]}),!Vp||$p);var Yp=qh.aTypedArray;(0,qh.exportTypedArrayMethod)("slice",(function(e,t){for(var r=fn(Yp(this),e,t),n=Yf(this),i=0,a=r.length,o=new n(a);a>i;)o[i]=r[i++];return o}),c((function(){new Int8Array(1).slice()})));var Kp=jr.some,Qp=qh.aTypedArray;(0,qh.exportTypedArrayMethod)("some",(function(e){return Kp(Qp(this),e,arguments.length>1?arguments[1]:void 0)}));var Xp=qh.aTypedArray,Zp=qh.exportTypedArrayMethod,el=s.Uint16Array,tl=el&&x(el.prototype.sort),rl=!(!tl||c((function(){tl(new el(2),null)}))&&c((function(){tl(new el(2),{})}))),nl=!!tl&&!c((function(){if(W)return W<74;if(Lu)return Lu<67;if(Wu)return!0;if(Ju)return Ju<602;var e,t,r=new el(516),n=Array(516);for(e=0;e<516;e++)t=e%4,r[e]=515-e,n[e]=e-2*t+3;for(tl(r,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(r[e]!==n[e])return!0}));Zp("sort",(function(e){return void 0!==e&&Y(e),nl?tl(this,e):$a(Xp(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))}),!nl||rl);var il=s.Int8Array,al=qh.aTypedArray,ol=qh.exportTypedArrayMethod,sl=[].toLocaleString,cl=!!il&&c((function(){sl.call(new il(1))}));ol("toLocaleString",(function(){return hn(sl,cl?fn(al(this)):al(this),fn(arguments))}),c((function(){return[1,2].toLocaleString()!=new il([1,2]).toLocaleString()}))||!c((function(){il.prototype.toLocaleString.call([1,2])})));var dl=qh.exportTypedArrayMethod,ul=s.Uint8Array,hl=ul&&ul.prototype||{},fl=[].toString,pl=x([].join);c((function(){fl.call({})}))&&(fl=function(){return pl(this)});var ll=hl.toString!=fl;dl("toString",fl,ll);var gl,bl,vl,Il,kl="process"==C(s.process),ml=/(?:ipad|iphone|ipod).*applewebkit/i.test(A),xl=s.setImmediate,yl=s.clearImmediate,wl=s.process,Cl=s.Dispatch,Ol=s.Function,zl=s.MessageChannel,Pl=s.String,El=0,ql={};try{gl=s.location}catch(e){}var jl=function(e){if(ae(ql,e)){var t=ql[e];delete ql[e],t()}},Sl=function(e){return function(){jl(e)}},Tl=function(e){jl(e.data)},Ml=function(e){s.postMessage(Pl(e),gl.protocol+"//"+gl.host)};xl&&yl||(xl=function(e){Ja(arguments.length,1);var t=S(e)?e:Ol(e),r=fn(arguments,1);return ql[++El]=function(){hn(t,void 0,r)},bl(El),El},yl=function(e){delete ql[e]},kl?bl=function(e){wl.nextTick(Sl(e))}:Cl&&Cl.now?bl=function(e){Cl.now(Sl(e))}:zl&&!ml?(Il=(vl=new zl).port2,vl.port1.onmessage=Tl,bl=lr(Il.postMessage,Il)):s.addEventListener&&S(s.postMessage)&&!s.importScripts&&gl&&"file:"!==gl.protocol&&!c(Ml)?(bl=Ml,s.addEventListener("message",Tl,!1)):bl="onreadystatechange"in xe("script")?function(e){Vt.appendChild(xe("script")).onreadystatechange=function(){Vt.removeChild(this),jl(e)}}:function(e){setTimeout(Sl(e),0)});var Rl,_l,Al,Ul,Bl,Nl,Ll,Wl,Dl={set:xl,clear:yl},Jl=/ipad|iphone|ipod/i.test(A)&&void 0!==s.Pebble,Fl=/web0s(?!.*chrome)/i.test(A),Gl=Ce.f,Hl=Dl.set,Vl=s.MutationObserver||s.WebKitMutationObserver,$l=s.document,Yl=s.process,Kl=s.Promise,Ql=Gl(s,"queueMicrotask"),Xl=Ql&&Ql.value;Xl||(Rl=function(){var e,t;for(kl&&(e=Yl.domain)&&e.exit();_l;){t=_l.fn,_l=_l.next;try{t()}catch(e){throw _l?Ul():Al=void 0,e}}Al=void 0,e&&e.enter()},ml||kl||Fl||!Vl||!$l?!Jl&&Kl&&Kl.resolve?((Ll=Kl.resolve(void 0)).constructor=Kl,Wl=lr(Ll.then,Ll),Ul=function(){Wl(Rl)}):kl?Ul=function(){Yl.nextTick(Rl)}:(Hl=lr(Hl,s),Ul=function(){Hl(Rl)}):(Bl=!0,Nl=$l.createTextNode(""),new Vl(Rl).observe(Nl,{characterData:!0}),Ul=function(){Nl.data=Bl=!Bl}));var Zl=Xl||function(e){var t={fn:e,next:void 0};Al&&(Al.next=t),_l||(_l=t,Ul()),Al=t},eg=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},tg=function(){this.head=null,this.tail=null};tg.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 rg=tg,ng=s.Promise,ig="object"==typeof window&&"object"!=typeof Deno;ng&&ng.prototype;var ag,og,sg,cg=le("species"),dg=!1,ug=S(s.PromiseRejectionEvent),hg={CONSTRUCTOR:Tt("Promise",(function(){var e=De(ng),t=e!==String(ng);if(!t&&66===W)return!0;if(W>=51&&/native code/.test(e))return!1;var r=new ng((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};return(r.constructor={})[cg]=n,!(dg=r.then((function(){}))instanceof n)||!t&&ig&&!ug})),REJECTION_EVENT:ug,SUBCLASSING:dg},fg=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=Y(t),this.reject=Y(r)},pg={f:function(e){return new fg(e)}},lg=Dl.set,gg=hg.CONSTRUCTOR,bg=hg.REJECTION_EVENT,vg=hg.SUBCLASSING,Ig=tt.getterFor("Promise"),kg=tt.set,mg=ng&&ng.prototype,xg=ng,yg=mg,wg=s.TypeError,Cg=s.document,Og=s.process,zg=pg.f,Pg=zg,Eg=!!(Cg&&Cg.createEvent&&s.dispatchEvent),qg=function(e){var t;return!(!T(e)||!S(t=e.then))&&t},jg=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&&_g(t),t.rejection=1),!0===s?r=a:(u&&u.enter(),r=s(a),u&&(u.exit(),i=!0)),r===e.promise?d(wg("Promise-chain cycle")):(n=qg(r))?f(n,r,c,d):c(r)):d(a)}catch(e){u&&!i&&u.exit(),d(e)}},Sg=function(e,t){e.notified||(e.notified=!0,Zl((function(){for(var r,n=e.reactions;r=n.get();)jg(r,e);e.notified=!1,t&&!e.rejection&&Mg(e)})))},Tg=function(e,t,r){var n,i;Eg?((n=Cg.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),s.dispatchEvent(n)):n={promise:t,reason:r},!bg&&(i=s["on"+e])?i(n):"unhandledrejection"===e&&function(e,t){var r=s.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))}("Unhandled promise rejection",r)},Mg=function(e){f(lg,s,(function(){var t,r=e.facade,n=e.value;if(Rg(e)&&(t=eg((function(){kl?Og.emit("unhandledRejection",n,r):Tg("unhandledrejection",r,n)})),e.rejection=kl||Rg(e)?2:1,t.error))throw t.value}))},Rg=function(e){return 1!==e.rejection&&!e.parent},_g=function(e){f(lg,s,(function(){var t=e.facade;kl?Og.emit("rejectionHandled",t):Tg("rejectionhandled",t,e.value)}))},Ag=function(e,t,r){return function(n){e(t,n,r)}},Ug=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,Sg(e,!0))},Bg=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw wg("Promise can't be resolved itself");var n=qg(t);n?Zl((function(){var r={done:!1};try{f(n,t,Ag(Bg,r,e),Ag(Ug,r,e))}catch(t){Ug(r,t,e)}})):(e.value=t,e.state=1,Sg(e,!1))}catch(t){Ug({done:!1},t,e)}}};if(gg&&(yg=(xg=function(e){Ua(this,yg),Y(e),f(ag,this);var t=Ig(this);try{e(Ag(Bg,t),Ag(Ug,t))}catch(e){Ug(t,e)}}).prototype,(ag=function(e){kg(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:new rg,rejection:!1,state:0,value:void 0})}).prototype=nt(yg,"then",(function(e,t){var r=Ig(this),n=zg(Hf(this,xg));return r.parent=!0,n.ok=!S(e)||e,n.fail=S(t)&&t,n.domain=kl?Og.domain:void 0,0==r.state?r.reactions.add(n):Zl((function(){jg(n,r)})),n.promise})),og=function(){var e=new ag,t=Ig(e);this.promise=e,this.resolve=Ag(Bg,t),this.reject=Ag(Ug,t)},pg.f=zg=function(e){return e===xg||void 0===e?new og(e):Pg(e)},S(ng)&&mg!==Object.prototype)){sg=mg.then,vg||nt(mg,"then",(function(e,t){var r=this;return new xg((function(e,t){f(sg,r,e,t)})).then(e,t)}),{unsafe:!0});try{delete mg.constructor}catch(e){}sa&&sa(mg,yg)}Rt({global:!0,constructor:!0,wrap:!0,forced:gg},{Promise:xg}),fr(xg,"Promise",!1),Rf("Promise");var Ng=TypeError,Lg=function(e,t){this.stopped=e,this.result=t},Wg=Lg.prototype,Dg=function(e,t,r){var n,i,a,o,s,c,d,u=r&&r.that,h=!(!r||!r.AS_ENTRIES),p=!(!r||!r.IS_RECORD),l=!(!r||!r.IS_ITERATOR),g=!(!r||!r.INTERRUPTED),b=lr(t,u),v=function(e){return n&&kc(n,"normal",e),new Lg(!0,e)},I=function(e){return h?(Ee(e),g?b(e[0],e[1],v):b(e[0],e[1])):g?b(e,v):b(e)};if(p)n=e.iterator;else if(l)n=e;else{if(!(i=Na(e)))throw Ng(V(e)+" is not iterable");if(wc(i)){for(a=0,o=pt(e);o>a;a++)if((s=I(e[a]))&&_(Wg,s))return s;return new Lg(!1)}n=Wa(e,i)}for(c=p?e.next:n.next;!(d=f(c,n)).done;){try{s=I(d.value)}catch(e){kc(n,"throw",e)}if("object"==typeof s&&s&&_(Wg,s))return s}return new Lg(!1)},Jg=hg.CONSTRUCTOR||!ch((function(e){ng.all(e).then(void 0,(function(){}))}));Rt({target:"Promise",stat:!0,forced:Jg},{all:function(e){var t=this,r=pg.f(t),n=r.resolve,i=r.reject,a=eg((function(){var r=Y(t.resolve),a=[],o=0,s=1;Dg(e,(function(e){var c=o++,d=!1;s++,f(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 Fg=hg.CONSTRUCTOR,Gg=ng&&ng.prototype;if(Rt({target:"Promise",proto:!0,forced:Fg,real:!0},{catch:function(e){return this.then(void 0,e)}}),S(ng)){var Hg=R("Promise").prototype.catch;Gg.catch!==Hg&&nt(Gg,"catch",Hg,{unsafe:!0})}Rt({target:"Promise",stat:!0,forced:Jg},{race:function(e){var t=this,r=pg.f(t),n=r.reject,i=eg((function(){var i=Y(t.resolve);Dg(e,(function(e){f(i,t,e).then(r.resolve,n)}))}));return i.error&&n(i.value),r.promise}}),Rt({target:"Promise",stat:!0,forced:hg.CONSTRUCTOR},{reject:function(e){var t=pg.f(this);return f(t.reject,void 0,e),t.promise}});var Vg=hg.CONSTRUCTOR;function $g(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 Yg(e){return function(e){if(Array.isArray(e))return $g(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 $g(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)?$g(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 Kg(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 Qg(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Kg(Object(r),!0).forEach((function(t){pi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Kg(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}R("Promise"),Rt({target:"Promise",stat:!0,forced:Vg},{resolve:function(e){return function(e,t){if(Ee(e),T(t)&&t.constructor===e)return t;var r=pg.f(e);return(0,r.resolve)(t),r.promise}(this,e)}}),Rt({target:"Object",stat:!0},{fromEntries:function(e){var t={};return Dg(e,(function(e,r){er(t,e,r)}),{AS_ENTRIES:!0}),t}});var Xg=Wo?btoa:function(e){return Buffer.from(e).toString("base64")},Zg=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}},eb=function(){return t.nanoid(128)},tb=function(){var e=di(Ni.mark((function e(t){var r,n,i,a,o,s,c;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=function(e){return e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")},n="",!Wo||!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,Yg(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 rb(e,t,r){return nb.apply(this,arguments)}function nb(){return(nb=di(Ni.mark((function e(t,r,n){var i,a,o,s,c,d,u,h;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,tb(r);case 2:return a=e.sent,(o=new Pu(t.clientConfig)).clientConfig.fetchOptions=Qg(Qg({},t.clientConfig.fetchOptions),{},{redirect:Wo?"follow":"manual"}),s={parameters:Qg(Qg({client_id:t.clientConfig.parameters.clientId,channel_id:t.clientConfig.parameters.siteId,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,u=new URL(d),h=Object.fromEntries(u.searchParams.entries()),!(c.status>=400||h.error)){e.next=14;break}throw new ws(c);case 14:return e.abrupt("return",Qg({url:d},Zg(d)));case 15:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ib(){return(ib=di(Ni.mark((function e(t,r,n){var i,a;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i="Basic ".concat(Xg("".concat(t.clientConfig.parameters.clientId,":").concat(n.clientSecret))),a={headers:{Authorization:i},body:Qg({grant_type:"client_credentials"},r.usid&&{usid:r.usid})},e.abrupt("return",t.getAccessToken(a));case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ab(){return(ab=di(Ni.mark((function e(t,r){var n,i,a;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=eb(),e.next=3,rb(t,n,Qg({redirectURI:r.redirectURI,hint:"guest"},r.usid&&{usid:r.usid}));case 3:return i=e.sent,a={client_id:t.clientConfig.parameters.clientId,channel_id:t.clientConfig.parameters.siteId,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 ob(){return(ob=di(Ni.mark((function e(t,r,n){var i,a,o,s,c,d,u,h,f,p,l,g,b,v;return Ni.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=eb(),e.next=3,tb(a);case 3:return o=e.sent,(s=new Pu(t.clientConfig)).clientConfig.fetchOptions=Qg(Qg({},t.clientConfig.fetchOptions),{},{redirect:Wo?"follow":"manual"}),c="Basic ".concat(Xg("".concat(r.username,":").concat(r.password))),d={headers:{Authorization:c},parameters:{organizationId:t.clientConfig.parameters.organizationId},body:Qg({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(u=e.sent,h=(null===(i=u.headers)||void 0===i?void 0:i.get("location"))||u.url,f=new URL(h),p=Object.fromEntries(f.searchParams.entries()),!(u.status>=400||p.error)){e.next=16;break}throw new ws(u);case 16:if(l=Zg(h),g={client_id:t.clientConfig.parameters.clientId,channel_id:t.clientConfig.parameters.siteId,code:l.code,code_verifier:a,grant_type:"authorization_code_pkce",organizationId:t.clientConfig.parameters.organizationId,redirect_uri:n.redirectURI,usid:l.usid},!r.clientSecret){e.next=22;break}return b="Basic ".concat(Xg("".concat(t.clientConfig.parameters.clientId,":").concat(r.clientSecret))),v={headers:{Authorization:b},body:g},e.abrupt("return",t.getAccessToken(v));case 22:return e.abrupt("return",t.getAccessToken({body:g}));case 23:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var sb=Object.freeze({__proto__:null,isBrowser:Wo,isNode:Do,globalObject:Jo,hasFetchAvailable:Fo,fetch:Go,stringToBase64:Xg,getCodeAndUsidFromUrl:Zg,createCodeVerifier:eb,generateCodeChallenge:tb,authorize:rb,loginGuestUserPrivate:function(e,t,r){return ib.apply(this,arguments)},loginGuestUser:function(e,t){return ab.apply(this,arguments)},loginRegisteredUserB2C:function(e,t,r){return ob.apply(this,arguments)},refreshAccessToken:function(e,t,r){var n={grant_type:"refresh_token",refresh_token:t.refreshToken,client_id:e.clientConfig.parameters.clientId,channel_id:e.clientConfig.parameters.siteId};if(r&&r.clientSecret){var i={headers:{Authorization:"Basic ".concat(Xg("".concat(e.clientConfig.parameters.clientId,":").concat(r.clientSecret)))},body:n};return e.getAccessToken(i)}return e.getAccessToken({body:n})},logout:function(e,t){return e.logoutCustomer({headers:{Authorization:"Bearer ".concat(t.accessToken)},parameters:{refresh_token:t.refreshToken,client_id:e.clientConfig.parameters.clientId,channel_id:e.clientConfig.parameters.siteId}})}});e.ClientConfig=No,e.ShopperBaskets=du,e.ShopperContexts=fu,e.ShopperCustomers=gu,e.ShopperDiscoverySearch=Iu,e.ShopperExperience=xu,e.ShopperGiftCertificates=Cu,e.ShopperLogin=Pu,e.ShopperOrders=ju,e.ShopperProducts=Mu,e.ShopperPromotions=Au,e.ShopperSearch=Zu,e.TemplateURL=au,e.helpers=sb,Object.defineProperty(e,"__esModule",{value:!0})}));
|