commerce-sdk-isomorphic 1.13.1 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/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 a,i,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,m=v.call,k=u&&I.bind(m,m),x=u?function(e){return e&&k(e)}:function(e){return e&&function(){return m.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")||"",B=s.process,U=s.Deno,N=B&&B.versions||U&&U.version,L=N&&N.v8;L&&(i=(a=L.split("."))[0]>0&&a[0]<4?1:+(a[0]+a[1])),!i&&A&&(!(a=A.match(/Edge\/(\d+)/))||a[1]>=74)&&(a=A.match(/Chrome\/(\d+)/))&&(i=+a[1]);var W=i,D=!!Object.getOwnPropertySymbols&&!c((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&W&&W<41})),F=D&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,J=Object,G=F?function(e){return"symbol"==typeof e}:function(e){var t=R("Symbol");return S(t)&&_(t.prototype,J(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))},ae=x({}.hasOwnProperty),ie=Object.hasOwn||function(e,t){return ae(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=F?he:he&&he.withoutSetter||de,le=function(e){if(!ie(ue,e)||!D&&"string"!=typeof ue[e]){var t="Symbol."+e;D&&ie(he,e)?ue[e]=he[e]:ue[e]=F&&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+""},me=s.document,ke=T(me)&&T(me.createElement),xe=function(e){return ke?me.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(ie(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=ie(Re,"name"),Be={EXISTS:Ae,PROPER:Ae&&"something"===function(){}.name,CONFIGURABLE:Ae&&(!d||d&&_e(Re,"name").configurable)},Ue=x(Function.toString);S(ee.inspectSource)||(ee.inspectSource=function(e){return Ue(e)});var Ne,Le,We,De=ee.inspectSource,Fe=s.WeakMap,Je=S(Fe)&&/native code/.test(De(Fe)),Ge=te("keys"),He=function(e){return Ge[e]||(Ge[e]=de(e))},Ve={},$e=s.TypeError,Ye=s.WeakMap;if(Je||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(ie(e,et))throw new $e("Object already initialized");return t.facade=e,Me(e,et,t),t},Le=function(e){return ie(e,et)?e[et]:{}},We=function(e){return ie(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=Be.CONFIGURABLE,r=tt.enforce,n=tt.get,a=Object.defineProperty,i=d&&!c((function(){return 8!==a((function(){}),"length",{value:8}).length})),o=String(String).split("String"),s=e.exports=function(e,n,s){"Symbol("===String(n).slice(0,7)&&(n="["+String(n).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),s&&s.getter&&(n="get "+n),s&&s.setter&&(n="set "+n),(!ie(e,"name")||t&&e.name!==n)&&(d?a(e,"name",{value:n,configurable:!0}):e.name=n),i&&s&&ie(s,"arity")&&e.length!==s.arity&&a(e,"length",{value:s.arity});try{s&&ie(s,"constructor")&&s.constructor?d&&a(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var c=r(e);return ie(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 a=n.enumerable,i=void 0!==n.name?n.name:t;if(S(r)&&rt(r,i,n),n.global)a?e[t]=r:Z(t,r);else{try{n.unsafe?e[t]&&(a=!0):delete e[t]}catch(e){}a?e[t]=r:Te.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},at=Math.ceil,it=Math.floor,ot=Math.trunc||function(e){var t=+e;return(t>0?it:at)(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 a,i=j(t),o=pt(i),s=ut(n,o);if(e&&r!=r){for(;o>s;)if((a=i[s++])!=a)return!0}else for(;o>s;s++)if((e||s in i)&&i[s]===r)return e||s||0;return!e&&-1}},gt={includes:lt(!0),indexOf:lt(!1)},bt=gt.indexOf,vt=x([].push),It=function(e,t){var r,n=j(e),a=0,i=[];for(r in n)!ie(Ve,r)&&ie(n,r)&&vt(i,r);for(;t.length>a;)ie(n,r=t[a++])&&(~bt(i,r)||vt(i,r));return i},mt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],kt=mt.concat("length","prototype"),xt={f:Object.getOwnPropertyNames||function(e){return It(e,kt)}},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),a=Te.f,i=Ce.f,o=0;o<n.length;o++){var s=n[o];ie(e,s)||r&&ie(r,s)||a(e,s,i(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,a,i,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(i=t[n],a=e.dontCallGetSet?(o=Mt(r,n))&&o.value:r[n],!Tt(d?n:c+(u?".":"#")+n,e.forced)&&void 0!==a){if(typeof i==typeof a)continue;Ot(i,a)}(e.sham||a&&a.sham)&&Me(i,"sham",!0),nt(r,n,i,e)}},_t=Object.keys||function(e){return It(e,mt)},At=c((function(){_t(1)}));Rt({target:"Object",stat:!0,forced:At},{keys:function(e){return _t(ne(e))}});var Bt={};Bt[le("toStringTag")]="z";var Ut,Nt="[object z]"===String(Bt),Lt=le("toStringTag"),Wt=Object,Dt="Arguments"==C(function(){return arguments}()),Ft=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},Jt=String,Gt=function(e){if("Symbol"===Ft(e))throw TypeError("Cannot convert a Symbol value to a string");return Jt(e)},Ht={f:d&&!Oe?Object.defineProperties:function(e,t){Ee(e);for(var r,n=j(t),a=_t(t),i=a.length,o=0;i>o;)Te.f(e,r=a[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{Ut=new ActiveXObject("htmlfile")}catch(e){}var e,t;Xt="undefined"!=typeof document?document.domain&&Ut?Qt(Ut):((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(Ut);for(var r=mt.length;r--;)delete Xt.prototype[mt[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),a=ut(t,n),i=ut(void 0===r?n:r,n),o=tr(rr(i-a,0)),s=0;a<i;a++,s++)er(o,s,e[a]);return o.length=s,o},ar=xt.f,ir="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],or={f:function(e){return ir&&"Window"==C(e)?function(e){try{return ar(e)}catch(e){return nr(ir)}}(e):ar(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&&!ie(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"),mr=/^\s*(?:class|function)\b/,kr=x(mr.exec),xr=!mr.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(Ft(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return xr||!!kr(mr,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,a=4==e,i=6==e,o=7==e,s=5==e||i;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,m=h||Pr,k=t?m(c,v):r||o?m(c,0):void 0;v>I;I++)if((s||I in g)&&(p=b(f=g[I],I,l),e))if(t)k[I]=p;else if(p)switch(e){case 3:return!0;case 5:return f;case 6:return I;case 2:Er(k,f)}else switch(e){case 4:return!1;case 7:Er(k,f)}return i?-1:n||a?a:k}},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,Br=Ar&&Ar.prototype,Ur=s.TypeError,Nr=s.QObject,Lr=Ce.f,Wr=Te.f,Dr=or.f,Fr=g.f,Jr=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(Br);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),ie(Gr,n)?(r.enumerable?(ie(e,Tr)&&e[Tr][n]&&(e[Tr][n]=!1),r=Zt(r,{enumerable:b(0,!1)})):(ie(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(Fr,this,t);return!(this===_r&&ie(Gr,t)&&!ie(Hr,t))&&(!(r||!ie(this,t)||!ie(Gr,t)||ie(this,Tr)&&this[Tr][t])||r)},en=function(e,t){var r=j(e),n=Ie(t);if(r!==_r||!ie(Gr,n)||ie(Hr,n)){var a=Lr(r,n);return!a||!ie(Gr,n)||ie(r,Tr)&&r[Tr][n]||(a.enumerable=!0),a}},tn=function(e){var t=Dr(j(e)),r=[];return Sr(t,(function(e){ie(Gr,e)||ie(Ve,e)||Jr(r,e)})),r},rn=function(e){var t=e===_r,r=Dr(t?Hr:j(e)),n=[];return Sr(r,(function(e){!ie(Gr,e)||t&&!ie(_r,e)||Jr(n,Gr[e])})),n};D||(Br=(Ar=function(){if(_(Br,this))throw Ur("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),ie(this,Tr)&&ie(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(Br,"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(Br,"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={});ie(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(ie(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(ie(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),mn=/[\uD800-\uDFFF]/g,kn=/^[\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),a=gn(r,t+1);return ln(kn,e)&&!ln(xn,a)||ln(xn,e)&&!ln(kn,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),a=hn(yn?Cn:pn,null,n);return wn&&"string"==typeof a?vn(a,mn,On):a}});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 "+Ft(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,Bn=An===Object.prototype?void 0:An,Un=function(e,t){var r=[][e];return!!r&&c((function(){r.call(null,t||function(){return 1},1)}))},Nn=jr.forEach,Ln=Un("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(Bn),Rt({target:"Object",stat:!0,sham:!d},{getOwnPropertyDescriptors:function(e){for(var t,r,n=j(e),a=Ce.f,i=Ct(n),o={},s=0;i.length>s;)void 0!==(r=a(n,t=i[s++]))&&er(o,t,r);return o}});var Fn=Ht.f;Rt({target:"Object",stat:!0,forced:Object.defineProperties!==Fn,sham:!d},{defineProperties:Fn});var Jn=Te.f;Rt({target:"Object",stat:!0,forced:Object.defineProperty!==Jn,sham:!d},{defineProperty:Jn});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,ea=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[Yn]=!1,"/./"[e](t)}catch(e){}}return!1}("startsWith"),ta=!(ea||(Gn=Kn(String.prototype,"startsWith"),!Gn||Gn.writable));Rt({target:"String",proto:!0,forced:!ta&&!ea},{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 ra=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},na=RegExp.prototype,aa=Be.PROPER,ia=RegExp.prototype.toString,oa=c((function(){return"/a/b"!=ia.call({source:"a",flags:"b"})})),sa=aa&&"toString"!=ia.name;function ca(e,t,r,n,a,i,o){try{var s=e[i](o),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,a)}function da(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var i=e.apply(t,r);function o(e){ca(i,n,a,o,s,"next",e)}function s(e){ca(i,n,a,o,s,"throw",e)}o(void 0)}))}}function ua(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ha(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 fa(e,t,r){return t&&ha(e.prototype,t),r&&ha(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function pa(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}(oa||sa)&&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 na||ie(e,"flags")||!_(na,e)?t:f(ra,e)}(e))}),{unsafe:!0});var la=Object.prototype,ga=la.hasOwnProperty,ba="function"==typeof Symbol?Symbol:{},va=ba.iterator||"@@iterator",Ia=ba.asyncIterator||"@@asyncIterator",ma=ba.toStringTag||"@@toStringTag";function ka(e,t,r,n){var a=t&&t.prototype instanceof wa?t:wa,i=Object.create(a.prototype),o=new Aa(n||[]);return i._invoke=function(e,t,r){var n="suspendedStart";return function(a,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw i;return Ua()}for(r.method=a,r.arg=i;;){var o=r.delegate;if(o){var s=Ma(o,r);if(s){if(s===ya)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=xa(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===ya)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}(e,r,o),i}function xa(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}var ya={};function wa(){}function Ca(){}function Oa(){}var za={};za[va]=function(){return this};var Pa=Object.getPrototypeOf,Ea=Pa&&Pa(Pa(Ba([])));Ea&&Ea!==la&&ga.call(Ea,va)&&(za=Ea);var qa=Oa.prototype=wa.prototype=Object.create(za);function ja(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function Sa(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===Ca||"GeneratorFunction"===(t.displayName||t.name))}function Ta(e,t){var r;this._invoke=function(n,a){function i(){return new t((function(r,i){!function r(n,a,i,o){var s=xa(e[n],e,a);if("throw"!==s.type){var c=s.arg,d=c.value;return d&&"object"==typeof d&&ga.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,i,o)}),(function(e){r("throw",e,i,o)})):t.resolve(d).then((function(e){c.value=e,i(c)}),(function(e){return r("throw",e,i,o)}))}o(s.arg)}(n,a,r,i)}))}return r=r?r.then(i,i):i()}}function Ma(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,Ma(e,t),"throw"===t.method))return ya;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return ya}var n=xa(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,ya;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,ya):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,ya)}function Ra(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 _a(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function Aa(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(Ra,this),this.reset(!0)}function Ba(e){if(e){var t=e[va];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(ga.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return n.next=n}}return{next:Ua}}function Ua(){return{value:void 0,done:!0}}Ca.prototype=qa.constructor=Oa,Oa.constructor=Ca,Oa[ma]=Ca.displayName="GeneratorFunction",ja(Ta.prototype),Ta.prototype[Ia]=function(){return this},ja(qa),qa[ma]="Generator",qa[va]=function(){return this},qa.toString=function(){return"[object Generator]"},Aa.prototype={constructor:Aa,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(_a),!e)for(var t in this)"t"===t.charAt(0)&&ga.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n],i=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var o=ga.call(a,"catchLoc"),s=ga.call(a,"finallyLoc");if(o&&s){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(o){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&ga.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,ya):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),ya},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),_a(r),ya}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;_a(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:Ba(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),ya}};var Na={wrap:ka,isGeneratorFunction:Sa,AsyncIterator:Ta,mark:function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,Oa):(e.__proto__=Oa,ma in e||(e[ma]="GeneratorFunction")),e.prototype=Object.create(qa),e},awrap:function(e){return{__await:e}},async:function(e,t,r,n,a){void 0===a&&(a=Promise);var i=new Ta(ka(e,t,r,n),a);return Sa(t)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},keys:function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},values:Ba},La=Te.f,Wa=le("unscopables"),Da=Array.prototype;null==Da[Wa]&&La(Da,Wa,{configurable:!0,value:Zt(null)});var Fa,Ja,Ga,Ha=function(e){Da[Wa][e]=!0},Va={},$a=!c((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Ya=He("IE_PROTO"),Ka=Object,Qa=Ka.prototype,Xa=$a?Ka.getPrototypeOf:function(e){var t=ne(e);if(ie(t,Ya))return t[Ya];var r=t.constructor;return S(r)&&t instanceof r?r.prototype:t instanceof Ka?Qa:null},Za=le("iterator"),ei=!1;[].keys&&("next"in(Ga=[].keys())?(Ja=Xa(Xa(Ga)))!==Object.prototype&&(Fa=Ja):ei=!0),(null==Fa||c((function(){var e={};return Fa[Za].call(e)!==e})))&&(Fa={}),S(Fa[Za])||nt(Fa,Za,(function(){return this}));var ti={IteratorPrototype:Fa,BUGGY_SAFARI_ITERATORS:ei},ri=ti.IteratorPrototype,ni=function(){return this},ai=function(e,t,r,n){var a=t+" Iterator";return e.prototype=Zt(ri,{next:b(+!n,r)}),fr(e,a,!1),Va[a]=ni,e},ii=String,oi=TypeError,si=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 oi("Can't set "+ii(e)+" as a prototype")}(n),t?e(r,n):r.__proto__=n,r}}():void 0),ci=Be.PROPER,di=Be.CONFIGURABLE,ui=ti.IteratorPrototype,hi=ti.BUGGY_SAFARI_ITERATORS,fi=le("iterator"),pi=function(){return this},li=function(e,t,r,n,a,i,o){ai(r,t,n);var s,c,d,u=function(e){if(e===a&&b)return b;if(!hi&&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[fi]||l["@@iterator"]||a&&l[a],b=!hi&&g||u(a),v="Array"==t&&l.entries||g;if(v&&(s=Xa(v.call(new e)))!==Object.prototype&&s.next&&(Xa(s)!==ui&&(si?si(s,ui):S(s[fi])||nt(s,fi,pi)),fr(s,h,!0)),ci&&"values"==a&&g&&"values"!==g.name&&(di?Me(l,"name","values"):(p=!0,b=function(){return f(g,this)})),a)if(c={values:u("values"),keys:i?b:u("keys"),entries:u("entries")},o)for(d in c)(hi||p||!(d in l))&&nt(l,d,c[d]);else Rt({target:t,proto:!0,forced:hi||p},c);return l[fi]!==b&&nt(l,fi,b,{name:a}),Va[t]=b,c},gi=Te.f,bi=tt.set,vi=tt.getterFor("Array Iterator"),Ii=li(Array,"Array",(function(e,t){bi(this,{type:"Array Iterator",target:j(e),index:0,kind:t})}),(function(){var e=vi(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"),mi=Va.Arguments=Va.Array;if(Ha("keys"),Ha("values"),Ha("entries"),d&&"values"!==mi.name)try{gi(mi,"name",{value:"values"})}catch(e){}var ki=x("".charAt),xi=x("".charCodeAt),yi=x("".slice),wi=function(e){return function(t,r){var n,a,i=Gt(q(t)),o=st(r),s=i.length;return o<0||o>=s?e?"":void 0:(n=xi(i,o))<55296||n>56319||o+1===s||(a=xi(i,o+1))<56320||a>57343?e?ki(i,o):n:e?yi(i,o,o+2):a-56320+(n-55296<<10)+65536}},Ci={codeAt:wi(!1),charAt:wi(!0)},Oi=Ci.charAt,zi=tt.set,Pi=tt.getterFor("String Iterator");li(String,"String",(function(e){zi(this,{type:"String Iterator",string:Gt(e),index:0})}),(function(){var e,t=Pi(this),r=t.string,n=t.index;return n>=r.length?{value:void 0,done:!0}:(e=Oi(r,n),t.index+=e.length,{value:e,done:!1})}));var Ei=le("iterator"),qi=le("toStringTag"),ji=Ii.values,Si=function(e,t){if(e){if(e[Ei]!==ji)try{Me(e,Ei,ji)}catch(t){e[Ei]=ji}if(e[qi]||Me(e,qi,t),Rn[t])for(var r in Ii)if(e[r]!==Ii[r])try{Me(e,r,Ii[r])}catch(t){e[r]=Ii[r]}}};for(var Ti in Rn)Si(s[Ti]&&s[Ti].prototype,Ti);Si(Bn,"DOMTokenList");var Mi=le("iterator"),Ri=!c((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,r="";return e.pathname="c%20d",t.forEach((function(e,n){t.delete("b"),r+=n+e})),!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[Mi]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==r||"x"!==new URL("http://x",void 0).host})),_i=function(e,t,r){for(var n in t)nt(e,n,t[n],r);return e},Ai=TypeError,Bi=function(e,t){if(_(t,e))return e;throw Ai("Incorrect invocation")},Ui=le("iterator"),Ni=function(e){if(null!=e)return K(e,Ui)||K(e,"@@iterator")||Va[Ft(e)]},Li=TypeError,Wi=function(e,t){var r=arguments.length<2?Ni(e):t;if(Y(r))return Ee(f(r,e));throw Li(V(e)+" is not iterable")},Di=TypeError,Fi=function(e,t){if(e<t)throw Di("Not enough arguments");return e},Ji=Math.floor,Gi=function(e,t){var r=e.length,n=Ji(r/2);return r<8?Hi(e,t):Vi(e,Gi(nr(e,0,n),t),Gi(nr(e,n),t),t)},Hi=function(e,t){for(var r,n,a=e.length,i=1;i<a;){for(n=i,r=e[i];n&&t(e[n-1],r)>0;)e[n]=e[--n];n!==i++&&(e[n]=r)}return e},Vi=function(e,t,r,n){for(var a=t.length,i=r.length,o=0,s=0;o<a||s<i;)e[o+s]=o<a&&s<i?n(t[o],r[s])<=0?t[o++]:r[s++]:o<a?t[o++]:r[s++];return e},$i=Gi,Yi=le("iterator"),Ki=tt.set,Qi=tt.getterFor("URLSearchParams"),Xi=tt.getterFor("URLSearchParamsIterator"),Zi=Object.getOwnPropertyDescriptor,eo=function(e){if(!d)return s[e];var t=Zi(s,e);return t&&t.value},to=eo("fetch"),ro=eo("Request"),no=eo("Headers"),ao=ro&&ro.prototype,io=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),mo=/\+/g,ko=Array(4),xo=function(e){return ko[e-1]||(ko[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,mo," "),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=ai((function(e,t){Ki(this,{type:"URLSearchParamsIterator",iterator:Wi(Qi(e).entries),kind:t})}),"Iterator",(function(){var e=Xi(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,a,i,o,s,c=Ni(e);if(c)for(r=(t=Wi(e,c)).next;!(n=f(r,t)).done;){if(i=(a=Wi(Ee(n.value))).next,(o=f(i,a)).done||(s=f(i,a)).done||!f(i,a).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)ie(e,d)&&po(this.entries,{key:d,value:Gt(e[d])})},parseQuery:function(e){if(e)for(var t,r,n=vo(e,"&"),a=0;a<n.length;)(t=n[a++]).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(){Bi(this,So);var e=arguments.length>0?arguments[0]:void 0;Ki(this,new qo(e))},So=jo.prototype;if(_i(So,{append:function(e,t){Fi(arguments.length,2);var r=Qi(this);po(r.entries,{key:Gt(e),value:Gt(t)}),r.updateURL()},delete:function(e){Fi(arguments.length,1);for(var t=Qi(this),r=t.entries,n=Gt(e),a=0;a<r.length;)r[a].key===n?bo(r,a,1):a++;t.updateURL()},get:function(e){Fi(arguments.length,1);for(var t=Qi(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){Fi(arguments.length,1);for(var t=Qi(this).entries,r=Gt(e),n=[],a=0;a<t.length;a++)t[a].key===r&&po(n,t[a].value);return n},has:function(e){Fi(arguments.length,1);for(var t=Qi(this).entries,r=Gt(e),n=0;n<t.length;)if(t[n++].key===r)return!0;return!1},set:function(e,t){Fi(arguments.length,1);for(var r,n=Qi(this),a=n.entries,i=!1,o=Gt(e),s=Gt(t),c=0;c<a.length;c++)(r=a[c]).key===o&&(i?bo(a,c--,1):(i=!0,r.value=s));i||po(a,{key:o,value:s}),n.updateURL()},sort:function(){var e=Qi(this);$i(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,r=Qi(this).entries,n=lr(e,arguments.length>1?arguments[1]:void 0),a=0;a<r.length;)n((t=r[a++]).value,t.key,this)},keys:function(){return new Eo(this,"keys")},values:function(){return new Eo(this,"values")},entries:function(){return new Eo(this,"entries")}},{enumerable:!0}),nt(So,Yi,So.entries,{name:"entries"}),nt(So,"toString",(function(){return Qi(this).serialize()}),{enumerable:!0}),fr(jo,"URLSearchParams"),Rt({global:!0,constructor:!0,forced:!Ri},{URLSearchParams:jo}),!Ri&&S(no)){var To=x(io.has),Mo=x(io.set),Ro=function(e){if(T(e)){var t,r=e.body;if("URLSearchParams"===Ft(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 Bi(this,ao),new ro(e,arguments.length>1?Ro(arguments[1]):{})};ao.constructor=_o,_o.prototype=ao,Rt({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:_o})}}var Ao={URLSearchParams:jo,getState:Qi};function Bo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Uo(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Bo(Object(r),!0).forEach((function(t){pa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bo(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var No=fa((function e(t){if(ua(this,e),pa(this,"baseUri",void 0),pa(this,"proxy",void 0),pa(this,"headers",void 0),pa(this,"parameters",void 0),pa(this,"fetchOptions",void 0),pa(this,"transformRequest",void 0),pa(this,"throwOnBadResponse",void 0),this.headers=Uo({},t.headers),this.parameters=Uo({},t.parameters),!this.parameters.shortCode)throw new Error("Missing required parameter: shortCode");this.fetchOptions=Uo({credentials:"omit"},t.fetchOptions),this.transformRequest=t.transformRequest||e.defaults.transformRequest,t.baseUri&&(this.baseUri=t.baseUri),t.proxy&&(this.proxy=t.proxy),this.throwOnBadResponse=!!t.throwOnBadResponse}));function Lo(e){return(Lo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}pa(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,Fo=Wo?window:globalThis,Jo="function"==typeof Fo.fetch,Go=function(){if(Do)return require("node-fetch").default;if(!Jo)throw new Error("Bad environment: it is not a node environment but fetch is not defined");return Fo.fetch}(),Ho=Function,Vo=x([].concat),$o=x([].join),Yo={},Ko=function(e,t,r){if(!ie(Yo,t)){for(var n=[],a=0;a<t;a++)n[a]="a["+a+"]";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),a=function(){var r=Vo(n,fn(arguments));return this instanceof a?Ko(t,r.length,r):t.apply(e,r)};return T(r)&&(a.prototype=r),a},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)})),as=!c((function(){es((function(){}))})),is=ns||as;Rt({target:"Reflect",stat:!0,forced:is,sham:is},{construct:function(e,t){Zo(e),Ee(t);var r=arguments.length<3?e:Zo(arguments[2]);if(as&&!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 a=r.prototype,i=Zt(T(a)?a:ts),o=hn(e,i,t);return T(o)?o:i}});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 a=new(Function.bind.apply(e,n));return r&&ps(a,r.prototype),a}).apply(null,arguments)}function ms(e){var t="function"==typeof Map?new Map:void 0;return(ms=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 ks(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 a=bs(this).constructor;r=Reflect.construct(n,arguments,a)}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,a,i,o=ne(this),s=Pr(o,0),c=0;for(t=-1,n=arguments.length;t<n;t++)if(hs(i=-1===t?o:arguments[t]))for(a=pt(i),ss(c+a),r=0;r<a;r++,c++)r in i&&er(s,c,i[r]);else ss(c+1),er(s,c++,i);return s.length=c,s}});var xs,ys,ws=function(e){ls(r,e);var t=ks(r);function r(e){var n;return ua(this,r),pa(fs(n=t.call(this,"".concat(e.status," ").concat(e.statusText))),"response",void 0),n.response=e,n}return fa(r)}(ms(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),Bs=x("".indexOf),Us=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,a,i,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(ra,c),b=c.source,v=0,I=u;if(l&&(g=Us(g,"y",""),-1===Bs(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),a=f(Rs,l?r:c,I),l?a?(a.input=Ns(a.input,v),a[0]=Ns(a[0],v),a.index=c.lastIndex,c.lastIndex+=a[0].length):c.lastIndex=0:Ls&&a&&(c.lastIndex=c.global?a.index+a[0].length:n),Ds&&a&&a.length>1&&f(Ms,a[0],r,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(a[i]=void 0)})),a&&p)for(a.groups=o=Zt(null),i=0;i<p.length;i++)o[(s=p[i])[0]]=a[s[1]];return a});var Fs=_s;Rt({target:"RegExp",proto:!0,forced:/./.exec!==Fs},{exec:Fs});var Js=le("species"),Gs=RegExp.prototype,Hs=function(e,t,r,n){var a=le(e),i=!c((function(){var t={};return t[a]=function(){return 7},7!=""[e](t)})),o=i&&!c((function(){var t=!1,r=/a/;return"split"===e&&((r={}).constructor={},r.constructor[Js]=function(){return r},r.flags="",r[a]=/./[a]),r.exec=function(){return t=!0,null},r[a](""),!t}));if(!i||!o||r){var s=x(/./[a]),d=t(a,""[e],(function(e,t,r,n,a){var o=x(e),c=t.exec;return c===Fs||c===Gs.exec?i&&!a?{done:!0,value:s(t,r,n)}:{done:!0,value:o(r,t,n)}:{done:!1}}));nt(String.prototype,e,d[0]),nt(Gs,a,d[1])}n&&Me(Gs[a],"sham",!0)},Vs=Ci.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,a,i){var o=r+e.length,s=n.length,c=ec;return void 0!==a&&(a=ne(a),c=Zs),Qs(i,c,(function(i,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=a[Xs(c,1,-1)];break;default:var u=+c;if(0===u)return i;if(u>s){var h=Ys(u/10);return 0===h?i:h<=s?void 0===n[h-1]?Ks(c,1):n[h-1]+Ks(c,1):i}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(Fs,e,t);throw rc("RegExp#exec called on incompatible receiver")},ac=le("replace"),ic=Math.max,oc=Math.min,sc=x([].concat),cc=x([].push),dc=x("".indexOf),uc=x("".slice),hc="$0"==="a".replace(/./,"$0"),fc=!!/./[ac]&&""===/./[ac]("a","$0");Hs("replace",(function(e,t,r){var n=fc?"$":"$0";return[function(e,r){var n=q(this),a=null==e?void 0:K(e,ac);return a?f(a,e,n,r):f(t,Gt(n),e,r)},function(e,a){var i=Ee(this),o=Gt(e);if("string"==typeof a&&-1===dc(a,n)&&-1===dc(a,"$<")){var s=r(t,i,o,a);if(s.done)return s.value}var c=S(a);c||(a=Gt(a));var d=i.global;if(d){var u=i.unicode;i.lastIndex=0}for(var h=[];;){var f=nc(i,o);if(null===f)break;if(cc(h,f),!d)break;""===Gt(f[0])&&(i.lastIndex=$s(o,ft(i.lastIndex),u))}for(var p,l="",g=0,b=0;b<h.length;b++){for(var v=Gt((f=h[b])[0]),I=ic(oc(st(f.index),o.length),0),m=[],k=1;k<f.length;k++)cc(m,void 0===(p=f[k])?p:String(p));var x=f.groups;if(c){var y=sc([v],m,I,o);void 0!==x&&cc(y,x);var w=Gt(hn(a,void 0,y))}else w=tc(v,o,I,m,x,a);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,a=1,i=yt.f,o=g.f;n>a;)for(var s,c=P(arguments[a++]),u=i?vc(_t(c),i(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,mc=function(e,t,r){var n,a;Ee(e);try{if(!(n=K(e,"return"))){if("throw"===t)throw r;return r}n=f(n,e)}catch(e){a=!0,n=e}if("throw"===t)throw r;if(a)throw n;return Ee(n),r},kc=function(e,t,r,n){try{return n?t(Ee(r)[0],r[1]):t(r)}catch(t){mc(e,"throw",t)}},xc=le("iterator"),yc=Array.prototype,wc=function(e){return void 0!==e&&(Va.Array===e||yc[xc]===e)},Cc=Array,Oc=function(e){var t=ne(e),r=Cr(this),n=arguments.length,a=n>1?arguments[1]:void 0,i=void 0!==a;i&&(a=lr(a,n>2?arguments[2]:void 0));var o,s,c,d,u,h,p=Ni(t),l=0;if(!p||this===Cc&&wc(p))for(o=pt(t),s=r?new this(o):Cc(o);o>l;l++)h=i?a(t[l],l):t[l],er(s,l,h);else for(u=(d=Wi(t,p)).next,s=r?new this:[];!(c=f(u,d)).done;l++)h=i?kc(d,a,[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),Bc=x("".split),Uc=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=[],a=(e=function(e){for(var t=[],r=0,n=e.length;r<n;){var a=Mc(e,r++);if(a>=55296&&a<=56319&&r<n){var i=Mc(e,r++);56320==(64512&i)?_c(t,((1023&a)<<10)+(1023&i)+65536):(_c(t,a),r--)}else _c(t,a)}return t}(e)).length,i=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<a;){var u=2147483647;for(t=0;t<e.length;t++)(r=e[t])>=i&&r<u&&(u=r);var h=d+1;if(u-i>Sc((2147483647-o)/h))throw qc(Ec);for(o+=(u-i)*h,i=u,t=0;t<e.length;t++){if((r=e[t])<i&&++o>2147483647)throw qc(Ec);if(r==i){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++,i++}return Rc(n,"")},Dc=Ci.codeAt,Fc=tt.set,Jc=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),ad=x("".replace),id=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 #/:<>?@[\\\]^|]/,md=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,kd=/[\t\n\r]/g,xd=function(e){var t,r,n,a;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,a=0,i=0;i<8;i++)0!==e[i]?(a>r&&(t=n,r=a),n=null,a=0):(null===n&&(n=i),++a);return a>r&&(t=n,r=a),t}(e),r=0;r<8;r++)a&&0===e[r]||(a&&(a=!1),n===r?(t+=r?":":"::",a=!0):(t+=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&&!ie(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={},Bd={},Ud={},Nd={},Ld={},Wd={},Dd={},Fd={},Jd={},Gd={},Hd={},Vd={},$d={},Yd={},Kd={},Qd={},Xd=function(e,t,r){var n,a,i,o=Gt(e);if(t){if(a=this.parse(o))throw $c(a);this.searchParams=null}else{if(void 0!==r&&(n=new Xd(r,!0)),a=this.parse(o,null,n))throw $c(a);(i=Hc(new Gc)).bindURL(this),this.searchParams=i}};Xd.prototype={type:"URL",parse:function(e,t,r){var n,a,i,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=ad(e,md,"")),e=ad(e,kd,""),n=Oc(e);u<=n.length;){switch(a=n[u],d){case Sd:if(!a||!Zc(ud,a)){if(t)return"Invalid scheme";d=Md;continue}h+=cd(a),d=Td;break;case Td:if(a&&(Zc(hd,a)||"+"==a||"-"==a||"."==a))h+=cd(a);else{if(":"!=a){if(t)return"Invalid scheme";h="",d=Md,u=0;continue}if(t&&(c.isSpecial()!=ie(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=Jd:c.isSpecial()&&r&&r.scheme==c.scheme?d=Rd:c.isSpecial()?d=Ud:"/"==n[u+1]?(d=_d,u++):(c.cannotBeABaseURL=!0,nd(c.path,""),d=Yd)}break;case Md:if(!r||r.cannotBeABaseURL&&"#"!=a)return"Invalid scheme";if(r.cannotBeABaseURL&&"#"==a){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?Jd:Ad;continue;case Rd:if("/"!=a||"/"!=n[u+1]){d=Ad;continue}d=Nd,u++;break;case _d:if("/"==a){d=Ld;break}d=$d;continue;case Ad:if(c.scheme=r.scheme,a==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("/"==a||"\\"==a&&c.isSpecial())d=Bd;else if("?"==a)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("#"!=a){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 Bd:if(!c.isSpecial()||"/"!=a&&"\\"!=a){if("/"!=a){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 Ud:if(d=Nd,"/"!=a||"/"!=Xc(h,u+1))continue;u++;break;case Nd:if("/"!=a&&"\\"!=a){d=Ld;continue}break;case Ld:if("@"==a){f&&(h="%40"+h),f=!0,i=Oc(h);for(var g=0;g<i.length;g++){var b=i[g];if(":"!=b||l){var v=zd(b,Od);l?c.password+=v:c.username+=v}else l=!0}h=""}else if(a==pc||"/"==a||"?"==a||"#"==a||"\\"==a&&c.isSpecial()){if(f&&""==h)return"Invalid authority";u-=Oc(h).length+1,h="",d=Wd}else h+=a;break;case Wd:case Dd:if(t&&"file"==c.scheme){d=Hd;continue}if(":"!=a||p){if(a==pc||"/"==a||"?"==a||"#"==a||"\\"==a&&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}"["==a?p=!0:"]"==a&&(p=!1),h+=a}else{if(""==h)return"Invalid host";if(o=c.parseHost(h))return o;if(h="",d=Fd,t==Dd)return}break;case Fd:if(!Zc(fd,a)){if(a==pc||"/"==a||"?"==a||"#"==a||"\\"==a&&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+=a;break;case Jd:if(c.scheme="file","/"==a||"\\"==a)d=Gd;else{if(!r||"file"!=r.scheme){d=$d;continue}if(a==pc)c.host=r.host,c.path=nr(r.path),c.query=r.query;else if("?"==a)c.host=r.host,c.path=nr(r.path),c.query="",d=Kd;else{if("#"!=a){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("/"==a||"\\"==a){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(a==pc||"/"==a||"\\"==a||"?"==a||"#"==a){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+=a;break;case Vd:if(c.isSpecial()){if(d=$d,"/"!=a&&"\\"!=a)continue}else if(t||"?"!=a)if(t||"#"!=a){if(a!=pc&&(d=$d,"/"!=a))continue}else c.fragment="",d=Qd;else c.query="",d=Kd;break;case $d:if(a==pc||"/"==a||"\\"==a&&c.isSpecial()||!t&&("?"==a||"#"==a)){if(".."===(s=cd(s=h))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(c.shortenPath(),"/"==a||"\\"==a&&c.isSpecial()||nd(c.path,"")):jd(h)?"/"==a||"\\"==a&&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&&(a==pc||"?"==a||"#"==a))for(;c.path.length>1&&""===c.path[0];)id(c.path);"?"==a?(c.query="",d=Kd):"#"==a&&(c.fragment="",d=Qd)}else h+=zd(a,Cd);break;case Yd:"?"==a?(c.query="",d=Kd):"#"==a?(c.fragment="",d=Qd):a!=pc&&(c.path[0]+=zd(a,yd));break;case Kd:t||"#"!=a?a!=pc&&("'"==a&&c.isSpecial()?c.query+="%27":c.query+="#"==a?"%23":zd(a,yd)):(c.fragment="",d=Qd);break;case Qd:a!=pc&&(c.fragment+=zd(a,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,a,i,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(a=null,n>0){if(!("."==f()&&n<4))return;h++}if(!Zc(fd,f()))return;for(;Zc(fd,f());){if(i=Yc(f(),10),null===a)a=i;else{if(0==a)return;a=10*a+i}if(a>255)return;h++}c[d]=256*c[d]+a,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=[],a=Bc(Ac(Uc(e),Pc,"."),".");for(t=0;t<a.length;t++)r=a[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,a,i,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(""==(a=c[n]))return e;if(i=10,a.length>1&&"0"==Xc(a,0)&&(i=Zc(pd,a)?16:8,a=sd(a,8==i?1:2)),""===a)o=0;else{if(!Zc(10==i?gd:8==i?ld:bd,a))return e;o=Yc(a,i)}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 ie(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,a=e.host,i=e.port,o=e.path,s=e.query,c=e.fragment,d=t+":";return null!==a?(d+="//",e.includesCredentials()&&(d+=r+(n?":"+n:"")+"@"),d+=xd(a),null!==i&&(d+=":"+i)):"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,Fd))},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=Bi(this,eu),r=Fi(arguments.length,1)>1?arguments[1]:void 0,n=Fc(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 Jc(this)[e]()},set:t&&function(e){return Jc(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 Jc(this).serialize()}),{enumerable:!0}),nt(eu,"toString",(function(){return Jc(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 au(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 a=bs(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return gs(this,r)}}fr(Zd,"URL"),Rt({global:!0,constructor:!0,forced:!Ri,sham:!d},{URL:Zd});var iu=function(e){ls(r,e);var t=au(r);function r(e,n,a){var i;return ua(this,r),(i=t.call(this,r.renderTemplateUri("".concat(n,"/").concat(e).replace(/\/\/+/g,"/"),null==a?void 0:a.pathParams))).addQueryParams(null==a?void 0:a.queryParams),null!=a&&a.origin&&i.replaceOrigin(null==a?void 0:a.origin),i}return fa(r,[{key:"replaceOrigin",value:function(e){var t=new URL(e);this.protocol=t.protocol,this.host=t.host,this.pathname="".concat(t.pathname,"/").concat(this.pathname).replace(/\/\/+/g,"/")}},{key:"addQueryParams",value:function(e){var t=this;e&&Object.keys(e).forEach((function(r){var n=e[r];if(Array.isArray(n))if("refine"===r)for(var a=0;a<n.length;a+=1)t.searchParams.append(r,String(n[a]));else t.searchParams.append(r,n.join());else t.searchParams.append(r,String(n))}))}}],[{key:"renderTemplateUri",value:function(e,t){return t?e.replace(/\{([^\}]+)\}/g,(function(e,r){return String(t[r])})):e}}]),r}(ms(URL)),ou="commerce-sdk-isomorphic@1.13.1";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){pa(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){ua(this,e),pa(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,a,i,o,s,c,d,u,h,f,p,l,g,b,v,I,m,k,x,y,w,C,O,z,P,E,q,j,S,T,M,R,_,A;return fa(e,[{key:"createBasket",value:(A=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.taxMode?o.taxMode=n.taxMode:void 0!==a.taxMode&&(o.taxMode=a.taxMode),void 0!==n.temporary?o.temporary=n.temporary:void 0!==a.temporary&&(o.temporary=a.temporary),void 0===n.siteId){e.next=19;break}o.siteId=n.siteId,e.next=24;break;case 19:if(void 0===a.siteId){e.next=23;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for createBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets",this.clientConfig.baseUri,{pathParams:i,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:(_=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.overrideExisting?o.overrideExisting=n.overrideExisting:void 0!==a.overrideExisting&&(o.overrideExisting=a.overrideExisting),void 0===n.siteId){e.next=18;break}o.siteId=n.siteId,e.next=23;break;case 18:if(void 0===a.siteId){e.next=22;break}o.siteId=a.siteId,e.next=23;break;case 22:throw new Error("Missing required query parameter: siteId");case 23:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for transferBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/actions/transfer",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.createDestinationBasket?o.createDestinationBasket=n.createDestinationBasket:void 0!==a.createDestinationBasket&&(o.createDestinationBasket=a.createDestinationBasket),void 0!==n.productItemMergeMode?o.productItemMergeMode=n.productItemMergeMode:void 0!==a.productItemMergeMode&&(o.productItemMergeMode=a.productItemMergeMode),void 0===n.siteId){e.next=19;break}o.siteId=n.siteId,e.next=24;break;case 19:if(void 0===a.siteId){e.next=23;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for mergeBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/actions/merge",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for deleteBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updateBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updateAsAgentBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/agent",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0!==n.useAsShipping?o.useAsShipping=n.useAsShipping:void 0!==a.useAsShipping&&(o.useAsShipping=a.useAsShipping),void 0!==n.removeExternalTax?o.removeExternalTax=n.removeExternalTax:void 0!==a.removeExternalTax&&(o.removeExternalTax=a.removeExternalTax),void 0===n.siteId){e.next=28;break}o.siteId=n.siteId,e.next=33;break;case 28:if(void 0===a.siteId){e.next=32;break}o.siteId=a.siteId,e.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updateBillingAddressForBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/billing-address",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for addCouponToBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/coupons",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.couponItemId){e.next=25;break}i.couponItemId=n.couponItemId,e.next=30;break;case 25:if(void 0===a.couponItemId){e.next=29;break}i.couponItemId=a.couponItemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: couponItemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for removeCouponFromBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/coupons/{couponItemId}",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updateCustomerForBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/customer",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for addGiftCertificateItemToBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.giftCertificateItemId){e.next=25;break}i.giftCertificateItemId=n.giftCertificateItemId,e.next=30;break;case 25:if(void 0===a.giftCertificateItemId){e.next=29;break}i.giftCertificateItemId=a.giftCertificateItemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: giftCertificateItemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for removeGiftCertificateItemFromBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.giftCertificateItemId){e.next=25;break}i.giftCertificateItemId=n.giftCertificateItemId,e.next=30;break;case 25:if(void 0===a.giftCertificateItemId){e.next=29;break}i.giftCertificateItemId=a.giftCertificateItemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: giftCertificateItemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updateGiftCertificateItemInBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for addItemToBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/items",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.itemId){e.next=25;break}i.itemId=n.itemId,e.next=30;break;case 25:if(void 0===a.itemId){e.next=29;break}i.itemId=a.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===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for removeItemFromBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:i,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:(k=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.itemId){e.next=25;break}i.itemId=n.itemId,e.next=30;break;case 25:if(void 0===a.itemId){e.next=29;break}i.itemId=a.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!==a.removeExternalTax&&(o.removeExternalTax=a.removeExternalTax),void 0===n.siteId){e.next=36;break}o.siteId=n.siteId,e.next=41;break;case 36:if(void 0===a.siteId){e.next=40;break}o.siteId=a.siteId,e.next=41;break;case 40:throw new Error("Missing required query parameter: siteId");case 41:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updateItemInBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:i,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 k.apply(this,arguments)})},{key:"addTaxesForBasketItem",value:(m=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.itemId){e.next=25;break}i.itemId=n.itemId,e.next=30;break;case 25:if(void 0===a.itemId){e.next=29;break}i.itemId=a.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===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for addTaxesForBasketItem: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}/taxes",this.clientConfig.baseUri,{pathParams:i,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 m.apply(this,arguments)})},{key:"addPaymentInstrumentToBasket",value:(I=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for addPaymentInstrumentToBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/payment-instruments",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}i.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===a.paymentInstrumentId){e.next=29;break}i.paymentInstrumentId=a.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===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for removePaymentInstrumentFromBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}i.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===a.paymentInstrumentId){e.next=29;break}i.paymentInstrumentId=a.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!==a.removeExternalTax&&(o.removeExternalTax=a.removeExternalTax),void 0===n.siteId){e.next=36;break}o.siteId=n.siteId,e.next=41;break;case 36:if(void 0===a.siteId){e.next=40;break}o.siteId=a.siteId,e.next=41;break;case 40:throw new Error("Missing required query parameter: siteId");case 41:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updatePaymentInstrumentInBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getPaymentMethodsForBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/payment-methods",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for addPriceAdjustmentToBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/price-adjustments",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.priceAdjustmentId){e.next=25;break}i.priceAdjustmentId=n.priceAdjustmentId,e.next=30;break;case 25:if(void 0===a.priceAdjustmentId){e.next=29;break}i.priceAdjustmentId=a.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===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for removePriceAdjustmentFromBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/price-adjustments/{priceAdjustmentId}",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.priceAdjustmentId){e.next=25;break}i.priceAdjustmentId=n.priceAdjustmentId,e.next=30;break;case 25:if(void 0===a.priceAdjustmentId){e.next=29;break}i.priceAdjustmentId=a.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===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updatePriceAdjustmentInBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/price-adjustments/{priceAdjustmentId}",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getPriceBooksForBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/price-books",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for addPriceBooksToBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/price-books",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for createShipmentForBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/shipments",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.shipmentId){e.next=25;break}i.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===a.shipmentId){e.next=29;break}i.shipmentId=a.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===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for removeShipmentFromBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.shipmentId){e.next=25;break}i.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===a.shipmentId){e.next=29;break}i.shipmentId=a.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===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updateShipmentForBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.shipmentId){e.next=25;break}i.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===a.shipmentId){e.next=29;break}i.shipmentId=a.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!==a.useAsBilling&&(o.useAsBilling=a.useAsBilling),void 0!==n.removeExternalTax?o.removeExternalTax=n.removeExternalTax:void 0!==a.removeExternalTax&&(o.removeExternalTax=a.removeExternalTax),void 0===n.siteId){e.next=37;break}o.siteId=n.siteId,e.next=42;break;case 37:if(void 0===a.siteId){e.next=41;break}o.siteId=a.siteId,e.next=42;break;case 41:throw new Error("Missing required query parameter: siteId");case 42:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updateShippingAddressForShipment: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-address",this.clientConfig.baseUri,{pathParams:i,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:(i=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.shipmentId){e.next=25;break}i.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===a.shipmentId){e.next=29;break}i.shipmentId=a.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===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updateShippingMethodForShipment: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-method",this.clientConfig.baseUri,{pathParams:i,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 i.apply(this,arguments)})},{key:"getShippingMethodsForShipment",value:(a=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.shipmentId){e.next=25;break}i.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===a.shipmentId){e.next=29;break}i.shipmentId=a.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===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getShippingMethodsForShipment: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-methods",this.clientConfig.baseUri,{pathParams:i,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 a.apply(this,arguments)})},{key:"updateAsStorefrontBasket",value:(n=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0!==n.exchange?o.exchange=n.exchange:void 0!==a.exchange&&(o.exchange=a.exchange),void 0===n.siteId){e.next=27;break}o.siteId=n.siteId,e.next=32;break;case 27:if(void 0===a.siteId){e.next=31;break}o.siteId=a.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!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updateAsStorefrontBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/storefront",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getTaxesFromBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/taxes",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for addTaxesForBasket: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/taxes",this.clientConfig.baseUri,{pathParams:i,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){pa(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}pa(du,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-baskets/{version}");var fu=function(){function e(t){ua(this,e),pa(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,a;return fa(e,[{key:"getShopperContext",value:(a=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.usid){e.next=16;break}i.usid=n.usid,e.next=21;break;case 16:if(void 0===a.usid){e.next=20;break}i.usid=a.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!==a.siteId&&(o.siteId=a.siteId),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getShopperContext: ".concat(e))})),s=new iu("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:i,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 a.apply(this,arguments)})},{key:"createShopperContext",value:(n=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.usid){e.next=16;break}i.usid=n.usid,e.next=21;break;case 16:if(void 0===a.usid){e.next=20;break}i.usid=a.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!==a.siteId&&(o.siteId=a.siteId),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for createShopperContext: ".concat(e))})),s=new iu("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.usid){e.next=16;break}i.usid=n.usid,e.next=21;break;case 16:if(void 0===a.usid){e.next=20;break}i.usid=a.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!==a.siteId&&(o.siteId=a.siteId),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for deleteShopperContext: ".concat(e))})),s=new iu("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.usid){e.next=16;break}i.usid=n.usid,e.next=21;break;case 16:if(void 0===a.usid){e.next=20;break}i.usid=a.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!==a.siteId&&(o.siteId=a.siteId),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updateShopperContext: ".concat(e))})),s=new iu("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:i,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){pa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}pa(fu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/shopper/shopper-context/{version}");var gu=function(){function e(t){ua(this,e),pa(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,a,i,o,s,c,d,u,h,f,p,l,g,b,v,I,m,k,x,y,w,C,O,z,P,E,q,j,S,T;return fa(e,[{key:"registerCustomer",value:(T=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}o.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for registerCustomer: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}o.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for invalidateCustomerAuth: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/actions/logout",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.clientId){e.next=17;break}o.clientId=n.clientId,e.next=22;break;case 17:if(void 0===a.clientId){e.next=21;break}o.clientId=a.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===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for authorizeCustomer: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/actions/login",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}o.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for authorizeTrustedSystem: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/trusted-system/actions/login",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}o.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for resetPassword: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/password/actions/reset",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}o.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getResetPasswordToken: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/password/actions/create-reset-token",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}o.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for registerExternalProfile: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/external-profile",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.externalId){e.next=17;break}o.externalId=n.externalId,e.next=22;break;case 17:if(void 0===a.externalId){e.next=21;break}o.externalId=a.externalId,e.next=22;break;case 21:throw new Error("Missing required query parameter: externalId");case 22:if(void 0===n.authenticationProviderId){e.next=26;break}o.authenticationProviderId=n.authenticationProviderId,e.next=31;break;case 26:if(void 0===a.authenticationProviderId){e.next=30;break}o.authenticationProviderId=a.authenticationProviderId,e.next=31;break;case 30:throw new Error("Missing required query parameter: authenticationProviderId");case 31:if(void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getExternalProfile: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/external-profile",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomer: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updateCustomer: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for createCustomerAddress: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/addresses",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.addressName){e.next=25;break}i.addressName=n.addressName,e.next=30;break;case 25:if(void 0===a.addressName){e.next=29;break}i.addressName=a.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===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerAddress: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:i,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:(k=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.addressName){e.next=25;break}i.addressName=n.addressName,e.next=30;break;case 25:if(void 0===a.addressName){e.next=29;break}i.addressName=a.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===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for removeCustomerAddress: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:i,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 k.apply(this,arguments)})},{key:"updateCustomerAddress",value:(m=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.addressName){e.next=25;break}i.addressName=n.addressName,e.next=30;break;case 25:if(void 0===a.addressName){e.next=29;break}i.addressName=a.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===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updateCustomerAddress: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:i,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 m.apply(this,arguments)})},{key:"getCustomerBaskets",value:(I=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerBaskets: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/baskets",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0!==n.crossSites?o.crossSites=n.crossSites:void 0!==a.crossSites&&(o.crossSites=a.crossSites),void 0!==n.from?o.from=n.from:void 0!==a.from&&(o.from=a.from),void 0!==n.until?o.until=n.until:void 0!==a.until&&(o.until=a.until),void 0!==n.status?o.status=n.status:void 0!==a.status&&(o.status=a.status),void 0===n.siteId){e.next=30;break}o.siteId=n.siteId,e.next=35;break;case 30:if(void 0===a.siteId){e.next=34;break}o.siteId=a.siteId,e.next=35;break;case 34:throw new Error("Missing required query parameter: siteId");case 35:return void 0!==n.offset?o.offset=n.offset:void 0!==a.offset&&(o.offset=a.offset),void 0!==n.limit?o.limit=n.limit:void 0!==a.limit&&(o.limit=a.limit),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerOrders: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/orders",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updateCustomerPassword: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/password",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for createCustomerPaymentInstrument: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/payment-instruments",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}i.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===a.paymentInstrumentId){e.next=29;break}i.paymentInstrumentId=a.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===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for deleteCustomerPaymentInstrument: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}i.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===a.paymentInstrumentId){e.next=29;break}i.paymentInstrumentId=a.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===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerPaymentInstrument: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerProductLists: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/product-lists",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for createCustomerProductList: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/product-lists",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}i.listId=n.listId,e.next=30;break;case 25:if(void 0===a.listId){e.next=29;break}i.listId=a.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===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for deleteCustomerProductList: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}i.listId=n.listId,e.next=30;break;case 25:if(void 0===a.listId){e.next=29;break}i.listId=a.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===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerProductList: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}i.listId=n.listId,e.next=30;break;case 25:if(void 0===a.listId){e.next=29;break}i.listId=a.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===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updateCustomerProductList: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}i.listId=n.listId,e.next=30;break;case 25:if(void 0===a.listId){e.next=29;break}i.listId=a.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===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for createCustomerProductListItem: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}i.listId=n.listId,e.next=30;break;case 25:if(void 0===a.listId){e.next=29;break}i.listId=a.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}i.itemId=n.itemId,e.next=39;break;case 34:if(void 0===a.itemId){e.next=38;break}i.itemId=a.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===a.siteId){e.next=48;break}o.siteId=a.siteId,e.next=49;break;case 48:throw new Error("Missing required query parameter: siteId");case 49:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for deleteCustomerProductListItem: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:i,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:(i=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}i.listId=n.listId,e.next=30;break;case 25:if(void 0===a.listId){e.next=29;break}i.listId=a.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}i.itemId=n.itemId,e.next=39;break;case 34:if(void 0===a.itemId){e.next=38;break}i.itemId=a.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===a.siteId){e.next=48;break}o.siteId=a.siteId,e.next=49;break;case 48:throw new Error("Missing required query parameter: siteId");case 49:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerProductListItem: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:i,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 i.apply(this,arguments)})},{key:"updateCustomerProductListItem",value:(a=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}i.listId=n.listId,e.next=30;break;case 25:if(void 0===a.listId){e.next=29;break}i.listId=a.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}i.itemId=n.itemId,e.next=39;break;case 34:if(void 0===a.itemId){e.next=38;break}i.itemId=a.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===a.siteId){e.next=48;break}o.siteId=a.siteId,e.next=49;break;case 48:throw new Error("Missing required query parameter: siteId");case 49:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updateCustomerProductListItem: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:i,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 a.apply(this,arguments)})},{key:"getPublicProductListsBySearchTerm",value:(n=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.email?o.email=n.email:void 0!==a.email&&(o.email=a.email),void 0!==n.firstName?o.firstName=n.firstName:void 0!==a.firstName&&(o.firstName=a.firstName),void 0!==n.lastName?o.lastName=n.lastName:void 0!==a.lastName&&(o.lastName=a.lastName),void 0===n.siteId){e.next=20;break}o.siteId=n.siteId,e.next=25;break;case 20:if(void 0===a.siteId){e.next=24;break}o.siteId=a.siteId,e.next=25;break;case 24:throw new Error("Missing required query parameter: siteId");case 25:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getPublicProductListsBySearchTerm: ".concat(e))})),s=new iu("/organizations/{organizationId}/product-lists",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.listId){e.next=16;break}i.listId=n.listId,e.next=21;break;case 16:if(void 0===a.listId){e.next=20;break}i.listId=a.listId,e.next=21;break;case 20:throw new Error("Missing required path parameter: listId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getPublicProductList: ".concat(e))})),s=new iu("/organizations/{organizationId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.listId){e.next=16;break}i.listId=n.listId,e.next=21;break;case 16:if(void 0===a.listId){e.next=20;break}i.listId=a.listId,e.next=21;break;case 20:throw new Error("Missing required path parameter: listId");case 21:if(void 0===n.itemId){e.next=25;break}i.itemId=n.itemId,e.next=30;break;case 25:if(void 0===a.itemId){e.next=29;break}i.itemId=a.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===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getProductListItem: ".concat(e))})),s=new iu("/organizations/{organizationId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:i,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){pa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}pa(gu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/customer/shopper-customers/{version}");var Iu=function(){function e(t){ua(this,e),pa(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 fa(e,[{key:"retrieveResults",value:(r=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.channelId){e.next=16;break}i.channelId=n.channelId,e.next=21;break;case 16:if(void 0===a.channelId){e.next=20;break}i.channelId=a.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===a.locale){e.next=30;break}o.locale=a.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!==a.offset&&(o.offset=a.offset),void 0!==n.limit?o.limit=n.limit:void 0!==a.limit&&(o.limit=a.limit),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for retrieveResults: ".concat(e))})),s=new iu("/organizations/{organizationId}/channels/{channelId}/results",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.channelId){e.next=16;break}i.channelId=n.channelId,e.next=21;break;case 16:if(void 0===a.channelId){e.next=20;break}i.channelId=a.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===a.suggestionTypes){e.next=30;break}o.suggestionTypes=a.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!==a.searchText&&(o.searchText=a.searchText),void 0===n.locale){e.next=36;break}o.locale=n.locale,e.next=41;break;case 36:if(void 0===a.locale){e.next=40;break}o.locale=a.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)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getSuggestions: ".concat(e))})),s=new iu("/organizations/{organizationId}/channels/{channelId}/suggestions",this.clientConfig.baseUri,{pathParams:i,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 mu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ku(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?mu(Object(r),!0).forEach((function(t){pa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}pa(Iu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/discovery/query/{version}");var xu=function(){function e(t){ua(this,e),pa(this,"clientConfig",void 0);var r=ku({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t,r;return fa(e,[{key:"getPages",value:(r=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.categoryId?o.categoryId=n.categoryId:void 0!==a.categoryId&&(o.categoryId=a.categoryId),void 0!==n.productId?o.productId=n.productId:void 0!==a.productId&&(o.productId=a.productId),void 0===n.aspectTypeId){e.next=19;break}o.aspectTypeId=n.aspectTypeId,e.next=24;break;case 19:if(void 0===a.aspectTypeId){e.next=23;break}o.aspectTypeId=a.aspectTypeId,e.next=24;break;case 23:throw new Error("Missing required query parameter: aspectTypeId");case 24:if(void 0!==n.aspectAttributes?o.aspectAttributes=n.aspectAttributes:void 0!==a.aspectAttributes&&(o.aspectAttributes=a.aspectAttributes),void 0!==n.parameters?o.parameters=n.parameters:void 0!==a.parameters&&(o.parameters=a.parameters),void 0===n.siteId){e.next=30;break}o.siteId=n.siteId,e.next=35;break;case 30:if(void 0===a.siteId){e.next=34;break}o.siteId=a.siteId,e.next=35;break;case 34:throw new Error("Missing required query parameter: siteId");case 35:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getPages: ".concat(e))})),s=new iu("/organizations/{organizationId}/pages",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=ku(ku({},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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.pageId){e.next=16;break}i.pageId=n.pageId,e.next=21;break;case 16:if(void 0===a.pageId){e.next=20;break}i.pageId=a.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!==a.aspectAttributes&&(o.aspectAttributes=a.aspectAttributes),void 0!==n.parameters?o.parameters=n.parameters:void 0!==a.parameters&&(o.parameters=a.parameters),void 0===n.siteId){e.next=28;break}o.siteId=n.siteId,e.next=33;break;case 28:if(void 0===a.siteId){e.next=32;break}o.siteId=a.siteId,e.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getPage: ".concat(e))})),s=new iu("/organizations/{organizationId}/pages/{pageId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=ku(ku({},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){pa(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}pa(xu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/experience/shopper-experience/{version}");var Cu=function(){function e(t){ua(this,e),pa(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 fa(e,[{key:"getGiftCertificate",value:(t=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}o.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getGiftCertificate: ".concat(e))})),s=new iu("/organizations/{organizationId}/gift-certificate",this.clientConfig.baseUri,{pathParams:i,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){pa(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}pa(Cu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/pricing/shopper-gift-certificates/{version}");var Pu=function(){function e(t){ua(this,e),pa(this,"clientConfig",void 0);var r=zu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t,r,n,a,i,o,s,c,d,u,h,f,p,l,g,b,v;return fa(e,[{key:"authenticateCustomer",value:(v=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for authenticateCustomer: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/login",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for authorizePasswordlessCustomer: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/passwordless/login",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.client_id){e.next=17;break}o.client_id=n.client_id,e.next=22;break;case 17:if(void 0===a.client_id){e.next=21;break}o.client_id=a.client_id,e.next=22;break;case 21:throw new Error("Missing required query parameter: client_id");case 22:if(void 0===n.refresh_token){e.next=26;break}o.refresh_token=n.refresh_token,e.next=31;break;case 26:if(void 0===a.refresh_token){e.next=30;break}o.refresh_token=a.refresh_token,e.next=31;break;case 30:throw new Error("Missing required query parameter: refresh_token");case 31:return void 0!==n.channel_id?o.channel_id=n.channel_id:void 0!==a.channel_id&&(o.channel_id=a.channel_id),void 0!==n.hint?o.hint=n.hint:void 0!==a.hint&&(o.hint=a.hint),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for logoutCustomer: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/logout",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.redirect_uri){e.next=17;break}o.redirect_uri=n.redirect_uri,e.next=22;break;case 17:if(void 0===a.redirect_uri){e.next=21;break}o.redirect_uri=a.redirect_uri,e.next=22;break;case 21:throw new Error("Missing required query parameter: redirect_uri");case 22:if(void 0===n.response_type){e.next=26;break}o.response_type=n.response_type,e.next=31;break;case 26:if(void 0===a.response_type){e.next=30;break}o.response_type=a.response_type,e.next=31;break;case 30:throw new Error("Missing required query parameter: response_type");case 31:if(void 0===n.client_id){e.next=35;break}o.client_id=n.client_id,e.next=40;break;case 35:if(void 0===a.client_id){e.next=39;break}o.client_id=a.client_id,e.next=40;break;case 39:throw new Error("Missing required query parameter: client_id");case 40:if(void 0!==n.scope?o.scope=n.scope:void 0!==a.scope&&(o.scope=a.scope),void 0!==n.state?o.state=n.state:void 0!==a.state&&(o.state=a.state),void 0!==n.usid?o.usid=n.usid:void 0!==a.usid&&(o.usid=a.usid),void 0!==n.hint?o.hint=n.hint:void 0!==a.hint&&(o.hint=a.hint),void 0!==n.channel_id?o.channel_id=n.channel_id:void 0!==a.channel_id&&(o.channel_id=a.channel_id),void 0===n.code_challenge){e.next=49;break}o.code_challenge=n.code_challenge,e.next=54;break;case 49:if(void 0===a.code_challenge){e.next=53;break}o.code_challenge=a.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!==a.ui_locales&&(o.ui_locales=a.ui_locales),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for authorizeCustomer: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/authorize",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getAccessToken: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/token",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getSessionBridgeAccessToken: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/session-bridge/token",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getTrustedSystemAccessToken: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/trusted-system/token",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.client_id){e.next=17;break}o.client_id=n.client_id,e.next=22;break;case 17:if(void 0===a.client_id){e.next=21;break}o.client_id=a.client_id,e.next=22;break;case 21:throw new Error("Missing required query parameter: client_id");case 22:if(void 0===n.channel_id){e.next=26;break}o.channel_id=n.channel_id,e.next=31;break;case 26:if(void 0===a.channel_id){e.next=30;break}o.channel_id=a.channel_id,e.next=31;break;case 30:throw new Error("Missing required query parameter: channel_id");case 31:if(void 0===n.code_challenge){e.next=35;break}o.code_challenge=n.code_challenge,e.next=40;break;case 35:if(void 0===a.code_challenge){e.next=39;break}o.code_challenge=a.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===a.login_id){e.next=48;break}o.login_id=a.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===a.idp_origin){e.next=57;break}o.idp_origin=a.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===a.redirect_uri){e.next=66;break}o.redirect_uri=a.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===a.response_type){e.next=75;break}o.response_type=a.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)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getTrustedAgentAuthorizationToken: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/trusted-agent/authorize",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getTrustedAgentAccessToken: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/trusted-agent/token",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getPasswordResetToken: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/password/reset",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for resetPassword: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/password/action",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getPasswordLessAccessToken: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/passwordless/token",this.clientConfig.baseUri,{pathParams:i,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:(i=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for revokeToken: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/revoke",this.clientConfig.baseUri,{pathParams:i,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:"introspectToken",value:(a=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for introspectToken: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/introspect",this.clientConfig.baseUri,{pathParams:i,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:"getUserInfo",value:(n=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},void 0!==n.channel_id?o.channel_id=n.channel_id:void 0!==a.channel_id&&(o.channel_id=a.channel_id),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getUserInfo: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/userinfo",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getWellknownOpenidConfiguration: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/.well-known/openid-configuration",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getJwksUri: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/jwks",this.clientConfig.baseUri,{pathParams:i,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){pa(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}pa(Pu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/{version}");var ju=function(){function e(t){ua(this,e),pa(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,a,i,o,s;return fa(e,[{key:"createOrder",value:(s=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}o.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for createOrder: ".concat(e))})),s=new iu("/organizations/{organizationId}/orders",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}i.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===a.orderNo){e.next=20;break}i.orderNo=a.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getOrder: ".concat(e))})),s=new iu("/organizations/{organizationId}/orders/{orderNo}",this.clientConfig.baseUri,{pathParams:i,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:(i=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}i.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===a.orderNo){e.next=20;break}i.orderNo=a.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for createPaymentInstrumentForOrder: ".concat(e))})),s=new iu("/organizations/{organizationId}/orders/{orderNo}/payment-instruments",this.clientConfig.baseUri,{pathParams:i,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 i.apply(this,arguments)})},{key:"removePaymentInstrumentFromOrder",value:(a=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}i.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===a.orderNo){e.next=20;break}i.orderNo=a.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}i.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===a.paymentInstrumentId){e.next=29;break}i.paymentInstrumentId=a.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===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for removePaymentInstrumentFromOrder: ".concat(e))})),s=new iu("/organizations/{organizationId}/orders/{orderNo}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:i,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 a.apply(this,arguments)})},{key:"updatePaymentInstrumentForOrder",value:(n=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}i.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===a.orderNo){e.next=20;break}i.orderNo=a.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}i.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===a.paymentInstrumentId){e.next=29;break}i.paymentInstrumentId=a.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===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updatePaymentInstrumentForOrder: ".concat(e))})),s=new iu("/organizations/{organizationId}/orders/{orderNo}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}i.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===a.orderNo){e.next=20;break}i.orderNo=a.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getPaymentMethodsForOrder: ".concat(e))})),s=new iu("/organizations/{organizationId}/orders/{orderNo}/payment-methods",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}i.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===a.orderNo){e.next=20;break}i.orderNo=a.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getTaxesFromOrder: ".concat(e))})),s=new iu("/organizations/{organizationId}/orders/{orderNo}/taxes",this.clientConfig.baseUri,{pathParams:i,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){pa(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}pa(ju,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-orders/{version}");var Mu=function(){function e(t){ua(this,e),pa(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,a;return fa(e,[{key:"getProducts",value:(a=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.select?o.select=n.select:void 0!==a.select&&(o.select=a.select),void 0===n.ids){e.next=18;break}o.ids=n.ids,e.next=23;break;case 18:if(void 0===a.ids){e.next=22;break}o.ids=a.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!==a.inventoryIds&&(o.inventoryIds=a.inventoryIds),void 0!==n.currency?o.currency=n.currency:void 0!==a.currency&&(o.currency=a.currency),void 0!==n.expand?o.expand=n.expand:void 0!==a.expand&&(o.expand=a.expand),void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),void 0!==n.allImages?o.allImages=n.allImages:void 0!==a.allImages&&(o.allImages=a.allImages),void 0!==n.perPricebook?o.perPricebook=n.perPricebook:void 0!==a.perPricebook&&(o.perPricebook=a.perPricebook),void 0===n.siteId){e.next=33;break}o.siteId=n.siteId,e.next=38;break;case 33:if(void 0===a.siteId){e.next=37;break}o.siteId=a.siteId,e.next=38;break;case 37:throw new Error("Missing required query parameter: siteId");case 38:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getProducts: ".concat(e))})),s=new iu("/organizations/{organizationId}/products",this.clientConfig.baseUri,{pathParams:i,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 a.apply(this,arguments)})},{key:"getProduct",value:(n=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.id){e.next=16;break}i.id=n.id,e.next=21;break;case 16:if(void 0===a.id){e.next=20;break}i.id=a.id,e.next=21;break;case 20:throw new Error("Missing required path parameter: id");case 21:if(o={},void 0!==n.select?o.select=n.select:void 0!==a.select&&(o.select=a.select),void 0!==n.inventoryIds?o.inventoryIds=n.inventoryIds:void 0!==a.inventoryIds&&(o.inventoryIds=a.inventoryIds),void 0!==n.currency?o.currency=n.currency:void 0!==a.currency&&(o.currency=a.currency),void 0!==n.expand?o.expand=n.expand:void 0!==a.expand&&(o.expand=a.expand),void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),void 0!==n.allImages?o.allImages=n.allImages:void 0!==a.allImages&&(o.allImages=a.allImages),void 0!==n.perPricebook?o.perPricebook=n.perPricebook:void 0!==a.perPricebook&&(o.perPricebook=a.perPricebook),void 0===n.siteId){e.next=33;break}o.siteId=n.siteId,e.next=38;break;case 33:if(void 0===a.siteId){e.next=37;break}o.siteId=a.siteId,e.next=38;break;case 37:throw new Error("Missing required query parameter: siteId");case 38:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getProduct: ".concat(e))})),s=new iu("/organizations/{organizationId}/products/{id}",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.ids){e.next=17;break}o.ids=n.ids,e.next=22;break;case 17:if(void 0===a.ids){e.next=21;break}o.ids=a.ids,e.next=22;break;case 21:throw new Error("Missing required query parameter: ids");case 22:if(void 0!==n.levels?o.levels=n.levels:void 0!==a.levels&&(o.levels=a.levels),void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),void 0===n.siteId){e.next=28;break}o.siteId=n.siteId,e.next=33;break;case 28:if(void 0===a.siteId){e.next=32;break}o.siteId=a.siteId,e.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getCategories: ".concat(e))})),s=new iu("/organizations/{organizationId}/categories",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.id){e.next=16;break}i.id=n.id,e.next=21;break;case 16:if(void 0===a.id){e.next=20;break}i.id=a.id,e.next=21;break;case 20:throw new Error("Missing required path parameter: id");case 21:if(o={},void 0!==n.levels?o.levels=n.levels:void 0!==a.levels&&(o.levels=a.levels),void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),void 0===n.siteId){e.next=28;break}o.siteId=n.siteId,e.next=33;break;case 28:if(void 0===a.siteId){e.next=32;break}o.siteId=a.siteId,e.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getCategory: ".concat(e))})),s=new iu("/organizations/{organizationId}/categories/{id}",this.clientConfig.baseUri,{pathParams:i,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){pa(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}pa(Mu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/product/shopper-products/{version}");var Au=function(){function e(t){ua(this,e),pa(this,"clientConfig",void 0);var r=_u({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t,r;return fa(e,[{key:"getPromotions",value:(r=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}o.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:if(void 0===n.ids){e.next=26;break}o.ids=n.ids,e.next=31;break;case 26:if(void 0===a.ids){e.next=30;break}o.ids=a.ids,e.next=31;break;case 30:throw new Error("Missing required query parameter: ids");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getPromotions: ".concat(e))})),s=new iu("/organizations/{organizationId}/promotions",this.clientConfig.baseUri,{pathParams:i,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=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.campaignId){e.next=16;break}i.campaignId=n.campaignId,e.next=21;break;case 16:if(void 0===a.campaignId){e.next=20;break}i.campaignId=a.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===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.startDate?o.startDate=n.startDate:void 0!==a.startDate&&(o.startDate=a.startDate),void 0!==n.endDate?o.endDate=n.endDate:void 0!==a.endDate&&(o.endDate=a.endDate),void 0!==n.currency?o.currency=n.currency:void 0!==a.currency&&(o.currency=a.currency),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getPromotionsForCampaign: ".concat(e))})),s=new iu("/organizations/{organizationId}/promotions/campaigns/{campaignId}",this.clientConfig.baseUri,{pathParams:i,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}();pa(Au,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/pricing/shopper-promotions/{version}");var Bu=TypeError,Uu=function(e,t){if(!delete e[t])throw Bu("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+)\./),Fu=!!Du&&+Du[1],Ju=[],Gu=x(Ju.sort),Hu=x(Ju.push),Vu=c((function(){Ju.sort(void 0)})),$u=c((function(){Ju.sort(null)})),Yu=Un("sort"),Ku=!c((function(){if(W)return W<70;if(!(Lu&&Lu>3)){if(Wu)return!0;if(Fu)return Fu<603;var e,t,r,n,a="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(n=0;n<47;n++)Ju.push({k:t+n,v:r})}for(Ju.sort((function(e,t){return t.v-e.v})),n=0;n<Ju.length;n++)t=Ju[n].k.charAt(0),a.charAt(a.length-1)!==t&&(a+=t);return"DGBEFHACIJK"!==a}}));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){pa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}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,a=[],i=pt(t);for(n=0;n<i;n++)n in t&&Hu(a,t[n]);for($i(a,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=a.length,n=0;n<r;)t[n]=a[n++];for(;n<i;)Uu(t,n++);return t}});var Zu=function(){function e(t){ua(this,e),pa(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 fa(e,[{key:"productSearch",value:(r=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.select?o.select=n.select:void 0!==a.select&&(o.select=a.select),void 0===n.siteId){e.next=18;break}o.siteId=n.siteId,e.next=23;break;case 18:if(void 0===a.siteId){e.next=22;break}o.siteId=a.siteId,e.next=23;break;case 22:throw new Error("Missing required query parameter: siteId");case 23:return void 0!==n.q?o.q=n.q:void 0!==a.q&&(o.q=a.q),void 0!==n.refine?o.refine=n.refine:void 0!==a.refine&&(o.refine=a.refine),void 0!==n.sort?o.sort=n.sort:void 0!==a.sort&&(o.sort=a.sort),void 0!==n.currency?o.currency=n.currency:void 0!==a.currency&&(o.currency=a.currency),void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),void 0!==n.expand?o.expand=n.expand:void 0!==a.expand&&(o.expand=a.expand),void 0!==n.allImages?o.allImages=n.allImages:void 0!==a.allImages&&(o.allImages=a.allImages),void 0!==n.perPricebook?o.perPricebook=n.perPricebook:void 0!==a.perPricebook&&(o.perPricebook=a.perPricebook),void 0!==n.allVariationProperties?o.allVariationProperties=n.allVariationProperties:void 0!==a.allVariationProperties&&(o.allVariationProperties=a.allVariationProperties),void 0!==n.offset?o.offset=n.offset:void 0!==a.offset&&(o.offset=a.offset),void 0!==n.limit?o.limit=n.limit:void 0!==a.limit&&(o.limit=a.limit),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for productSearch: ".concat(e))})),s=new iu("/organizations/{organizationId}/product-search",this.clientConfig.baseUri,{pathParams:i,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,t){return r.apply(this,arguments)})},{key:"getSearchSuggestions",value:(t=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}o.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:if(void 0===n.q){e.next=26;break}o.q=n.q,e.next=31;break;case 26:if(void 0===a.q){e.next=30;break}o.q=a.q,e.next=31;break;case 30:throw new Error("Missing required query parameter: q");case 31:return void 0!==n.limit?o.limit=n.limit:void 0!==a.limit&&(o.limit=a.limit),void 0!==n.currency?o.currency=n.currency:void 0!==a.currency&&(o.currency=a.currency),void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getSearchSuggestions: ".concat(e))})),s=new iu("/organizations/{organizationId}/search-suggestions",this.clientConfig.baseUri,{pathParams:i,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}();function eh(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 th(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?eh(Object(r),!0).forEach((function(t){pa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eh(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}pa(Zu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/search/shopper-search/{version}/");var rh=function(){function e(t){ua(this,e),pa(this,"clientConfig",void 0);var r=th({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new No(r)}var t;return fa(e,[{key:"getUrlMapping",value:(t=da(Na.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.urlSegment){e.next=17;break}o.urlSegment=n.urlSegment,e.next=22;break;case 17:if(void 0===a.urlSegment){e.next=21;break}o.urlSegment=a.urlSegment,e.next=22;break;case 21:throw new Error("Missing required query parameter: urlSegment");case 22:if(void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getUrlMapping: ".concat(e))})),s=new iu("/organizations/{organizationId}/url-mapping",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=th(th({},this.clientConfig.headers),null==t?void 0:t.headers),Wo||(c["user-agent"]=[c["user-agent"],ou].join(" ")),d=th(th({},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,r){return t.apply(this,arguments)})}]),e}();pa(rh,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/site/shopper-seo/{version}");var nh=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),a=Gt(e),i=r(t,n,a);if(i.done)return i.value;var o=n.lastIndex;nh(o,0)||(n.lastIndex=0);var s=nc(n,a);return nh(n.lastIndex,o)||(n.lastIndex=o),null===s?-1:s.index}]}));var ah=le("iterator"),ih=!1;try{var oh=0,sh={next:function(){return{done:!!oh++}},return:function(){ih=!0}};sh[ah]=function(){return this},Array.from(sh,(function(){throw 2}))}catch(e){}var ch,dh,uh,hh=function(e,t){if(!t&&!ih)return!1;var r=!1;try{var n={};n[ah]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r},fh="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView,ph=Te.f,lh=tt.enforce,gh=tt.get,bh=s.Int8Array,vh=bh&&bh.prototype,Ih=s.Uint8ClampedArray,mh=Ih&&Ih.prototype,kh=bh&&Xa(bh),xh=vh&&Xa(vh),yh=Object.prototype,wh=s.TypeError,Ch=le("toStringTag"),Oh=de("TYPED_ARRAY_TAG"),zh=fh&&!!si&&"Opera"!==Ft(s.opera),Ph=!1,Eh={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},qh={BigInt64Array:8,BigUint64Array:8},jh=function(e){var t=Xa(e);if(T(t)){var r=gh(t);return r&&ie(r,"TypedArrayConstructor")?r.TypedArrayConstructor:jh(t)}},Sh=function(e){if(!T(e))return!1;var t=Ft(e);return ie(Eh,t)||ie(qh,t)};for(ch in Eh)(uh=(dh=s[ch])&&dh.prototype)?lh(uh).TypedArrayConstructor=dh:zh=!1;for(ch in qh)(uh=(dh=s[ch])&&dh.prototype)&&(lh(uh).TypedArrayConstructor=dh);if((!zh||!S(kh)||kh===Function.prototype)&&(kh=function(){throw wh("Incorrect invocation")},zh))for(ch in Eh)s[ch]&&si(s[ch],kh);if((!zh||!xh||xh===yh)&&(xh=kh.prototype,zh))for(ch in Eh)s[ch]&&si(s[ch].prototype,xh);if(zh&&Xa(mh)!==xh&&si(mh,xh),d&&!ie(xh,Ch))for(ch in Ph=!0,ph(xh,Ch,{get:function(){return T(this)?this[Oh]:void 0}}),Eh)s[ch]&&Me(s[ch],Oh,ch);var Th={NATIVE_ARRAY_BUFFER_VIEWS:zh,TYPED_ARRAY_TAG:Ph&&Oh,aTypedArray:function(e){if(Sh(e))return e;throw wh("Target is not a typed array")},aTypedArrayConstructor:function(e){if(S(e)&&(!si||_(kh,e)))return e;throw wh(V(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,r,n){if(d){if(r)for(var a in Eh){var i=s[a];if(i&&ie(i.prototype,e))try{delete i.prototype[e]}catch(r){try{i.prototype[e]=t}catch(e){}}}xh[e]&&!r||nt(xh,e,r?t:zh&&vh[e]||t,n)}},exportTypedArrayStaticMethod:function(e,t,r){var n,a;if(d){if(si){if(r)for(n in Eh)if((a=s[n])&&ie(a,e))try{delete a[e]}catch(e){}if(kh[e]&&!r)return;try{return nt(kh,e,r?t:zh&&kh[e]||t)}catch(e){}}for(n in Eh)!(a=s[n])||a[e]&&!r||nt(a,e,t)}},getTypedArrayConstructor:jh,isView:function(e){if(!T(e))return!1;var t=Ft(e);return"DataView"===t||ie(Eh,t)||ie(qh,t)},isTypedArray:Sh,TypedArray:kh,TypedArrayPrototype:xh},Mh=Th.NATIVE_ARRAY_BUFFER_VIEWS,Rh=s.ArrayBuffer,_h=s.Int8Array,Ah=!Mh||!c((function(){_h(1)}))||!c((function(){new _h(-1)}))||!hh((function(e){new _h,new _h(null),new _h(1.5),new _h(e)}),!0)||c((function(){return 1!==new _h(new Rh(2),1,void 0).length})),Bh=RangeError,Uh=function(e){if(void 0===e)return 0;var t=st(e),r=ft(t);if(t!==r)throw Bh("Wrong length or index");return r},Nh=Array,Lh=Math.abs,Wh=Math.pow,Dh=Math.floor,Fh=Math.log,Jh=Math.LN2,Gh=function(e,t,r){var n,a,i,o=Nh(r),s=8*r-t-1,c=(1<<s)-1,d=c>>1,u=23===t?Wh(2,-24)-Wh(2,-77):0,h=e<0||0===e&&1/e<0?1:0,f=0;for((e=Lh(e))!=e||e===1/0?(a=e!=e?1:0,n=c):(n=Dh(Fh(e)/Jh),e*(i=Wh(2,-n))<1&&(n--,i*=2),(e+=n+d>=1?u/i:u*Wh(2,1-d))*i>=2&&(n++,i/=2),n+d>=c?(a=0,n=c):n+d>=1?(a=(e*i-1)*Wh(2,t),n+=d):(a=e*Wh(2,d-1)*Wh(2,t),n=0));t>=8;)o[f++]=255&a,a/=256,t-=8;for(n=n<<t|a,s+=t;s>0;)o[f++]=255&n,n/=256,s-=8;return o[--f]|=128*h,o},Hh=function(e,t){var r,n=e.length,a=8*n-t-1,i=(1<<a)-1,o=i>>1,s=a-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===i)return r?NaN:d?-1/0:1/0;r+=Wh(2,t),u-=o}return(d?-1:1)*r*Wh(2,u-t)},Vh=function(e){for(var t=ne(this),r=pt(t),n=arguments.length,a=ut(n>1?arguments[1]:void 0,r),i=n>2?arguments[2]:void 0,o=void 0===i?r:ut(i,r);o>a;)t[a++]=e;return t},$h=xt.f,Yh=Te.f,Kh=Be.PROPER,Qh=Be.CONFIGURABLE,Xh=tt.get,Zh=tt.set,ef=s.ArrayBuffer,tf=ef,rf=tf&&tf.prototype,nf=s.DataView,af=nf&&nf.prototype,of=Object.prototype,sf=s.Array,cf=s.RangeError,df=x(Vh),uf=x([].reverse),hf=Gh,ff=Hh,pf=function(e){return[255&e]},lf=function(e){return[255&e,e>>8&255]},gf=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},bf=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},vf=function(e){return hf(e,23,4)},If=function(e){return hf(e,52,8)},mf=function(e,t){Yh(e.prototype,t,{get:function(){return Xh(this)[t]}})},kf=function(e,t,r,n){var a=Uh(r),i=Xh(e);if(a+t>i.byteLength)throw cf("Wrong index");var o=Xh(i.buffer).bytes,s=a+i.byteOffset,c=nr(o,s,s+t);return n?c:uf(c)},xf=function(e,t,r,n,a,i){var o=Uh(r),s=Xh(e);if(o+t>s.byteLength)throw cf("Wrong index");for(var c=Xh(s.buffer).bytes,d=o+s.byteOffset,u=n(+a),h=0;h<t;h++)c[d+h]=u[i?h:t-h-1]};if(fh){var yf=Kh&&"ArrayBuffer"!==ef.name;if(c((function(){ef(1)}))&&c((function(){new ef(-1)}))&&!c((function(){return new ef,new ef(1.5),new ef(NaN),yf&&!Qh})))yf&&Qh&&Me(ef,"name","ArrayBuffer");else{(tf=function(e){return Bi(this,rf),new ef(Uh(e))}).prototype=rf;for(var wf,Cf=$h(ef),Of=0;Cf.length>Of;)(wf=Cf[Of++])in tf||Me(tf,wf,ef[wf]);rf.constructor=tf}si&&Xa(af)!==of&&si(af,of);var zf=new nf(new tf(2)),Pf=x(af.setInt8);zf.setInt8(0,2147483648),zf.setInt8(1,2147483649),!zf.getInt8(0)&&zf.getInt8(1)||_i(af,{setInt8:function(e,t){Pf(this,e,t<<24>>24)},setUint8:function(e,t){Pf(this,e,t<<24>>24)}},{unsafe:!0})}else rf=(tf=function(e){Bi(this,rf);var t=Uh(e);Zh(this,{bytes:df(sf(t),0),byteLength:t}),d||(this.byteLength=t)}).prototype,af=(nf=function(e,t,r){Bi(this,af),Bi(e,rf);var n=Xh(e).byteLength,a=st(t);if(a<0||a>n)throw cf("Wrong offset");if(a+(r=void 0===r?n-a:ft(r))>n)throw cf("Wrong length");Zh(this,{buffer:e,byteLength:r,byteOffset:a}),d||(this.buffer=e,this.byteLength=r,this.byteOffset=a)}).prototype,d&&(mf(tf,"byteLength"),mf(nf,"buffer"),mf(nf,"byteLength"),mf(nf,"byteOffset")),_i(af,{getInt8:function(e){return kf(this,1,e)[0]<<24>>24},getUint8:function(e){return kf(this,1,e)[0]},getInt16:function(e){var t=kf(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=kf(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return bf(kf(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return bf(kf(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return ff(kf(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return ff(kf(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){xf(this,1,e,pf,t)},setUint8:function(e,t){xf(this,1,e,pf,t)},setInt16:function(e,t){xf(this,2,e,lf,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){xf(this,2,e,lf,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){xf(this,4,e,gf,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){xf(this,4,e,gf,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){xf(this,4,e,vf,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){xf(this,8,e,If,t,arguments.length>2?arguments[2]:void 0)}});fr(tf,"ArrayBuffer"),fr(nf,"DataView");var Ef={ArrayBuffer:tf,DataView:nf},qf=Math.floor,jf=Number.isInteger||function(e){return!T(e)&&isFinite(e)&&qf(e)===e},Sf=RangeError,Tf=RangeError,Mf=function(e,t){var r=function(e){var t=st(e);if(t<0)throw Sf("The argument can't be less than 0");return t}(e);if(r%t)throw Tf("Wrong offset");return r},Rf=Th.aTypedArrayConstructor,_f=function(e){var t,r,n,a,i,o,s=Zo(this),c=ne(e),d=arguments.length,u=d>1?arguments[1]:void 0,h=void 0!==u,p=Ni(c);if(p&&!wc(p))for(o=(i=Wi(c,p)).next,c=[];!(a=f(o,i)).done;)c.push(a.value);for(h&&d>2&&(u=lr(u,arguments[2])),r=pt(c),n=new(Rf(s))(r),t=0;r>t;t++)n[t]=h?u(c[t],t):c[t];return n},Af=le("species"),Bf=function(e){var t=R(e),r=Te.f;d&&t&&!t[Af]&&r(t,Af,{configurable:!0,get:function(){return this}})};n((function(e){var t=xt.f,r=jr.forEach,n=tt.get,a=tt.set,i=tt.enforce,o=Te.f,c=Ce.f,u=Math.round,h=s.RangeError,p=Ef.ArrayBuffer,l=p.prototype,g=Ef.DataView,v=Th.NATIVE_ARRAY_BUFFER_VIEWS,I=Th.TYPED_ARRAY_TAG,m=Th.TypedArray,k=Th.TypedArrayPrototype,x=Th.aTypedArrayConstructor,y=Th.isTypedArray,w=function(e,t){x(e);for(var r=0,n=t.length,a=new e(n);n>r;)a[r]=t[r++];return a},C=function(e,t){o(e,t,{get:function(){return n(this)[t]}})},O=function(e){var t;return _(l,e)||"ArrayBuffer"==(t=Ft(e))||"SharedArrayBuffer"==t},z=function(e,t){return y(e)&&!G(t)&&t in e&&jf(+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)&&ie(r,"value"))||ie(r,"get")||ie(r,"set")||r.configurable||ie(r,"writable")&&!r.writable||ie(r,"enumerable")&&!r.enumerable?o(e,t,r):(e[t]=r.value,e)};d?(v||(Ce.f=P,Te.f=E,C(k,"buffer"),C(k,"byteOffset"),C(k,"byteLength"),C(k,"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 a=n(e);d&&(r=(r=u(r))<0?0:r>255?255:255&r),a.view[C](t*l+a.byteOffset,r,!0)}(this,t,e)},enumerable:!0})};v?Ah&&(P=c((function(e,t,r,n){return Bi(e,E),function(e,t,r){var n,a;return si&&S(n=t.constructor)&&n!==r&&T(a=n.prototype)&&a!==r.prototype&&si(e,a),e}(T(t)?O(t)?void 0!==n?new z(t,Mf(r,l),n):void 0!==r?new z(t,Mf(r,l)):new z(t):y(t)?w(P,t):f(_f,P,t):new z(Uh(t)),e,P)})),si&&si(P,m),r(t(z),(function(e){e in P||Me(P,e,z[e])})),P.prototype=E):(P=c((function(e,t,r,n){Bi(e,E);var i,o,s,c=0,d=0;if(T(t)){if(!O(t))return y(t)?w(P,t):f(_f,P,t);i=t,d=Mf(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=Uh(t),i=new p(o=s*l);for(a(e,{buffer:i,byteOffset:d,byteLength:o,length:s,view:new g(i)});c<s;)j(e,c++)})),si&&si(P,m),E=P.prototype=Zt(k)),E.constructor!==P&&Me(E,"constructor",P),i(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),Bf(b)}):e.exports=function(){}}))("Uint8",(function(e){return function(t,r,n){return e(this,t,r,n)}}));var Uf=Math.min,Nf=x([].copyWithin||function(e,t){var r=ne(this),n=pt(r),a=ut(e,n),i=ut(t,n),o=arguments.length>2?arguments[2]:void 0,s=Uf((void 0===o?n:ut(o,n))-i,n-a),c=1;for(i<a&&a<i+s&&(c=-1,i+=s-1,a+=s-1);s-- >0;)i in r?r[a]=r[i]:Uu(r,a),a+=c,i+=c;return r}),Lf=Th.aTypedArray;(0,Th.exportTypedArrayMethod)("copyWithin",(function(e,t){return Nf(Lf(this),e,t,arguments.length>2?arguments[2]:void 0)}));var Wf=jr.every,Df=Th.aTypedArray;(0,Th.exportTypedArrayMethod)("every",(function(e){return Wf(Df(this),e,arguments.length>1?arguments[1]:void 0)}));var Ff=TypeError,Jf=function(e){var t=ve(e,"number");if("number"==typeof t)throw Ff("Can't convert number to bigint");return BigInt(t)},Gf=Th.aTypedArray,Hf=Th.exportTypedArrayMethod,Vf=x("".slice);Hf("fill",(function(e){var t=arguments.length;Gf(this);var r="Big"===Vf(Ft(this),0,3)?Jf(e):+e;return f(Vh,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 $f=le("species"),Yf=function(e,t){var r,n=Ee(e).constructor;return void 0===n||null==(r=Ee(n)[$f])?t:Zo(r)},Kf=Th.aTypedArrayConstructor,Qf=Th.getTypedArrayConstructor,Xf=function(e){return Kf(Yf(e,Qf(e)))},Zf=function(e,t){return function(e,t){for(var r=0,n=pt(t),a=new e(n);n>r;)a[r]=t[r++];return a}(Xf(e),t)},ep=jr.filter,tp=Th.aTypedArray;(0,Th.exportTypedArrayMethod)("filter",(function(e){var t=ep(tp(this),e,arguments.length>1?arguments[1]:void 0);return Zf(this,t)}));var rp=jr.find,np=Th.aTypedArray;(0,Th.exportTypedArrayMethod)("find",(function(e){return rp(np(this),e,arguments.length>1?arguments[1]:void 0)}));var ap=jr.findIndex,ip=Th.aTypedArray;(0,Th.exportTypedArrayMethod)("findIndex",(function(e){return ap(ip(this),e,arguments.length>1?arguments[1]:void 0)}));var op=jr.forEach,sp=Th.aTypedArray;(0,Th.exportTypedArrayMethod)("forEach",(function(e){op(sp(this),e,arguments.length>1?arguments[1]:void 0)}));var cp=gt.includes,dp=Th.aTypedArray;(0,Th.exportTypedArrayMethod)("includes",(function(e){return cp(dp(this),e,arguments.length>1?arguments[1]:void 0)}));var up=gt.indexOf,hp=Th.aTypedArray;(0,Th.exportTypedArrayMethod)("indexOf",(function(e){return up(hp(this),e,arguments.length>1?arguments[1]:void 0)}));var fp=le("iterator"),pp=s.Uint8Array,lp=x(Ii.values),gp=x(Ii.keys),bp=x(Ii.entries),vp=Th.aTypedArray,Ip=Th.exportTypedArrayMethod,mp=pp&&pp.prototype,kp=!c((function(){mp[fp].call([1])})),xp=!!mp&&mp.values&&mp[fp]===mp.values&&"values"===mp.values.name,yp=function(){return lp(vp(this))};Ip("entries",(function(){return bp(vp(this))}),kp),Ip("keys",(function(){return gp(vp(this))}),kp),Ip("values",yp,kp||!xp,{name:"values"}),Ip(fp,yp,kp||!xp,{name:"values"});var wp=Th.aTypedArray,Cp=Th.exportTypedArrayMethod,Op=x([].join);Cp("join",(function(e){return Op(wp(this),e)}));var zp=Math.min,Pp=[].lastIndexOf,Ep=!!Pp&&1/[1].lastIndexOf(1,-0)<0,qp=Un("lastIndexOf"),jp=Ep||!qp?function(e){if(Ep)return hn(Pp,this,arguments)||0;var t=j(this),r=pt(t),n=r-1;for(arguments.length>1&&(n=zp(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,Sp=Th.aTypedArray;(0,Th.exportTypedArrayMethod)("lastIndexOf",(function(e){var t=arguments.length;return hn(jp,Sp(this),t>1?[e,arguments[1]]:[e])}));var Tp=jr.map,Mp=Th.aTypedArray;(0,Th.exportTypedArrayMethod)("map",(function(e){return Tp(Mp(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new(Xf(e))(t)}))}));var Rp=TypeError,_p=function(e){return function(t,r,n,a){Y(r);var i=ne(t),o=P(i),s=pt(i),c=e?s-1:0,d=e?-1:1;if(n<2)for(;;){if(c in o){a=o[c],c+=d;break}if(c+=d,e?c<0:s<=c)throw Rp("Reduce of empty array with no initial value")}for(;e?c>=0:s>c;c+=d)c in o&&(a=r(a,o[c],c,i));return a}},Ap={left:_p(!1),right:_p(!0)},Bp=Ap.left,Up=Th.aTypedArray;(0,Th.exportTypedArrayMethod)("reduce",(function(e){var t=arguments.length;return Bp(Up(this),e,t,t>1?arguments[1]:void 0)}));var Np=Ap.right,Lp=Th.aTypedArray;(0,Th.exportTypedArrayMethod)("reduceRight",(function(e){var t=arguments.length;return Np(Lp(this),e,t,t>1?arguments[1]:void 0)}));var Wp=Th.aTypedArray,Dp=Th.exportTypedArrayMethod,Fp=Math.floor;Dp("reverse",(function(){for(var e,t=Wp(this).length,r=Fp(t/2),n=0;n<r;)e=this[n],this[n++]=this[--t],this[t]=e;return this}));var Jp=s.RangeError,Gp=s.Int8Array,Hp=Gp&&Gp.prototype,Vp=Hp&&Hp.set,$p=Th.aTypedArray,Yp=Th.exportTypedArrayMethod,Kp=!c((function(){var e=new Uint8ClampedArray(2);return f(Vp,e,{length:1,0:3},1),3!==e[1]})),Qp=Kp&&Th.NATIVE_ARRAY_BUFFER_VIEWS&&c((function(){var e=new Gp(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}));Yp("set",(function(e){$p(this);var t=Mf(arguments.length>1?arguments[1]:void 0,1),r=ne(e);if(Kp)return f(Vp,this,r,t);var n=this.length,a=pt(r),i=0;if(a+t>n)throw Jp("Wrong length");for(;i<a;)this[t+i]=r[i++]}),!Kp||Qp);var Xp=Th.aTypedArray;(0,Th.exportTypedArrayMethod)("slice",(function(e,t){for(var r=fn(Xp(this),e,t),n=Xf(this),a=0,i=r.length,o=new n(i);i>a;)o[a]=r[a++];return o}),c((function(){new Int8Array(1).slice()})));var Zp=jr.some,el=Th.aTypedArray;(0,Th.exportTypedArrayMethod)("some",(function(e){return Zp(el(this),e,arguments.length>1?arguments[1]:void 0)}));var tl=Th.aTypedArray,rl=Th.exportTypedArrayMethod,nl=s.Uint16Array,al=nl&&x(nl.prototype.sort),il=!(!al||c((function(){al(new nl(2),null)}))&&c((function(){al(new nl(2),{})}))),ol=!!al&&!c((function(){if(W)return W<74;if(Lu)return Lu<67;if(Wu)return!0;if(Fu)return Fu<602;var e,t,r=new nl(516),n=Array(516);for(e=0;e<516;e++)t=e%4,r[e]=515-e,n[e]=e-2*t+3;for(al(r,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(r[e]!==n[e])return!0}));rl("sort",(function(e){return void 0!==e&&Y(e),ol?al(this,e):$i(tl(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))}),!ol||il);var sl=s.Int8Array,cl=Th.aTypedArray,dl=Th.exportTypedArrayMethod,ul=[].toLocaleString,hl=!!sl&&c((function(){ul.call(new sl(1))}));dl("toLocaleString",(function(){return hn(ul,hl?fn(cl(this)):cl(this),fn(arguments))}),c((function(){return[1,2].toLocaleString()!=new sl([1,2]).toLocaleString()}))||!c((function(){sl.prototype.toLocaleString.call([1,2])})));var fl=Th.exportTypedArrayMethod,pl=s.Uint8Array,ll=pl&&pl.prototype||{},gl=[].toString,bl=x([].join);c((function(){gl.call({})}))&&(gl=function(){return bl(this)});var vl=ll.toString!=gl;fl("toString",gl,vl);var Il,ml,kl,xl,yl="process"==C(s.process),wl=/(?:ipad|iphone|ipod).*applewebkit/i.test(A),Cl=s.setImmediate,Ol=s.clearImmediate,zl=s.process,Pl=s.Dispatch,El=s.Function,ql=s.MessageChannel,jl=s.String,Sl=0,Tl={};try{Il=s.location}catch(e){}var Ml=function(e){if(ie(Tl,e)){var t=Tl[e];delete Tl[e],t()}},Rl=function(e){return function(){Ml(e)}},_l=function(e){Ml(e.data)},Al=function(e){s.postMessage(jl(e),Il.protocol+"//"+Il.host)};Cl&&Ol||(Cl=function(e){Fi(arguments.length,1);var t=S(e)?e:El(e),r=fn(arguments,1);return Tl[++Sl]=function(){hn(t,void 0,r)},ml(Sl),Sl},Ol=function(e){delete Tl[e]},yl?ml=function(e){zl.nextTick(Rl(e))}:Pl&&Pl.now?ml=function(e){Pl.now(Rl(e))}:ql&&!wl?(xl=(kl=new ql).port2,kl.port1.onmessage=_l,ml=lr(xl.postMessage,xl)):s.addEventListener&&S(s.postMessage)&&!s.importScripts&&Il&&"file:"!==Il.protocol&&!c(Al)?(ml=Al,s.addEventListener("message",_l,!1)):ml="onreadystatechange"in xe("script")?function(e){Vt.appendChild(xe("script")).onreadystatechange=function(){Vt.removeChild(this),Ml(e)}}:function(e){setTimeout(Rl(e),0)});var Bl,Ul,Nl,Ll,Wl,Dl,Fl,Jl,Gl={set:Cl,clear:Ol},Hl=/ipad|iphone|ipod/i.test(A)&&void 0!==s.Pebble,Vl=/web0s(?!.*chrome)/i.test(A),$l=Ce.f,Yl=Gl.set,Kl=s.MutationObserver||s.WebKitMutationObserver,Ql=s.document,Xl=s.process,Zl=s.Promise,eg=$l(s,"queueMicrotask"),tg=eg&&eg.value;tg||(Bl=function(){var e,t;for(yl&&(e=Xl.domain)&&e.exit();Ul;){t=Ul.fn,Ul=Ul.next;try{t()}catch(e){throw Ul?Ll():Nl=void 0,e}}Nl=void 0,e&&e.enter()},wl||yl||Vl||!Kl||!Ql?!Hl&&Zl&&Zl.resolve?((Fl=Zl.resolve(void 0)).constructor=Zl,Jl=lr(Fl.then,Fl),Ll=function(){Jl(Bl)}):yl?Ll=function(){Xl.nextTick(Bl)}:(Yl=lr(Yl,s),Ll=function(){Yl(Bl)}):(Wl=!0,Dl=Ql.createTextNode(""),new Kl(Bl).observe(Dl,{characterData:!0}),Ll=function(){Dl.data=Wl=!Wl}));var rg=tg||function(e){var t={fn:e,next:void 0};Nl&&(Nl.next=t),Ul||(Ul=t,Ll()),Nl=t},ng=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},ag=function(){this.head=null,this.tail=null};ag.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 ig=ag,og=s.Promise,sg="object"==typeof window&&"object"!=typeof Deno;og&&og.prototype;var cg,dg,ug,hg=le("species"),fg=!1,pg=S(s.PromiseRejectionEvent),lg={CONSTRUCTOR:Tt("Promise",(function(){var e=De(og),t=e!==String(og);if(!t&&66===W)return!0;if(W>=51&&/native code/.test(e))return!1;var r=new og((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};return(r.constructor={})[hg]=n,!(fg=r.then((function(){}))instanceof n)||!t&&sg&&!pg})),REJECTION_EVENT:pg,SUBCLASSING:fg},gg=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)},bg={f:function(e){return new gg(e)}},vg=Gl.set,Ig=lg.CONSTRUCTOR,mg=lg.REJECTION_EVENT,kg=lg.SUBCLASSING,xg=tt.getterFor("Promise"),yg=tt.set,wg=og&&og.prototype,Cg=og,Og=wg,zg=s.TypeError,Pg=s.document,Eg=s.process,qg=bg.f,jg=qg,Sg=!!(Pg&&Pg.createEvent&&s.dispatchEvent),Tg=function(e){var t;return!(!T(e)||!S(t=e.then))&&t},Mg=function(e,t){var r,n,a,i=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&&Ug(t),t.rejection=1),!0===s?r=i:(u&&u.enter(),r=s(i),u&&(u.exit(),a=!0)),r===e.promise?d(zg("Promise-chain cycle")):(n=Tg(r))?f(n,r,c,d):c(r)):d(i)}catch(e){u&&!a&&u.exit(),d(e)}},Rg=function(e,t){e.notified||(e.notified=!0,rg((function(){for(var r,n=e.reactions;r=n.get();)Mg(r,e);e.notified=!1,t&&!e.rejection&&Ag(e)})))},_g=function(e,t,r){var n,a;Sg?((n=Pg.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),s.dispatchEvent(n)):n={promise:t,reason:r},!mg&&(a=s["on"+e])?a(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)},Ag=function(e){f(vg,s,(function(){var t,r=e.facade,n=e.value;if(Bg(e)&&(t=ng((function(){yl?Eg.emit("unhandledRejection",n,r):_g("unhandledrejection",r,n)})),e.rejection=yl||Bg(e)?2:1,t.error))throw t.value}))},Bg=function(e){return 1!==e.rejection&&!e.parent},Ug=function(e){f(vg,s,(function(){var t=e.facade;yl?Eg.emit("rejectionHandled",t):_g("rejectionhandled",t,e.value)}))},Ng=function(e,t,r){return function(n){e(t,n,r)}},Lg=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,Rg(e,!0))},Wg=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw zg("Promise can't be resolved itself");var n=Tg(t);n?rg((function(){var r={done:!1};try{f(n,t,Ng(Wg,r,e),Ng(Lg,r,e))}catch(t){Lg(r,t,e)}})):(e.value=t,e.state=1,Rg(e,!1))}catch(t){Lg({done:!1},t,e)}}};if(Ig&&(Og=(Cg=function(e){Bi(this,Og),Y(e),f(cg,this);var t=xg(this);try{e(Ng(Wg,t),Ng(Lg,t))}catch(e){Lg(t,e)}}).prototype,(cg=function(e){yg(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:new ig,rejection:!1,state:0,value:void 0})}).prototype=nt(Og,"then",(function(e,t){var r=xg(this),n=qg(Yf(this,Cg));return r.parent=!0,n.ok=!S(e)||e,n.fail=S(t)&&t,n.domain=yl?Eg.domain:void 0,0==r.state?r.reactions.add(n):rg((function(){Mg(n,r)})),n.promise})),dg=function(){var e=new cg,t=xg(e);this.promise=e,this.resolve=Ng(Wg,t),this.reject=Ng(Lg,t)},bg.f=qg=function(e){return e===Cg||void 0===e?new dg(e):jg(e)},S(og)&&wg!==Object.prototype)){ug=wg.then,kg||nt(wg,"then",(function(e,t){var r=this;return new Cg((function(e,t){f(ug,r,e,t)})).then(e,t)}),{unsafe:!0});try{delete wg.constructor}catch(e){}si&&si(wg,Og)}Rt({global:!0,constructor:!0,wrap:!0,forced:Ig},{Promise:Cg}),fr(Cg,"Promise",!1),Bf("Promise");var Dg=TypeError,Fg=function(e,t){this.stopped=e,this.result=t},Jg=Fg.prototype,Gg=function(e,t,r){var n,a,i,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&&mc(n,"normal",e),new Fg(!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(!(a=Ni(e)))throw Dg(V(e)+" is not iterable");if(wc(a)){for(i=0,o=pt(e);o>i;i++)if((s=I(e[i]))&&_(Jg,s))return s;return new Fg(!1)}n=Wi(e,a)}for(c=p?e.next:n.next;!(d=f(c,n)).done;){try{s=I(d.value)}catch(e){mc(n,"throw",e)}if("object"==typeof s&&s&&_(Jg,s))return s}return new Fg(!1)},Hg=lg.CONSTRUCTOR||!hh((function(e){og.all(e).then(void 0,(function(){}))}));Rt({target:"Promise",stat:!0,forced:Hg},{all:function(e){var t=this,r=bg.f(t),n=r.resolve,a=r.reject,i=ng((function(){var r=Y(t.resolve),i=[],o=0,s=1;Gg(e,(function(e){var c=o++,d=!1;s++,f(r,t,e).then((function(e){d||(d=!0,i[c]=e,--s||n(i))}),a)})),--s||n(i)}));return i.error&&a(i.value),r.promise}});var Vg=lg.CONSTRUCTOR,$g=og&&og.prototype;if(Rt({target:"Promise",proto:!0,forced:Vg,real:!0},{catch:function(e){return this.then(void 0,e)}}),S(og)){var Yg=R("Promise").prototype.catch;$g.catch!==Yg&&nt($g,"catch",Yg,{unsafe:!0})}Rt({target:"Promise",stat:!0,forced:Hg},{race:function(e){var t=this,r=bg.f(t),n=r.reject,a=ng((function(){var a=Y(t.resolve);Gg(e,(function(e){f(a,t,e).then(r.resolve,n)}))}));return a.error&&n(a.value),r.promise}}),Rt({target:"Promise",stat:!0,forced:lg.CONSTRUCTOR},{reject:function(e){var t=bg.f(this);return f(t.reject,void 0,e),t.promise}});var Kg=lg.CONSTRUCTOR;function Qg(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 Xg(e){return function(e){if(Array.isArray(e))return Qg(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 Qg(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)?Qg(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 Zg(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 eb(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Zg(Object(r),!0).forEach((function(t){pa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zg(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}R("Promise"),Rt({target:"Promise",stat:!0,forced:Kg},{resolve:function(e){return function(e,t){if(Ee(e),T(t)&&t.constructor===e)return t;var r=bg.f(e);return(0,r.resolve)(t),r.promise}(this,e)}}),Rt({target:"Object",stat:!0},{fromEntries:function(e){var t={};return Gg(e,(function(e,r){er(t,e,r)}),{AS_ENTRIES:!0}),t}});var tb=Wo?btoa:function(e){return Buffer.from(e).toString("base64")},rb=function(e){var t,r,n=new URL(e),a=new URLSearchParams(n.search),i=null!==(t=a.get("usid"))&&void 0!==t?t:"";return{code:null!==(r=a.get("code"))&&void 0!==r?r:"",usid:i}},nb=function(){return t.nanoid(128)},ab=function(){var e=da(Na.mark((function e(t){var r,n,a,i,o,s,c;return Na.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 a=new TextEncoder,i=a.encode(t),e.next=7,window.crypto.subtle.digest("SHA-256",i);case 7:o=e.sent,s=btoa(String.fromCharCode.apply(String,Xg(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 ib(e,t,r){return ob.apply(this,arguments)}function ob(){return(ob=da(Na.mark((function e(t,r,n){var a,i,o,s,c,d,u,h;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ab(r);case 2:return i=e.sent,(o=new Pu(t.clientConfig)).clientConfig.fetchOptions=eb(eb({},t.clientConfig.fetchOptions),{},{redirect:Wo?"follow":"manual"}),s={parameters:eb(eb({client_id:t.clientConfig.parameters.clientId,channel_id:t.clientConfig.parameters.siteId,code_challenge:i},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===(a=c.headers)||void 0===a?void 0:a.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",eb({url:d},rb(d)));case 15:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function sb(){return(sb=da(Na.mark((function e(t,r,n){var a,i;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a="Basic ".concat(tb("".concat(t.clientConfig.parameters.clientId,":").concat(n.clientSecret))),i={headers:{Authorization:a},body:eb({grant_type:"client_credentials"},r.usid&&{usid:r.usid})},e.abrupt("return",t.getAccessToken(i));case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function cb(){return(cb=da(Na.mark((function e(t,r){var n,a,i;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=nb(),e.next=3,ib(t,n,eb({redirectURI:r.redirectURI,hint:"guest"},r.usid&&{usid:r.usid}));case 3:return a=e.sent,i={client_id:t.clientConfig.parameters.clientId,channel_id:t.clientConfig.parameters.siteId,code:a.code,code_verifier:n,grant_type:"authorization_code_pkce",redirect_uri:r.redirectURI,usid:a.usid},e.abrupt("return",t.getAccessToken({body:i}));case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function db(){return(db=da(Na.mark((function e(t,r,n){var a,i,o,s,c,d,u,h,f,p,l,g,b,v;return Na.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=nb(),e.next=3,ab(i);case 3:return o=e.sent,(s=new Pu(t.clientConfig)).clientConfig.fetchOptions=eb(eb({},t.clientConfig.fetchOptions),{},{redirect:Wo?"follow":"manual"}),c="Basic ".concat(tb("".concat(r.username,":").concat(r.password))),d={headers:{Authorization:c},parameters:{organizationId:t.clientConfig.parameters.organizationId},body:eb({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===(a=u.headers)||void 0===a?void 0:a.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=rb(h),g={client_id:t.clientConfig.parameters.clientId,channel_id:t.clientConfig.parameters.siteId,code:l.code,code_verifier:i,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(tb("".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 ub=Object.freeze({__proto__:null,isBrowser:Wo,isNode:Do,globalObject:Fo,hasFetchAvailable:Jo,fetch:Go,stringToBase64:tb,getCodeAndUsidFromUrl:rb,createCodeVerifier:nb,generateCodeChallenge:ab,authorize:ib,loginGuestUserPrivate:function(e,t,r){return sb.apply(this,arguments)},loginGuestUser:function(e,t){return cb.apply(this,arguments)},loginRegisteredUserB2C:function(e,t,r){return db.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 a={headers:{Authorization:"Basic ".concat(tb("".concat(e.clientConfig.parameters.clientId,":").concat(r.clientSecret)))},body:n};return e.getAccessToken(a)}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.ShopperSeo=rh,e.TemplateURL=iu,e.helpers=ub,Object.defineProperty(e,"__esModule",{value:!0})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("nanoid"),require("seedrandom")):"function"==typeof define&&define.amd?define(["exports","nanoid","seedrandom"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).CommerceSdk={},e.nanoid$1,e.seedrandom)}(this,(function(e,t,r){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=n(r),a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(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 s,c,d=function(e){return e&&e.Math==Math&&e},u=d("object"==typeof globalThis&&globalThis)||d("object"==typeof window&&window)||d("object"==typeof self&&self)||d("object"==typeof a&&a)||function(){return this}()||Function("return this")(),h=function(e){try{return!!e()}catch(e){return!0}},f=!h((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),l=!h((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),p=Function.prototype.call,g=l?p.bind(p):function(){return p.apply(p,arguments)},v={}.propertyIsEnumerable,b=Object.getOwnPropertyDescriptor,I={f:b&&!v.call({1:2},1)?function(e){var t=b(this,e);return!!t&&t.enumerable}:v},m=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},k=Function.prototype,y=k.bind,x=k.call,w=l&&y.bind(x,x),C=l?function(e){return e&&w(e)}:function(e){return e&&function(){return x.apply(e,arguments)}},P=C({}.toString),z=C("".slice),O=function(e){return z(P(e),8,-1)},E=Object,q=C("".split),j=h((function(){return!E("z").propertyIsEnumerable(0)}))?function(e){return"String"==O(e)?q(e,""):E(e)}:E,S=TypeError,T=function(e){if(null==e)throw S("Can't call method on "+e);return e},M=function(e){return j(T(e))},_=function(e){return"function"==typeof e},A=function(e){return"object"==typeof e?null!==e:_(e)},U=function(e){return _(e)?e:void 0},R=function(e,t){return arguments.length<2?U(u[e]):u[e]&&u[e][t]},B=C({}.isPrototypeOf),L=R("navigator","userAgent")||"",N=u.process,D=u.Deno,W=N&&N.versions||D&&D.version,F=W&&W.v8;F&&(c=(s=F.split("."))[0]>0&&s[0]<4?1:+(s[0]+s[1])),!c&&L&&(!(s=L.match(/Edge\/(\d+)/))||s[1]>=74)&&(s=L.match(/Chrome\/(\d+)/))&&(c=+s[1]);var G=c,H=!!Object.getOwnPropertySymbols&&!h((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&G&&G<41})),V=H&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,$=Object,Y=V?function(e){return"symbol"==typeof e}:function(e){var t=R("Symbol");return _(t)&&B(t.prototype,$(e))},J=String,K=function(e){try{return J(e)}catch(e){return"Object"}},Q=TypeError,X=function(e){if(_(e))return e;throw Q(K(e)+" is not a function")},Z=function(e,t){var r=e[t];return null==r?void 0:X(r)},ee=TypeError,te=Object.defineProperty,re=function(e,t){try{te(u,e,{value:t,configurable:!0,writable:!0})}catch(r){u[e]=t}return t},ne=u["__core-js_shared__"]||re("__core-js_shared__",{}),ie=o((function(e){(e.exports=function(e,t){return ne[e]||(ne[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"})})),ae=Object,oe=function(e){return ae(T(e))},se=C({}.hasOwnProperty),ce=Object.hasOwn||function(e,t){return se(oe(e),t)},de=0,ue=Math.random(),he=C(1..toString),fe=function(e){return"Symbol("+(void 0===e?"":e)+")_"+he(++de+ue,36)},le=ie("wks"),pe=u.Symbol,ge=pe&&pe.for,ve=V?pe:pe&&pe.withoutSetter||fe,be=function(e){if(!ce(le,e)||!H&&"string"!=typeof le[e]){var t="Symbol."+e;H&&ce(pe,e)?le[e]=pe[e]:le[e]=V&&ge?ge(t):ve(t)}return le[e]},Ie=TypeError,me=be("toPrimitive"),ke=function(e,t){if(!A(e)||Y(e))return e;var r,n=Z(e,me);if(n){if(void 0===t&&(t="default"),r=g(n,e,t),!A(r)||Y(r))return r;throw Ie("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var r,n;if("string"===t&&_(r=e.toString)&&!A(n=g(r,e)))return n;if(_(r=e.valueOf)&&!A(n=g(r,e)))return n;if("string"!==t&&_(r=e.toString)&&!A(n=g(r,e)))return n;throw ee("Can't convert object to primitive value")}(e,t)},ye=function(e){var t=ke(e,"string");return Y(t)?t:t+""},xe=u.document,we=A(xe)&&A(xe.createElement),Ce=function(e){return we?xe.createElement(e):{}},Pe=!f&&!h((function(){return 7!=Object.defineProperty(Ce("div"),"a",{get:function(){return 7}}).a})),ze=Object.getOwnPropertyDescriptor,Oe={f:f?ze:function(e,t){if(e=M(e),t=ye(t),Pe)try{return ze(e,t)}catch(e){}if(ce(e,t))return m(!g(I.f,e,t),e[t])}},Ee=f&&h((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),qe=String,je=TypeError,Se=function(e){if(A(e))return e;throw je(qe(e)+" is not an object")},Te=TypeError,Me=Object.defineProperty,_e=Object.getOwnPropertyDescriptor,Ae={f:f?Ee?function(e,t,r){if(Se(e),t=ye(t),Se(r),"function"==typeof e&&"prototype"===t&&"value"in r&&"writable"in r&&!r.writable){var n=_e(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 Me(e,t,r)}:Me:function(e,t,r){if(Se(e),t=ye(t),Se(r),Pe)try{return Me(e,t,r)}catch(e){}if("get"in r||"set"in r)throw Te("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},Ue=f?function(e,t,r){return Ae.f(e,t,m(1,r))}:function(e,t,r){return e[t]=r,e},Re=Function.prototype,Be=f&&Object.getOwnPropertyDescriptor,Le=ce(Re,"name"),Ne={EXISTS:Le,PROPER:Le&&"something"===function(){}.name,CONFIGURABLE:Le&&(!f||f&&Be(Re,"name").configurable)},De=C(Function.toString);_(ne.inspectSource)||(ne.inspectSource=function(e){return De(e)});var We,Fe,Ge,He=ne.inspectSource,Ve=u.WeakMap,$e=_(Ve)&&/native code/.test(He(Ve)),Ye=ie("keys"),Je=function(e){return Ye[e]||(Ye[e]=fe(e))},Ke={},Qe=u.TypeError,Xe=u.WeakMap;if($e||ne.state){var Ze=ne.state||(ne.state=new Xe),et=C(Ze.get),tt=C(Ze.has),rt=C(Ze.set);We=function(e,t){if(tt(Ze,e))throw new Qe("Object already initialized");return t.facade=e,rt(Ze,e,t),t},Fe=function(e){return et(Ze,e)||{}},Ge=function(e){return tt(Ze,e)}}else{var nt=Je("state");Ke[nt]=!0,We=function(e,t){if(ce(e,nt))throw new Qe("Object already initialized");return t.facade=e,Ue(e,nt,t),t},Fe=function(e){return ce(e,nt)?e[nt]:{}},Ge=function(e){return ce(e,nt)}}var it={set:We,get:Fe,has:Ge,enforce:function(e){return Ge(e)?Fe(e):We(e,{})},getterFor:function(e){return function(t){var r;if(!A(t)||(r=Fe(t)).type!==e)throw Qe("Incompatible receiver, "+e+" required");return r}}},at=o((function(e){var t=Ne.CONFIGURABLE,r=it.enforce,n=it.get,i=Object.defineProperty,a=f&&!h((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),(!ce(e,"name")||t&&e.name!==n)&&(f?i(e,"name",{value:n,configurable:!0}):e.name=n),a&&s&&ce(s,"arity")&&e.length!==s.arity&&i(e,"length",{value:s.arity});try{s&&ce(s,"constructor")&&s.constructor?f&&i(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var c=r(e);return ce(c,"source")||(c.source=o.join("string"==typeof n?n:"")),e};Function.prototype.toString=s((function(){return _(this)&&n(this).source||He(this)}),"toString")})),ot=function(e,t,r,n){n||(n={});var i=n.enumerable,a=void 0!==n.name?n.name:t;if(_(r)&&at(r,a,n),n.global)i?e[t]=r:re(t,r);else{try{n.unsafe?e[t]&&(i=!0):delete e[t]}catch(e){}i?e[t]=r:Ae.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},st=Math.ceil,ct=Math.floor,dt=Math.trunc||function(e){var t=+e;return(t>0?ct:st)(t)},ut=function(e){var t=+e;return t!=t||0===t?0:dt(t)},ht=Math.max,ft=Math.min,lt=function(e,t){var r=ut(e);return r<0?ht(r+t,0):ft(r,t)},pt=Math.min,gt=function(e){return e>0?pt(ut(e),9007199254740991):0},vt=function(e){return gt(e.length)},bt=function(e){return function(t,r,n){var i,a=M(t),o=vt(a),s=lt(n,o);if(e&&r!=r){for(;o>s;)if((i=a[s++])!=i)return!0}else for(;o>s;s++)if((e||s in a)&&a[s]===r)return e||s||0;return!e&&-1}},It={includes:bt(!0),indexOf:bt(!1)},mt=It.indexOf,kt=C([].push),yt=function(e,t){var r,n=M(e),i=0,a=[];for(r in n)!ce(Ke,r)&&ce(n,r)&&kt(a,r);for(;t.length>i;)ce(n,r=t[i++])&&(~mt(a,r)||kt(a,r));return a},xt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],wt=xt.concat("length","prototype"),Ct={f:Object.getOwnPropertyNames||function(e){return yt(e,wt)}},Pt={f:Object.getOwnPropertySymbols},zt=C([].concat),Ot=R("Reflect","ownKeys")||function(e){var t=Ct.f(Se(e)),r=Pt.f;return r?zt(t,r(e)):t},Et=function(e,t,r){for(var n=Ot(t),i=Ae.f,a=Oe.f,o=0;o<n.length;o++){var s=n[o];ce(e,s)||r&&ce(r,s)||i(e,s,a(t,s))}},qt=/#|\.prototype\./,jt=function(e,t){var r=Tt[St(e)];return r==_t||r!=Mt&&(_(t)?h(t):!!t)},St=jt.normalize=function(e){return String(e).replace(qt,".").toLowerCase()},Tt=jt.data={},Mt=jt.NATIVE="N",_t=jt.POLYFILL="P",At=jt,Ut=Oe.f,Rt=function(e,t){var r,n,i,a,o,s=e.target,c=e.global,d=e.stat;if(r=c?u:d?u[s]||re(s,{}):(u[s]||{}).prototype)for(n in t){if(a=t[n],i=e.dontCallGetSet?(o=Ut(r,n))&&o.value:r[n],!At(c?n:s+(d?".":"#")+n,e.forced)&&void 0!==i){if(typeof a==typeof i)continue;Et(a,i)}(e.sham||i&&i.sham)&&Ue(a,"sham",!0),ot(r,n,a,e)}},Bt=Object.keys||function(e){return yt(e,xt)},Lt=h((function(){Bt(1)}));Rt({target:"Object",stat:!0,forced:Lt},{keys:function(e){return Bt(oe(e))}});var Nt={};Nt[be("toStringTag")]="z";var Dt,Wt="[object z]"===String(Nt),Ft=be("toStringTag"),Gt=Object,Ht="Arguments"==O(function(){return arguments}()),Vt=Wt?O: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=Gt(e),Ft))?r:Ht?O(t):"Object"==(n=O(t))&&_(t.callee)?"Arguments":n},$t=String,Yt=function(e){if("Symbol"===Vt(e))throw TypeError("Cannot convert a Symbol value to a string");return $t(e)},Jt={f:f&&!Ee?Object.defineProperties:function(e,t){Se(e);for(var r,n=M(t),i=Bt(t),a=i.length,o=0;a>o;)Ae.f(e,r=i[o++],n[r]);return e}},Kt=R("document","documentElement"),Qt=Je("IE_PROTO"),Xt=function(){},Zt=function(e){return"<script>"+e+"<\/script>"},er=function(e){e.write(Zt("")),e.close();var t=e.parentWindow.Object;return e=null,t},tr=function(){try{Dt=new ActiveXObject("htmlfile")}catch(e){}var e,t;tr="undefined"!=typeof document?document.domain&&Dt?er(Dt):((t=Ce("iframe")).style.display="none",Kt.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(Zt("document.F=Object")),e.close(),e.F):er(Dt);for(var r=xt.length;r--;)delete tr.prototype[xt[r]];return tr()};Ke[Qt]=!0;var rr=Object.create||function(e,t){var r;return null!==e?(Xt.prototype=Se(e),r=new Xt,Xt.prototype=null,r[Qt]=e):r=tr(),void 0===t?r:Jt.f(r,t)},nr=function(e,t,r){var n=ye(t);n in e?Ae.f(e,n,m(0,r)):e[n]=r},ir=Array,ar=Math.max,or=function(e,t,r){for(var n=vt(e),i=lt(t,n),a=lt(void 0===r?n:r,n),o=ir(ar(a-i,0)),s=0;i<a;i++,s++)nr(o,s,e[i]);return o.length=s,o},sr=Ct.f,cr="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],dr={f:function(e){return cr&&"Window"==O(e)?function(e){try{return sr(e)}catch(e){return or(cr)}}(e):sr(M(e))}},ur={f:be},hr=u,fr=Ae.f,lr=Ae.f,pr=be("toStringTag"),gr=function(e,t,r){e&&!r&&(e=e.prototype),e&&!ce(e,pr)&&lr(e,pr,{configurable:!0,value:t})},vr=C(C.bind),br=function(e,t){return X(e),void 0===t?e:l?vr(e,t):function(){return e.apply(t,arguments)}},Ir=Array.isArray||function(e){return"Array"==O(e)},mr=function(){},kr=[],yr=R("Reflect","construct"),xr=/^\s*(?:class|function)\b/,wr=C(xr.exec),Cr=!xr.exec(mr),Pr=function(e){if(!_(e))return!1;try{return yr(mr,kr,e),!0}catch(e){return!1}},zr=function(e){if(!_(e))return!1;switch(Vt(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Cr||!!wr(xr,He(e))}catch(e){return!0}};zr.sham=!0;var Or=!yr||h((function(){var e;return Pr(Pr.call)||!Pr(Object)||!Pr((function(){e=!0}))||e}))?zr:Pr,Er=be("species"),qr=Array,jr=function(e,t){return new(function(e){var t;return Ir(e)&&(t=e.constructor,(Or(t)&&(t===qr||Ir(t.prototype))||A(t)&&null===(t=t[Er]))&&(t=void 0)),void 0===t?qr:t}(e))(0===t?0:t)},Sr=C([].push),Tr=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,l,p=oe(c),g=j(p),v=br(d,u),b=vt(g),I=0,m=h||jr,k=t?m(c,b):r||o?m(c,0):void 0;b>I;I++)if((s||I in g)&&(l=v(f=g[I],I,p),e))if(t)k[I]=l;else if(l)switch(e){case 3:return!0;case 5:return f;case 6:return I;case 2:Sr(k,f)}else switch(e){case 4:return!1;case 7:Sr(k,f)}return a?-1:n||i?i:k}},Mr={forEach:Tr(0),map:Tr(1),filter:Tr(2),some:Tr(3),every:Tr(4),find:Tr(5),findIndex:Tr(6),filterReject:Tr(7)},_r=Mr.forEach,Ar=Je("hidden"),Ur=it.set,Rr=it.getterFor("Symbol"),Br=Object.prototype,Lr=u.Symbol,Nr=Lr&&Lr.prototype,Dr=u.TypeError,Wr=u.QObject,Fr=Oe.f,Gr=Ae.f,Hr=dr.f,Vr=I.f,$r=C([].push),Yr=ie("symbols"),Jr=ie("op-symbols"),Kr=ie("wks"),Qr=!Wr||!Wr.prototype||!Wr.prototype.findChild,Xr=f&&h((function(){return 7!=rr(Gr({},"a",{get:function(){return Gr(this,"a",{value:7}).a}})).a}))?function(e,t,r){var n=Fr(Br,t);n&&delete Br[t],Gr(e,t,r),n&&e!==Br&&Gr(Br,t,n)}:Gr,Zr=function(e,t){var r=Yr[e]=rr(Nr);return Ur(r,{type:"Symbol",tag:e,description:t}),f||(r.description=t),r},en=function(e,t,r){e===Br&&en(Jr,t,r),Se(e);var n=ye(t);return Se(r),ce(Yr,n)?(r.enumerable?(ce(e,Ar)&&e[Ar][n]&&(e[Ar][n]=!1),r=rr(r,{enumerable:m(0,!1)})):(ce(e,Ar)||Gr(e,Ar,m(1,{})),e[Ar][n]=!0),Xr(e,n,r)):Gr(e,n,r)},tn=function(e,t){Se(e);var r=M(t),n=Bt(r).concat(on(r));return _r(n,(function(t){f&&!g(rn,r,t)||en(e,t,r[t])})),e},rn=function(e){var t=ye(e),r=g(Vr,this,t);return!(this===Br&&ce(Yr,t)&&!ce(Jr,t))&&(!(r||!ce(this,t)||!ce(Yr,t)||ce(this,Ar)&&this[Ar][t])||r)},nn=function(e,t){var r=M(e),n=ye(t);if(r!==Br||!ce(Yr,n)||ce(Jr,n)){var i=Fr(r,n);return!i||!ce(Yr,n)||ce(r,Ar)&&r[Ar][n]||(i.enumerable=!0),i}},an=function(e){var t=Hr(M(e)),r=[];return _r(t,(function(e){ce(Yr,e)||ce(Ke,e)||$r(r,e)})),r},on=function(e){var t=e===Br,r=Hr(t?Jr:M(e)),n=[];return _r(r,(function(e){!ce(Yr,e)||t&&!ce(Br,e)||$r(n,Yr[e])})),n};H||(Nr=(Lr=function(){if(B(Nr,this))throw Dr("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?Yt(arguments[0]):void 0,t=fe(e),r=function(e){this===Br&&g(r,Jr,e),ce(this,Ar)&&ce(this[Ar],t)&&(this[Ar][t]=!1),Xr(this,t,m(1,e))};return f&&Qr&&Xr(Br,t,{configurable:!0,set:r}),Zr(t,e)}).prototype,ot(Nr,"toString",(function(){return Rr(this).tag})),ot(Lr,"withoutSetter",(function(e){return Zr(fe(e),e)})),I.f=rn,Ae.f=en,Jt.f=tn,Oe.f=nn,Ct.f=dr.f=an,Pt.f=on,ur.f=function(e){return Zr(be(e),e)},f&&(Gr(Nr,"description",{configurable:!0,get:function(){return Rr(this).description}}),ot(Br,"propertyIsEnumerable",rn,{unsafe:!0}))),Rt({global:!0,constructor:!0,wrap:!0,forced:!H,sham:!H},{Symbol:Lr}),_r(Bt(Kr),(function(e){!function(e){var t=hr.Symbol||(hr.Symbol={});ce(t,e)||fr(t,e,{value:ur.f(e)})}(e)})),Rt({target:"Symbol",stat:!0,forced:!H},{useSetter:function(){Qr=!0},useSimple:function(){Qr=!1}}),Rt({target:"Object",stat:!0,forced:!H,sham:!f},{create:function(e,t){return void 0===t?rr(e):tn(rr(e),t)},defineProperty:en,defineProperties:tn,getOwnPropertyDescriptor:nn}),Rt({target:"Object",stat:!0,forced:!H},{getOwnPropertyNames:an}),function(){var e=R("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,n=be("toPrimitive");t&&!t[n]&&ot(t,n,(function(e){return g(r,this)}),{arity:1})}(),gr(Lr,"Symbol"),Ke[Ar]=!0;var sn=H&&!!Symbol.for&&!!Symbol.keyFor,cn=ie("string-to-symbol-registry"),dn=ie("symbol-to-string-registry");Rt({target:"Symbol",stat:!0,forced:!sn},{for:function(e){var t=Yt(e);if(ce(cn,t))return cn[t];var r=R("Symbol")(t);return cn[t]=r,dn[r]=t,r}});var un=ie("symbol-to-string-registry");Rt({target:"Symbol",stat:!0,forced:!sn},{keyFor:function(e){if(!Y(e))throw TypeError(K(e)+" is not a symbol");if(ce(un,e))return un[e]}});var hn=Function.prototype,fn=hn.apply,ln=hn.call,pn="object"==typeof Reflect&&Reflect.apply||(l?ln.bind(fn):function(){return ln.apply(fn,arguments)}),gn=C([].slice),vn=R("JSON","stringify"),bn=C(/./.exec),In=C("".charAt),mn=C("".charCodeAt),kn=C("".replace),yn=C(1..toString),xn=/[\uD800-\uDFFF]/g,wn=/^[\uD800-\uDBFF]$/,Cn=/^[\uDC00-\uDFFF]$/,Pn=!H||h((function(){var e=R("Symbol")();return"[null]"!=vn([e])||"{}"!=vn({a:e})||"{}"!=vn(Object(e))})),zn=h((function(){return'"\\udf06\\ud834"'!==vn("\udf06\ud834")||'"\\udead"'!==vn("\udead")})),On=function(e,t){var r=gn(arguments),n=t;if((A(t)||void 0!==e)&&!Y(e))return Ir(t)||(t=function(e,t){if(_(n)&&(t=g(n,this,e,t)),!Y(t))return t}),r[1]=t,pn(vn,null,r)},En=function(e,t,r){var n=In(r,t-1),i=In(r,t+1);return bn(wn,e)&&!bn(Cn,i)||bn(Cn,e)&&!bn(wn,n)?"\\u"+yn(mn(e,0),16):e};vn&&Rt({target:"JSON",stat:!0,arity:3,forced:Pn||zn},{stringify:function(e,t,r){var n=gn(arguments),i=pn(Pn?On:vn,null,n);return zn&&"string"==typeof i?kn(i,xn,En):i}});var qn=!H||h((function(){Pt.f(1)}));Rt({target:"Object",stat:!0,forced:qn},{getOwnPropertySymbols:function(e){var t=Pt.f;return t?t(oe(e)):[]}});var jn=be("species"),Sn=function(e){return G>=51||!h((function(){var t=[];return(t.constructor={})[jn]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Tn=Mr.filter,Mn=Sn("filter");Rt({target:"Array",proto:!0,forced:!Mn},{filter:function(e){return Tn(this,e,arguments.length>1?arguments[1]:void 0)}});var _n=Wt?{}.toString:function(){return"[object "+Vt(this)+"]"};Wt||ot(Object.prototype,"toString",_n,{unsafe:!0});var An=Oe.f,Un=h((function(){An(1)}));Rt({target:"Object",stat:!0,forced:!f||Un,sham:!f},{getOwnPropertyDescriptor:function(e,t){return An(M(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},Bn=Ce("span").classList,Ln=Bn&&Bn.constructor&&Bn.constructor.prototype,Nn=Ln===Object.prototype?void 0:Ln,Dn=function(e,t){var r=[][e];return!!r&&h((function(){r.call(null,t||function(){return 1},1)}))},Wn=Mr.forEach,Fn=Dn("forEach")?[].forEach:function(e){return Wn(this,e,arguments.length>1?arguments[1]:void 0)},Gn=function(e){if(e&&e.forEach!==Fn)try{Ue(e,"forEach",Fn)}catch(t){e.forEach=Fn}};for(var Hn in Rn)Rn[Hn]&&Gn(u[Hn]&&u[Hn].prototype);Gn(Nn),Rt({target:"Object",stat:!0,sham:!f},{getOwnPropertyDescriptors:function(e){for(var t,r,n=M(e),i=Oe.f,a=Ot(n),o={},s=0;a.length>s;)void 0!==(r=i(n,t=a[s++]))&&nr(o,t,r);return o}});var Vn=Jt.f;Rt({target:"Object",stat:!0,forced:Object.defineProperties!==Vn,sham:!f},{defineProperties:Vn});var $n=Ae.f;Rt({target:"Object",stat:!0,forced:Object.defineProperty!==$n,sham:!f},{defineProperty:$n});var Yn,Jn=be("match"),Kn=TypeError,Qn=function(e){if(function(e){var t;return A(e)&&(void 0!==(t=e[Jn])?!!t:"RegExp"==O(e))}(e))throw Kn("The method doesn't accept regular expressions");return e},Xn=be("match"),Zn=Oe.f,ei=C("".startsWith),ti=C("".slice),ri=Math.min,ni=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[Xn]=!1,"/./"[e](t)}catch(e){}}return!1}("startsWith"),ii=!(ni||(Yn=Zn(String.prototype,"startsWith"),!Yn||Yn.writable));Rt({target:"String",proto:!0,forced:!ii&&!ni},{startsWith:function(e){var t=Yt(T(this));Qn(e);var r=gt(ri(arguments.length>1?arguments[1]:void 0,t.length)),n=Yt(e);return ei?ei(t,n,r):ti(t,r,r+n.length)===n}});var ai=function(){var e=Se(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},oi=RegExp.prototype,si=Ne.PROPER,ci=RegExp.prototype.toString,di=h((function(){return"/a/b"!=ci.call({source:"a",flags:"b"})})),ui=si&&"toString"!=ci.name;function hi(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 fi(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function o(e){hi(a,n,i,o,s,"next",e)}function s(e){hi(a,n,i,o,s,"throw",e)}o(void 0)}))}}function li(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pi(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 gi(e,t,r){return t&&pi(e.prototype,t),r&&pi(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function vi(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}(di||ui)&&ot(RegExp.prototype,"toString",(function(){var e=Se(this);return"/"+Yt(e.source)+"/"+Yt(function(e){var t=e.flags;return void 0!==t||"flags"in oi||ce(e,"flags")||!B(oi,e)?t:g(ai,e)}(e))}),{unsafe:!0});var bi=Object.prototype,Ii=bi.hasOwnProperty,mi="function"==typeof Symbol?Symbol:{},ki=mi.iterator||"@@iterator",yi=mi.asyncIterator||"@@asyncIterator",xi=mi.toStringTag||"@@toStringTag";function wi(e,t,r,n){var i=t&&t.prototype instanceof zi?t:zi,a=Object.create(i.prototype),o=new Li(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 Di()}for(r.method=i,r.arg=a;;){var o=r.delegate;if(o){var s=Ui(o,r);if(s){if(s===Pi)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=Ci(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===Pi)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 Ci(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}var Pi={};function zi(){}function Oi(){}function Ei(){}var qi={};qi[ki]=function(){return this};var ji=Object.getPrototypeOf,Si=ji&&ji(ji(Ni([])));Si&&Si!==bi&&Ii.call(Si,ki)&&(qi=Si);var Ti=Ei.prototype=zi.prototype=Object.create(qi);function Mi(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function _i(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===Oi||"GeneratorFunction"===(t.displayName||t.name))}function Ai(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=Ci(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 Ui(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,Ui(e,t),"throw"===t.method))return Pi;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return Pi}var n=Ci(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,Pi;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,Pi):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,Pi)}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 Bi(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function Li(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(Ri,this),this.reset(!0)}function Ni(e){if(e){var t=e[ki];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:Di}}function Di(){return{value:void 0,done:!0}}Oi.prototype=Ti.constructor=Ei,Ei.constructor=Oi,Ei[xi]=Oi.displayName="GeneratorFunction",Mi(Ai.prototype),Ai.prototype[yi]=function(){return this},Mi(Ti),Ti[xi]="Generator",Ti[ki]=function(){return this},Ti.toString=function(){return"[object Generator]"},Li.prototype={constructor:Li,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(Bi),!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,Pi):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),Pi},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),Bi(r),Pi}},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;Bi(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:Ni(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),Pi}};var Wi={wrap:wi,isGeneratorFunction:_i,AsyncIterator:Ai,mark:function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,Ei):(e.__proto__=Ei,xi in e||(e[xi]="GeneratorFunction")),e.prototype=Object.create(Ti),e},awrap:function(e){return{__await:e}},async:function(e,t,r,n,i){void 0===i&&(i=Promise);var a=new Ai(wi(e,t,r,n),i);return _i(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:Ni},Fi=Ae.f,Gi=be("unscopables"),Hi=Array.prototype;null==Hi[Gi]&&Fi(Hi,Gi,{configurable:!0,value:rr(null)});var Vi,$i,Yi,Ji=function(e){Hi[Gi][e]=!0},Ki={},Qi=!h((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Xi=Je("IE_PROTO"),Zi=Object,ea=Zi.prototype,ta=Qi?Zi.getPrototypeOf:function(e){var t=oe(e);if(ce(t,Xi))return t[Xi];var r=t.constructor;return _(r)&&t instanceof r?r.prototype:t instanceof Zi?ea:null},ra=be("iterator"),na=!1;[].keys&&("next"in(Yi=[].keys())?($i=ta(ta(Yi)))!==Object.prototype&&(Vi=$i):na=!0),(null==Vi||h((function(){var e={};return Vi[ra].call(e)!==e})))&&(Vi={}),_(Vi[ra])||ot(Vi,ra,(function(){return this}));var ia={IteratorPrototype:Vi,BUGGY_SAFARI_ITERATORS:na},aa=ia.IteratorPrototype,oa=function(){return this},sa=function(e,t,r,n){var i=t+" Iterator";return e.prototype=rr(aa,{next:m(+!n,r)}),gr(e,i,!1),Ki[i]=oa,e},ca=String,da=TypeError,ua=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=C(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),t=r instanceof Array}catch(e){}return function(r,n){return Se(r),function(e){if("object"==typeof e||_(e))return e;throw da("Can't set "+ca(e)+" as a prototype")}(n),t?e(r,n):r.__proto__=n,r}}():void 0),ha=Ne.PROPER,fa=Ne.CONFIGURABLE,la=ia.IteratorPrototype,pa=ia.BUGGY_SAFARI_ITERATORS,ga=be("iterator"),va=function(){return this},ba=function(e,t,r,n,i,a,o){sa(r,t,n);var s,c,d,u=function(e){if(e===i&&v)return v;if(!pa&&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",f=!1,l=e.prototype,p=l[ga]||l["@@iterator"]||i&&l[i],v=!pa&&p||u(i),b="Array"==t&&l.entries||p;if(b&&(s=ta(b.call(new e)))!==Object.prototype&&s.next&&(ta(s)!==la&&(ua?ua(s,la):_(s[ga])||ot(s,ga,va)),gr(s,h,!0)),ha&&"values"==i&&p&&"values"!==p.name&&(fa?Ue(l,"name","values"):(f=!0,v=function(){return g(p,this)})),i)if(c={values:u("values"),keys:a?v:u("keys"),entries:u("entries")},o)for(d in c)(pa||f||!(d in l))&&ot(l,d,c[d]);else Rt({target:t,proto:!0,forced:pa||f},c);return l[ga]!==v&&ot(l,ga,v,{name:i}),Ki[t]=v,c},Ia=Ae.f,ma=it.set,ka=it.getterFor("Array Iterator"),ya=ba(Array,"Array",(function(e,t){ma(this,{type:"Array Iterator",target:M(e),index:0,kind:t})}),(function(){var e=ka(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"),xa=Ki.Arguments=Ki.Array;if(Ji("keys"),Ji("values"),Ji("entries"),f&&"values"!==xa.name)try{Ia(xa,"name",{value:"values"})}catch(e){}var wa=C("".charAt),Ca=C("".charCodeAt),Pa=C("".slice),za=function(e){return function(t,r){var n,i,a=Yt(T(t)),o=ut(r),s=a.length;return o<0||o>=s?e?"":void 0:(n=Ca(a,o))<55296||n>56319||o+1===s||(i=Ca(a,o+1))<56320||i>57343?e?wa(a,o):n:e?Pa(a,o,o+2):i-56320+(n-55296<<10)+65536}},Oa={codeAt:za(!1),charAt:za(!0)},Ea=Oa.charAt,qa=it.set,ja=it.getterFor("String Iterator");ba(String,"String",(function(e){qa(this,{type:"String Iterator",string:Yt(e),index:0})}),(function(){var e,t=ja(this),r=t.string,n=t.index;return n>=r.length?{value:void 0,done:!0}:(e=Ea(r,n),t.index+=e.length,{value:e,done:!1})}));var Sa=be("iterator"),Ta=be("toStringTag"),Ma=ya.values,_a=function(e,t){if(e){if(e[Sa]!==Ma)try{Ue(e,Sa,Ma)}catch(t){e[Sa]=Ma}if(e[Ta]||Ue(e,Ta,t),Rn[t])for(var r in ya)if(e[r]!==ya[r])try{Ue(e,r,ya[r])}catch(t){e[r]=ya[r]}}};for(var Aa in Rn)_a(u[Aa]&&u[Aa].prototype,Aa);_a(Nn,"DOMTokenList");var Ua=be("iterator"),Ra=!h((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[Ua]||"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})),Ba=function(e,t,r){for(var n in t)ot(e,n,t[n],r);return e},La=TypeError,Na=function(e,t){if(B(t,e))return e;throw La("Incorrect invocation")},Da=be("iterator"),Wa=function(e){if(null!=e)return Z(e,Da)||Z(e,"@@iterator")||Ki[Vt(e)]},Fa=TypeError,Ga=function(e,t){var r=arguments.length<2?Wa(e):t;if(X(r))return Se(g(r,e));throw Fa(K(e)+" is not iterable")},Ha=TypeError,Va=function(e,t){if(e<t)throw Ha("Not enough arguments");return e},$a=Math.floor,Ya=function(e,t){var r=e.length,n=$a(r/2);return r<8?Ja(e,t):Ka(e,Ya(or(e,0,n),t),Ya(or(e,n),t),t)},Ja=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},Ka=function(e,t,r,n){for(var i=t.length,a=r.length,o=0,s=0;o<i||s<a;)e[o+s]=o<i&&s<a?n(t[o],r[s])<=0?t[o++]:r[s++]:o<i?t[o++]:r[s++];return e},Qa=Ya,Xa=be("iterator"),Za=it.set,eo=it.getterFor("URLSearchParams"),to=it.getterFor("URLSearchParamsIterator"),ro=Object.getOwnPropertyDescriptor,no=function(e){if(!f)return u[e];var t=ro(u,e);return t&&t.value},io=no("fetch"),ao=no("Request"),oo=no("Headers"),so=ao&&ao.prototype,co=oo&&oo.prototype,uo=u.RegExp,ho=u.TypeError,fo=u.decodeURIComponent,lo=u.encodeURIComponent,po=C("".charAt),go=C([].join),vo=C([].push),bo=C("".replace),Io=C([].shift),mo=C([].splice),ko=C("".split),yo=C("".slice),xo=/\+/g,wo=Array(4),Co=function(e){return wo[e-1]||(wo[e-1]=uo("((?:%[\\da-f]{2}){"+e+"})","gi"))},Po=function(e){try{return fo(e)}catch(t){return e}},zo=function(e){var t=bo(e,xo," "),r=4;try{return fo(t)}catch(e){for(;r;)t=bo(t,Co(r--),Po);return t}},Oo=/[!'()~]|%20/g,Eo={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},qo=function(e){return Eo[e]},jo=function(e){return bo(lo(e),Oo,qo)},So=sa((function(e,t){Za(this,{type:"URLSearchParamsIterator",iterator:Ga(eo(e).entries),kind:t})}),"Iterator",(function(){var e=to(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),To=function(e){this.entries=[],this.url=null,void 0!==e&&(A(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===po(e,0)?yo(e,1):e:Yt(e)))};To.prototype={type:"URLSearchParams",bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,r,n,i,a,o,s,c=Wa(e);if(c)for(r=(t=Ga(e,c)).next;!(n=g(r,t)).done;){if(a=(i=Ga(Se(n.value))).next,(o=g(a,i)).done||(s=g(a,i)).done||!g(a,i).done)throw ho("Expected sequence with length 2");vo(this.entries,{key:Yt(o.value),value:Yt(s.value)})}else for(var d in e)ce(e,d)&&vo(this.entries,{key:d,value:Yt(e[d])})},parseQuery:function(e){if(e)for(var t,r,n=ko(e,"&"),i=0;i<n.length;)(t=n[i++]).length&&(r=ko(t,"="),vo(this.entries,{key:zo(Io(r)),value:zo(go(r,"="))}))},serialize:function(){for(var e,t=this.entries,r=[],n=0;n<t.length;)e=t[n++],vo(r,jo(e.key)+"="+jo(e.value));return go(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var Mo=function(){Na(this,_o);var e=arguments.length>0?arguments[0]:void 0;Za(this,new To(e))},_o=Mo.prototype;if(Ba(_o,{append:function(e,t){Va(arguments.length,2);var r=eo(this);vo(r.entries,{key:Yt(e),value:Yt(t)}),r.updateURL()},delete:function(e){Va(arguments.length,1);for(var t=eo(this),r=t.entries,n=Yt(e),i=0;i<r.length;)r[i].key===n?mo(r,i,1):i++;t.updateURL()},get:function(e){Va(arguments.length,1);for(var t=eo(this).entries,r=Yt(e),n=0;n<t.length;n++)if(t[n].key===r)return t[n].value;return null},getAll:function(e){Va(arguments.length,1);for(var t=eo(this).entries,r=Yt(e),n=[],i=0;i<t.length;i++)t[i].key===r&&vo(n,t[i].value);return n},has:function(e){Va(arguments.length,1);for(var t=eo(this).entries,r=Yt(e),n=0;n<t.length;)if(t[n++].key===r)return!0;return!1},set:function(e,t){Va(arguments.length,1);for(var r,n=eo(this),i=n.entries,a=!1,o=Yt(e),s=Yt(t),c=0;c<i.length;c++)(r=i[c]).key===o&&(a?mo(i,c--,1):(a=!0,r.value=s));a||vo(i,{key:o,value:s}),n.updateURL()},sort:function(){var e=eo(this);Qa(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,r=eo(this).entries,n=br(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 So(this,"keys")},values:function(){return new So(this,"values")},entries:function(){return new So(this,"entries")}},{enumerable:!0}),ot(_o,Xa,_o.entries,{name:"entries"}),ot(_o,"toString",(function(){return eo(this).serialize()}),{enumerable:!0}),gr(Mo,"URLSearchParams"),Rt({global:!0,constructor:!0,forced:!Ra},{URLSearchParams:Mo}),!Ra&&_(oo)){var Ao=C(co.has),Uo=C(co.set),Ro=function(e){if(A(e)){var t,r=e.body;if("URLSearchParams"===Vt(r))return t=e.headers?new oo(e.headers):new oo,Ao(t,"content-type")||Uo(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),rr(e,{body:m(0,Yt(r)),headers:m(0,t)})}return e};if(_(io)&&Rt({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return io(e,arguments.length>1?Ro(arguments[1]):{})}}),_(ao)){var Bo=function(e){return Na(this,so),new ao(e,arguments.length>1?Ro(arguments[1]):{})};so.constructor=Bo,Bo.prototype=so,Rt({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Bo})}}var Lo={URLSearchParams:Mo,getState:eo};function No(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 Do(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?No(Object(r),!0).forEach((function(t){vi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):No(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Wo=gi((function e(t){if(li(this,e),vi(this,"baseUri",void 0),vi(this,"proxy",void 0),vi(this,"headers",void 0),vi(this,"parameters",void 0),vi(this,"fetchOptions",void 0),vi(this,"transformRequest",void 0),vi(this,"throwOnBadResponse",void 0),this.headers=Do({},t.headers),this.parameters=Do({},t.parameters),!this.parameters.shortCode)throw new Error("Missing required parameter: shortCode");this.fetchOptions=Do({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 Fo(e){return(Fo="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)}vi(Wo,"defaults",{transformRequest:function(e,t){switch(t["Content-Type"]){case"application/json":return JSON.stringify(e);case"application/x-www-form-urlencoded":return new URLSearchParams(e);default:return e}}}),Rt({global:!0},{globalThis:u});var Go="object"===("undefined"==typeof window?"undefined":Fo(window))&&"object"===Fo(window.document),Ho="object"===("undefined"==typeof process?"undefined":Fo(process))&&"object"===Fo(process.versions)&&"string"==typeof process.versions.node,Vo=Go?window:globalThis,$o="function"==typeof Vo.fetch,Yo=function(){if(Ho)return require("node-fetch").default;if(!$o)throw new Error("Bad environment: it is not a node environment but fetch is not defined");return Vo.fetch}(),Jo=Function,Ko=C([].concat),Qo=C([].join),Xo={},Zo=function(e,t,r){if(!ce(Xo,t)){for(var n=[],i=0;i<t;i++)n[i]="a["+i+"]";Xo[t]=Jo("C,a","return new C("+Qo(n,",")+")")}return Xo[t](e,r)},es=l?Jo.bind:function(e){var t=X(this),r=t.prototype,n=gn(arguments,1),i=function(){var r=Ko(n,gn(arguments));return this instanceof i?Zo(t,r.length,r):t.apply(e,r)};return A(r)&&(i.prototype=r),i},ts=TypeError,rs=function(e){if(Or(e))return e;throw ts(K(e)+" is not a constructor")},ns=R("Reflect","construct"),is=Object.prototype,as=[].push,os=h((function(){function e(){}return!(ns((function(){}),[],e)instanceof e)})),ss=!h((function(){ns((function(){}))})),cs=os||ss;Rt({target:"Reflect",stat:!0,forced:cs,sham:cs},{construct:function(e,t){rs(e),Se(t);var r=arguments.length<3?e:rs(arguments[2]);if(ss&&!os)return ns(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 pn(as,n,t),new(pn(es,e,n))}var i=r.prototype,a=rr(A(i)?i:is),o=pn(e,a,t);return A(o)?o:a}});var ds=TypeError,us=function(e){if(e>9007199254740991)throw ds("Maximum allowed index exceeded");return e},hs=be("isConcatSpreadable"),fs=G>=51||!h((function(){var e=[];return e[hs]=!1,e.concat()[0]!==e})),ls=Sn("concat"),ps=function(e){if(!A(e))return!1;var t=e[hs];return void 0!==t?!!t:Ir(e)};function gs(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vs(e,t){return(vs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function bs(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&&vs(e,t)}function Is(e,t){if(t&&("object"===Fo(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return gs(e)}function ms(e){return(ms=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ks(){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 ys(e,t,r){return(ys=ks()?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&&vs(i,r.prototype),i}).apply(null,arguments)}function xs(e){var t="function"==typeof Map?new Map:void 0;return(xs=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 ys(e,arguments,ms(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),vs(n,e)})(e)}function ws(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=ms(e);if(t){var i=ms(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:!fs||!ls},{concat:function(e){var t,r,n,i,a,o=oe(this),s=jr(o,0),c=0;for(t=-1,n=arguments.length;t<n;t++)if(ps(a=-1===t?o:arguments[t]))for(i=vt(a),us(c+i),r=0;r<i;r++,c++)r in a&&nr(s,c,a[r]);else us(c+1),nr(s,c++,a);return s.length=c,s}});var Cs=function(e){bs(r,e);var t=ws(r);function r(e){var n;return li(this,r),vi(gs(n=t.call(this,"".concat(e.status," ").concat(e.statusText))),"response",void 0),n.response=e,n}return gi(r)}(xs(Error));function Ps(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 zs(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ps(Object(r),!0).forEach((function(t){vi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ps(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Os,Es,qs=function(){var e=fi(Wi.mark((function e(t,r,n,i){var a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=zs(zs({},null==n?void 0:n.headers),null==r?void 0:r.headers),s=zs(zs({},null==n?void 0:n.fetchOptions),{},{headers:o,body:null==r?void 0:r.body,method:null!==(a=null==r?void 0:r.method)&&void 0!==a?a:"GET"}),e.next=4,Yo(t,s);case 4:if(c=e.sent,!i){e.next=7;break}return e.abrupt("return",c);case 7:if(null==n||!n.throwOnBadResponse||c.ok||304===c.status){e.next=11;break}throw new Cs(c);case 11:return e.next=13,c.text();case 13:return d=e.sent,e.abrupt("return",d?JSON.parse(d):{});case 15:case"end":return e.stop()}}),e)})));return function(t,r,n,i){return e.apply(this,arguments)}}(),js=u.RegExp,Ss=h((function(){var e=js("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),Ts=Ss||h((function(){return!js("a","y").sticky})),Ms={BROKEN_CARET:Ss||h((function(){var e=js("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:Ts,UNSUPPORTED_Y:Ss},_s=u.RegExp,As=h((function(){var e=_s(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),Us=u.RegExp,Rs=h((function(){var e=Us("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),Bs=it.get,Ls=ie("native-string-replace",String.prototype.replace),Ns=RegExp.prototype.exec,Ds=Ns,Ws=C("".charAt),Fs=C("".indexOf),Gs=C("".replace),Hs=C("".slice),Vs=(Es=/b*/g,g(Ns,Os=/a/,"a"),g(Ns,Es,"a"),0!==Os.lastIndex||0!==Es.lastIndex),$s=Ms.BROKEN_CARET,Ys=void 0!==/()??/.exec("")[1];(Vs||Ys||$s||As||Rs)&&(Ds=function(e){var t,r,n,i,a,o,s,c=this,d=Bs(c),u=Yt(e),h=d.raw;if(h)return h.lastIndex=c.lastIndex,t=g(Ds,h,u),c.lastIndex=h.lastIndex,t;var f=d.groups,l=$s&&c.sticky,p=g(ai,c),v=c.source,b=0,I=u;if(l&&(p=Gs(p,"y",""),-1===Fs(p,"g")&&(p+="g"),I=Hs(u,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==Ws(u,c.lastIndex-1))&&(v="(?: "+v+")",I=" "+I,b++),r=new RegExp("^(?:"+v+")",p)),Ys&&(r=new RegExp("^"+v+"$(?!\\s)",p)),Vs&&(n=c.lastIndex),i=g(Ns,l?r:c,I),l?i?(i.input=Hs(i.input,b),i[0]=Hs(i[0],b),i.index=c.lastIndex,c.lastIndex+=i[0].length):c.lastIndex=0:Vs&&i&&(c.lastIndex=c.global?i.index+i[0].length:n),Ys&&i&&i.length>1&&g(Ls,i[0],r,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(i[a]=void 0)})),i&&f)for(i.groups=o=rr(null),a=0;a<f.length;a++)o[(s=f[a])[0]]=i[s[1]];return i});var Js=Ds;Rt({target:"RegExp",proto:!0,forced:/./.exec!==Js},{exec:Js});var Ks=be("species"),Qs=RegExp.prototype,Xs=function(e,t,r,n){var i=be(e),a=!h((function(){var t={};return t[i]=function(){return 7},7!=""[e](t)})),o=a&&!h((function(){var t=!1,r=/a/;return"split"===e&&((r={}).constructor={},r.constructor[Ks]=function(){return r},r.flags="",r[i]=/./[i]),r.exec=function(){return t=!0,null},r[i](""),!t}));if(!a||!o||r){var s=C(/./[i]),c=t(i,""[e],(function(e,t,r,n,i){var o=C(e),c=t.exec;return c===Js||c===Qs.exec?a&&!i?{done:!0,value:s(t,r,n)}:{done:!0,value:o(r,t,n)}:{done:!1}}));ot(String.prototype,e,c[0]),ot(Qs,i,c[1])}n&&Ue(Qs[i],"sham",!0)},Zs=Oa.charAt,ec=function(e,t,r){return t+(r?Zs(e,t).length:1)},tc=Math.floor,rc=C("".charAt),nc=C("".replace),ic=C("".slice),ac=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,oc=/\$([$&'`]|\d{1,2})/g,sc=function(e,t,r,n,i,a){var o=r+e.length,s=n.length,c=oc;return void 0!==i&&(i=oe(i),c=ac),nc(a,c,(function(a,c){var d;switch(rc(c,0)){case"$":return"$";case"&":return e;case"`":return ic(t,0,r);case"'":return ic(t,o);case"<":d=i[ic(c,1,-1)];break;default:var u=+c;if(0===u)return a;if(u>s){var h=tc(u/10);return 0===h?a:h<=s?void 0===n[h-1]?rc(c,1):n[h-1]+rc(c,1):a}d=n[u-1]}return void 0===d?"":d}))},cc=TypeError,dc=function(e,t){var r=e.exec;if(_(r)){var n=g(r,e,t);return null!==n&&Se(n),n}if("RegExp"===O(e))return g(Js,e,t);throw cc("RegExp#exec called on incompatible receiver")},uc=be("replace"),hc=Math.max,fc=Math.min,lc=C([].concat),pc=C([].push),gc=C("".indexOf),vc=C("".slice),bc="$0"==="a".replace(/./,"$0"),Ic=!!/./[uc]&&""===/./[uc]("a","$0");Xs("replace",(function(e,t,r){var n=Ic?"$":"$0";return[function(e,r){var n=T(this),i=null==e?void 0:Z(e,uc);return i?g(i,e,n,r):g(t,Yt(n),e,r)},function(e,i){var a=Se(this),o=Yt(e);if("string"==typeof i&&-1===gc(i,n)&&-1===gc(i,"$<")){var s=r(t,a,o,i);if(s.done)return s.value}var c=_(i);c||(i=Yt(i));var d=a.global;if(d){var u=a.unicode;a.lastIndex=0}for(var h=[];;){var f=dc(a,o);if(null===f)break;if(pc(h,f),!d)break;""===Yt(f[0])&&(a.lastIndex=ec(o,gt(a.lastIndex),u))}for(var l,p="",g=0,v=0;v<h.length;v++){for(var b=Yt((f=h[v])[0]),I=hc(fc(ut(f.index),o.length),0),m=[],k=1;k<f.length;k++)pc(m,void 0===(l=f[k])?l:String(l));var y=f.groups;if(c){var x=lc([b],m,I,o);void 0!==y&&pc(x,y);var w=Yt(pn(i,void 0,x))}else w=sc(b,o,I,m,y,i);I>=g&&(p+=vc(o,g,I)+w,g=I+b.length)}return p+vc(o,g)}]}),!!h((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!bc||Ic);var mc,kc=function(e,t,r){return r.get&&at(r.get,t,{getter:!0}),r.set&&at(r.set,t,{setter:!0}),Ae.f(e,t,r)},yc=Object.assign,xc=Object.defineProperty,wc=C([].concat),Cc=!yc||h((function(){if(f&&1!==yc({b:1},yc(xc({},"a",{enumerable:!0,get:function(){xc(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!=yc({},e)[r]||"abcdefghijklmnopqrst"!=Bt(yc({},t)).join("")}))?function(e,t){for(var r=oe(e),n=arguments.length,i=1,a=Pt.f,o=I.f;n>i;)for(var s,c=j(arguments[i++]),d=a?wc(Bt(c),a(c)):Bt(c),u=d.length,h=0;u>h;)s=d[h++],f&&!g(o,c,s)||(r[s]=c[s]);return r}:yc,Pc=function(e,t,r){var n,i;Se(e);try{if(!(n=Z(e,"return"))){if("throw"===t)throw r;return r}n=g(n,e)}catch(e){i=!0,n=e}if("throw"===t)throw r;if(i)throw n;return Se(n),r},zc=function(e,t,r,n){try{return n?t(Se(r)[0],r[1]):t(r)}catch(t){Pc(e,"throw",t)}},Oc=be("iterator"),Ec=Array.prototype,qc=function(e){return void 0!==e&&(Ki.Array===e||Ec[Oc]===e)},jc=Array,Sc=function(e){var t=oe(e),r=Or(this),n=arguments.length,i=n>1?arguments[1]:void 0,a=void 0!==i;a&&(i=br(i,n>2?arguments[2]:void 0));var o,s,c,d,u,h,f=Wa(t),l=0;if(!f||this===jc&&qc(f))for(o=vt(t),s=r?new this(o):jc(o);o>l;l++)h=a?i(t[l],l):t[l],nr(s,l,h);else for(u=(d=Ga(t,f)).next,s=r?new this:[];!(c=g(u,d)).done;l++)h=a?zc(d,i,[c.value,l],!0):c.value,nr(s,l,h);return s.length=l,s},Tc=/[^\0-\u007E]/,Mc=/[.\u3002\uFF0E\uFF61]/g,_c="Overflow: input needs wider integers to process",Ac=RangeError,Uc=C(Mc.exec),Rc=Math.floor,Bc=String.fromCharCode,Lc=C("".charCodeAt),Nc=C([].join),Dc=C([].push),Wc=C("".replace),Fc=C("".split),Gc=C("".toLowerCase),Hc=function(e){return e+22+75*(e<26)},Vc=function(e,t,r){var n=0;for(e=r?Rc(e/700):e>>1,e+=Rc(e/t);e>455;)e=Rc(e/35),n+=36;return Rc(n+36*e/(e+38))},$c=function(e){var t,r,n=[],i=(e=function(e){for(var t=[],r=0,n=e.length;r<n;){var i=Lc(e,r++);if(i>=55296&&i<=56319&&r<n){var a=Lc(e,r++);56320==(64512&a)?Dc(t,((1023&i)<<10)+(1023&a)+65536):(Dc(t,i),r--)}else Dc(t,i)}return t}(e)).length,a=128,o=0,s=72;for(t=0;t<e.length;t++)(r=e[t])<128&&Dc(n,Bc(r));var c=n.length,d=c;for(c&&Dc(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>Rc((2147483647-o)/h))throw Ac(_c);for(o+=(u-a)*h,a=u,t=0;t<e.length;t++){if((r=e[t])<a&&++o>2147483647)throw Ac(_c);if(r==a){for(var f=o,l=36;;){var p=l<=s?1:l>=s+26?26:l-s;if(f<p)break;var g=f-p,v=36-p;Dc(n,Bc(Hc(p+g%v))),f=Rc(g/v),l+=36}Dc(n,Bc(Hc(f))),s=Vc(o,h,d==c),o=0,d++}}o++,a++}return Nc(n,"")},Yc=Oa.codeAt,Jc=it.set,Kc=it.getterFor("URL"),Qc=Lo.URLSearchParams,Xc=Lo.getState,Zc=u.URL,ed=u.TypeError,td=u.parseInt,rd=Math.floor,nd=Math.pow,id=C("".charAt),ad=C(/./.exec),od=C([].join),sd=C(1..toString),cd=C([].pop),dd=C([].push),ud=C("".replace),hd=C([].shift),fd=C("".split),ld=C("".slice),pd=C("".toLowerCase),gd=C([].unshift),vd=/[a-z]/i,bd=/[\d+-.a-z]/i,Id=/\d/,md=/^0x/i,kd=/^[0-7]+$/,yd=/^\d+$/,xd=/^[\da-f]+$/i,wd=/[\0\t\n\r #%/:<>?@[\\\]^|]/,Cd=/[\0\t\n\r #/:<>?@[\\\]^|]/,Pd=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,zd=/[\t\n\r]/g,Od=function(e){var t,r,n,i;if("number"==typeof e){for(t=[],r=0;r<4;r++)gd(t,e%256),e=rd(e/256);return od(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+=sd(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},Ed={},qd=Cc({},Ed,{" ":1,'"':1,"<":1,">":1,"`":1}),jd=Cc({},qd,{"#":1,"?":1,"{":1,"}":1}),Sd=Cc({},jd,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Td=function(e,t){var r=Yc(e,0);return r>32&&r<127&&!ce(t,e)?e:encodeURIComponent(e)},Md={ftp:21,file:null,http:80,https:443,ws:80,wss:443},_d=function(e,t){var r;return 2==e.length&&ad(vd,id(e,0))&&(":"==(r=id(e,1))||!t&&"|"==r)},Ad=function(e){var t;return e.length>1&&_d(ld(e,0,2))&&(2==e.length||"/"===(t=id(e,2))||"\\"===t||"?"===t||"#"===t)},Ud=function(e){return"."===e||"%2e"===pd(e)},Rd={},Bd={},Ld={},Nd={},Dd={},Wd={},Fd={},Gd={},Hd={},Vd={},$d={},Yd={},Jd={},Kd={},Qd={},Xd={},Zd={},eu={},tu={},ru={},nu={},iu=function(e,t,r){var n,i,a,o=Yt(e);if(t){if(i=this.parse(o))throw ed(i);this.searchParams=null}else{if(void 0!==r&&(n=new iu(r,!0)),i=this.parse(o,null,n))throw ed(i);(a=Xc(new Qc)).bindURL(this),this.searchParams=a}};iu.prototype={type:"URL",parse:function(e,t,r){var n,i,a,o,s,c=this,d=t||Rd,u=0,h="",f=!1,l=!1,p=!1;for(e=Yt(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=ud(e,Pd,"")),e=ud(e,zd,""),n=Sc(e);u<=n.length;){switch(i=n[u],d){case Rd:if(!i||!ad(vd,i)){if(t)return"Invalid scheme";d=Ld;continue}h+=pd(i),d=Bd;break;case Bd:if(i&&(ad(bd,i)||"+"==i||"-"==i||"."==i))h+=pd(i);else{if(":"!=i){if(t)return"Invalid scheme";h="",d=Ld,u=0;continue}if(t&&(c.isSpecial()!=ce(Md,h)||"file"==h&&(c.includesCredentials()||null!==c.port)||"file"==c.scheme&&!c.host))return;if(c.scheme=h,t)return void(c.isSpecial()&&Md[c.scheme]==c.port&&(c.port=null));h="","file"==c.scheme?d=Kd:c.isSpecial()&&r&&r.scheme==c.scheme?d=Nd:c.isSpecial()?d=Gd:"/"==n[u+1]?(d=Dd,u++):(c.cannotBeABaseURL=!0,dd(c.path,""),d=tu)}break;case Ld:if(!r||r.cannotBeABaseURL&&"#"!=i)return"Invalid scheme";if(r.cannotBeABaseURL&&"#"==i){c.scheme=r.scheme,c.path=or(r.path),c.query=r.query,c.fragment="",c.cannotBeABaseURL=!0,d=nu;break}d="file"==r.scheme?Kd:Wd;continue;case Nd:if("/"!=i||"/"!=n[u+1]){d=Wd;continue}d=Hd,u++;break;case Dd:if("/"==i){d=Vd;break}d=eu;continue;case Wd:if(c.scheme=r.scheme,i==mc)c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=or(r.path),c.query=r.query;else if("/"==i||"\\"==i&&c.isSpecial())d=Fd;else if("?"==i)c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=or(r.path),c.query="",d=ru;else{if("#"!=i){c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=or(r.path),c.path.length--,d=eu;continue}c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=or(r.path),c.query=r.query,c.fragment="",d=nu}break;case Fd:if(!c.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,d=eu;continue}d=Vd}else d=Hd;break;case Gd:if(d=Hd,"/"!=i||"/"!=id(h,u+1))continue;u++;break;case Hd:if("/"!=i&&"\\"!=i){d=Vd;continue}break;case Vd:if("@"==i){f&&(h="%40"+h),f=!0,a=Sc(h);for(var g=0;g<a.length;g++){var v=a[g];if(":"!=v||p){var b=Td(v,Sd);p?c.password+=b:c.username+=b}else p=!0}h=""}else if(i==mc||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()){if(f&&""==h)return"Invalid authority";u-=Sc(h).length+1,h="",d=$d}else h+=i;break;case $d:case Yd:if(t&&"file"==c.scheme){d=Xd;continue}if(":"!=i||l){if(i==mc||"/"==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=Zd,t)return;continue}"["==i?l=!0:"]"==i&&(l=!1),h+=i}else{if(""==h)return"Invalid host";if(o=c.parseHost(h))return o;if(h="",d=Jd,t==Yd)return}break;case Jd:if(!ad(Id,i)){if(i==mc||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()||t){if(""!=h){var I=td(h,10);if(I>65535)return"Invalid port";c.port=c.isSpecial()&&I===Md[c.scheme]?null:I,h=""}if(t)return;d=Zd;continue}return"Invalid port"}h+=i;break;case Kd:if(c.scheme="file","/"==i||"\\"==i)d=Qd;else{if(!r||"file"!=r.scheme){d=eu;continue}if(i==mc)c.host=r.host,c.path=or(r.path),c.query=r.query;else if("?"==i)c.host=r.host,c.path=or(r.path),c.query="",d=ru;else{if("#"!=i){Ad(od(or(n,u),""))||(c.host=r.host,c.path=or(r.path),c.shortenPath()),d=eu;continue}c.host=r.host,c.path=or(r.path),c.query=r.query,c.fragment="",d=nu}}break;case Qd:if("/"==i||"\\"==i){d=Xd;break}r&&"file"==r.scheme&&!Ad(od(or(n,u),""))&&(_d(r.path[0],!0)?dd(c.path,r.path[0]):c.host=r.host),d=eu;continue;case Xd:if(i==mc||"/"==i||"\\"==i||"?"==i||"#"==i){if(!t&&_d(h))d=eu;else if(""==h){if(c.host="",t)return;d=Zd}else{if(o=c.parseHost(h))return o;if("localhost"==c.host&&(c.host=""),t)return;h="",d=Zd}continue}h+=i;break;case Zd:if(c.isSpecial()){if(d=eu,"/"!=i&&"\\"!=i)continue}else if(t||"?"!=i)if(t||"#"!=i){if(i!=mc&&(d=eu,"/"!=i))continue}else c.fragment="",d=nu;else c.query="",d=ru;break;case eu:if(i==mc||"/"==i||"\\"==i&&c.isSpecial()||!t&&("?"==i||"#"==i)){if(".."===(s=pd(s=h))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(c.shortenPath(),"/"==i||"\\"==i&&c.isSpecial()||dd(c.path,"")):Ud(h)?"/"==i||"\\"==i&&c.isSpecial()||dd(c.path,""):("file"==c.scheme&&!c.path.length&&_d(h)&&(c.host&&(c.host=""),h=id(h,0)+":"),dd(c.path,h)),h="","file"==c.scheme&&(i==mc||"?"==i||"#"==i))for(;c.path.length>1&&""===c.path[0];)hd(c.path);"?"==i?(c.query="",d=ru):"#"==i&&(c.fragment="",d=nu)}else h+=Td(i,jd);break;case tu:"?"==i?(c.query="",d=ru):"#"==i?(c.fragment="",d=nu):i!=mc&&(c.path[0]+=Td(i,Ed));break;case ru:t||"#"!=i?i!=mc&&("'"==i&&c.isSpecial()?c.query+="%27":c.query+="#"==i?"%23":Td(i,Ed)):(c.fragment="",d=nu);break;case nu:i!=mc&&(c.fragment+=Td(i,qd))}u++}},parseHost:function(e){var t,r,n;if("["==id(e,0)){if("]"!=id(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 id(e,h)};if(":"==f()){if(":"!=id(e,1))return;h+=2,u=++d}for(;f();){if(8==d)return;if(":"!=f()){for(t=r=0;r<4&&ad(xd,f());)t=16*t+td(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(!ad(Id,f()))return;for(;ad(Id,f());){if(a=td(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}(ld(e,1,-1))))return"Invalid host";this.host=t}else if(this.isSpecial()){if(e=function(e){var t,r,n=[],i=Fc(Wc(Gc(e),Mc,"."),".");for(t=0;t<i.length;t++)r=i[t],Dc(n,Uc(Tc,r)?"xn--"+$c(r):r);return Nc(n,".")}(e),ad(wd,e))return"Invalid host";if(null===(t=function(e){var t,r,n,i,a,o,s,c=fd(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"==id(i,0)&&(a=ad(md,i)?16:8,i=ld(i,8==a?1:2)),""===i)o=0;else{if(!ad(10==a?yd:8==a?kd:xd,i))return e;o=td(i,a)}dd(r,o)}for(n=0;n<t;n++)if(o=r[n],n==t-1){if(o>=nd(256,5-t))return null}else if(o>255)return null;for(s=cd(r),n=0;n<r.length;n++)s+=r[n]*nd(256,3-n);return s}(e)))return"Invalid host";this.host=t}else{if(ad(Cd,e))return"Invalid host";for(t="",r=Sc(e),n=0;n<r.length;n++)t+=Td(r[n],Ed);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return ce(Md,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&_d(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+=Od(i),null!==a&&(d+=":"+a)):"file"==t&&(d+="//"),d+=e.cannotBeABaseURL?o[0]:o.length?"/"+od(o,"/"):"",null!==s&&(d+="?"+s),null!==c&&(d+="#"+c),d},setHref:function(e){var t=this.parse(e);if(t)throw ed(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new au(e.path[0]).origin}catch(e){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+Od(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(Yt(e)+":",Rd)},getUsername:function(){return this.username},setUsername:function(e){var t=Sc(Yt(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<t.length;r++)this.username+=Td(t[r],Sd)}},getPassword:function(){return this.password},setPassword:function(e){var t=Sc(Yt(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<t.length;r++)this.password+=Td(t[r],Sd)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?Od(e):Od(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,$d)},getHostname:function(){var e=this.host;return null===e?"":Od(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,Yd)},getPort:function(){var e=this.port;return null===e?"":Yt(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=Yt(e))?this.port=null:this.parse(e,Jd))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+od(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,Zd))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=Yt(e))?this.query=null:("?"==id(e,0)&&(e=ld(e,1)),this.query="",this.parse(e,ru)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=Yt(e))?("#"==id(e,0)&&(e=ld(e,1)),this.fragment="",this.parse(e,nu)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var au=function(e){var t=Na(this,ou),r=Va(arguments.length,1)>1?arguments[1]:void 0,n=Jc(t,new iu(e,!1,r));f||(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())},ou=au.prototype,su=function(e,t){return{get:function(){return Kc(this)[e]()},set:t&&function(e){return Kc(this)[t](e)},configurable:!0,enumerable:!0}};if(f&&(kc(ou,"href",su("serialize","setHref")),kc(ou,"origin",su("getOrigin")),kc(ou,"protocol",su("getProtocol","setProtocol")),kc(ou,"username",su("getUsername","setUsername")),kc(ou,"password",su("getPassword","setPassword")),kc(ou,"host",su("getHost","setHost")),kc(ou,"hostname",su("getHostname","setHostname")),kc(ou,"port",su("getPort","setPort")),kc(ou,"pathname",su("getPathname","setPathname")),kc(ou,"search",su("getSearch","setSearch")),kc(ou,"searchParams",su("getSearchParams")),kc(ou,"hash",su("getHash","setHash"))),ot(ou,"toJSON",(function(){return Kc(this).serialize()}),{enumerable:!0}),ot(ou,"toString",(function(){return Kc(this).serialize()}),{enumerable:!0}),Zc){var cu=Zc.createObjectURL,du=Zc.revokeObjectURL;cu&&ot(au,"createObjectURL",br(cu,Zc)),du&&ot(au,"revokeObjectURL",br(du,Zc))}function uu(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=ms(e);if(t){var i=ms(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Is(this,r)}}gr(au,"URL"),Rt({global:!0,constructor:!0,forced:!Ra,sham:!f},{URL:au});var hu=function(e){bs(r,e);var t=uu(r);function r(e,n,i){var a;return li(this,r),(a=t.call(this,r.renderTemplateUri("".concat(n,"/").concat(e).replace(/\/\/+/g,"/"),null==i?void 0:i.pathParams))).addQueryParams(null==i?void 0:i.queryParams),null!=i&&i.origin&&a.replaceOrigin(null==i?void 0:i.origin),a}return gi(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}(xs(URL)),fu="commerce-sdk-isomorphic@2.0.0";function lu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function pu(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){vi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var gu=function(){function e(t){li(this,e),vi(this,"clientConfig",void 0);var r=pu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Wo(r)}var t,r,n,i,a,o,s,c,d,u,h,f,l,p,g,v,b,I,m,k,y,x,w,C,P,z,O,E,q,j,S,T,M,_,A,U;return gi(e,[{key:"createBasket",value:(U=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.taxMode?o.taxMode=n.taxMode:void 0!==i.taxMode&&(o.taxMode=i.taxMode),void 0!==n.temporary?o.temporary=n.temporary:void 0!==i.temporary&&(o.temporary=i.temporary),void 0===n.siteId){e.next=19;break}o.siteId=n.siteId,e.next=24;break;case 19:if(void 0===i.siteId){e.next=23;break}o.siteId=i.siteId,e.next=24;break;case 23:throw new Error("Missing required query parameter: siteId");case 24:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for createBasket: ".concat(e))})),s=new hu("/organizations/{organizationId}/baskets",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=31,qs(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 31:return d=e.sent,e.abrupt("return",d);case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return U.apply(this,arguments)})},{key:"transferBasket",value:(A=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.overrideExisting?o.overrideExisting=n.overrideExisting:void 0!==i.overrideExisting&&(o.overrideExisting=i.overrideExisting),void 0===n.siteId){e.next=18;break}o.siteId=n.siteId,e.next=23;break;case 18:if(void 0===i.siteId){e.next=22;break}o.siteId=i.siteId,e.next=23;break;case 22:throw new Error("Missing required query parameter: siteId");case 23:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for transferBasket: ".concat(e))})),s=new hu("/organizations/{organizationId}/baskets/actions/transfer",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=30,qs(s.toString(),{method:"POST",headers:c},this.clientConfig,r);case 30:return d=e.sent,e.abrupt("return",d);case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return A.apply(this,arguments)})},{key:"mergeBasket",value:(_=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.createDestinationBasket?o.createDestinationBasket=n.createDestinationBasket:void 0!==i.createDestinationBasket&&(o.createDestinationBasket=i.createDestinationBasket),void 0!==n.productItemMergeMode?o.productItemMergeMode=n.productItemMergeMode:void 0!==i.productItemMergeMode&&(o.productItemMergeMode=i.productItemMergeMode),void 0===n.siteId){e.next=19;break}o.siteId=n.siteId,e.next=24;break;case 19:if(void 0===i.siteId){e.next=23;break}o.siteId=i.siteId,e.next=24;break;case 23:throw new Error("Missing required query parameter: siteId");case 24:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for mergeBasket: ".concat(e))})),s=new hu("/organizations/{organizationId}/baskets/actions/merge",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=31,qs(s.toString(),{method:"POST",headers:c},this.clientConfig,r);case 31:return d=e.sent,e.abrupt("return",d);case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return _.apply(this,arguments)})},{key:"deleteBasket",value:(M=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for deleteBasket: ".concat(e))})),s=new hu("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=37,qs(s.toString(),{method:"DELETE",headers:c},this.clientConfig,r);case 37:if(d=e.sent,!r){e.next=40;break}return e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return M.apply(this,arguments)})},{key:"getBasket",value:(T=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getBasket: ".concat(e))})),s=new hu("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=38,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 38:return d=e.sent,e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return T.apply(this,arguments)})},{key:"updateBasket",value:(S=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateBasket: ".concat(e))})),s=new hu("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=38,qs(s.toString(),{method:"PATCH",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 38:return d=e.sent,e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return S.apply(this,arguments)})},{key:"updateAsAgentBasket",value:(j=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateAsAgentBasket: ".concat(e))})),s=new hu("/organizations/{organizationId}/baskets/{basketId}/agent",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=38,qs(s.toString(),{method:"PUT",headers:c},this.clientConfig,r);case 38:return d=e.sent,e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return j.apply(this,arguments)})},{key:"updateBillingAddressForBasket",value:(q=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0!==n.useAsShipping?o.useAsShipping=n.useAsShipping:void 0!==i.useAsShipping&&(o.useAsShipping=i.useAsShipping),void 0!==n.removeExternalTax?o.removeExternalTax=n.removeExternalTax:void 0!==i.removeExternalTax&&(o.removeExternalTax=i.removeExternalTax),void 0===n.siteId){e.next=28;break}o.siteId=n.siteId,e.next=33;break;case 28:if(void 0===i.siteId){e.next=32;break}o.siteId=i.siteId,e.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateBillingAddressForBasket: ".concat(e))})),s=new hu("/organizations/{organizationId}/baskets/{basketId}/billing-address",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=40,qs(s.toString(),{method:"PUT",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 40:return d=e.sent,e.abrupt("return",d);case 42:case"end":return e.stop()}}),e,this)}))),function(e,t){return q.apply(this,arguments)})},{key:"addCouponToBasket",value:(E=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for addCouponToBasket: ".concat(e))})),s=new hu("/organizations/{organizationId}/baskets/{basketId}/coupons",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=38,qs(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 38:return d=e.sent,e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return E.apply(this,arguments)})},{key:"removeCouponFromBasket",value:(O=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.couponItemId){e.next=25;break}a.couponItemId=n.couponItemId,e.next=30;break;case 25:if(void 0===i.couponItemId){e.next=29;break}a.couponItemId=i.couponItemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: couponItemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for removeCouponFromBasket: ".concat(e))})),s=new hu("/organizations/{organizationId}/baskets/{basketId}/coupons/{couponItemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=47,qs(s.toString(),{method:"DELETE",headers:c},this.clientConfig,r);case 47:return d=e.sent,e.abrupt("return",d);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return O.apply(this,arguments)})},{key:"updateCustomerForBasket",value:(z=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateCustomerForBasket: ".concat(e))})),s=new hu("/organizations/{organizationId}/baskets/{basketId}/customer",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=38,qs(s.toString(),{method:"PUT",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 38:return d=e.sent,e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return z.apply(this,arguments)})},{key:"addGiftCertificateItemToBasket",value:(P=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for addGiftCertificateItemToBasket: ".concat(e))})),s=new hu("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=38,qs(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 38:return d=e.sent,e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return P.apply(this,arguments)})},{key:"removeGiftCertificateItemFromBasket",value:(C=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.giftCertificateItemId){e.next=25;break}a.giftCertificateItemId=n.giftCertificateItemId,e.next=30;break;case 25:if(void 0===i.giftCertificateItemId){e.next=29;break}a.giftCertificateItemId=i.giftCertificateItemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: giftCertificateItemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for removeGiftCertificateItemFromBasket: ".concat(e))})),s=new hu("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=47,qs(s.toString(),{method:"DELETE",headers:c},this.clientConfig,r);case 47:return d=e.sent,e.abrupt("return",d);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return C.apply(this,arguments)})},{key:"updateGiftCertificateItemInBasket",value:(w=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.giftCertificateItemId){e.next=25;break}a.giftCertificateItemId=n.giftCertificateItemId,e.next=30;break;case 25:if(void 0===i.giftCertificateItemId){e.next=29;break}a.giftCertificateItemId=i.giftCertificateItemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: giftCertificateItemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateGiftCertificateItemInBasket: ".concat(e))})),s=new hu("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=47,qs(s.toString(),{method:"PATCH",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 47:return d=e.sent,e.abrupt("return",d);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return w.apply(this,arguments)})},{key:"addItemToBasket",value:(x=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for addItemToBasket: ".concat(e))})),s=new hu("/organizations/{organizationId}/baskets/{basketId}/items",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=38,qs(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 38:return d=e.sent,e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return x.apply(this,arguments)})},{key:"removeItemFromBasket",value:(y=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.itemId){e.next=25;break}a.itemId=n.itemId,e.next=30;break;case 25:if(void 0===i.itemId){e.next=29;break}a.itemId=i.itemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: itemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for removeItemFromBasket: ".concat(e))})),s=new hu("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=47,qs(s.toString(),{method:"DELETE",headers:c},this.clientConfig,r);case 47:return d=e.sent,e.abrupt("return",d);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return y.apply(this,arguments)})},{key:"updateItemInBasket",value:(k=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.itemId){e.next=25;break}a.itemId=n.itemId,e.next=30;break;case 25:if(void 0===i.itemId){e.next=29;break}a.itemId=i.itemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: itemId");case 30:if(o={},void 0!==n.removeExternalTax?o.removeExternalTax=n.removeExternalTax:void 0!==i.removeExternalTax&&(o.removeExternalTax=i.removeExternalTax),void 0===n.siteId){e.next=36;break}o.siteId=n.siteId,e.next=41;break;case 36:if(void 0===i.siteId){e.next=40;break}o.siteId=i.siteId,e.next=41;break;case 40:throw new Error("Missing required query parameter: siteId");case 41:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateItemInBasket: ".concat(e))})),s=new hu("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=48,qs(s.toString(),{method:"PATCH",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 48:return d=e.sent,e.abrupt("return",d);case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return k.apply(this,arguments)})},{key:"addTaxesForBasketItem",value:(m=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.itemId){e.next=25;break}a.itemId=n.itemId,e.next=30;break;case 25:if(void 0===i.itemId){e.next=29;break}a.itemId=i.itemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: itemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for addTaxesForBasketItem: ".concat(e))})),s=new hu("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}/taxes",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=46,qs(s.toString(),{method:"PUT",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 46:if(d=e.sent,!r){e.next=49;break}return e.abrupt("return",d);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return m.apply(this,arguments)})},{key:"addPaymentInstrumentToBasket",value:(I=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for addPaymentInstrumentToBasket: ".concat(e))})),s=new hu("/organizations/{organizationId}/baskets/{basketId}/payment-instruments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=38,qs(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 38:return d=e.sent,e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return I.apply(this,arguments)})},{key:"removePaymentInstrumentFromBasket",value:(b=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}a.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===i.paymentInstrumentId){e.next=29;break}a.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for removePaymentInstrumentFromBasket: ".concat(e))})),s=new hu("/organizations/{organizationId}/baskets/{basketId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=47,qs(s.toString(),{method:"DELETE",headers:c},this.clientConfig,r);case 47:return d=e.sent,e.abrupt("return",d);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"updatePaymentInstrumentInBasket",value:(v=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}a.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===i.paymentInstrumentId){e.next=29;break}a.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(o={},void 0!==n.removeExternalTax?o.removeExternalTax=n.removeExternalTax:void 0!==i.removeExternalTax&&(o.removeExternalTax=i.removeExternalTax),void 0===n.siteId){e.next=36;break}o.siteId=n.siteId,e.next=41;break;case 36:if(void 0===i.siteId){e.next=40;break}o.siteId=i.siteId,e.next=41;break;case 40:throw new Error("Missing required query parameter: siteId");case 41:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updatePaymentInstrumentInBasket: ".concat(e))})),s=new hu("/organizations/{organizationId}/baskets/{basketId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=48,qs(s.toString(),{method:"PATCH",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 48:return d=e.sent,e.abrupt("return",d);case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return v.apply(this,arguments)})},{key:"getPaymentMethodsForBasket",value:(g=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPaymentMethodsForBasket: ".concat(e))})),s=new hu("/organizations/{organizationId}/baskets/{basketId}/payment-methods",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=38,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 38:return d=e.sent,e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"addPriceAdjustmentToBasket",value:(p=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for addPriceAdjustmentToBasket: ".concat(e))})),s=new hu("/organizations/{organizationId}/baskets/{basketId}/price-adjustments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=38,qs(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 38:return d=e.sent,e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"removePriceAdjustmentFromBasket",value:(l=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.priceAdjustmentId){e.next=25;break}a.priceAdjustmentId=n.priceAdjustmentId,e.next=30;break;case 25:if(void 0===i.priceAdjustmentId){e.next=29;break}a.priceAdjustmentId=i.priceAdjustmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: priceAdjustmentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for removePriceAdjustmentFromBasket: ".concat(e))})),s=new hu("/organizations/{organizationId}/baskets/{basketId}/price-adjustments/{priceAdjustmentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=47,qs(s.toString(),{method:"DELETE",headers:c},this.clientConfig,r);case 47:return d=e.sent,e.abrupt("return",d);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"updatePriceAdjustmentInBasket",value:(f=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.priceAdjustmentId){e.next=25;break}a.priceAdjustmentId=n.priceAdjustmentId,e.next=30;break;case 25:if(void 0===i.priceAdjustmentId){e.next=29;break}a.priceAdjustmentId=i.priceAdjustmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: priceAdjustmentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updatePriceAdjustmentInBasket: ".concat(e))})),s=new hu("/organizations/{organizationId}/baskets/{basketId}/price-adjustments/{priceAdjustmentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=46,qs(s.toString(),{method:"PATCH",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 46:return d=e.sent,e.abrupt("return",d);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"getPriceBooksForBasket",value:(h=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPriceBooksForBasket: ".concat(e))})),s=new hu("/organizations/{organizationId}/baskets/{basketId}/price-books",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=37,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 37:return d=e.sent,e.abrupt("return",d);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"addPriceBooksToBasket",value:(u=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for addPriceBooksToBasket: ".concat(e))})),s=new hu("/organizations/{organizationId}/baskets/{basketId}/price-books",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=37,qs(s.toString(),{method:"PUT",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 37:if(d=e.sent,!r){e.next=40;break}return e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"createShipmentForBasket",value:(d=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for createShipmentForBasket: ".concat(e))})),s=new hu("/organizations/{organizationId}/baskets/{basketId}/shipments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=38,qs(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 38:return d=e.sent,e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"removeShipmentFromBasket",value:(c=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.shipmentId){e.next=25;break}a.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===i.shipmentId){e.next=29;break}a.shipmentId=i.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for removeShipmentFromBasket: ".concat(e))})),s=new hu("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=47,qs(s.toString(),{method:"DELETE",headers:c},this.clientConfig,r);case 47:return d=e.sent,e.abrupt("return",d);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"updateShipmentForBasket",value:(s=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.shipmentId){e.next=25;break}a.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===i.shipmentId){e.next=29;break}a.shipmentId=i.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateShipmentForBasket: ".concat(e))})),s=new hu("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=47,qs(s.toString(),{method:"PATCH",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 47:return d=e.sent,e.abrupt("return",d);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"updateShippingAddressForShipment",value:(o=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.shipmentId){e.next=25;break}a.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===i.shipmentId){e.next=29;break}a.shipmentId=i.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(o={},void 0!==n.useAsBilling?o.useAsBilling=n.useAsBilling:void 0!==i.useAsBilling&&(o.useAsBilling=i.useAsBilling),void 0!==n.removeExternalTax?o.removeExternalTax=n.removeExternalTax:void 0!==i.removeExternalTax&&(o.removeExternalTax=i.removeExternalTax),void 0===n.siteId){e.next=37;break}o.siteId=n.siteId,e.next=42;break;case 37:if(void 0===i.siteId){e.next=41;break}o.siteId=i.siteId,e.next=42;break;case 41:throw new Error("Missing required query parameter: siteId");case 42:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateShippingAddressForShipment: ".concat(e))})),s=new hu("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-address",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=49,qs(s.toString(),{method:"PUT",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 49:return d=e.sent,e.abrupt("return",d);case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"updateShippingMethodForShipment",value:(a=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.shipmentId){e.next=25;break}a.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===i.shipmentId){e.next=29;break}a.shipmentId=i.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateShippingMethodForShipment: ".concat(e))})),s=new hu("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-method",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=47,qs(s.toString(),{method:"PUT",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 47:return d=e.sent,e.abrupt("return",d);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"getShippingMethodsForShipment",value:(i=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.shipmentId){e.next=25;break}a.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===i.shipmentId){e.next=29;break}a.shipmentId=i.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getShippingMethodsForShipment: ".concat(e))})),s=new hu("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-methods",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=47,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 47:return d=e.sent,e.abrupt("return",d);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"updateAsStorefrontBasket",value:(n=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0!==n.exchange?o.exchange=n.exchange:void 0!==i.exchange&&(o.exchange=i.exchange),void 0===n.siteId){e.next=27;break}o.siteId=n.siteId,e.next=32;break;case 27:if(void 0===i.siteId){e.next=31;break}o.siteId=i.siteId,e.next=32;break;case 31:throw new Error("Missing required query parameter: siteId");case 32:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateAsStorefrontBasket: ".concat(e))})),s=new hu("/organizations/{organizationId}/baskets/{basketId}/storefront",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=39,qs(s.toString(),{method:"PUT",headers:c},this.clientConfig,r);case 39:return d=e.sent,e.abrupt("return",d);case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getTaxesFromBasket",value:(r=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getTaxesFromBasket: ".concat(e))})),s=new hu("/organizations/{organizationId}/baskets/{basketId}/taxes",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=37,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 37:return d=e.sent,e.abrupt("return",d);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"addTaxesForBasket",value:(t=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for addTaxesForBasket: ".concat(e))})),s=new hu("/organizations/{organizationId}/baskets/{basketId}/taxes",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=37,qs(s.toString(),{method:"PUT",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 37:if(d=e.sent,!r){e.next=40;break}return e.abrupt("return",d);case 40: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 bu(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){vi(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}vi(gu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-baskets/{version}");var Iu=function(){function e(t){li(this,e),vi(this,"clientConfig",void 0);var r=bu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Wo(r)}var t,r,n,i;return gi(e,[{key:"getShopperContext",value:(i=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.usid){e.next=16;break}a.usid=n.usid,e.next=21;break;case 16:if(void 0===i.usid){e.next=20;break}a.usid=i.usid,e.next=21;break;case 20:throw new Error("Missing required path parameter: usid");case 21:return o={},void 0!==n.siteId?o.siteId=n.siteId:void 0!==i.siteId&&(o.siteId=i.siteId),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getShopperContext: ".concat(e))})),s=new hu("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=bu(bu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=29,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 29:return d=e.sent,e.abrupt("return",d);case 31:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"createShopperContext",value:(n=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.usid){e.next=16;break}a.usid=n.usid,e.next=21;break;case 16:if(void 0===i.usid){e.next=20;break}a.usid=i.usid,e.next=21;break;case 20:throw new Error("Missing required path parameter: usid");case 21:return o={},void 0!==n.siteId?o.siteId=n.siteId:void 0!==i.siteId&&(o.siteId=i.siteId),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for createShopperContext: ".concat(e))})),s=new hu("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=bu(bu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=29,qs(s.toString(),{method:"PUT",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 29:return d=e.sent,e.abrupt("return",d);case 31:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"deleteShopperContext",value:(r=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.usid){e.next=16;break}a.usid=n.usid,e.next=21;break;case 16:if(void 0===i.usid){e.next=20;break}a.usid=i.usid,e.next=21;break;case 20:throw new Error("Missing required path parameter: usid");case 21:return o={},void 0!==n.siteId?o.siteId=n.siteId:void 0!==i.siteId&&(o.siteId=i.siteId),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for deleteShopperContext: ".concat(e))})),s=new hu("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=bu(bu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=29,qs(s.toString(),{method:"DELETE",headers:c},this.clientConfig,r);case 29:if(d=e.sent,!r){e.next=32;break}return e.abrupt("return",d);case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"updateShopperContext",value:(t=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.usid){e.next=16;break}a.usid=n.usid,e.next=21;break;case 16:if(void 0===i.usid){e.next=20;break}a.usid=i.usid,e.next=21;break;case 20:throw new Error("Missing required path parameter: usid");case 21:return o={},void 0!==n.siteId?o.siteId=n.siteId:void 0!==i.siteId&&(o.siteId=i.siteId),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateShopperContext: ".concat(e))})),s=new hu("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=bu(bu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=29,qs(s.toString(),{method:"PATCH",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 29:return d=e.sent,e.abrupt("return",d);case 31:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function mu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ku(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?mu(Object(r),!0).forEach((function(t){vi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}vi(Iu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/shopper/shopper-context/{version}");var yu=function(){function e(t){li(this,e),vi(this,"clientConfig",void 0);var r=ku({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Wo(r)}var t,r,n,i,a,o,s,c,d,u,h,f,l,p,g,v,b,I,m,k,y,x,w,C,P,z,O,E,q;return gi(e,[{key:"registerCustomer",value:(q=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for registerCustomer: ".concat(e))})),s=new hu("/organizations/{organizationId}/customers",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=28,qs(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 28:return d=e.sent,e.abrupt("return",d);case 30:case"end":return e.stop()}}),e,this)}))),function(e,t){return q.apply(this,arguments)})},{key:"resetPassword",value:(E=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for resetPassword: ".concat(e))})),s=new hu("/organizations/{organizationId}/customers/password/actions/reset",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=28,qs(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 28:if(d=e.sent,!r){e.next=31;break}return e.abrupt("return",d);case 31:case"end":return e.stop()}}),e,this)}))),function(e,t){return E.apply(this,arguments)})},{key:"getResetPasswordToken",value:(O=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getResetPasswordToken: ".concat(e))})),s=new hu("/organizations/{organizationId}/customers/password/actions/create-reset-token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=28,qs(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 28:return d=e.sent,e.abrupt("return",d);case 30:case"end":return e.stop()}}),e,this)}))),function(e,t){return O.apply(this,arguments)})},{key:"registerExternalProfile",value:(z=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for registerExternalProfile: ".concat(e))})),s=new hu("/organizations/{organizationId}/customers/external-profile",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=28,qs(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 28:return d=e.sent,e.abrupt("return",d);case 30:case"end":return e.stop()}}),e,this)}))),function(e,t){return z.apply(this,arguments)})},{key:"getExternalProfile",value:(P=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.externalId){e.next=17;break}o.externalId=n.externalId,e.next=22;break;case 17:if(void 0===i.externalId){e.next=21;break}o.externalId=i.externalId,e.next=22;break;case 21:throw new Error("Missing required query parameter: externalId");case 22:if(void 0===n.authenticationProviderId){e.next=26;break}o.authenticationProviderId=n.authenticationProviderId,e.next=31;break;case 26:if(void 0===i.authenticationProviderId){e.next=30;break}o.authenticationProviderId=i.authenticationProviderId,e.next=31;break;case 30:throw new Error("Missing required query parameter: authenticationProviderId");case 31:if(void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getExternalProfile: ".concat(e))})),s=new hu("/organizations/{organizationId}/customers/external-profile",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=46,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 46:return d=e.sent,e.abrupt("return",d);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return P.apply(this,arguments)})},{key:"getCustomer",value:(C=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomer: ".concat(e))})),s=new hu("/organizations/{organizationId}/customers/{customerId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=37,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 37:return d=e.sent,e.abrupt("return",d);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return C.apply(this,arguments)})},{key:"updateCustomer",value:(w=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateCustomer: ".concat(e))})),s=new hu("/organizations/{organizationId}/customers/{customerId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=37,qs(s.toString(),{method:"PATCH",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 37:return d=e.sent,e.abrupt("return",d);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return w.apply(this,arguments)})},{key:"createCustomerAddress",value:(x=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for createCustomerAddress: ".concat(e))})),s=new hu("/organizations/{organizationId}/customers/{customerId}/addresses",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=37,qs(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 37:return d=e.sent,e.abrupt("return",d);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return x.apply(this,arguments)})},{key:"getCustomerAddress",value:(y=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.addressName){e.next=25;break}a.addressName=n.addressName,e.next=30;break;case 25:if(void 0===i.addressName){e.next=29;break}a.addressName=i.addressName,e.next=30;break;case 29:throw new Error("Missing required path parameter: addressName");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerAddress: ".concat(e))})),s=new hu("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=46,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 46:return d=e.sent,e.abrupt("return",d);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return y.apply(this,arguments)})},{key:"removeCustomerAddress",value:(k=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.addressName){e.next=25;break}a.addressName=n.addressName,e.next=30;break;case 25:if(void 0===i.addressName){e.next=29;break}a.addressName=i.addressName,e.next=30;break;case 29:throw new Error("Missing required path parameter: addressName");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for removeCustomerAddress: ".concat(e))})),s=new hu("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=46,qs(s.toString(),{method:"DELETE",headers:c},this.clientConfig,r);case 46:if(d=e.sent,!r){e.next=49;break}return e.abrupt("return",d);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return k.apply(this,arguments)})},{key:"updateCustomerAddress",value:(m=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.addressName){e.next=25;break}a.addressName=n.addressName,e.next=30;break;case 25:if(void 0===i.addressName){e.next=29;break}a.addressName=i.addressName,e.next=30;break;case 29:throw new Error("Missing required path parameter: addressName");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateCustomerAddress: ".concat(e))})),s=new hu("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=46,qs(s.toString(),{method:"PATCH",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 46:return d=e.sent,e.abrupt("return",d);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return m.apply(this,arguments)})},{key:"getCustomerBaskets",value:(I=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerBaskets: ".concat(e))})),s=new hu("/organizations/{organizationId}/customers/{customerId}/baskets",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=37,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 37:return d=e.sent,e.abrupt("return",d);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return I.apply(this,arguments)})},{key:"getCustomerOrders",value:(b=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0!==n.crossSites?o.crossSites=n.crossSites:void 0!==i.crossSites&&(o.crossSites=i.crossSites),void 0!==n.from?o.from=n.from:void 0!==i.from&&(o.from=i.from),void 0!==n.until?o.until=n.until:void 0!==i.until&&(o.until=i.until),void 0!==n.status?o.status=n.status:void 0!==i.status&&(o.status=i.status),void 0===n.siteId){e.next=30;break}o.siteId=n.siteId,e.next=35;break;case 30:if(void 0===i.siteId){e.next=34;break}o.siteId=i.siteId,e.next=35;break;case 34:throw new Error("Missing required query parameter: siteId");case 35:return void 0!==n.offset?o.offset=n.offset:void 0!==i.offset&&(o.offset=i.offset),void 0!==n.limit?o.limit=n.limit:void 0!==i.limit&&(o.limit=i.limit),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerOrders: ".concat(e))})),s=new hu("/organizations/{organizationId}/customers/{customerId}/orders",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=43,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 43:return d=e.sent,e.abrupt("return",d);case 45:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"updateCustomerPassword",value:(v=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateCustomerPassword: ".concat(e))})),s=new hu("/organizations/{organizationId}/customers/{customerId}/password",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=37,qs(s.toString(),{method:"PUT",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 37:if(d=e.sent,!r){e.next=40;break}return e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return v.apply(this,arguments)})},{key:"createCustomerPaymentInstrument",value:(g=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for createCustomerPaymentInstrument: ".concat(e))})),s=new hu("/organizations/{organizationId}/customers/{customerId}/payment-instruments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=37,qs(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 37:return d=e.sent,e.abrupt("return",d);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"deleteCustomerPaymentInstrument",value:(p=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}a.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===i.paymentInstrumentId){e.next=29;break}a.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for deleteCustomerPaymentInstrument: ".concat(e))})),s=new hu("/organizations/{organizationId}/customers/{customerId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=46,qs(s.toString(),{method:"DELETE",headers:c},this.clientConfig,r);case 46:if(d=e.sent,!r){e.next=49;break}return e.abrupt("return",d);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"getCustomerPaymentInstrument",value:(l=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}a.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===i.paymentInstrumentId){e.next=29;break}a.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerPaymentInstrument: ".concat(e))})),s=new hu("/organizations/{organizationId}/customers/{customerId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=46,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 46:return d=e.sent,e.abrupt("return",d);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"getCustomerProductLists",value:(f=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerProductLists: ".concat(e))})),s=new hu("/organizations/{organizationId}/customers/{customerId}/product-lists",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=37,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 37:return d=e.sent,e.abrupt("return",d);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"createCustomerProductList",value:(h=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for createCustomerProductList: ".concat(e))})),s=new hu("/organizations/{organizationId}/customers/{customerId}/product-lists",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=37,qs(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 37:return d=e.sent,e.abrupt("return",d);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"deleteCustomerProductList",value:(u=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}a.listId=n.listId,e.next=30;break;case 25:if(void 0===i.listId){e.next=29;break}a.listId=i.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for deleteCustomerProductList: ".concat(e))})),s=new hu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=46,qs(s.toString(),{method:"DELETE",headers:c},this.clientConfig,r);case 46:if(d=e.sent,!r){e.next=49;break}return e.abrupt("return",d);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"getCustomerProductList",value:(d=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}a.listId=n.listId,e.next=30;break;case 25:if(void 0===i.listId){e.next=29;break}a.listId=i.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerProductList: ".concat(e))})),s=new hu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=46,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 46:return d=e.sent,e.abrupt("return",d);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"updateCustomerProductList",value:(c=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}a.listId=n.listId,e.next=30;break;case 25:if(void 0===i.listId){e.next=29;break}a.listId=i.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateCustomerProductList: ".concat(e))})),s=new hu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=46,qs(s.toString(),{method:"PATCH",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 46:return d=e.sent,e.abrupt("return",d);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"createCustomerProductListItem",value:(s=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}a.listId=n.listId,e.next=30;break;case 25:if(void 0===i.listId){e.next=29;break}a.listId=i.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for createCustomerProductListItem: ".concat(e))})),s=new hu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=46,qs(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 46:return d=e.sent,e.abrupt("return",d);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"deleteCustomerProductListItem",value:(o=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}a.listId=n.listId,e.next=30;break;case 25:if(void 0===i.listId){e.next=29;break}a.listId=i.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(void 0===n.itemId){e.next=34;break}a.itemId=n.itemId,e.next=39;break;case 34:if(void 0===i.itemId){e.next=38;break}a.itemId=i.itemId,e.next=39;break;case 38:throw new Error("Missing required path parameter: itemId");case 39:if(o={},void 0===n.siteId){e.next=44;break}o.siteId=n.siteId,e.next=49;break;case 44:if(void 0===i.siteId){e.next=48;break}o.siteId=i.siteId,e.next=49;break;case 48:throw new Error("Missing required query parameter: siteId");case 49:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for deleteCustomerProductListItem: ".concat(e))})),s=new hu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=55,qs(s.toString(),{method:"DELETE",headers:c},this.clientConfig,r);case 55:if(d=e.sent,!r){e.next=58;break}return e.abrupt("return",d);case 58:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"getCustomerProductListItem",value:(a=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}a.listId=n.listId,e.next=30;break;case 25:if(void 0===i.listId){e.next=29;break}a.listId=i.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(void 0===n.itemId){e.next=34;break}a.itemId=n.itemId,e.next=39;break;case 34:if(void 0===i.itemId){e.next=38;break}a.itemId=i.itemId,e.next=39;break;case 38:throw new Error("Missing required path parameter: itemId");case 39:if(o={},void 0===n.siteId){e.next=44;break}o.siteId=n.siteId,e.next=49;break;case 44:if(void 0===i.siteId){e.next=48;break}o.siteId=i.siteId,e.next=49;break;case 48:throw new Error("Missing required query parameter: siteId");case 49:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerProductListItem: ".concat(e))})),s=new hu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=55,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 55:return d=e.sent,e.abrupt("return",d);case 57:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"updateCustomerProductListItem",value:(i=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}a.listId=n.listId,e.next=30;break;case 25:if(void 0===i.listId){e.next=29;break}a.listId=i.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(void 0===n.itemId){e.next=34;break}a.itemId=n.itemId,e.next=39;break;case 34:if(void 0===i.itemId){e.next=38;break}a.itemId=i.itemId,e.next=39;break;case 38:throw new Error("Missing required path parameter: itemId");case 39:if(o={},void 0===n.siteId){e.next=44;break}o.siteId=n.siteId,e.next=49;break;case 44:if(void 0===i.siteId){e.next=48;break}o.siteId=i.siteId,e.next=49;break;case 48:throw new Error("Missing required query parameter: siteId");case 49:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateCustomerProductListItem: ".concat(e))})),s=new hu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=55,qs(s.toString(),{method:"PATCH",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 55:return d=e.sent,e.abrupt("return",d);case 57:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getPublicProductListsBySearchTerm",value:(n=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.email?o.email=n.email:void 0!==i.email&&(o.email=i.email),void 0!==n.firstName?o.firstName=n.firstName:void 0!==i.firstName&&(o.firstName=i.firstName),void 0!==n.lastName?o.lastName=n.lastName:void 0!==i.lastName&&(o.lastName=i.lastName),void 0===n.siteId){e.next=20;break}o.siteId=n.siteId,e.next=25;break;case 20:if(void 0===i.siteId){e.next=24;break}o.siteId=i.siteId,e.next=25;break;case 24:throw new Error("Missing required query parameter: siteId");case 25:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPublicProductListsBySearchTerm: ".concat(e))})),s=new hu("/organizations/{organizationId}/product-lists",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=31,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 31:return d=e.sent,e.abrupt("return",d);case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getPublicProductList",value:(r=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.listId){e.next=16;break}a.listId=n.listId,e.next=21;break;case 16:if(void 0===i.listId){e.next=20;break}a.listId=i.listId,e.next=21;break;case 20:throw new Error("Missing required path parameter: listId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPublicProductList: ".concat(e))})),s=new hu("/organizations/{organizationId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=37,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 37:return d=e.sent,e.abrupt("return",d);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getProductListItem",value:(t=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.listId){e.next=16;break}a.listId=n.listId,e.next=21;break;case 16:if(void 0===i.listId){e.next=20;break}a.listId=i.listId,e.next=21;break;case 20:throw new Error("Missing required path parameter: listId");case 21:if(void 0===n.itemId){e.next=25;break}a.itemId=n.itemId,e.next=30;break;case 25:if(void 0===i.itemId){e.next=29;break}a.itemId=i.itemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: itemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getProductListItem: ".concat(e))})),s=new hu("/organizations/{organizationId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=46,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 46:return d=e.sent,e.abrupt("return",d);case 48: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 wu(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){vi(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}vi(yu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/customer/shopper-customers/{version}");var Cu=function(){function e(t){li(this,e),vi(this,"clientConfig",void 0);var r=wu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Wo(r)}var t,r;return gi(e,[{key:"retrieveResults",value:(r=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.channelId){e.next=16;break}a.channelId=n.channelId,e.next=21;break;case 16:if(void 0===i.channelId){e.next=20;break}a.channelId=i.channelId,e.next=21;break;case 20:throw new Error("Missing required path parameter: channelId");case 21:if(o={},void 0===n.locale){e.next=26;break}o.locale=n.locale,e.next=31;break;case 26:if(void 0===i.locale){e.next=30;break}o.locale=i.locale,e.next=31;break;case 30:throw new Error("Missing required query parameter: locale");case 31:return void 0!==n.offset?o.offset=n.offset:void 0!==i.offset&&(o.offset=i.offset),void 0!==n.limit?o.limit=n.limit:void 0!==i.limit&&(o.limit=i.limit),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for retrieveResults: ".concat(e))})),s=new hu("/organizations/{organizationId}/channels/{channelId}/results",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),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=39,qs(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 39:return d=e.sent,e.abrupt("return",d);case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getSuggestions",value:(t=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.channelId){e.next=16;break}a.channelId=n.channelId,e.next=21;break;case 16:if(void 0===i.channelId){e.next=20;break}a.channelId=i.channelId,e.next=21;break;case 20:throw new Error("Missing required path parameter: channelId");case 21:if(o={},void 0===n.suggestionTypes){e.next=26;break}o.suggestionTypes=n.suggestionTypes,e.next=31;break;case 26:if(void 0===i.suggestionTypes){e.next=30;break}o.suggestionTypes=i.suggestionTypes,e.next=31;break;case 30:throw new Error("Missing required query parameter: suggestionTypes");case 31:if(void 0!==n.searchText?o.searchText=n.searchText:void 0!==i.searchText&&(o.searchText=i.searchText),void 0===n.locale){e.next=36;break}o.locale=n.locale,e.next=41;break;case 36:if(void 0===i.locale){e.next=40;break}o.locale=i.locale,e.next=41;break;case 40:throw new Error("Missing required query parameter: locale");case 41:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getSuggestions: ".concat(e))})),s=new hu("/organizations/{organizationId}/channels/{channelId}/suggestions",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=wu(wu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=47,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 47:return d=e.sent,e.abrupt("return",d);case 49: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 zu(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){vi(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}vi(Cu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/discovery/query/{version}");var Ou=function(){function e(t){li(this,e),vi(this,"clientConfig",void 0);var r=zu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Wo(r)}var t,r;return gi(e,[{key:"getPages",value:(r=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.categoryId?o.categoryId=n.categoryId:void 0!==i.categoryId&&(o.categoryId=i.categoryId),void 0!==n.productId?o.productId=n.productId:void 0!==i.productId&&(o.productId=i.productId),void 0===n.aspectTypeId){e.next=19;break}o.aspectTypeId=n.aspectTypeId,e.next=24;break;case 19:if(void 0===i.aspectTypeId){e.next=23;break}o.aspectTypeId=i.aspectTypeId,e.next=24;break;case 23:throw new Error("Missing required query parameter: aspectTypeId");case 24:if(void 0!==n.aspectAttributes?o.aspectAttributes=n.aspectAttributes:void 0!==i.aspectAttributes&&(o.aspectAttributes=i.aspectAttributes),void 0!==n.parameters?o.parameters=n.parameters:void 0!==i.parameters&&(o.parameters=i.parameters),void 0===n.siteId){e.next=30;break}o.siteId=n.siteId,e.next=35;break;case 30:if(void 0===i.siteId){e.next=34;break}o.siteId=i.siteId,e.next=35;break;case 34:throw new Error("Missing required query parameter: siteId");case 35:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPages: ".concat(e))})),s=new hu("/organizations/{organizationId}/pages",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=zu(zu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=42,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 42:return d=e.sent,e.abrupt("return",d);case 44:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getPage",value:(t=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.pageId){e.next=16;break}a.pageId=n.pageId,e.next=21;break;case 16:if(void 0===i.pageId){e.next=20;break}a.pageId=i.pageId,e.next=21;break;case 20:throw new Error("Missing required path parameter: pageId");case 21:if(o={},void 0!==n.aspectAttributes?o.aspectAttributes=n.aspectAttributes:void 0!==i.aspectAttributes&&(o.aspectAttributes=i.aspectAttributes),void 0!==n.parameters?o.parameters=n.parameters:void 0!==i.parameters&&(o.parameters=i.parameters),void 0===n.siteId){e.next=28;break}o.siteId=n.siteId,e.next=33;break;case 28:if(void 0===i.siteId){e.next=32;break}o.siteId=i.siteId,e.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPage: ".concat(e))})),s=new hu("/organizations/{organizationId}/pages/{pageId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=zu(zu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=40,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 40:return d=e.sent,e.abrupt("return",d);case 42: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){vi(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}vi(Ou,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/experience/shopper-experience/{version}");var ju=function(){function e(t){li(this,e),vi(this,"clientConfig",void 0);var r=qu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Wo(r)}var t;return gi(e,[{key:"getGiftCertificate",value:(t=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getGiftCertificate: ".concat(e))})),s=new hu("/organizations/{organizationId}/gift-certificate",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),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=28,qs(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 28:return d=e.sent,e.abrupt("return",d);case 30: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){vi(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}vi(ju,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/pricing/shopper-gift-certificates/{version}");var Mu=function(){function e(t){li(this,e),vi(this,"clientConfig",void 0);var r=Tu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Wo(r)}var t,r,n,i,a,o,s,c,d,u,h,f,l,p,g,v,b;return gi(e,[{key:"authenticateCustomer",value:(b=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for authenticateCustomer: ".concat(e))})),s=new hu("/organizations/{organizationId}/oauth2/login",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Tu(Tu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=19,qs(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 19:if(d=e.sent,!r){e.next=22;break}return e.abrupt("return",d);case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"authorizePasswordlessCustomer",value:(v=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for authorizePasswordlessCustomer: ".concat(e))})),s=new hu("/organizations/{organizationId}/oauth2/passwordless/login",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Tu(Tu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=19,qs(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 19:return d=e.sent,e.abrupt("return",d);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return v.apply(this,arguments)})},{key:"logoutCustomer",value:(g=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.client_id){e.next=17;break}o.client_id=n.client_id,e.next=22;break;case 17:if(void 0===i.client_id){e.next=21;break}o.client_id=i.client_id,e.next=22;break;case 21:throw new Error("Missing required query parameter: client_id");case 22:if(void 0===n.refresh_token){e.next=26;break}o.refresh_token=n.refresh_token,e.next=31;break;case 26:if(void 0===i.refresh_token){e.next=30;break}o.refresh_token=i.refresh_token,e.next=31;break;case 30:throw new Error("Missing required query parameter: refresh_token");case 31:return void 0!==n.channel_id?o.channel_id=n.channel_id:void 0!==i.channel_id&&(o.channel_id=i.channel_id),void 0!==n.hint?o.hint=n.hint:void 0!==i.hint&&(o.hint=i.hint),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for logoutCustomer: ".concat(e))})),s=new hu("/organizations/{organizationId}/oauth2/logout",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Tu(Tu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=39,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 39:return d=e.sent,e.abrupt("return",d);case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"authorizeCustomer",value:(p=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.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 for authorizeCustomer: ".concat(e))})),s=new hu("/organizations/{organizationId}/oauth2/authorize",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Tu(Tu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=61,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 61:if(d=e.sent,!r){e.next=64;break}return e.abrupt("return",d);case 64:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"getAccessToken",value:(l=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getAccessToken: ".concat(e))})),s=new hu("/organizations/{organizationId}/oauth2/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Tu(Tu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=19,qs(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 19:return d=e.sent,e.abrupt("return",d);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"getSessionBridgeAccessToken",value:(f=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getSessionBridgeAccessToken: ".concat(e))})),s=new hu("/organizations/{organizationId}/oauth2/session-bridge/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Tu(Tu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=19,qs(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 19:return d=e.sent,e.abrupt("return",d);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"getTrustedSystemAccessToken",value:(h=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getTrustedSystemAccessToken: ".concat(e))})),s=new hu("/organizations/{organizationId}/oauth2/trusted-system/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Tu(Tu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=19,qs(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 19:return d=e.sent,e.abrupt("return",d);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"getTrustedAgentAuthorizationToken",value:(u=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.client_id){e.next=17;break}o.client_id=n.client_id,e.next=22;break;case 17:if(void 0===i.client_id){e.next=21;break}o.client_id=i.client_id,e.next=22;break;case 21:throw new Error("Missing required query parameter: client_id");case 22:if(void 0===n.channel_id){e.next=26;break}o.channel_id=n.channel_id,e.next=31;break;case 26:if(void 0===i.channel_id){e.next=30;break}o.channel_id=i.channel_id,e.next=31;break;case 30:throw new Error("Missing required query parameter: channel_id");case 31:if(void 0===n.code_challenge){e.next=35;break}o.code_challenge=n.code_challenge,e.next=40;break;case 35:if(void 0===i.code_challenge){e.next=39;break}o.code_challenge=i.code_challenge,e.next=40;break;case 39:throw new Error("Missing required query parameter: code_challenge");case 40:if(void 0===n.login_id){e.next=44;break}o.login_id=n.login_id,e.next=49;break;case 44:if(void 0===i.login_id){e.next=48;break}o.login_id=i.login_id,e.next=49;break;case 48:throw new Error("Missing required query parameter: login_id");case 49:if(void 0===n.idp_origin){e.next=53;break}o.idp_origin=n.idp_origin,e.next=58;break;case 53:if(void 0===i.idp_origin){e.next=57;break}o.idp_origin=i.idp_origin,e.next=58;break;case 57:throw new Error("Missing required query parameter: idp_origin");case 58:if(void 0===n.redirect_uri){e.next=62;break}o.redirect_uri=n.redirect_uri,e.next=67;break;case 62:if(void 0===i.redirect_uri){e.next=66;break}o.redirect_uri=i.redirect_uri,e.next=67;break;case 66:throw new Error("Missing required query parameter: redirect_uri");case 67:if(void 0===n.response_type){e.next=71;break}o.response_type=n.response_type,e.next=76;break;case 71:if(void 0===i.response_type){e.next=75;break}o.response_type=i.response_type,e.next=76;break;case 75:throw new Error("Missing required query parameter: response_type");case 76:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getTrustedAgentAuthorizationToken: ".concat(e))})),s=new hu("/organizations/{organizationId}/oauth2/trusted-agent/authorize",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Tu(Tu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=82,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 82:if(d=e.sent,!r){e.next=85;break}return e.abrupt("return",d);case 85:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"getTrustedAgentAccessToken",value:(d=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getTrustedAgentAccessToken: ".concat(e))})),s=new hu("/organizations/{organizationId}/oauth2/trusted-agent/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Tu(Tu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=19,qs(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 19:return d=e.sent,e.abrupt("return",d);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"getPasswordResetToken",value:(c=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPasswordResetToken: ".concat(e))})),s=new hu("/organizations/{organizationId}/oauth2/password/reset",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Tu(Tu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=19,qs(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 19:if(d=e.sent,!r){e.next=22;break}return e.abrupt("return",d);case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"resetPassword",value:(s=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for resetPassword: ".concat(e))})),s=new hu("/organizations/{organizationId}/oauth2/password/action",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Tu(Tu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=19,qs(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 19:if(d=e.sent,!r){e.next=22;break}return e.abrupt("return",d);case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"getPasswordLessAccessToken",value:(o=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPasswordLessAccessToken: ".concat(e))})),s=new hu("/organizations/{organizationId}/oauth2/passwordless/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Tu(Tu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=19,qs(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 19:return d=e.sent,e.abrupt("return",d);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"revokeToken",value:(a=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for revokeToken: ".concat(e))})),s=new hu("/organizations/{organizationId}/oauth2/revoke",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Tu(Tu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=19,qs(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 19:return d=e.sent,e.abrupt("return",d);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"introspectToken",value:(i=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for introspectToken: ".concat(e))})),s=new hu("/organizations/{organizationId}/oauth2/introspect",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Tu(Tu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=19,qs(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 19:return d=e.sent,e.abrupt("return",d);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getUserInfo",value:(n=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},void 0!==n.channel_id?o.channel_id=n.channel_id:void 0!==i.channel_id&&(o.channel_id=i.channel_id),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getUserInfo: ".concat(e))})),s=new hu("/organizations/{organizationId}/oauth2/userinfo",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Tu(Tu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=20,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 20:return d=e.sent,e.abrupt("return",d);case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getWellknownOpenidConfiguration",value:(r=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getWellknownOpenidConfiguration: ".concat(e))})),s=new hu("/organizations/{organizationId}/oauth2/.well-known/openid-configuration",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Tu(Tu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=19,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 19:return d=e.sent,e.abrupt("return",d);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getJwksUri",value:(t=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getJwksUri: ".concat(e))})),s=new hu("/organizations/{organizationId}/oauth2/jwks",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Tu(Tu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=19,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 19:return d=e.sent,e.abrupt("return",d);case 21:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function _u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Au(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_u(Object(r),!0).forEach((function(t){vi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}vi(Mu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/{version}");var Uu=function(){function e(t){li(this,e),vi(this,"clientConfig",void 0);var r=Au({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Wo(r)}var t,r,n,i,a,o,s,c;return gi(e,[{key:"createOrder",value:(c=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for createOrder: ".concat(e))})),s=new hu("/organizations/{organizationId}/orders",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Au(Au({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=29,qs(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 29:return d=e.sent,e.abrupt("return",d);case 31:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"getOrder",value:(s=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}a.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===i.orderNo){e.next=20;break}a.orderNo=i.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getOrder: ".concat(e))})),s=new hu("/organizations/{organizationId}/orders/{orderNo}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Au(Au({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=38,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 38:return d=e.sent,e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"guestOrderLookup",value:(o=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}a.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===i.orderNo){e.next=20;break}a.orderNo=i.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for guestOrderLookup: ".concat(e))})),s=new hu("/organizations/{organizationId}/orders/{orderNo}/lookup",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Au(Au({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=38,qs(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 38:return d=e.sent,e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"createPaymentInstrumentForOrder",value:(a=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}a.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===i.orderNo){e.next=20;break}a.orderNo=i.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for createPaymentInstrumentForOrder: ".concat(e))})),s=new hu("/organizations/{organizationId}/orders/{orderNo}/payment-instruments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Au(Au({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=38,qs(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 38:return d=e.sent,e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"removePaymentInstrumentFromOrder",value:(i=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}a.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===i.orderNo){e.next=20;break}a.orderNo=i.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}a.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===i.paymentInstrumentId){e.next=29;break}a.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for removePaymentInstrumentFromOrder: ".concat(e))})),s=new hu("/organizations/{organizationId}/orders/{orderNo}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Au(Au({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=47,qs(s.toString(),{method:"DELETE",headers:c},this.clientConfig,r);case 47:return d=e.sent,e.abrupt("return",d);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"updatePaymentInstrumentForOrder",value:(n=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}a.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===i.orderNo){e.next=20;break}a.orderNo=i.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}a.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===i.paymentInstrumentId){e.next=29;break}a.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updatePaymentInstrumentForOrder: ".concat(e))})),s=new hu("/organizations/{organizationId}/orders/{orderNo}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Au(Au({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=47,qs(s.toString(),{method:"PATCH",headers:c,body:this.clientConfig.transformRequest(t.body,c)},this.clientConfig,r);case 47:return d=e.sent,e.abrupt("return",d);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getPaymentMethodsForOrder",value:(r=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}a.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===i.orderNo){e.next=20;break}a.orderNo=i.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPaymentMethodsForOrder: ".concat(e))})),s=new hu("/organizations/{organizationId}/orders/{orderNo}/payment-methods",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Au(Au({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=38,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 38:return d=e.sent,e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getTaxesFromOrder",value:(t=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}a.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===i.orderNo){e.next=20;break}a.orderNo=i.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getTaxesFromOrder: ".concat(e))})),s=new hu("/organizations/{organizationId}/orders/{orderNo}/taxes",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Au(Au({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=37,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 37:return d=e.sent,e.abrupt("return",d);case 39: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 Bu(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){vi(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}vi(Uu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-orders/{version}");var Lu=function(){function e(t){li(this,e),vi(this,"clientConfig",void 0);var r=Bu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Wo(r)}var t,r,n,i;return gi(e,[{key:"getProducts",value:(i=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.select?o.select=n.select:void 0!==i.select&&(o.select=i.select),void 0===n.ids){e.next=18;break}o.ids=n.ids,e.next=23;break;case 18:if(void 0===i.ids){e.next=22;break}o.ids=i.ids,e.next=23;break;case 22:throw new Error("Missing required query parameter: ids");case 23:if(void 0!==n.inventoryIds?o.inventoryIds=n.inventoryIds:void 0!==i.inventoryIds&&(o.inventoryIds=i.inventoryIds),void 0!==n.currency?o.currency=n.currency:void 0!==i.currency&&(o.currency=i.currency),void 0!==n.expand?o.expand=n.expand:void 0!==i.expand&&(o.expand=i.expand),void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),void 0!==n.allImages?o.allImages=n.allImages:void 0!==i.allImages&&(o.allImages=i.allImages),void 0!==n.perPricebook?o.perPricebook=n.perPricebook:void 0!==i.perPricebook&&(o.perPricebook=i.perPricebook),void 0===n.siteId){e.next=33;break}o.siteId=n.siteId,e.next=38;break;case 33:if(void 0===i.siteId){e.next=37;break}o.siteId=i.siteId,e.next=38;break;case 37:throw new Error("Missing required query parameter: siteId");case 38:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getProducts: ".concat(e))})),s=new hu("/organizations/{organizationId}/products",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Bu(Bu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=44,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 44:return d=e.sent,e.abrupt("return",d);case 46:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getProduct",value:(n=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.id){e.next=16;break}a.id=n.id,e.next=21;break;case 16:if(void 0===i.id){e.next=20;break}a.id=i.id,e.next=21;break;case 20:throw new Error("Missing required path parameter: id");case 21:if(o={},void 0!==n.select?o.select=n.select:void 0!==i.select&&(o.select=i.select),void 0!==n.inventoryIds?o.inventoryIds=n.inventoryIds:void 0!==i.inventoryIds&&(o.inventoryIds=i.inventoryIds),void 0!==n.currency?o.currency=n.currency:void 0!==i.currency&&(o.currency=i.currency),void 0!==n.expand?o.expand=n.expand:void 0!==i.expand&&(o.expand=i.expand),void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),void 0!==n.allImages?o.allImages=n.allImages:void 0!==i.allImages&&(o.allImages=i.allImages),void 0!==n.perPricebook?o.perPricebook=n.perPricebook:void 0!==i.perPricebook&&(o.perPricebook=i.perPricebook),void 0===n.siteId){e.next=33;break}o.siteId=n.siteId,e.next=38;break;case 33:if(void 0===i.siteId){e.next=37;break}o.siteId=i.siteId,e.next=38;break;case 37:throw new Error("Missing required query parameter: siteId");case 38:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getProduct: ".concat(e))})),s=new hu("/organizations/{organizationId}/products/{id}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Bu(Bu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=44,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 44:return d=e.sent,e.abrupt("return",d);case 46:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getCategories",value:(r=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.ids){e.next=17;break}o.ids=n.ids,e.next=22;break;case 17:if(void 0===i.ids){e.next=21;break}o.ids=i.ids,e.next=22;break;case 21:throw new Error("Missing required query parameter: ids");case 22:if(void 0!==n.levels?o.levels=n.levels:void 0!==i.levels&&(o.levels=i.levels),void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),void 0===n.siteId){e.next=28;break}o.siteId=n.siteId,e.next=33;break;case 28:if(void 0===i.siteId){e.next=32;break}o.siteId=i.siteId,e.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getCategories: ".concat(e))})),s=new hu("/organizations/{organizationId}/categories",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Bu(Bu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=39,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 39:return d=e.sent,e.abrupt("return",d);case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getCategory",value:(t=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.id){e.next=16;break}a.id=n.id,e.next=21;break;case 16:if(void 0===i.id){e.next=20;break}a.id=i.id,e.next=21;break;case 20:throw new Error("Missing required path parameter: id");case 21:if(o={},void 0!==n.levels?o.levels=n.levels:void 0!==i.levels&&(o.levels=i.levels),void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),void 0===n.siteId){e.next=28;break}o.siteId=n.siteId,e.next=33;break;case 28:if(void 0===i.siteId){e.next=32;break}o.siteId=i.siteId,e.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getCategory: ".concat(e))})),s=new hu("/organizations/{organizationId}/categories/{id}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Bu(Bu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=39,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 39:return d=e.sent,e.abrupt("return",d);case 41:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function Nu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Du(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Nu(Object(r),!0).forEach((function(t){vi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Nu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}vi(Lu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/product/shopper-products/{version}");var Wu=function(){function e(t){li(this,e),vi(this,"clientConfig",void 0);var r=Du({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Wo(r)}var t,r;return gi(e,[{key:"getPromotions",value:(r=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:if(void 0===n.ids){e.next=26;break}o.ids=n.ids,e.next=31;break;case 26:if(void 0===i.ids){e.next=30;break}o.ids=i.ids,e.next=31;break;case 30:throw new Error("Missing required query parameter: ids");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPromotions: ".concat(e))})),s=new hu("/organizations/{organizationId}/promotions",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Du(Du({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=38,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 38:return d=e.sent,e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getPromotionsForCampaign",value:(t=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.campaignId){e.next=16;break}a.campaignId=n.campaignId,e.next=21;break;case 16:if(void 0===i.campaignId){e.next=20;break}a.campaignId=i.campaignId,e.next=21;break;case 20:throw new Error("Missing required path parameter: campaignId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.startDate?o.startDate=n.startDate:void 0!==i.startDate&&(o.startDate=i.startDate),void 0!==n.endDate?o.endDate=n.endDate:void 0!==i.endDate&&(o.endDate=i.endDate),void 0!==n.currency?o.currency=n.currency:void 0!==i.currency&&(o.currency=i.currency),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPromotionsForCampaign: ".concat(e))})),s=new hu("/organizations/{organizationId}/promotions/campaigns/{campaignId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Du(Du({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=40,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 40:return d=e.sent,e.abrupt("return",d);case 42:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();vi(Wu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/pricing/shopper-promotions/{version}");var Fu=TypeError,Gu=function(e,t){if(!delete e[t])throw Fu("Cannot delete property "+K(t)+" of "+K(e))},Hu=L.match(/firefox\/(\d+)/i),Vu=!!Hu&&+Hu[1],$u=/MSIE|Trident/.test(L),Yu=L.match(/AppleWebKit\/(\d+)\./),Ju=!!Yu&&+Yu[1],Ku=[],Qu=C(Ku.sort),Xu=C(Ku.push),Zu=h((function(){Ku.sort(void 0)})),eh=h((function(){Ku.sort(null)})),th=Dn("sort"),rh=!h((function(){if(G)return G<70;if(!(Vu&&Vu>3)){if($u)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++)Ku.push({k:t+n,v:r})}for(Ku.sort((function(e,t){return t.v-e.v})),n=0;n<Ku.length;n++)t=Ku[n].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}}));function nh(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 ih(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?nh(Object(r),!0).forEach((function(t){vi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nh(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Rt({target:"Array",proto:!0,forced:Zu||!eh||!th||!rh},{sort:function(e){void 0!==e&&X(e);var t=oe(this);if(rh)return void 0===e?Qu(t):Qu(t,e);var r,n,i=[],a=vt(t);for(n=0;n<a;n++)n in t&&Xu(i,t[n]);for(Qa(i,function(e){return function(t,r){return void 0===r?-1:void 0===t?1:void 0!==e?+e(t,r)||0:Yt(t)>Yt(r)?1:-1}}(e)),r=i.length,n=0;n<r;)t[n]=i[n++];for(;n<a;)Gu(t,n++);return t}});var ah=function(){function e(t){li(this,e),vi(this,"clientConfig",void 0);var r=ih({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Wo(r)}var t,r;return gi(e,[{key:"productSearch",value:(r=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.select?o.select=n.select:void 0!==i.select&&(o.select=i.select),void 0===n.siteId){e.next=18;break}o.siteId=n.siteId,e.next=23;break;case 18:if(void 0===i.siteId){e.next=22;break}o.siteId=i.siteId,e.next=23;break;case 22:throw new Error("Missing required query parameter: siteId");case 23:return void 0!==n.q?o.q=n.q:void 0!==i.q&&(o.q=i.q),void 0!==n.refine?o.refine=n.refine:void 0!==i.refine&&(o.refine=i.refine),void 0!==n.sort?o.sort=n.sort:void 0!==i.sort&&(o.sort=i.sort),void 0!==n.currency?o.currency=n.currency:void 0!==i.currency&&(o.currency=i.currency),void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),void 0!==n.expand?o.expand=n.expand:void 0!==i.expand&&(o.expand=i.expand),void 0!==n.allImages?o.allImages=n.allImages:void 0!==i.allImages&&(o.allImages=i.allImages),void 0!==n.perPricebook?o.perPricebook=n.perPricebook:void 0!==i.perPricebook&&(o.perPricebook=i.perPricebook),void 0!==n.allVariationProperties?o.allVariationProperties=n.allVariationProperties:void 0!==i.allVariationProperties&&(o.allVariationProperties=i.allVariationProperties),void 0!==n.offset?o.offset=n.offset:void 0!==i.offset&&(o.offset=i.offset),void 0!==n.limit?o.limit=n.limit:void 0!==i.limit&&(o.limit=i.limit),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for productSearch: ".concat(e))})),s=new hu("/organizations/{organizationId}/product-search",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ih(ih({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=40,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 40:return d=e.sent,e.abrupt("return",d);case 42:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getSearchSuggestions",value:(t=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:if(void 0===n.q){e.next=26;break}o.q=n.q,e.next=31;break;case 26:if(void 0===i.q){e.next=30;break}o.q=i.q,e.next=31;break;case 30:throw new Error("Missing required query parameter: q");case 31:return void 0!==n.limit?o.limit=n.limit:void 0!==i.limit&&(o.limit=i.limit),void 0!==n.currency?o.currency=n.currency:void 0!==i.currency&&(o.currency=i.currency),void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getSearchSuggestions: ".concat(e))})),s=new hu("/organizations/{organizationId}/search-suggestions",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ih(ih({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=40,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 40:return d=e.sent,e.abrupt("return",d);case 42:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function oh(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 sh(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?oh(Object(r),!0).forEach((function(t){vi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):oh(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}vi(ah,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/search/shopper-search/{version}/");var ch=function(){function e(t){li(this,e),vi(this,"clientConfig",void 0);var r=sh({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Wo(r)}var t;return gi(e,[{key:"getUrlMapping",value:(t=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.urlSegment){e.next=17;break}o.urlSegment=n.urlSegment,e.next=22;break;case 17:if(void 0===i.urlSegment){e.next=21;break}o.urlSegment=i.urlSegment,e.next=22;break;case 21:throw new Error("Missing required query parameter: urlSegment");case 22:if(void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getUrlMapping: ".concat(e))})),s=new hu("/organizations/{organizationId}/url-mapping",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=sh(sh({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=38,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 38:return d=e.sent,e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function dh(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 uh(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?dh(Object(r),!0).forEach((function(t){vi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dh(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}vi(ch,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/site/shopper-seo/{version}");var hh=function(){function e(t){li(this,e),vi(this,"clientConfig",void 0);var r=uh({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Wo(r)}var t,r;return gi(e,[{key:"searchStores",value:(r=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.countryCode?o.countryCode=n.countryCode:void 0!==i.countryCode&&(o.countryCode=i.countryCode),void 0!==n.distanceUnit?o.distanceUnit=n.distanceUnit:void 0!==i.distanceUnit&&(o.distanceUnit=i.distanceUnit),void 0!==n.latitude?o.latitude=n.latitude:void 0!==i.latitude&&(o.latitude=i.latitude),void 0!==n.longitude?o.longitude=n.longitude:void 0!==i.longitude&&(o.longitude=i.longitude),void 0!==n.maxDistance?o.maxDistance=n.maxDistance:void 0!==i.maxDistance&&(o.maxDistance=i.maxDistance),void 0!==n.postalCode?o.postalCode=n.postalCode:void 0!==i.postalCode&&(o.postalCode=i.postalCode),void 0===n.siteId){e.next=23;break}o.siteId=n.siteId,e.next=28;break;case 23:if(void 0===i.siteId){e.next=27;break}o.siteId=i.siteId,e.next=28;break;case 27:throw new Error("Missing required query parameter: siteId");case 28:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),void 0!==n.offset?o.offset=n.offset:void 0!==i.offset&&(o.offset=i.offset),void 0!==n.limit?o.limit=n.limit:void 0!==i.limit&&(o.limit=i.limit),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for searchStores: ".concat(e))})),s=new hu("/organizations/{organizationId}/store-search",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=uh(uh({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=37,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 37:return d=e.sent,e.abrupt("return",d);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getStores",value:(t=fi(Wi.mark((function e(t,r){var n,i,a,o,s,c,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:if(void 0===n.ids){e.next=26;break}o.ids=n.ids,e.next=31;break;case 26:if(void 0===i.ids){e.next=30;break}o.ids=i.ids,e.next=31;break;case 30:throw new Error("Missing required query parameter: ids");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getStores: ".concat(e))})),s=new hu("/organizations/{organizationId}/stores",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=uh(uh({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(c["user-agent"]=[c["user-agent"],fu].join(" ")),e.next=38,qs(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 38:return d=e.sent,e.abrupt("return",d);case 40:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();vi(hh,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/store/shopper-stores/{version}");var fh=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};Xs("search",(function(e,t,r){return[function(t){var r=T(this),n=null==t?void 0:Z(t,e);return n?g(n,t,r):new RegExp(t)[e](Yt(r))},function(e){var n=Se(this),i=Yt(e),a=r(t,n,i);if(a.done)return a.value;var o=n.lastIndex;fh(o,0)||(n.lastIndex=0);var s=dc(n,i);return fh(n.lastIndex,o)||(n.lastIndex=o),null===s?-1:s.index}]}));var lh=Mr.map,ph=Sn("map");Rt({target:"Array",proto:!0,forced:!ph},{map:function(e){return lh(this,e,arguments.length>1?arguments[1]:void 0)}});var gh=be("iterator"),vh=!1;try{var bh=0,Ih={next:function(){return{done:!!bh++}},return:function(){vh=!0}};Ih[gh]=function(){return this},Array.from(Ih,(function(){throw 2}))}catch(e){}var mh,kh,yh,xh=function(e,t){if(!t&&!vh)return!1;var r=!1;try{var n={};n[gh]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r},wh="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView,Ch=Ae.f,Ph=it.enforce,zh=it.get,Oh=u.Int8Array,Eh=Oh&&Oh.prototype,qh=u.Uint8ClampedArray,jh=qh&&qh.prototype,Sh=Oh&&ta(Oh),Th=Eh&&ta(Eh),Mh=Object.prototype,_h=u.TypeError,Ah=be("toStringTag"),Uh=fe("TYPED_ARRAY_TAG"),Rh=wh&&!!ua&&"Opera"!==Vt(u.opera),Bh=!1,Lh={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},Nh={BigInt64Array:8,BigUint64Array:8},Dh=function(e){var t=ta(e);if(A(t)){var r=zh(t);return r&&ce(r,"TypedArrayConstructor")?r.TypedArrayConstructor:Dh(t)}},Wh=function(e){if(!A(e))return!1;var t=Vt(e);return ce(Lh,t)||ce(Nh,t)};for(mh in Lh)(yh=(kh=u[mh])&&kh.prototype)?Ph(yh).TypedArrayConstructor=kh:Rh=!1;for(mh in Nh)(yh=(kh=u[mh])&&kh.prototype)&&(Ph(yh).TypedArrayConstructor=kh);if((!Rh||!_(Sh)||Sh===Function.prototype)&&(Sh=function(){throw _h("Incorrect invocation")},Rh))for(mh in Lh)u[mh]&&ua(u[mh],Sh);if((!Rh||!Th||Th===Mh)&&(Th=Sh.prototype,Rh))for(mh in Lh)u[mh]&&ua(u[mh].prototype,Th);if(Rh&&ta(jh)!==Th&&ua(jh,Th),f&&!ce(Th,Ah))for(mh in Bh=!0,Ch(Th,Ah,{get:function(){return A(this)?this[Uh]:void 0}}),Lh)u[mh]&&Ue(u[mh],Uh,mh);var Fh={NATIVE_ARRAY_BUFFER_VIEWS:Rh,TYPED_ARRAY_TAG:Bh&&Uh,aTypedArray:function(e){if(Wh(e))return e;throw _h("Target is not a typed array")},aTypedArrayConstructor:function(e){if(_(e)&&(!ua||B(Sh,e)))return e;throw _h(K(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,r,n){if(f){if(r)for(var i in Lh){var a=u[i];if(a&&ce(a.prototype,e))try{delete a.prototype[e]}catch(r){try{a.prototype[e]=t}catch(e){}}}Th[e]&&!r||ot(Th,e,r?t:Rh&&Eh[e]||t,n)}},exportTypedArrayStaticMethod:function(e,t,r){var n,i;if(f){if(ua){if(r)for(n in Lh)if((i=u[n])&&ce(i,e))try{delete i[e]}catch(e){}if(Sh[e]&&!r)return;try{return ot(Sh,e,r?t:Rh&&Sh[e]||t)}catch(e){}}for(n in Lh)!(i=u[n])||i[e]&&!r||ot(i,e,t)}},getTypedArrayConstructor:Dh,isView:function(e){if(!A(e))return!1;var t=Vt(e);return"DataView"===t||ce(Lh,t)||ce(Nh,t)},isTypedArray:Wh,TypedArray:Sh,TypedArrayPrototype:Th},Gh=Fh.NATIVE_ARRAY_BUFFER_VIEWS,Hh=u.ArrayBuffer,Vh=u.Int8Array,$h=!Gh||!h((function(){Vh(1)}))||!h((function(){new Vh(-1)}))||!xh((function(e){new Vh,new Vh(null),new Vh(1.5),new Vh(e)}),!0)||h((function(){return 1!==new Vh(new Hh(2),1,void 0).length})),Yh=RangeError,Jh=function(e){if(void 0===e)return 0;var t=ut(e),r=gt(t);if(t!==r)throw Yh("Wrong length or index");return r},Kh=Array,Qh=Math.abs,Xh=Math.pow,Zh=Math.floor,ef=Math.log,tf=Math.LN2,rf=function(e,t,r){var n,i,a,o=Kh(r),s=8*r-t-1,c=(1<<s)-1,d=c>>1,u=23===t?Xh(2,-24)-Xh(2,-77):0,h=e<0||0===e&&1/e<0?1:0,f=0;for((e=Qh(e))!=e||e===1/0?(i=e!=e?1:0,n=c):(n=Zh(ef(e)/tf),e*(a=Xh(2,-n))<1&&(n--,a*=2),(e+=n+d>=1?u/a:u*Xh(2,1-d))*a>=2&&(n++,a/=2),n+d>=c?(i=0,n=c):n+d>=1?(i=(e*a-1)*Xh(2,t),n+=d):(i=e*Xh(2,d-1)*Xh(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},nf=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+=Xh(2,t),u-=o}return(d?-1:1)*r*Xh(2,u-t)},af=function(e){for(var t=oe(this),r=vt(t),n=arguments.length,i=lt(n>1?arguments[1]:void 0,r),a=n>2?arguments[2]:void 0,o=void 0===a?r:lt(a,r);o>i;)t[i++]=e;return t},of=Ct.f,sf=Ae.f,cf=Ne.PROPER,df=Ne.CONFIGURABLE,uf=it.get,hf=it.set,ff=u.ArrayBuffer,lf=ff,pf=lf&&lf.prototype,gf=u.DataView,vf=gf&&gf.prototype,bf=Object.prototype,If=u.Array,mf=u.RangeError,kf=C(af),yf=C([].reverse),xf=rf,wf=nf,Cf=function(e){return[255&e]},Pf=function(e){return[255&e,e>>8&255]},zf=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},Of=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},Ef=function(e){return xf(e,23,4)},qf=function(e){return xf(e,52,8)},jf=function(e,t){sf(e.prototype,t,{get:function(){return uf(this)[t]}})},Sf=function(e,t,r,n){var i=Jh(r),a=uf(e);if(i+t>a.byteLength)throw mf("Wrong index");var o=uf(a.buffer).bytes,s=i+a.byteOffset,c=or(o,s,s+t);return n?c:yf(c)},Tf=function(e,t,r,n,i,a){var o=Jh(r),s=uf(e);if(o+t>s.byteLength)throw mf("Wrong index");for(var c=uf(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(wh){var Mf=cf&&"ArrayBuffer"!==ff.name;if(h((function(){ff(1)}))&&h((function(){new ff(-1)}))&&!h((function(){return new ff,new ff(1.5),new ff(NaN),Mf&&!df})))Mf&&df&&Ue(ff,"name","ArrayBuffer");else{(lf=function(e){return Na(this,pf),new ff(Jh(e))}).prototype=pf;for(var _f,Af=of(ff),Uf=0;Af.length>Uf;)(_f=Af[Uf++])in lf||Ue(lf,_f,ff[_f]);pf.constructor=lf}ua&&ta(vf)!==bf&&ua(vf,bf);var Rf=new gf(new lf(2)),Bf=C(vf.setInt8);Rf.setInt8(0,2147483648),Rf.setInt8(1,2147483649),!Rf.getInt8(0)&&Rf.getInt8(1)||Ba(vf,{setInt8:function(e,t){Bf(this,e,t<<24>>24)},setUint8:function(e,t){Bf(this,e,t<<24>>24)}},{unsafe:!0})}else pf=(lf=function(e){Na(this,pf);var t=Jh(e);hf(this,{bytes:kf(If(t),0),byteLength:t}),f||(this.byteLength=t)}).prototype,vf=(gf=function(e,t,r){Na(this,vf),Na(e,pf);var n=uf(e).byteLength,i=ut(t);if(i<0||i>n)throw mf("Wrong offset");if(i+(r=void 0===r?n-i:gt(r))>n)throw mf("Wrong length");hf(this,{buffer:e,byteLength:r,byteOffset:i}),f||(this.buffer=e,this.byteLength=r,this.byteOffset=i)}).prototype,f&&(jf(lf,"byteLength"),jf(gf,"buffer"),jf(gf,"byteLength"),jf(gf,"byteOffset")),Ba(vf,{getInt8:function(e){return Sf(this,1,e)[0]<<24>>24},getUint8:function(e){return Sf(this,1,e)[0]},getInt16:function(e){var t=Sf(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=Sf(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return Of(Sf(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return Of(Sf(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return wf(Sf(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return wf(Sf(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){Tf(this,1,e,Cf,t)},setUint8:function(e,t){Tf(this,1,e,Cf,t)},setInt16:function(e,t){Tf(this,2,e,Pf,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){Tf(this,2,e,Pf,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){Tf(this,4,e,zf,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){Tf(this,4,e,zf,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){Tf(this,4,e,Ef,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){Tf(this,8,e,qf,t,arguments.length>2?arguments[2]:void 0)}});gr(lf,"ArrayBuffer"),gr(gf,"DataView");var Lf={ArrayBuffer:lf,DataView:gf},Nf=Math.floor,Df=Number.isInteger||function(e){return!A(e)&&isFinite(e)&&Nf(e)===e},Wf=RangeError,Ff=RangeError,Gf=function(e,t){var r=function(e){var t=ut(e);if(t<0)throw Wf("The argument can't be less than 0");return t}(e);if(r%t)throw Ff("Wrong offset");return r},Hf=Fh.aTypedArrayConstructor,Vf=function(e){var t,r,n,i,a,o,s=rs(this),c=oe(e),d=arguments.length,u=d>1?arguments[1]:void 0,h=void 0!==u,f=Wa(c);if(f&&!qc(f))for(o=(a=Ga(c,f)).next,c=[];!(i=g(o,a)).done;)c.push(i.value);for(h&&d>2&&(u=br(u,arguments[2])),r=vt(c),n=new(Hf(s))(r),t=0;r>t;t++)n[t]=h?u(c[t],t):c[t];return n},$f=be("species"),Yf=function(e){var t=R(e),r=Ae.f;f&&t&&!t[$f]&&r(t,$f,{configurable:!0,get:function(){return this}})};o((function(e){var t=Ct.f,r=Mr.forEach,n=it.get,i=it.set,a=it.enforce,o=Ae.f,s=Oe.f,c=Math.round,d=u.RangeError,h=Lf.ArrayBuffer,l=h.prototype,p=Lf.DataView,v=Fh.NATIVE_ARRAY_BUFFER_VIEWS,b=Fh.TYPED_ARRAY_TAG,I=Fh.TypedArray,k=Fh.TypedArrayPrototype,y=Fh.aTypedArrayConstructor,x=Fh.isTypedArray,w=function(e,t){y(e);for(var r=0,n=t.length,i=new e(n);n>r;)i[r]=t[r++];return i},C=function(e,t){o(e,t,{get:function(){return n(this)[t]}})},P=function(e){var t;return B(l,e)||"ArrayBuffer"==(t=Vt(e))||"SharedArrayBuffer"==t},z=function(e,t){return x(e)&&!Y(t)&&t in e&&Df(+t)&&t>=0},O=function(e,t){return t=ye(t),z(e,t)?m(2,e[t]):s(e,t)},E=function(e,t,r){return t=ye(t),!(z(e,t)&&A(r)&&ce(r,"value"))||ce(r,"get")||ce(r,"set")||r.configurable||ce(r,"writable")&&!r.writable||ce(r,"enumerable")&&!r.enumerable?o(e,t,r):(e[t]=r.value,e)};f?(v||(Oe.f=O,Ae.f=E,C(k,"buffer"),C(k,"byteOffset"),C(k,"byteLength"),C(k,"length")),Rt({target:"Object",stat:!0,forced:!v},{getOwnPropertyDescriptor:O,defineProperty:E}),e.exports=function(e,s,f){var l=e.match(/\d+$/)[0]/8,m=e+(f?"Clamped":"")+"Array",y="get"+e,C="set"+e,z=u[m],O=z,E=O&&O.prototype,q={},j=function(e,t){o(e,t,{get:function(){return function(e,t){var r=n(e);return r.view[y](t*l+r.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,r){var i=n(e);f&&(r=(r=c(r))<0?0:r>255?255:255&r),i.view[C](t*l+i.byteOffset,r,!0)}(this,t,e)},enumerable:!0})};v?$h&&(O=s((function(e,t,r,n){return Na(e,E),function(e,t,r){var n,i;return ua&&_(n=t.constructor)&&n!==r&&A(i=n.prototype)&&i!==r.prototype&&ua(e,i),e}(A(t)?P(t)?void 0!==n?new z(t,Gf(r,l),n):void 0!==r?new z(t,Gf(r,l)):new z(t):x(t)?w(O,t):g(Vf,O,t):new z(Jh(t)),e,O)})),ua&&ua(O,I),r(t(z),(function(e){e in O||Ue(O,e,z[e])})),O.prototype=E):(O=s((function(e,t,r,n){Na(e,E);var a,o,s,c=0,u=0;if(A(t)){if(!P(t))return x(t)?w(O,t):g(Vf,O,t);a=t,u=Gf(r,l);var f=t.byteLength;if(void 0===n){if(f%l)throw d("Wrong length");if((o=f-u)<0)throw d("Wrong length")}else if((o=gt(n)*l)+u>f)throw d("Wrong length");s=o/l}else s=Jh(t),a=new h(o=s*l);for(i(e,{buffer:a,byteOffset:u,byteLength:o,length:s,view:new p(a)});c<s;)j(e,c++)})),ua&&ua(O,I),E=O.prototype=rr(k)),E.constructor!==O&&Ue(E,"constructor",O),a(E).TypedArrayConstructor=O,b&&Ue(E,b,m);var S=O!=z;q[m]=O,Rt({global:!0,constructor:!0,forced:S,sham:!v},q),"BYTES_PER_ELEMENT"in O||Ue(O,"BYTES_PER_ELEMENT",l),"BYTES_PER_ELEMENT"in E||Ue(E,"BYTES_PER_ELEMENT",l),Yf(m)}):e.exports=function(){}}))("Uint8",(function(e){return function(t,r,n){return e(this,t,r,n)}}));var Jf=Math.min,Kf=C([].copyWithin||function(e,t){var r=oe(this),n=vt(r),i=lt(e,n),a=lt(t,n),o=arguments.length>2?arguments[2]:void 0,s=Jf((void 0===o?n:lt(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]:Gu(r,i),i+=c,a+=c;return r}),Qf=Fh.aTypedArray;(0,Fh.exportTypedArrayMethod)("copyWithin",(function(e,t){return Kf(Qf(this),e,t,arguments.length>2?arguments[2]:void 0)}));var Xf=Mr.every,Zf=Fh.aTypedArray;(0,Fh.exportTypedArrayMethod)("every",(function(e){return Xf(Zf(this),e,arguments.length>1?arguments[1]:void 0)}));var el=TypeError,tl=function(e){var t=ke(e,"number");if("number"==typeof t)throw el("Can't convert number to bigint");return BigInt(t)},rl=Fh.aTypedArray,nl=Fh.exportTypedArrayMethod,il=C("".slice);nl("fill",(function(e){var t=arguments.length;rl(this);var r="Big"===il(Vt(this),0,3)?tl(e):+e;return g(af,this,r,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}),h((function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e})));var al=be("species"),ol=function(e,t){var r,n=Se(e).constructor;return void 0===n||null==(r=Se(n)[al])?t:rs(r)},sl=Fh.aTypedArrayConstructor,cl=Fh.getTypedArrayConstructor,dl=function(e){return sl(ol(e,cl(e)))},ul=function(e,t){return function(e,t){for(var r=0,n=vt(t),i=new e(n);n>r;)i[r]=t[r++];return i}(dl(e),t)},hl=Mr.filter,fl=Fh.aTypedArray;(0,Fh.exportTypedArrayMethod)("filter",(function(e){var t=hl(fl(this),e,arguments.length>1?arguments[1]:void 0);return ul(this,t)}));var ll=Mr.find,pl=Fh.aTypedArray;(0,Fh.exportTypedArrayMethod)("find",(function(e){return ll(pl(this),e,arguments.length>1?arguments[1]:void 0)}));var gl=Mr.findIndex,vl=Fh.aTypedArray;(0,Fh.exportTypedArrayMethod)("findIndex",(function(e){return gl(vl(this),e,arguments.length>1?arguments[1]:void 0)}));var bl=Mr.forEach,Il=Fh.aTypedArray;(0,Fh.exportTypedArrayMethod)("forEach",(function(e){bl(Il(this),e,arguments.length>1?arguments[1]:void 0)}));var ml=It.includes,kl=Fh.aTypedArray;(0,Fh.exportTypedArrayMethod)("includes",(function(e){return ml(kl(this),e,arguments.length>1?arguments[1]:void 0)}));var yl=It.indexOf,xl=Fh.aTypedArray;(0,Fh.exportTypedArrayMethod)("indexOf",(function(e){return yl(xl(this),e,arguments.length>1?arguments[1]:void 0)}));var wl=be("iterator"),Cl=u.Uint8Array,Pl=C(ya.values),zl=C(ya.keys),Ol=C(ya.entries),El=Fh.aTypedArray,ql=Fh.exportTypedArrayMethod,jl=Cl&&Cl.prototype,Sl=!h((function(){jl[wl].call([1])})),Tl=!!jl&&jl.values&&jl[wl]===jl.values&&"values"===jl.values.name,Ml=function(){return Pl(El(this))};ql("entries",(function(){return Ol(El(this))}),Sl),ql("keys",(function(){return zl(El(this))}),Sl),ql("values",Ml,Sl||!Tl,{name:"values"}),ql(wl,Ml,Sl||!Tl,{name:"values"});var _l=Fh.aTypedArray,Al=Fh.exportTypedArrayMethod,Ul=C([].join);Al("join",(function(e){return Ul(_l(this),e)}));var Rl=Math.min,Bl=[].lastIndexOf,Ll=!!Bl&&1/[1].lastIndexOf(1,-0)<0,Nl=Dn("lastIndexOf"),Dl=Ll||!Nl?function(e){if(Ll)return pn(Bl,this,arguments)||0;var t=M(this),r=vt(t),n=r-1;for(arguments.length>1&&(n=Rl(n,ut(arguments[1]))),n<0&&(n=r+n);n>=0;n--)if(n in t&&t[n]===e)return n||0;return-1}:Bl,Wl=Fh.aTypedArray;(0,Fh.exportTypedArrayMethod)("lastIndexOf",(function(e){var t=arguments.length;return pn(Dl,Wl(this),t>1?[e,arguments[1]]:[e])}));var Fl=Mr.map,Gl=Fh.aTypedArray;(0,Fh.exportTypedArrayMethod)("map",(function(e){return Fl(Gl(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new(dl(e))(t)}))}));var Hl=TypeError,Vl=function(e){return function(t,r,n,i){X(r);var a=oe(t),o=j(a),s=vt(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 Hl("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}},$l={left:Vl(!1),right:Vl(!0)},Yl=$l.left,Jl=Fh.aTypedArray;(0,Fh.exportTypedArrayMethod)("reduce",(function(e){var t=arguments.length;return Yl(Jl(this),e,t,t>1?arguments[1]:void 0)}));var Kl=$l.right,Ql=Fh.aTypedArray;(0,Fh.exportTypedArrayMethod)("reduceRight",(function(e){var t=arguments.length;return Kl(Ql(this),e,t,t>1?arguments[1]:void 0)}));var Xl=Fh.aTypedArray,Zl=Fh.exportTypedArrayMethod,ep=Math.floor;Zl("reverse",(function(){for(var e,t=Xl(this).length,r=ep(t/2),n=0;n<r;)e=this[n],this[n++]=this[--t],this[t]=e;return this}));var tp=u.RangeError,rp=u.Int8Array,np=rp&&rp.prototype,ip=np&&np.set,ap=Fh.aTypedArray,op=Fh.exportTypedArrayMethod,sp=!h((function(){var e=new Uint8ClampedArray(2);return g(ip,e,{length:1,0:3},1),3!==e[1]})),cp=sp&&Fh.NATIVE_ARRAY_BUFFER_VIEWS&&h((function(){var e=new rp(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}));op("set",(function(e){ap(this);var t=Gf(arguments.length>1?arguments[1]:void 0,1),r=oe(e);if(sp)return g(ip,this,r,t);var n=this.length,i=vt(r),a=0;if(i+t>n)throw tp("Wrong length");for(;a<i;)this[t+a]=r[a++]}),!sp||cp);var dp=Fh.aTypedArray;(0,Fh.exportTypedArrayMethod)("slice",(function(e,t){for(var r=gn(dp(this),e,t),n=dl(this),i=0,a=r.length,o=new n(a);a>i;)o[i]=r[i++];return o}),h((function(){new Int8Array(1).slice()})));var up=Mr.some,hp=Fh.aTypedArray;(0,Fh.exportTypedArrayMethod)("some",(function(e){return up(hp(this),e,arguments.length>1?arguments[1]:void 0)}));var fp=Fh.aTypedArray,lp=Fh.exportTypedArrayMethod,pp=u.Uint16Array,gp=pp&&C(pp.prototype.sort),vp=!(!gp||h((function(){gp(new pp(2),null)}))&&h((function(){gp(new pp(2),{})}))),bp=!!gp&&!h((function(){if(G)return G<74;if(Vu)return Vu<67;if($u)return!0;if(Ju)return Ju<602;var e,t,r=new pp(516),n=Array(516);for(e=0;e<516;e++)t=e%4,r[e]=515-e,n[e]=e-2*t+3;for(gp(r,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(r[e]!==n[e])return!0}));lp("sort",(function(e){return void 0!==e&&X(e),bp?gp(this,e):Qa(fp(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))}),!bp||vp);var Ip=u.Int8Array,mp=Fh.aTypedArray,kp=Fh.exportTypedArrayMethod,yp=[].toLocaleString,xp=!!Ip&&h((function(){yp.call(new Ip(1))}));kp("toLocaleString",(function(){return pn(yp,xp?gn(mp(this)):mp(this),gn(arguments))}),h((function(){return[1,2].toLocaleString()!=new Ip([1,2]).toLocaleString()}))||!h((function(){Ip.prototype.toLocaleString.call([1,2])})));var wp=Fh.exportTypedArrayMethod,Cp=u.Uint8Array,Pp=Cp&&Cp.prototype||{},zp=[].toString,Op=C([].join);h((function(){zp.call({})}))&&(zp=function(){return Op(this)});var Ep=Pp.toString!=zp;wp("toString",zp,Ep);var qp,jp,Sp,Tp,Mp="process"==O(u.process),_p=/(?:ipad|iphone|ipod).*applewebkit/i.test(L),Ap=u.setImmediate,Up=u.clearImmediate,Rp=u.process,Bp=u.Dispatch,Lp=u.Function,Np=u.MessageChannel,Dp=u.String,Wp=0,Fp={};try{qp=u.location}catch(e){}var Gp=function(e){if(ce(Fp,e)){var t=Fp[e];delete Fp[e],t()}},Hp=function(e){return function(){Gp(e)}},Vp=function(e){Gp(e.data)},$p=function(e){u.postMessage(Dp(e),qp.protocol+"//"+qp.host)};Ap&&Up||(Ap=function(e){Va(arguments.length,1);var t=_(e)?e:Lp(e),r=gn(arguments,1);return Fp[++Wp]=function(){pn(t,void 0,r)},jp(Wp),Wp},Up=function(e){delete Fp[e]},Mp?jp=function(e){Rp.nextTick(Hp(e))}:Bp&&Bp.now?jp=function(e){Bp.now(Hp(e))}:Np&&!_p?(Tp=(Sp=new Np).port2,Sp.port1.onmessage=Vp,jp=br(Tp.postMessage,Tp)):u.addEventListener&&_(u.postMessage)&&!u.importScripts&&qp&&"file:"!==qp.protocol&&!h($p)?(jp=$p,u.addEventListener("message",Vp,!1)):jp="onreadystatechange"in Ce("script")?function(e){Kt.appendChild(Ce("script")).onreadystatechange=function(){Kt.removeChild(this),Gp(e)}}:function(e){setTimeout(Hp(e),0)});var Yp,Jp,Kp,Qp,Xp,Zp,eg,tg,rg={set:Ap,clear:Up},ng=/ipad|iphone|ipod/i.test(L)&&void 0!==u.Pebble,ig=/web0s(?!.*chrome)/i.test(L),ag=Oe.f,og=rg.set,sg=u.MutationObserver||u.WebKitMutationObserver,cg=u.document,dg=u.process,ug=u.Promise,hg=ag(u,"queueMicrotask"),fg=hg&&hg.value;fg||(Yp=function(){var e,t;for(Mp&&(e=dg.domain)&&e.exit();Jp;){t=Jp.fn,Jp=Jp.next;try{t()}catch(e){throw Jp?Qp():Kp=void 0,e}}Kp=void 0,e&&e.enter()},_p||Mp||ig||!sg||!cg?!ng&&ug&&ug.resolve?((eg=ug.resolve(void 0)).constructor=ug,tg=br(eg.then,eg),Qp=function(){tg(Yp)}):Mp?Qp=function(){dg.nextTick(Yp)}:(og=br(og,u),Qp=function(){og(Yp)}):(Xp=!0,Zp=cg.createTextNode(""),new sg(Yp).observe(Zp,{characterData:!0}),Qp=function(){Zp.data=Xp=!Xp}));var lg=fg||function(e){var t={fn:e,next:void 0};Kp&&(Kp.next=t),Jp||(Jp=t,Qp()),Kp=t},pg=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},gg=function(){this.head=null,this.tail=null};gg.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 vg=gg,bg=u.Promise,Ig="object"==typeof window&&"object"!=typeof Deno;bg&&bg.prototype;var mg,kg,yg,xg=be("species"),wg=!1,Cg=_(u.PromiseRejectionEvent),Pg={CONSTRUCTOR:At("Promise",(function(){var e=He(bg),t=e!==String(bg);if(!t&&66===G)return!0;if(G>=51&&/native code/.test(e))return!1;var r=new bg((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};return(r.constructor={})[xg]=n,!(wg=r.then((function(){}))instanceof n)||!t&&Ig&&!Cg})),REJECTION_EVENT:Cg,SUBCLASSING:wg},zg=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw TypeError("Bad Promise constructor");t=e,r=n})),this.resolve=X(t),this.reject=X(r)},Og={f:function(e){return new zg(e)}},Eg=rg.set,qg=Pg.CONSTRUCTOR,jg=Pg.REJECTION_EVENT,Sg=Pg.SUBCLASSING,Tg=it.getterFor("Promise"),Mg=it.set,_g=bg&&bg.prototype,Ag=bg,Ug=_g,Rg=u.TypeError,Bg=u.document,Lg=u.process,Ng=Og.f,Dg=Ng,Wg=!!(Bg&&Bg.createEvent&&u.dispatchEvent),Fg=function(e){var t;return!(!A(e)||!_(t=e.then))&&t},Gg=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&&Jg(t),t.rejection=1),!0===s?r=a:(u&&u.enter(),r=s(a),u&&(u.exit(),i=!0)),r===e.promise?d(Rg("Promise-chain cycle")):(n=Fg(r))?g(n,r,c,d):c(r)):d(a)}catch(e){u&&!i&&u.exit(),d(e)}},Hg=function(e,t){e.notified||(e.notified=!0,lg((function(){for(var r,n=e.reactions;r=n.get();)Gg(r,e);e.notified=!1,t&&!e.rejection&&$g(e)})))},Vg=function(e,t,r){var n,i;Wg?((n=Bg.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),u.dispatchEvent(n)):n={promise:t,reason:r},!jg&&(i=u["on"+e])?i(n):"unhandledrejection"===e&&function(e,t){var r=u.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))}("Unhandled promise rejection",r)},$g=function(e){g(Eg,u,(function(){var t,r=e.facade,n=e.value;if(Yg(e)&&(t=pg((function(){Mp?Lg.emit("unhandledRejection",n,r):Vg("unhandledrejection",r,n)})),e.rejection=Mp||Yg(e)?2:1,t.error))throw t.value}))},Yg=function(e){return 1!==e.rejection&&!e.parent},Jg=function(e){g(Eg,u,(function(){var t=e.facade;Mp?Lg.emit("rejectionHandled",t):Vg("rejectionhandled",t,e.value)}))},Kg=function(e,t,r){return function(n){e(t,n,r)}},Qg=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,Hg(e,!0))},Xg=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw Rg("Promise can't be resolved itself");var n=Fg(t);n?lg((function(){var r={done:!1};try{g(n,t,Kg(Xg,r,e),Kg(Qg,r,e))}catch(t){Qg(r,t,e)}})):(e.value=t,e.state=1,Hg(e,!1))}catch(t){Qg({done:!1},t,e)}}};if(qg&&(Ug=(Ag=function(e){Na(this,Ug),X(e),g(mg,this);var t=Tg(this);try{e(Kg(Xg,t),Kg(Qg,t))}catch(e){Qg(t,e)}}).prototype,(mg=function(e){Mg(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:new vg,rejection:!1,state:0,value:void 0})}).prototype=ot(Ug,"then",(function(e,t){var r=Tg(this),n=Ng(ol(this,Ag));return r.parent=!0,n.ok=!_(e)||e,n.fail=_(t)&&t,n.domain=Mp?Lg.domain:void 0,0==r.state?r.reactions.add(n):lg((function(){Gg(n,r)})),n.promise})),kg=function(){var e=new mg,t=Tg(e);this.promise=e,this.resolve=Kg(Xg,t),this.reject=Kg(Qg,t)},Og.f=Ng=function(e){return e===Ag||void 0===e?new kg(e):Dg(e)},_(bg)&&_g!==Object.prototype)){yg=_g.then,Sg||ot(_g,"then",(function(e,t){var r=this;return new Ag((function(e,t){g(yg,r,e,t)})).then(e,t)}),{unsafe:!0});try{delete _g.constructor}catch(e){}ua&&ua(_g,Ug)}Rt({global:!0,constructor:!0,wrap:!0,forced:qg},{Promise:Ag}),gr(Ag,"Promise",!1),Yf("Promise");var Zg=TypeError,ev=function(e,t){this.stopped=e,this.result=t},tv=ev.prototype,rv=function(e,t,r){var n,i,a,o,s,c,d,u=r&&r.that,h=!(!r||!r.AS_ENTRIES),f=!(!r||!r.IS_RECORD),l=!(!r||!r.IS_ITERATOR),p=!(!r||!r.INTERRUPTED),v=br(t,u),b=function(e){return n&&Pc(n,"normal",e),new ev(!0,e)},I=function(e){return h?(Se(e),p?v(e[0],e[1],b):v(e[0],e[1])):p?v(e,b):v(e)};if(f)n=e.iterator;else if(l)n=e;else{if(!(i=Wa(e)))throw Zg(K(e)+" is not iterable");if(qc(i)){for(a=0,o=vt(e);o>a;a++)if((s=I(e[a]))&&B(tv,s))return s;return new ev(!1)}n=Ga(e,i)}for(c=f?e.next:n.next;!(d=g(c,n)).done;){try{s=I(d.value)}catch(e){Pc(n,"throw",e)}if("object"==typeof s&&s&&B(tv,s))return s}return new ev(!1)},nv=Pg.CONSTRUCTOR||!xh((function(e){bg.all(e).then(void 0,(function(){}))}));Rt({target:"Promise",stat:!0,forced:nv},{all:function(e){var t=this,r=Og.f(t),n=r.resolve,i=r.reject,a=pg((function(){var r=X(t.resolve),a=[],o=0,s=1;rv(e,(function(e){var c=o++,d=!1;s++,g(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 iv=Pg.CONSTRUCTOR,av=bg&&bg.prototype;if(Rt({target:"Promise",proto:!0,forced:iv,real:!0},{catch:function(e){return this.then(void 0,e)}}),_(bg)){var ov=R("Promise").prototype.catch;av.catch!==ov&&ot(av,"catch",ov,{unsafe:!0})}Rt({target:"Promise",stat:!0,forced:nv},{race:function(e){var t=this,r=Og.f(t),n=r.reject,i=pg((function(){var i=X(t.resolve);rv(e,(function(e){g(i,t,e).then(r.resolve,n)}))}));return i.error&&n(i.value),r.promise}}),Rt({target:"Promise",stat:!0,forced:Pg.CONSTRUCTOR},{reject:function(e){var t=Og.f(this);return g(t.reject,void 0,e),t.promise}});var sv=Pg.CONSTRUCTOR;function cv(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 dv(e){return function(e){if(Array.isArray(e))return cv(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 cv(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)?cv(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 uv(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 hv(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?uv(Object(r),!0).forEach((function(t){vi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uv(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}R("Promise"),Rt({target:"Promise",stat:!0,forced:sv},{resolve:function(e){return function(e,t){if(Se(e),A(t)&&t.constructor===e)return t;var r=Og.f(e);return(0,r.resolve)(t),r.promise}(this,e)}}),Rt({target:"Object",stat:!0},{fromEntries:function(e){var t={};return rv(e,(function(e,r){nr(t,e,r)}),{AS_ENTRIES:!0}),t}});var fv=Go?btoa:function(e){return Buffer.from(e).toString("base64")},lv=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}},pv=function(){return e=i.default(String(+new Date),{entropy:!0}),t.customRandom(t.urlAlphabet,128,(function(t){return new Uint8Array(t).map((function(){return 256*e()}))}))();var e},gv=function(){var e=fi(Wi.mark((function e(t){var r,n,i,a,o,s,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=function(e){return e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")},n="",!Go||!window.crypto){e.next=12;break}return i=new TextEncoder,a=i.encode(t),e.next=7,window.crypto.subtle.digest("SHA-256",a);case 7:o=e.sent,s=btoa(String.fromCharCode.apply(String,dv(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 vv(e,t,r){return bv.apply(this,arguments)}function bv(){return(bv=fi(Wi.mark((function e(t,r,n){var i,a,o,s,c,d,u,h;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,gv(r);case 2:return a=e.sent,(o=new Mu(t.clientConfig)).clientConfig.fetchOptions=hv(hv({},t.clientConfig.fetchOptions),{},{redirect:Go?"follow":"manual"}),s={parameters:hv(hv({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 Cs(c);case 14:return e.abrupt("return",hv({url:d},lv(d)));case 15:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Iv(){return(Iv=fi(Wi.mark((function e(t,r,n){var i,a;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i="Basic ".concat(fv("".concat(t.clientConfig.parameters.clientId,":").concat(n.clientSecret))),a={headers:{Authorization:i},body:hv({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 mv(){return(mv=fi(Wi.mark((function e(t,r){var n,i,a;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=pv(),e.next=3,vv(t,n,hv({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 kv(){return(kv=fi(Wi.mark((function e(t,r,n){var i,a,o,s,c,d,u,h,f,l,p,g,v,b;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=pv(),e.next=3,gv(a);case 3:return o=e.sent,(s=new Mu(t.clientConfig)).clientConfig.fetchOptions=hv(hv({},t.clientConfig.fetchOptions),{},{redirect:Go?"follow":"manual"}),c="Basic ".concat(fv("".concat(r.username,":").concat(r.password))),d={headers:{Authorization:c},parameters:{organizationId:t.clientConfig.parameters.organizationId},body:hv({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),l=Object.fromEntries(f.searchParams.entries()),!(u.status>=400||l.error)){e.next=16;break}throw new Cs(u);case 16:if(p=lv(h),g={client_id:t.clientConfig.parameters.clientId,channel_id:t.clientConfig.parameters.siteId,code:p.code,code_verifier:a,grant_type:"authorization_code_pkce",organizationId:t.clientConfig.parameters.organizationId,redirect_uri:n.redirectURI,usid:p.usid},!r.clientSecret){e.next=22;break}return v="Basic ".concat(fv("".concat(t.clientConfig.parameters.clientId,":").concat(r.clientSecret))),b={headers:{Authorization:v},body:g},e.abrupt("return",t.getAccessToken(b));case 22:return e.abrupt("return",t.getAccessToken({body:g}));case 23:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var yv=Mr.find,xv=!0;"find"in[]&&Array(1).find((function(){xv=!1})),Rt({target:"Array",proto:!0,forced:xv},{find:function(e){return yv(this,e,arguments.length>1?arguments[1]:void 0)}}),Ji("find");function wv(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 Cv(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?wv(Object(r),!0).forEach((function(t){vi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wv(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Pv=function(e){var t=!1;return e&&(t=Boolean(Object.keys(e).find((function(e){return"content-type"===e.toLowerCase()})))),t},zv=function(){var e=fi(Wi.mark((function e(t){var r,n,i,a,o,s,c,d,u,h,f,l;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.options,a=t.clientConfig,o=t.rawResponse,s=["apiName","endpointPath","organizationId","shortCode"],c=Cv(Cv({},a.parameters),null==i?void 0:i.customApiPathParameters),s.forEach((function(e){if(!c[e])throw new Error("Missing required property needed in options.customApiPathParameters or clientConfig.parameters: ".concat(e))})),c.apiVersion||(c.apiVersion="v1"),d=a,a.baseUri||(d=Cv(Cv({},a),{},{baseUri:"https://{shortCode}.api.commercecloud.salesforce.com/custom/{apiName}/{apiVersion}"})),u=Boolean(!(null!==(r=i.parameters)&&void 0!==r&&r.siteId)&&(null==a||null===(n=a.parameters)||void 0===n?void 0:n.siteId)),h=Pv(i.headers)||Pv(d.headers),f=i,h&&!u||(f=Cv(Cv({},i),{},{headers:Cv(Cv({},i.headers),!h&&{"Content-Type":"application/json"}),parameters:Cv(Cv({},i.parameters),u&&{siteId:a.parameters.siteId})})),l=new hu("/organizations/{organizationId}/{endpointPath}",d.baseUri,{pathParams:c,queryParams:f.parameters,origin:d.proxy}),e.abrupt("return",qs(l.toString(),f,d,o));case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Ov=Object.freeze({__proto__:null,isBrowser:Go,isNode:Ho,globalObject:Vo,hasFetchAvailable:$o,fetch:Yo,stringToBase64:fv,getCodeAndUsidFromUrl:lv,createCodeVerifier:pv,generateCodeChallenge:gv,authorize:vv,loginGuestUserPrivate:function(e,t,r){return Iv.apply(this,arguments)},loginGuestUser:function(e,t){return mv.apply(this,arguments)},loginRegisteredUserB2C:function(e,t,r){return kv.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(fv("".concat(e.clientConfig.parameters.clientId,":").concat(r.clientSecret)))},body:n};return e.getAccessToken(i)}return e.getAccessToken({body:n})},logout:function(e,t){return e.logoutCustomer({headers:{Authorization:"Bearer ".concat(t.accessToken)},parameters:{refresh_token:t.refreshToken,client_id:e.clientConfig.parameters.clientId,channel_id:e.clientConfig.parameters.siteId}})},callCustomEndpoint:zv,doFetch:qs});e.ClientConfig=Wo,e.ShopperBaskets=gu,e.ShopperContexts=Iu,e.ShopperCustomers=yu,e.ShopperDiscoverySearch=Cu,e.ShopperExperience=Ou,e.ShopperGiftCertificates=ju,e.ShopperLogin=Mu,e.ShopperOrders=Uu,e.ShopperProducts=Lu,e.ShopperPromotions=Wu,e.ShopperSearch=ah,e.ShopperSeo=ch,e.ShopperStores=hh,e.TemplateURL=hu,e.helpers=Ov,Object.defineProperty(e,"__esModule",{value:!0})}));