@coveo/headless 3.19.0 → 3.19.1
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/dist/browser/case-assist/headless.esm.js +1 -1
- package/dist/browser/case-assist/headless.js +1 -1
- package/dist/browser/commerce/headless.esm.js +1 -1
- package/dist/browser/commerce/headless.js +1 -1
- package/dist/browser/headless.esm.js +1 -1
- package/dist/browser/headless.js +1 -1
- package/dist/browser/insight/headless.esm.js +1 -1
- package/dist/browser/insight/headless.js +1 -1
- package/dist/browser/recommendation/headless.esm.js +1 -1
- package/dist/browser/recommendation/headless.js +1 -1
- package/dist/browser/ssr/headless.esm.js +1 -1
- package/dist/browser/ssr/headless.js +1 -1
- package/dist/browser/ssr-commerce/headless.esm.js +1 -1
- package/dist/browser/ssr-commerce/headless.js +1 -1
- package/dist/case-assist/headless.cjs +1 -1
- package/dist/case-assist/headless.esm.js +1 -1
- package/dist/commerce/headless.cjs +1 -1
- package/dist/commerce/headless.esm.js +1 -1
- package/dist/headless.cjs +1 -1
- package/dist/headless.esm.js +1 -1
- package/dist/insight/headless.cjs +1 -1
- package/dist/insight/headless.esm.js +1 -1
- package/dist/quantic/case-assist/headless.js +1 -1
- package/dist/quantic/commerce/headless.js +1 -1
- package/dist/quantic/headless.js +1 -1
- package/dist/quantic/insight/headless.js +1 -1
- package/dist/quantic/recommendation/headless.js +1 -1
- package/dist/recommendation/headless.cjs +1 -1
- package/dist/recommendation/headless.esm.js +1 -1
- package/dist/ssr/headless.cjs +1 -1
- package/dist/ssr/headless.esm.js +1 -1
- package/dist/ssr-commerce/headless.cjs +1 -1
- package/dist/ssr-commerce/headless.esm.js +1 -1
- package/package.json +1 -1
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* See the License for the specific language governing permissions and
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/(function(g,f){if(typeof exports=="object"&&typeof module<"u"){module.exports=f(require)}else if("function"==typeof define && define.amd){define("CoveoHeadlessRecommendation",["crypto","@coveo/bueno"],function(_d_0,_d_1){var d={"crypto": _d_0,"@coveo/bueno": _d_1},r=function(m){if(m in d) return d[m];if(typeof require=="function") return require(m);throw new Error("Cannot find module '"+m+"'")};return f(r)})}else {var gN={"crypto":"crypto","@coveo/bueno":"@coveo/bueno"},gReq=function(r){var mod = r in gN ? g[gN[r]] : g[r]; return mod };g["CoveoHeadlessRecommendation"]=f(gReq)}}(typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : this,function(require){var exports={};var __exports=exports;var module={exports};
|
|
18
|
-
"use strict";var jp=Object.create;var Wr=Object.defineProperty;var Bp=Object.getOwnPropertyDescriptor;var Qp=Object.getOwnPropertyNames;var $p=Object.getPrototypeOf,Hp=Object.prototype.hasOwnProperty;var zp=(e,t,r)=>t in e?Wr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var de=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ds=(e,t)=>{for(var r in t)Wr(e,r,{get:t[r],enumerable:!0})},Ms=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Qp(t))!Hp.call(e,o)&&o!==r&&Wr(e,o,{get:()=>t[o],enumerable:!(n=Bp(t,o))||n.enumerable});return e};var Qe=(e,t,r)=>(r=e!=null?jp($p(e)):{},Ms(t||!e||!e.__esModule?Wr(r,"default",{value:e,enumerable:!0}):r,e)),Wp=e=>Ms(Wr({},"__esModule",{value:!0}),e);var se=(e,t,r)=>zp(e,typeof t!="symbol"?t+"":t,r);var Qs=de(Kr=>{"use strict";var _n=Kr&&Kr.__assign||function(){return _n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},_n.apply(this,arguments)};Object.defineProperty(Kr,"__esModule",{value:!0});var rf={delayFirstAttempt:!1,jitter:"none",maxDelay:1/0,numOfAttempts:10,retry:function(){return!0},startingDelay:100,timeMultiple:2};function nf(e){var t=_n(_n({},rf),e);return t.numOfAttempts<1&&(t.numOfAttempts=1),t}Kr.getSanitizedOptions=nf});var $s=de(Oi=>{"use strict";Object.defineProperty(Oi,"__esModule",{value:!0});function of(e){var t=Math.random()*e;return Math.round(t)}Oi.fullJitter=of});var Hs=de(Di=>{"use strict";Object.defineProperty(Di,"__esModule",{value:!0});function af(e){return e}Di.noJitter=af});var zs=de(Mi=>{"use strict";Object.defineProperty(Mi,"__esModule",{value:!0});var sf=$s(),cf=Hs();function uf(e){switch(e.jitter){case"full":return sf.fullJitter;case"none":default:return cf.noJitter}}Mi.JitterFactory=uf});var Ni=de(qi=>{"use strict";Object.defineProperty(qi,"__esModule",{value:!0});var lf=zs(),df=function(){function e(t){this.options=t,this.attempt=0}return e.prototype.apply=function(){var t=this;return new Promise(function(r){return setTimeout(r,t.jitteredDelay)})},e.prototype.setAttemptNumber=function(t){this.attempt=t},Object.defineProperty(e.prototype,"jitteredDelay",{get:function(){var t=lf.JitterFactory(this.options);return t(this.delay)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"delay",{get:function(){var t=this.options.startingDelay,r=this.options.timeMultiple,n=this.numOfDelayedAttempts,o=t*Math.pow(r,n);return Math.min(o,this.options.maxDelay)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt},enumerable:!0,configurable:!0}),e}();qi.Delay=df});var Ws=de(et=>{"use strict";var pf=et&&et.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},e(t,r)};return function(t,r){e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),ff=et&&et.__awaiter||function(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function c(d){try{s(n.next(d))}catch(p){a(p)}}function u(d){try{s(n.throw(d))}catch(p){a(p)}}function s(d){d.done?i(d.value):o(d.value).then(c,u)}s((n=n.apply(e,t||[])).next())})},mf=et&&et.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,a;return a={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(s){return function(d){return u([s,d])}}function u(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=s[0]&2?o.return:s[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;switch(o=0,i&&(s=[s[0]&2,i.value]),s[0]){case 0:case 1:i=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,o=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){r.label=s[1];break}if(s[0]===6&&r.label<i[1]){r.label=i[1],i=s;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(s);break}i[2]&&r.ops.pop(),r.trys.pop();continue}s=t.call(e,r)}catch(d){s=[6,d],o=0}finally{n=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}};Object.defineProperty(et,"__esModule",{value:!0});var gf=Ni(),hf=function(e){pf(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.apply=function(){return ff(this,void 0,void 0,function(){return mf(this,function(r){return[2,this.isFirstAttempt?!0:e.prototype.apply.call(this)]})})},Object.defineProperty(t.prototype,"isFirstAttempt",{get:function(){return this.attempt===0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt-1},enumerable:!0,configurable:!0}),t}(gf.Delay);et.SkipFirstDelay=hf});var Gs=de(Yr=>{"use strict";var yf=Yr&&Yr.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},e(t,r)};return function(t,r){e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Yr,"__esModule",{value:!0});var Sf=Ni(),vf=function(e){yf(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Sf.Delay);Yr.AlwaysDelay=vf});var Ks=de(_i=>{"use strict";Object.defineProperty(_i,"__esModule",{value:!0});var Cf=Ws(),Af=Gs();function bf(e,t){var r=wf(e);return r.setAttemptNumber(t),r}_i.DelayFactory=bf;function wf(e){return e.delayFirstAttempt?new Af.AlwaysDelay(e):new Cf.SkipFirstDelay(e)}});var Ys=de(Lt=>{"use strict";var Vi=Lt&&Lt.__awaiter||function(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function c(d){try{s(n.next(d))}catch(p){a(p)}}function u(d){try{s(n.throw(d))}catch(p){a(p)}}function s(d){d.done?i(d.value):o(d.value).then(c,u)}s((n=n.apply(e,t||[])).next())})},Ui=Lt&&Lt.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,a;return a={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(s){return function(d){return u([s,d])}}function u(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=s[0]&2?o.return:s[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;switch(o=0,i&&(s=[s[0]&2,i.value]),s[0]){case 0:case 1:i=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,o=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){r.label=s[1];break}if(s[0]===6&&r.label<i[1]){r.label=i[1],i=s;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(s);break}i[2]&&r.ops.pop(),r.trys.pop();continue}s=t.call(e,r)}catch(d){s=[6,d],o=0}finally{n=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}};Object.defineProperty(Lt,"__esModule",{value:!0});var xf=Qs(),Rf=Ks();function Ef(e,t){return t===void 0&&(t={}),Vi(this,void 0,void 0,function(){var r,n;return Ui(this,function(o){switch(o.label){case 0:return r=xf.getSanitizedOptions(t),n=new Pf(e,r),[4,n.execute()];case 1:return[2,o.sent()]}})})}Lt.backOff=Ef;var Pf=function(){function e(t,r){this.request=t,this.options=r,this.attemptNumber=0}return e.prototype.execute=function(){return Vi(this,void 0,void 0,function(){var t,r;return Ui(this,function(n){switch(n.label){case 0:if(this.attemptLimitReached)return[3,7];n.label=1;case 1:return n.trys.push([1,4,,6]),[4,this.applyDelay()];case 2:return n.sent(),[4,this.request()];case 3:return[2,n.sent()];case 4:return t=n.sent(),this.attemptNumber++,[4,this.options.retry(t,this.attemptNumber)];case 5:if(r=n.sent(),!r||this.attemptLimitReached)throw t;return[3,6];case 6:return[3,0];case 7:throw new Error("Something went wrong.")}})})},Object.defineProperty(e.prototype,"attemptLimitReached",{get:function(){return this.attemptNumber>=this.options.numOfAttempts},enumerable:!0,configurable:!0}),e.prototype.applyDelay=function(){return Vi(this,void 0,void 0,function(){var t;return Ui(this,function(r){switch(r.label){case 0:return t=Rf.DelayFactory(this.options,this.attemptNumber),[4,t.apply()];case 1:return r.sent(),[2]}})})},e}()});var Do=de((Na,_a)=>{"use strict";(function(e,t){typeof Na=="object"&&typeof _a<"u"?_a.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs=t()})(Na,function(){"use strict";var e=1e3,t=6e4,r=36e5,n="millisecond",o="second",i="minute",a="hour",c="day",u="week",s="month",d="quarter",p="year",f="date",l="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,A=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(D){var k=["th","st","nd","rd"],T=D%100;return"["+D+(k[(T-20)%10]||k[T]||k[0])+"]"}},h=function(D,k,T){var q=String(D);return!q||q.length>=k?D:""+Array(k+1-q.length).join(T)+D},b={s:h,z:function(D){var k=-D.utcOffset(),T=Math.abs(k),q=Math.floor(T/60),O=T%60;return(k<=0?"+":"-")+h(q,2,"0")+":"+h(O,2,"0")},m:function D(k,T){if(k.date()<T.date())return-D(T,k);var q=12*(T.year()-k.year())+(T.month()-k.month()),O=k.clone().add(q,s),_=T-O<0,V=k.clone().add(q+(_?-1:1),s);return+(-(q+(T-O)/(_?O-V:V-O))||0)},a:function(D){return D<0?Math.ceil(D)||0:Math.floor(D)},p:function(D){return{M:s,y:p,w:u,d:c,D:f,h:a,m:i,s:o,ms:n,Q:d}[D]||String(D||"").toLowerCase().replace(/s$/,"")},u:function(D){return D===void 0}},g="en",y={};y[g]=v;var I="$isDayjsObject",w=function(D){return D instanceof F||!(!D||!D[I])},S=function D(k,T,q){var O;if(!k)return g;if(typeof k=="string"){var _=k.toLowerCase();y[_]&&(O=_),T&&(y[_]=T,O=_);var V=k.split("-");if(!O&&V.length>1)return D(V[0])}else{var L=k.name;y[L]=k,O=L}return!q&&O&&(g=O),O||!q&&g},C=function(D,k){if(w(D))return D.clone();var T=typeof k=="object"?k:{};return T.date=D,T.args=arguments,new F(T)},x=b;x.l=S,x.i=w,x.w=function(D,k){return C(D,{locale:k.$L,utc:k.$u,x:k.$x,$offset:k.$offset})};var F=function(){function D(T){this.$L=S(T.locale,null,!0),this.parse(T),this.$x=this.$x||T.x||{},this[I]=!0}var k=D.prototype;return k.parse=function(T){this.$d=function(q){var O=q.date,_=q.utc;if(O===null)return new Date(NaN);if(x.u(O))return new Date;if(O instanceof Date)return new Date(O);if(typeof O=="string"&&!/Z$/i.test(O)){var V=O.match(m);if(V){var L=V[2]-1||0,Q=(V[7]||"0").substring(0,3);return _?new Date(Date.UTC(V[1],L,V[3]||1,V[4]||0,V[5]||0,V[6]||0,Q)):new Date(V[1],L,V[3]||1,V[4]||0,V[5]||0,V[6]||0,Q)}}return new Date(O)}(T),this.init()},k.init=function(){var T=this.$d;this.$y=T.getFullYear(),this.$M=T.getMonth(),this.$D=T.getDate(),this.$W=T.getDay(),this.$H=T.getHours(),this.$m=T.getMinutes(),this.$s=T.getSeconds(),this.$ms=T.getMilliseconds()},k.$utils=function(){return x},k.isValid=function(){return this.$d.toString()!==l},k.isSame=function(T,q){var O=C(T);return this.startOf(q)<=O&&O<=this.endOf(q)},k.isAfter=function(T,q){return C(T)<this.startOf(q)},k.isBefore=function(T,q){return this.endOf(q)<C(T)},k.$g=function(T,q,O){return x.u(T)?this[q]:this.set(O,T)},k.unix=function(){return Math.floor(this.valueOf()/1e3)},k.valueOf=function(){return this.$d.getTime()},k.startOf=function(T,q){var O=this,_=!!x.u(q)||q,V=x.p(T),L=function(G,te){var oe=x.w(O.$u?Date.UTC(O.$y,te,G):new Date(O.$y,te,G),O);return _?oe:oe.endOf(c)},Q=function(G,te){return x.w(O.toDate()[G].apply(O.toDate("s"),(_?[0,0,0,0]:[23,59,59,999]).slice(te)),O)},W=this.$W,B=this.$M,$=this.$D,j="set"+(this.$u?"UTC":"");switch(V){case p:return _?L(1,0):L(31,11);case s:return _?L(1,B):L(0,B+1);case u:var H=this.$locale().weekStart||0,ne=(W<H?W+7:W)-H;return L(_?$-ne:$+(6-ne),B);case c:case f:return Q(j+"Hours",0);case a:return Q(j+"Minutes",1);case i:return Q(j+"Seconds",2);case o:return Q(j+"Milliseconds",3);default:return this.clone()}},k.endOf=function(T){return this.startOf(T,!1)},k.$set=function(T,q){var O,_=x.p(T),V="set"+(this.$u?"UTC":""),L=(O={},O[c]=V+"Date",O[f]=V+"Date",O[s]=V+"Month",O[p]=V+"FullYear",O[a]=V+"Hours",O[i]=V+"Minutes",O[o]=V+"Seconds",O[n]=V+"Milliseconds",O)[_],Q=_===c?this.$D+(q-this.$W):q;if(_===s||_===p){var W=this.clone().set(f,1);W.$d[L](Q),W.init(),this.$d=W.set(f,Math.min(this.$D,W.daysInMonth())).$d}else L&&this.$d[L](Q);return this.init(),this},k.set=function(T,q){return this.clone().$set(T,q)},k.get=function(T){return this[x.p(T)]()},k.add=function(T,q){var O,_=this;T=Number(T);var V=x.p(q),L=function(B){var $=C(_);return x.w($.date($.date()+Math.round(B*T)),_)};if(V===s)return this.set(s,this.$M+T);if(V===p)return this.set(p,this.$y+T);if(V===c)return L(1);if(V===u)return L(7);var Q=(O={},O[i]=t,O[a]=r,O[o]=e,O)[V]||1,W=this.$d.getTime()+T*Q;return x.w(W,this)},k.subtract=function(T,q){return this.add(-1*T,q)},k.format=function(T){var q=this,O=this.$locale();if(!this.isValid())return O.invalidDate||l;var _=T||"YYYY-MM-DDTHH:mm:ssZ",V=x.z(this),L=this.$H,Q=this.$m,W=this.$M,B=O.weekdays,$=O.months,j=O.meridiem,H=function(te,oe,Ae,De){return te&&(te[oe]||te(q,_))||Ae[oe].slice(0,De)},ne=function(te){return x.s(L%12||12,te,"0")},G=j||function(te,oe,Ae){var De=te<12?"AM":"PM";return Ae?De.toLowerCase():De};return _.replace(A,function(te,oe){return oe||function(Ae){switch(Ae){case"YY":return String(q.$y).slice(-2);case"YYYY":return x.s(q.$y,4,"0");case"M":return W+1;case"MM":return x.s(W+1,2,"0");case"MMM":return H(O.monthsShort,W,$,3);case"MMMM":return H($,W);case"D":return q.$D;case"DD":return x.s(q.$D,2,"0");case"d":return String(q.$W);case"dd":return H(O.weekdaysMin,q.$W,B,2);case"ddd":return H(O.weekdaysShort,q.$W,B,3);case"dddd":return B[q.$W];case"H":return String(L);case"HH":return x.s(L,2,"0");case"h":return ne(1);case"hh":return ne(2);case"a":return G(L,Q,!0);case"A":return G(L,Q,!1);case"m":return String(Q);case"mm":return x.s(Q,2,"0");case"s":return String(q.$s);case"ss":return x.s(q.$s,2,"0");case"SSS":return x.s(q.$ms,3,"0");case"Z":return V}return null}(te)||V.replace(":","")})},k.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},k.diff=function(T,q,O){var _,V=this,L=x.p(q),Q=C(T),W=(Q.utcOffset()-this.utcOffset())*t,B=this-Q,$=function(){return x.m(V,Q)};switch(L){case p:_=$()/12;break;case s:_=$();break;case d:_=$()/3;break;case u:_=(B-W)/6048e5;break;case c:_=(B-W)/864e5;break;case a:_=B/r;break;case i:_=B/t;break;case o:_=B/e;break;default:_=B}return O?_:x.a(_)},k.daysInMonth=function(){return this.endOf(s).$D},k.$locale=function(){return y[this.$L]},k.locale=function(T,q){if(!T)return this.$L;var O=this.clone(),_=S(T,q,!0);return _&&(O.$L=_),O},k.clone=function(){return x.w(this.$d,this)},k.toDate=function(){return new Date(this.valueOf())},k.toJSON=function(){return this.isValid()?this.toISOString():null},k.toISOString=function(){return this.$d.toISOString()},k.toString=function(){return this.$d.toUTCString()},D}(),N=F.prototype;return C.prototype=N,[["$ms",n],["$s",o],["$m",i],["$H",a],["$W",c],["$M",s],["$y",p],["$D",f]].forEach(function(D){N[D[1]]=function(k){return this.$g(k,D[0],D[1])}}),C.extend=function(D,k){return D.$i||(D(k,F,C),D.$i=!0),C},C.locale=S,C.isDayjs=w,C.unix=function(D){return C(1e3*D)},C.en=y[g],C.Ls=y,C.p={},C})});var rl=de((Va,Ua)=>{"use strict";(function(e,t){typeof Va=="object"&&typeof Ua<"u"?Ua.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_quarterOfYear=t()})(Va,function(){"use strict";var e="month",t="quarter";return function(r,n){var o=n.prototype;o.quarter=function(c){return this.$utils().u(c)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(c-1))};var i=o.add;o.add=function(c,u){return c=Number(c),this.$utils().p(u)===t?this.add(3*c,e):i.bind(this)(c,u)};var a=o.startOf;o.startOf=function(c,u){var s=this.$utils(),d=!!s.u(u)||u;if(s.p(c)===t){var p=this.quarter()-1;return d?this.month(3*p).startOf(e).startOf("day"):this.month(3*p+2).endOf(e).endOf("day")}return a.bind(this)(c,u)}}})});var nl=de((La,ja)=>{"use strict";(function(e,t){typeof La=="object"&&typeof ja<"u"?ja.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_customParseFormat=t()})(La,function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,r=/\d/,n=/\d\d/,o=/\d\d?/,i=/\d*[^-_:/,()\s\d]+/,a={},c=function(m){return(m=+m)+(m>68?1900:2e3)},u=function(m){return function(A){this[m]=+A}},s=[/[+-]\d\d:?(\d\d)?|Z/,function(m){(this.zone||(this.zone={})).offset=function(A){if(!A||A==="Z")return 0;var v=A.match(/([+-]|\d\d)/g),h=60*v[1]+(+v[2]||0);return h===0?0:v[0]==="+"?-h:h}(m)}],d=function(m){var A=a[m];return A&&(A.indexOf?A:A.s.concat(A.f))},p=function(m,A){var v,h=a.meridiem;if(h){for(var b=1;b<=24;b+=1)if(m.indexOf(h(b,0,A))>-1){v=b>12;break}}else v=m===(A?"pm":"PM");return v},f={A:[i,function(m){this.afternoon=p(m,!1)}],a:[i,function(m){this.afternoon=p(m,!0)}],Q:[r,function(m){this.month=3*(m-1)+1}],S:[r,function(m){this.milliseconds=100*+m}],SS:[n,function(m){this.milliseconds=10*+m}],SSS:[/\d{3}/,function(m){this.milliseconds=+m}],s:[o,u("seconds")],ss:[o,u("seconds")],m:[o,u("minutes")],mm:[o,u("minutes")],H:[o,u("hours")],h:[o,u("hours")],HH:[o,u("hours")],hh:[o,u("hours")],D:[o,u("day")],DD:[n,u("day")],Do:[i,function(m){var A=a.ordinal,v=m.match(/\d+/);if(this.day=v[0],A)for(var h=1;h<=31;h+=1)A(h).replace(/\[|\]/g,"")===m&&(this.day=h)}],w:[o,u("week")],ww:[n,u("week")],M:[o,u("month")],MM:[n,u("month")],MMM:[i,function(m){var A=d("months"),v=(d("monthsShort")||A.map(function(h){return h.slice(0,3)})).indexOf(m)+1;if(v<1)throw new Error;this.month=v%12||v}],MMMM:[i,function(m){var A=d("months").indexOf(m)+1;if(A<1)throw new Error;this.month=A%12||A}],Y:[/[+-]?\d+/,u("year")],YY:[n,function(m){this.year=c(m)}],YYYY:[/\d{4}/,u("year")],Z:s,ZZ:s};function l(m){var A,v;A=m,v=a&&a.formats;for(var h=(m=A.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(C,x,F){var N=F&&F.toUpperCase();return x||v[F]||e[F]||v[N].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(D,k,T){return k||T.slice(1)})})).match(t),b=h.length,g=0;g<b;g+=1){var y=h[g],I=f[y],w=I&&I[0],S=I&&I[1];h[g]=S?{regex:w,parser:S}:y.replace(/^\[|\]$/g,"")}return function(C){for(var x={},F=0,N=0;F<b;F+=1){var D=h[F];if(typeof D=="string")N+=D.length;else{var k=D.regex,T=D.parser,q=C.slice(N),O=k.exec(q)[0];T.call(x,O),C=C.replace(O,"")}}return function(_){var V=_.afternoon;if(V!==void 0){var L=_.hours;V?L<12&&(_.hours+=12):L===12&&(_.hours=0),delete _.afternoon}}(x),x}}return function(m,A,v){v.p.customParseFormat=!0,m&&m.parseTwoDigitYear&&(c=m.parseTwoDigitYear);var h=A.prototype,b=h.parse;h.parse=function(g){var y=g.date,I=g.utc,w=g.args;this.$u=I;var S=w[1];if(typeof S=="string"){var C=w[2]===!0,x=w[3]===!0,F=C||x,N=w[2];x&&(N=w[2]),a=this.$locale(),!C&&N&&(a=v.Ls[N]),this.$d=function(q,O,_,V){try{if(["x","X"].indexOf(O)>-1)return new Date((O==="X"?1e3:1)*q);var L=l(O)(q),Q=L.year,W=L.month,B=L.day,$=L.hours,j=L.minutes,H=L.seconds,ne=L.milliseconds,G=L.zone,te=L.week,oe=new Date,Ae=B||(Q||W?1:oe.getDate()),De=Q||oe.getFullYear(),pt=0;Q&&!W||(pt=W>0?W-1:oe.getMonth());var tr,rr=$||0,zr=j||0,Ii=H||0,Fi=ne||0;return G?new Date(Date.UTC(De,pt,Ae,rr,zr,Ii,Fi+60*G.offset*1e3)):_?new Date(Date.UTC(De,pt,Ae,rr,zr,Ii,Fi)):(tr=new Date(De,pt,Ae,rr,zr,Ii,Fi),te&&(tr=V(tr).week(te).toDate()),tr)}catch{return new Date("")}}(y,S,I,v),this.init(),N&&N!==!0&&(this.$L=this.locale(N).$L),F&&y!=this.format(S)&&(this.$d=new Date("")),a={}}else if(S instanceof Array)for(var D=S.length,k=1;k<=D;k+=1){w[1]=S[k-1];var T=v.apply(this,w);if(T.isValid()){this.$d=T.$d,this.$L=T.$L,this.init();break}k===D&&(this.$d=new Date(""))}else b.call(this,g)}}})});var ed=de((zE,Zl)=>{"use strict";var sS=/(^|; )Coveo-Pendragon=([^;]*)/;Zl.exports=()=>sS.exec(document.cookie)?.pop()||null});var rd=de((as,ss)=>{"use strict";(function(e,t){typeof as=="object"&&typeof ss<"u"?ss.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_timezone=t()})(as,function(){"use strict";var e={year:0,month:1,day:2,hour:3,minute:4,second:5},t={};return function(r,n,o){var i,a=function(d,p,f){f===void 0&&(f={});var l=new Date(d),m=function(A,v){v===void 0&&(v={});var h=v.timeZoneName||"short",b=A+"|"+h,g=t[b];return g||(g=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:A,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:h}),t[b]=g),g}(p,f);return m.formatToParts(l)},c=function(d,p){for(var f=a(d,p),l=[],m=0;m<f.length;m+=1){var A=f[m],v=A.type,h=A.value,b=e[v];b>=0&&(l[b]=parseInt(h,10))}var g=l[3],y=g===24?0:g,I=l[0]+"-"+l[1]+"-"+l[2]+" "+y+":"+l[4]+":"+l[5]+":000",w=+d;return(o.utc(I).valueOf()-(w-=w%1e3))/6e4},u=n.prototype;u.tz=function(d,p){d===void 0&&(d=i);var f,l=this.utcOffset(),m=this.toDate(),A=m.toLocaleString("en-US",{timeZone:d}),v=Math.round((m-new Date(A))/1e3/60),h=15*-Math.round(m.getTimezoneOffset()/15)-v;if(!Number(h))f=this.utcOffset(0,p);else if(f=o(A,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(h,!0),p){var b=f.utcOffset();f=f.add(l-b,"minute")}return f.$x.$timezone=d,f},u.offsetName=function(d){var p=this.$x.$timezone||o.tz.guess(),f=a(this.valueOf(),p,{timeZoneName:d}).find(function(l){return l.type.toLowerCase()==="timezonename"});return f&&f.value};var s=u.startOf;u.startOf=function(d,p){if(!this.$x||!this.$x.$timezone)return s.call(this,d,p);var f=o(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return s.call(f,d,p).tz(this.$x.$timezone,!0)},o.tz=function(d,p,f){var l=f&&p,m=f||p||i,A=c(+o(),m);if(typeof d!="string")return o(d).tz(m);var v=function(y,I,w){var S=y-60*I*1e3,C=c(S,w);if(I===C)return[S,I];var x=c(S-=60*(C-I)*1e3,w);return C===x?[S,C]:[y-60*Math.min(C,x)*1e3,Math.max(C,x)]}(o.utc(d,l).valueOf(),A,m),h=v[0],b=v[1],g=o(h).utcOffset(b);return g.$x.$timezone=m,g},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(d){i=d}}})});var nd=de((cs,us)=>{"use strict";(function(e,t){typeof cs=="object"&&typeof us<"u"?us.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_utc=t()})(cs,function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g;return function(n,o,i){var a=o.prototype;i.utc=function(l){var m={date:l,utc:!0,args:arguments};return new o(m)},a.utc=function(l){var m=i(this.toDate(),{locale:this.$L,utc:!0});return l?m.add(this.utcOffset(),e):m},a.local=function(){return i(this.toDate(),{locale:this.$L,utc:!1})};var c=a.parse;a.parse=function(l){l.utc&&(this.$u=!0),this.$utils().u(l.$offset)||(this.$offset=l.$offset),c.call(this,l)};var u=a.init;a.init=function(){if(this.$u){var l=this.$d;this.$y=l.getUTCFullYear(),this.$M=l.getUTCMonth(),this.$D=l.getUTCDate(),this.$W=l.getUTCDay(),this.$H=l.getUTCHours(),this.$m=l.getUTCMinutes(),this.$s=l.getUTCSeconds(),this.$ms=l.getUTCMilliseconds()}else u.call(this)};var s=a.utcOffset;a.utcOffset=function(l,m){var A=this.$utils().u;if(A(l))return this.$u?0:A(this.$offset)?s.call(this):this.$offset;if(typeof l=="string"&&(l=function(g){g===void 0&&(g="");var y=g.match(t);if(!y)return null;var I=(""+y[0]).match(r)||["-",0,0],w=I[0],S=60*+I[1]+ +I[2];return S===0?0:w==="+"?S:-S}(l),l===null))return this;var v=Math.abs(l)<=16?60*l:l,h=this;if(m)return h.$offset=v,h.$u=l===0,h;if(l!==0){var b=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(h=this.local().add(v+b,e)).$offset=v,h.$x.$localOffset=b}else h=this.utc();return h};var d=a.format;a.format=function(l){var m=l||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return d.call(this,m)},a.valueOf=function(){var l=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*l},a.isUTC=function(){return!!this.$u},a.toISOString=function(){return this.toDate().toISOString()},a.toString=function(){return this.toDate().toUTCString()};var p=a.toDate;a.toDate=function(l){return l==="s"&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():p.call(this)};var f=a.diff;a.diff=function(l,m,A){if(l&&this.$u===l.$u)return f.call(this,l,m,A);var v=this.local(),h=i(l).local();return f.call(v,h,m,A)}}})});var yd=de((ZP,hd)=>{"use strict";function SS(e){try{return JSON.stringify(e)}catch{return'"[Circular]"'}}hd.exports=vS;function vS(e,t,r){var n=r&&r.stringify||SS,o=1;if(typeof e=="object"&&e!==null){var i=t.length+o;if(i===1)return e;var a=new Array(i);a[0]=n(e);for(var c=1;c<i;c++)a[c]=n(t[c]);return a.join(" ")}if(typeof e!="string")return e;var u=t.length;if(u===0)return e;for(var s="",d=1-o,p=-1,f=e&&e.length||0,l=0;l<f;){if(e.charCodeAt(l)===37&&l+1<f){switch(p=p>-1?p:0,e.charCodeAt(l+1)){case 100:case 102:if(d>=u||t[d]==null)break;p<l&&(s+=e.slice(p,l)),s+=Number(t[d]),p=l+2,l++;break;case 105:if(d>=u||t[d]==null)break;p<l&&(s+=e.slice(p,l)),s+=Math.floor(Number(t[d])),p=l+2,l++;break;case 79:case 111:case 106:if(d>=u||t[d]===void 0)break;p<l&&(s+=e.slice(p,l));var m=typeof t[d];if(m==="string"){s+="'"+t[d]+"'",p=l+2,l++;break}if(m==="function"){s+=t[d].name||"<anonymous>",p=l+2,l++;break}s+=n(t[d]),p=l+2,l++;break;case 115:if(d>=u)break;p<l&&(s+=e.slice(p,l)),s+=String(t[d]),p=l+2,l++;break;case 37:p<l&&(s+=e.slice(p,l)),s+="%",p=l+2,l++,d--;break}++d}++l}return p===-1?e:(p<f&&(s+=e.slice(p)),s)}});var wd=de((eI,zo)=>{"use strict";var Sd=yd();zo.exports=lt;var Rn=MS().console||{},CS={mapHttpRequest:Ho,mapHttpResponse:Ho,wrapRequestSerializer:fs,wrapResponseSerializer:fs,wrapErrorSerializer:fs,req:Ho,res:Ho,err:Cd,errWithCause:Cd};function Et(e,t){return e==="silent"?1/0:t.levels.values[e]}var hs=Symbol("pino.logFuncs"),ms=Symbol("pino.hierarchy"),AS={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function vd(e,t){let r={logger:t,parent:e[ms]};t[ms]=r}function bS(e,t,r){let n={};t.forEach(o=>{n[o]=r[o]?r[o]:Rn[o]||Rn[AS[o]||"log"]||Mr}),e[hs]=n}function wS(e,t){return Array.isArray(e)?e.filter(function(n){return n!=="!stdSerializers.err"}):e===!0?Object.keys(t):!1}function lt(e){e=e||{},e.browser=e.browser||{};let t=e.browser.transmit;if(t&&typeof t.send!="function")throw Error("pino: transmit option must have a send function");let r=e.browser.write||Rn;e.browser.write&&(e.browser.asObject=!0);let n=e.serializers||{},o=wS(e.browser.serialize,n),i=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(i=!1);let a=Object.keys(e.customLevels||{}),c=["error","fatal","warn","info","debug","trace"].concat(a);typeof r=="function"&&c.forEach(function(A){r[A]=r}),(e.enabled===!1||e.browser.disabled)&&(e.level="silent");let u=e.level||"info",s=Object.create(r);s.log||(s.log=Mr),bS(s,c,r),vd({},s),Object.defineProperty(s,"levelVal",{get:p}),Object.defineProperty(s,"level",{get:f,set:l});let d={transmit:t,serialize:o,asObject:e.browser.asObject,formatters:e.browser.formatters,levels:c,timestamp:kS(e),messageKey:e.messageKey||"msg",onChild:e.onChild||Mr};s.levels=xS(e),s.level=u,s.setMaxListeners=s.getMaxListeners=s.emit=s.addListener=s.on=s.prependListener=s.once=s.prependOnceListener=s.removeListener=s.removeAllListeners=s.listeners=s.listenerCount=s.eventNames=s.write=s.flush=Mr,s.serializers=n,s._serialize=o,s._stdErrSerialize=i,s.child=function(...A){return m.call(this,d,...A)},t&&(s._logEvent=gs());function p(){return Et(this.level,this)}function f(){return this._level}function l(A){if(A!=="silent"&&!this.levels.values[A])throw Error("unknown level "+A);this._level=A,Jt(this,d,s,"error"),Jt(this,d,s,"fatal"),Jt(this,d,s,"warn"),Jt(this,d,s,"info"),Jt(this,d,s,"debug"),Jt(this,d,s,"trace"),a.forEach(v=>{Jt(this,d,s,v)})}function m(A,v,h){if(!v)throw new Error("missing bindings for child Pino");h=h||{},o&&v.serializers&&(h.serializers=v.serializers);let b=h.serializers;if(o&&b){var g=Object.assign({},n,b),y=e.browser.serialize===!0?Object.keys(g):o;delete v.serializers,ys([v],y,g,this._stdErrSerialize)}function I(S){this._childLevel=(S._childLevel|0)+1,this.bindings=v,g&&(this.serializers=g,this._serialize=y),t&&(this._logEvent=gs([].concat(S._logEvent.bindings,v)))}I.prototype=this;let w=new I(this);return vd(this,w),w.child=function(...S){return m.call(this,A,...S)},w.level=h.level||this.level,A.onChild(w),w}return s}function xS(e){let t=e.customLevels||{},r=Object.assign({},lt.levels.values,t),n=Object.assign({},lt.levels.labels,RS(t));return{values:r,labels:n}}function RS(e){let t={};return Object.keys(e).forEach(function(r){t[e[r]]=r}),t}lt.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}};lt.stdSerializers=CS;lt.stdTimeFunctions=Object.assign({},{nullTime:Ad,epochTime:bd,unixTime:OS,isoTime:DS});function ES(e){let t=[];e.bindings&&t.push(e.bindings);let r=e[ms];for(;r.parent;)r=r.parent,r.logger.bindings&&t.push(r.logger.bindings);return t.reverse()}function Jt(e,t,r,n){if(Object.defineProperty(e,n,{value:Et(e.level,r)>Et(n,r)?Mr:r[hs][n],writable:!0,enumerable:!0,configurable:!0}),e[n]===Mr){if(!t.transmit)return;let i=t.transmit.level||e.level,a=Et(i,r);if(Et(n,r)<a)return}e[n]=IS(e,t,r,n);let o=ES(e);o.length!==0&&(e[n]=PS(o,e[n]))}function PS(e,t){return function(){return t.apply(this,[...e,...arguments])}}function IS(e,t,r,n){return function(o){return function(){let a=t.timestamp(),c=new Array(arguments.length),u=Object.getPrototypeOf&&Object.getPrototypeOf(this)===Rn?Rn:this;for(var s=0;s<c.length;s++)c[s]=arguments[s];var d=!1;if(t.serialize&&(ys(c,this._serialize,this.serializers,this._stdErrSerialize),d=!0),t.asObject||t.formatters?o.call(u,FS(this,n,c,a,t)):o.apply(u,c),t.transmit){let p=t.transmit.level||e._level,f=Et(p,r),l=Et(n,r);if(l<f)return;TS(this,{ts:a,methodLevel:n,methodValue:l,transmitLevel:p,transmitValue:r.levels.values[t.transmit.level||e._level],send:t.transmit.send,val:Et(e._level,r)},c,d)}}}(e[hs][n])}function FS(e,t,r,n,o){let{level:i,log:a=f=>f}=o.formatters||{},c=r.slice(),u=c[0],s={};if(n&&(s.time=n),i){let f=i(t,e.levels.values[t]);Object.assign(s,f)}else s.level=e.levels.values[t];let d=(e._childLevel|0)+1;if(d<1&&(d=1),u!==null&&typeof u=="object"){for(;d--&&typeof c[0]=="object";)Object.assign(s,c.shift());u=c.length?Sd(c.shift(),c):void 0}else typeof u=="string"&&(u=Sd(c.shift(),c));return u!==void 0&&(s[o.messageKey]=u),a(s)}function ys(e,t,r,n){for(let o in e)if(n&&e[o]instanceof Error)e[o]=lt.stdSerializers.err(e[o]);else if(typeof e[o]=="object"&&!Array.isArray(e[o])&&t)for(let i in e[o])t.indexOf(i)>-1&&i in r&&(e[o][i]=r[i](e[o][i]))}function TS(e,t,r,n=!1){let o=t.send,i=t.ts,a=t.methodLevel,c=t.methodValue,u=t.val,s=e._logEvent.bindings;n||ys(r,e._serialize||Object.keys(e.serializers),e.serializers,e._stdErrSerialize===void 0?!0:e._stdErrSerialize),e._logEvent.ts=i,e._logEvent.messages=r.filter(function(d){return s.indexOf(d)===-1}),e._logEvent.level.label=a,e._logEvent.level.value=c,o(a,e._logEvent,u),e._logEvent=gs(s)}function gs(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function Cd(e){let t={type:e.constructor.name,msg:e.message,stack:e.stack};for(let r in e)t[r]===void 0&&(t[r]=e[r]);return t}function kS(e){return typeof e.timestamp=="function"?e.timestamp:e.timestamp===!1?Ad:bd}function Ho(){return{}}function fs(e){return e}function Mr(){}function Ad(){return!1}function bd(){return Date.now()}function OS(){return Math.round(Date.now()/1e3)}function DS(){return new Date(Date.now()).toISOString()}function MS(){function e(t){return typeof t<"u"&&t}try{return typeof globalThis<"u"||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch{return e(self)||e(window)||e(this)||{}}}zo.exports.default=lt;zo.exports.pino=lt});var oC={};Ds(oC,{DefaultFieldsToInclude:()=>Cs,EcommerceDefaultFieldsToInclude:()=>Ud,HighlightUtils:()=>ki,MinimumFieldsToInclude:()=>oi,ResultTemplatesHelpers:()=>Lp,buildContext:()=>qp,buildController:()=>Ut,buildDictionaryFieldContext:()=>Np,buildInteractiveResult:()=>Dp,buildRecommendationEngine:()=>Td,buildRecommendationList:()=>kp,buildResultTemplatesManager:()=>Vp,getAnalyticsNextApiBaseUrl:()=>Vn,getOrganizationEndpoint:()=>ve,getSampleRecommendationEngineConfiguration:()=>Ss,loadAdvancedSearchQueryActions:()=>BS,loadClickAnalyticsActions:()=>ZS,loadConfigurationActions:()=>LS,loadContextActions:()=>$S,loadDebugActions:()=>JS,loadDictionaryFieldContextActions:()=>HS,loadFieldActions:()=>GS,loadPaginationActions:()=>ks,loadPipelineActions:()=>KS,loadRecommendationActions:()=>XS,loadSearchConfigurationActions:()=>jS,loadSearchHubActions:()=>YS});module.exports=Wp(oC);var ki={};Ds(ki,{escape:()=>nr,getHighlightedSuggestion:()=>Yp,highlightString:()=>Kp});var Us=require("@coveo/bueno");function qs(e){return Array.isArray(e)}function Mn(e){return e.trim()===""}function Ns(e,t){return[...e.reduce((r,n)=>{let o=t(n);return r.has(o)||r.set(o,n),r},new Map).values()]}var Gp=new Set(["1",1,"yes",!0]);function _s(){if(typeof navigator>"u"||typeof window>"u")return!1;let e=navigator,t=window;return[e.globalPrivacyControl,e.doNotTrack,e.msDoNotTrack,t.doNotTrack].some(r=>Gp.has(r))}function Vs(e){let t={};for(let[r,n]of e)t[r]=n;return t}function Gr(e){if(typeof e!="object"||!e)return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}function Kp(e){if(Mn(e.openingDelimiter)||Mn(e.closingDelimiter))throw Error("delimiters should be a non-empty string");if((0,Us.isNullOrUndefined)(e.content)||Mn(e.content))return e.content;if(e.highlights.length===0)return nr(e.content);let t=e.content.length,r="",n=0;for(let o=0;o<e.highlights.length;o++){let i=e.highlights[o],a=i.offset,c=a+i.length;if(c>t)break;r+=nr(e.content.slice(n,a)),r+=e.openingDelimiter,r+=nr(e.content.slice(a,c)),r+=e.closingDelimiter,n=c}return n!==t&&(r+=nr(e.content.slice(n))),r}function Yp(e,t){return e=nr(e),e.replace(/\[(.*?)\]|\{(.*?)\}|\((.*?)\)/g,(r,n,o,i)=>n?Ti(n,t.notMatchDelimiters):o?Ti(o,t.exactMatchDelimiters):i?Ti(i,t.correctionDelimiters):r)}function Ti(e,t){return t?t.open+e+t.close:e}function nr(e){let t={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},r="(?:"+Object.keys(t).join("|")+")",n=RegExp(r),o=RegExp(r,"g");return n.test(e)?e.replace(o,i=>t[i]):e}var vs=require("@coveo/bueno");var qn=e=>e;var Ls=e=>e,js=e=>e,Bs=e=>e;var ic=require("@coveo/bueno");function Nn(){return{answerSnippet:"",documentId:{contentIdKey:"",contentIdValue:""},question:"",relatedQuestions:[],score:0}}function $e(){return{response:{results:[],searchUid:"",totalCountFiltered:0,facets:[],generateAutomaticFacets:{facets:[]},queryCorrections:[],triggers:[],questionAnswer:Nn(),pipeline:"",splitTestRun:"",termsToHighlight:{},phrasesToHighlight:{},extendedResults:{}},duration:0,queryExecuted:"",error:null,automaticallyCorrected:!1,isLoading:!1,results:[],searchResponseId:"",requestId:"",questionAnswer:Nn(),extendedResults:{}}}function ft(e){let{url:t,accessToken:r,organizationId:n,authentication:o,...i}=e;return i}var mt=e=>{let{response:t}=e;return t.body?Jp(e):Xp(t)},Jp=e=>ef(e)?tf(e):Zp(e)?e.body:{message:"unknown",statusCode:0,type:"unknown"},Xp=e=>{let t=JSON.parse(JSON.stringify(e,Object.getOwnPropertyNames(e)));return{...t,message:`Client side error: ${t.message||""}`,statusCode:400,type:"ClientError"}};function Zp(e){return e.body.statusCode!==void 0}function ef(e){return e.body.exception!==void 0}var tf=e=>({message:e.body.exception.code,statusCode:e.response.status,type:e.body.exception.code});var ec=Qe(Ys(),1);var If="recommendation-internal-options",bC=Symbol.for(If);var He=new Error("Failed to load reducers."),or=class extends Error{constructor(){super(),this.name="ExpiredToken",this.message="The token being used to perform the request is expired."}};var jt=class extends Error{constructor(r,n){super();se(this,"statusCode");this.name="Disconnected",this.message=`Client could not connect to the following URL: ${r}`,this.statusCode=n??0}};function Js(e){let t=[];for(let r in e){let n=encodeURIComponent(r),o=encodeURIComponent(e[r]);t.push(`${n}=${o}`)}return t.join("&")}function Xs(e){return typeof e!="object"||!e?!1:Object.values(e).every(Ff)}function Ff(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function Zs(e){return e===429}var _e=class e{static async call(t){let r=Tf(t),{logger:n}=t,o=await e.preprocessRequest(r,t);n.info(o,"Platform request");let{url:i,...a}=o,c=async()=>{let u=await fetch(i,a);if(Zs(u.status))throw u;return u};try{let u=await(0,ec.backOff)(c,{retry:s=>{let d=s&&Zs(s.status);return d&&n.info("Platform retrying request"),d}});switch(u.status){case 419:case 401:throw n.info("Platform renewing token"),new or;case 404:throw new jt(i,u.status);default:return n.info({response:u,requestInfo:o},"Platform response"),u}}catch(u){return u.message==="Failed to fetch"?new jt(i):u}}static async preprocessRequest(t,r){let{origin:n,preprocessRequest:o,logger:i,requestMetadata:a}=r,{signal:c,...u}=t,s=Gr(u);try{let d=await o(t,n,a);return{...t,...d}}catch(d){i.error(d,"Platform request preprocessing failed. Returning default request options.")}return s}};function ve(e,t="prod",r="platform"){let n=t==="prod"?"":t,o=r==="platform"?"":`.${r}`;return`https://${e}${o}.org${n}.coveo.com`}function gt(e,t="prod"){return`${ve(e,t)}/rest/search/v2`}function Vn(e,t="prod"){return`${ve(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function Tf(e){let{url:t,method:r,requestParams:n,contentType:o,accessToken:i,signal:a}=e,c=e.method==="POST"||e.method==="PUT",u=kf(n,o);return{url:t,method:r,headers:{"Content-Type":o,Authorization:`Bearer ${i}`,...e.headers},...c&&{body:u},signal:a}}function kf(e,t){return t==="application/x-www-form-urlencoded"?Xs(e)?Js(e):"":JSON.stringify(e)}var ht=class{constructor(){se(this,"currentAbortController",null)}async enqueue(t,r){let n=this.currentAbortController,o=this.currentAbortController=new AbortController;n&&(r.warnOnAbort&&r.logger.warn("Cancelling current pending search query"),n.abort());try{return await t(o?.signal??null)}finally{this.currentAbortController===o&&(this.currentAbortController=null)}}};var Jr=class{constructor(t){se(this,"_basePath");se(this,"_params",{});this._basePath=t}addParam(t,r){this._params={...this.params,[t]:r}}get basePath(){return this._basePath}get params(){return this._params}get hasParams(){return Object.entries(this._params).length}get href(){return this.hasParams?`${this.basePath}?${Object.entries(this.params).map(([t,r])=>`${t}=${encodeURIComponent(r)}`).join("&")}`:this.basePath}};function tc(e){return((e.headers.get("content-type")||"").split(";").find(n=>n.indexOf("charset=")!==-1)||"").split("=")[1]||"UTF-8"}var tt=(e,t,r,n)=>{let o=new Jr(`${e.url}${n}`);return o.addParam("organizationId",e.organizationId),e.authentication&&o.addParam("authentication",e.authentication),{accessToken:e.accessToken,method:t,contentType:r,url:o.href,origin:"searchApiFetch"}};var rc=async(e,t)=>{let r=await _e.call({...tt(e,"POST","application/x-www-form-urlencoded","/html"),requestParams:ft(e),requestMetadata:{method:"html"},...t});if(r instanceof Error)throw r;let n=tc(r),o=await r.arrayBuffer(),a=new TextDecoder(n).decode(o);return Of(a)?{success:a}:{error:mt({response:r,body:a})}};function Of(e){return typeof e=="string"}function Df(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function Mf(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function Un(e,t){if(t&&e.name==="AbortError")return{error:Mf(e)};if(e instanceof jt)return{error:Df(e)};throw e}var Ln=class{constructor(t){this.options=t;se(this,"apiCallsQueues",{unknown:new ht,mainSearch:new ht,facetValues:new ht,foldingCollection:new ht,instantResults:new ht})}async plan(t){let r=await _e.call({...tt(t,"POST","application/json","/plan"),requestParams:ft(t),requestMetadata:{method:"plan"},...this.options});if(r instanceof Error)return Un(r);let n=await r.json();return Nf(n)?{success:n}:{error:mt({response:r,body:n})}}async querySuggest(t){let r=await _e.call({...tt(t,"POST","application/json","/querySuggest"),requestMetadata:{method:"querySuggest"},requestParams:ft(t),...this.options});if(r instanceof Error)return Un(r);let n=await r.json(),o={response:r,body:n};return qf(n)?{success:(await this.options.postprocessQuerySuggestResponseMiddleware(o)).body}:{error:mt(o)}}async search(t,r){let n=r?.origin??"unknown",o=await this.apiCallsQueues[n].enqueue(c=>_e.call({...tt(t,"POST","application/json",""),requestParams:ft(t),requestMetadata:{method:"search",origin:r?.origin},...this.options,signal:c??void 0}),{logger:this.options.logger,warnOnAbort:!r?.disableAbortWarning});if(o instanceof Error)return Un(o,r?.disableAbortWarning);let i=await o.json(),a={response:o,body:i};return nc(i)?(a.body=oc(i),{success:(await this.options.postprocessSearchResponseMiddleware(a)).body}):{error:mt(a)}}async facetSearch(t){let r=await _e.call({...tt(t,"POST","application/json","/facet"),requestParams:ft(t),requestMetadata:{method:"facetSearch"},...this.options});if(r instanceof Error)throw r;let n=await r.json(),o={response:r,body:n};return(await this.options.postprocessFacetSearchResponseMiddleware(o)).body}async recommendations(t){let r=await _e.call({...tt(t,"POST","application/json",""),requestParams:ft(t),requestMetadata:{method:"recommendations"},...this.options});if(r instanceof Error)throw r;let n=await r.json();if(nc(n)){let o={response:r,body:n};return o.body=oc(n),{success:(await this.options.postprocessSearchResponseMiddleware(o)).body}}return{error:mt({response:r,body:n})}}async html(t){return rc(t,{...this.options})}async fieldDescriptions(t){let r=await _e.call({...tt(t,"GET","application/json","/fields"),requestParams:{},requestMetadata:{method:"fieldDescriptions"},...this.options});if(r instanceof Error)throw r;let n=await r.json();return _f(n)?{success:n}:{error:mt({response:r,body:n})}}},jn=e=>e.success!==void 0,be=e=>e.error!==void 0;function nc(e){return e.results!==void 0}function oc(e){let t=Nn();return(0,ic.isNullOrUndefined)(e.questionAnswer)?(e.questionAnswer=t,e):(e.questionAnswer={...t,...e.questionAnswer},e)}function qf(e){return e.completions!==void 0}function Nf(e){return e.preprocessingOutput!==void 0}function _f(e){return e.fields!==void 0}var Ce=require("@coveo/bueno");function pe(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Vf=typeof Symbol=="function"&&Symbol.observable||"@@observable",ac=Vf,Li=()=>Math.random().toString(36).substring(7).split("").join("."),Uf={INIT:`@@redux/INIT${Li()}`,REPLACE:`@@redux/REPLACE${Li()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Li()}`},Bn=Uf;function ze(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function ji(e,t,r){if(typeof e!="function")throw new Error(pe(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(pe(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(pe(1));return r(ji)(e,t)}let n=e,o=t,i=new Map,a=i,c=0,u=!1;function s(){a===i&&(a=new Map,i.forEach((v,h)=>{a.set(h,v)}))}function d(){if(u)throw new Error(pe(3));return o}function p(v){if(typeof v!="function")throw new Error(pe(4));if(u)throw new Error(pe(5));let h=!0;s();let b=c++;return a.set(b,v),function(){if(h){if(u)throw new Error(pe(6));h=!1,s(),a.delete(b),i=null}}}function f(v){if(!ze(v))throw new Error(pe(7));if(typeof v.type>"u")throw new Error(pe(8));if(typeof v.type!="string")throw new Error(pe(17));if(u)throw new Error(pe(9));try{u=!0,o=n(o,v)}finally{u=!1}return(i=a).forEach(b=>{b()}),v}function l(v){if(typeof v!="function")throw new Error(pe(10));n=v,f({type:Bn.REPLACE})}function m(){let v=p;return{subscribe(h){if(typeof h!="object"||h===null)throw new Error(pe(11));function b(){let y=h;y.next&&y.next(d())}return b(),{unsubscribe:v(b)}},[ac](){return this}}}return f({type:Bn.INIT}),{dispatch:f,subscribe:p,getState:d,replaceReducer:l,[ac]:m}}function Lf(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:Bn.INIT})>"u")throw new Error(pe(12));if(typeof r(void 0,{type:Bn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(pe(13))})}function ir(e){let t=Object.keys(e),r={};for(let a=0;a<t.length;a++){let c=t[a];typeof e[c]=="function"&&(r[c]=e[c])}let n=Object.keys(r),o,i;try{Lf(r)}catch(a){i=a}return function(c={},u){if(i)throw i;let s=!1,d={};for(let p=0;p<n.length;p++){let f=n[p],l=r[f],m=c[f],A=l(m,u);if(typeof A>"u"){let v=u&&u.type;throw new Error(pe(14))}d[f]=A,s=s||A!==m}return s=s||n.length!==Object.keys(c).length,s?d:c}}function ar(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function sc(...e){return t=>(r,n)=>{let o=t(r,n),i=()=>{throw new Error(pe(15))},a={getState:o.getState,dispatch:(u,...s)=>i(u,...s)},c=e.map(u=>u(a));return i=ar(...c)(o.dispatch),{...o,dispatch:i}}}function Qn(e){return ze(e)&&"type"in e&&typeof e.type=="string"}var Ji=Symbol.for("immer-nothing"),Xr=Symbol.for("immer-draftable"),we=Symbol.for("immer-state");function fe(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Qt=Object.getPrototypeOf;function Fe(e){return!!e&&!!e[we]}function xe(e){return e?pc(e)||Array.isArray(e)||!!e[Xr]||!!e.constructor?.[Xr]||nn(e)||on(e):!1}var jf=Object.prototype.constructor.toString();function pc(e){if(!e||typeof e!="object")return!1;let t=Qt(e);if(t===null)return!0;let r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object?!0:typeof r=="function"&&Function.toString.call(r)===jf}function Xi(e){return Fe(e)||fe(15,e),e[we].base_}function Zr(e,t){$t(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function $t(e){let t=e[we];return t?t.type_:Array.isArray(e)?1:nn(e)?2:on(e)?3:0}function en(e,t){return $t(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Bi(e,t){return $t(e)===2?e.get(t):e[t]}function fc(e,t,r){let n=$t(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function Bf(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function nn(e){return e instanceof Map}function on(e){return e instanceof Set}function Bt(e){return e.copy_||e.base_}function Hi(e,t){if(nn(e))return new Map(e);if(on(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=pc(e);if(t===!0||t==="class_only"&&!r){let n=Object.getOwnPropertyDescriptors(e);delete n[we];let o=Reflect.ownKeys(n);for(let i=0;i<o.length;i++){let a=o[i],c=n[a];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(n[a]={configurable:!0,writable:!0,enumerable:c.enumerable,value:e[a]})}return Object.create(Qt(e),n)}else{let n=Qt(e);if(n!==null&&r)return{...e};let o=Object.create(n);return Object.assign(o,e)}}function zn(e,t=!1){return Wn(e)||Fe(e)||!xe(e)||($t(e)>1&&(e.set=e.add=e.clear=e.delete=Qf),Object.freeze(e),t&&Object.entries(e).forEach(([r,n])=>zn(n,!0))),e}function Qf(){fe(2)}function Wn(e){return Object.isFrozen(e)}var zi={};function Ht(e){let t=zi[e];return t||fe(0,e),t}function $f(e,t){zi[e]||(zi[e]=t)}var tn;function mc(){return tn}function Hf(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function cc(e,t){t&&(Ht("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Wi(e){Gi(e),e.drafts_.forEach(zf),e.drafts_=null}function Gi(e){e===tn&&(tn=e.parent_)}function uc(e){return tn=Hf(tn,e)}function zf(e){let t=e[we];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function lc(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[we].modified_&&(Wi(t),fe(4)),xe(e)&&(e=$n(t,e),t.parent_||Hn(t,e)),t.patches_&&Ht("Patches").generateReplacementPatches_(r[we].base_,e,t.patches_,t.inversePatches_)):e=$n(t,r,[]),Wi(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Ji?e:void 0}function $n(e,t,r){if(Wn(t))return t;let n=t[we];if(!n)return Zr(t,(o,i)=>dc(e,n,t,o,i,r)),t;if(n.scope_!==e)return t;if(!n.modified_)return Hn(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;let o=n.copy_,i=o,a=!1;n.type_===3&&(i=new Set(o),o.clear(),a=!0),Zr(i,(c,u)=>dc(e,n,o,c,u,r,a)),Hn(e,o,!1),r&&e.patches_&&Ht("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function dc(e,t,r,n,o,i,a){if(Fe(o)){let c=i&&t&&t.type_!==3&&!en(t.assigned_,n)?i.concat(n):void 0,u=$n(e,o,c);if(fc(r,n,u),Fe(u))e.canAutoFreeze_=!1;else return}else a&&r.add(o);if(xe(o)&&!Wn(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;$n(e,o),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,n)&&Hn(e,o)}}function Hn(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&zn(t,r)}function Wf(e,t){let r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:mc(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},o=n,i=Zi;r&&(o=[n],i=rn);let{revoke:a,proxy:c}=Proxy.revocable(o,i);return n.draft_=c,n.revoke_=a,c}var Zi={get(e,t){if(t===we)return e;let r=Bt(e);if(!en(r,t))return Gf(e,r,t);let n=r[t];return e.finalized_||!xe(n)?n:n===Qi(e.base_,t)?($i(e),e.copy_[t]=Yi(n,e)):n},has(e,t){return t in Bt(e)},ownKeys(e){return Reflect.ownKeys(Bt(e))},set(e,t,r){let n=gc(Bt(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let o=Qi(Bt(e),t),i=o?.[we];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(Bf(r,o)&&(r!==void 0||en(e.base_,t)))return!0;$i(e),Ki(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Qi(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,$i(e),Ki(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=Bt(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){fe(11)},getPrototypeOf(e){return Qt(e.base_)},setPrototypeOf(){fe(12)}},rn={};Zr(Zi,(e,t)=>{rn[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});rn.deleteProperty=function(e,t){return rn.set.call(this,e,t,void 0)};rn.set=function(e,t,r){return Zi.set.call(this,e[0],t,r,e[0])};function Qi(e,t){let r=e[we];return(r?Bt(r):e)[t]}function Gf(e,t,r){let n=gc(t,r);return n?"value"in n?n.value:n.get?.call(e.draft_):void 0}function gc(e,t){if(!(t in e))return;let r=Qt(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Qt(r)}}function Ki(e){e.modified_||(e.modified_=!0,e.parent_&&Ki(e.parent_))}function $i(e){e.copy_||(e.copy_=Hi(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Kf=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){let i=r;r=t;let a=this;return function(u=i,...s){return a.produce(u,d=>r.call(this,d,...s))}}typeof r!="function"&&fe(6),n!==void 0&&typeof n!="function"&&fe(7);let o;if(xe(t)){let i=uc(this),a=Yi(t,void 0),c=!0;try{o=r(a),c=!1}finally{c?Wi(i):Gi(i)}return cc(i,n),lc(o,i)}else if(!t||typeof t!="object"){if(o=r(t),o===void 0&&(o=t),o===Ji&&(o=void 0),this.autoFreeze_&&zn(o,!0),n){let i=[],a=[];Ht("Patches").generateReplacementPatches_(t,o,i,a),n(i,a)}return o}else fe(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(a,...c)=>this.produceWithPatches(a,u=>t(u,...c));let n,o;return[this.produce(t,r,(a,c)=>{n=a,o=c}),n,o]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){xe(e)||fe(8),Fe(e)&&(e=hc(e));let t=uc(this),r=Yi(e,void 0);return r[we].isManual_=!0,Gi(t),r}finishDraft(e,t){let r=e&&e[we];(!r||!r.isManual_)&&fe(9);let{scope_:n}=r;return cc(n,t),lc(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let o=t[r];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}r>-1&&(t=t.slice(r+1));let n=Ht("Patches").applyPatches_;return Fe(e)?n(e,t):this.produce(e,o=>n(o,t))}};function Yi(e,t){let r=nn(e)?Ht("MapSet").proxyMap_(e,t):on(e)?Ht("MapSet").proxySet_(e,t):Wf(e,t);return(t?t.scope_:mc()).drafts_.push(r),r}function hc(e){return Fe(e)||fe(10,e),yc(e)}function yc(e){if(!xe(e)||Wn(e))return e;let t=e[we],r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Hi(e,t.scope_.immer_.useStrictShallowCopy_)}else r=Hi(e,!0);return Zr(r,(n,o)=>{fc(r,n,yc(o))}),t&&(t.finalized_=!1),r}function Sc(){let t="replace",r="add",n="remove";function o(f,l,m,A){switch(f.type_){case 0:case 2:return a(f,l,m,A);case 1:return i(f,l,m,A);case 3:return c(f,l,m,A)}}function i(f,l,m,A){let{base_:v,assigned_:h}=f,b=f.copy_;b.length<v.length&&([v,b]=[b,v],[m,A]=[A,m]);for(let g=0;g<v.length;g++)if(h[g]&&b[g]!==v[g]){let y=l.concat([g]);m.push({op:t,path:y,value:p(b[g])}),A.push({op:t,path:y,value:p(v[g])})}for(let g=v.length;g<b.length;g++){let y=l.concat([g]);m.push({op:r,path:y,value:p(b[g])})}for(let g=b.length-1;v.length<=g;--g){let y=l.concat([g]);A.push({op:n,path:y})}}function a(f,l,m,A){let{base_:v,copy_:h}=f;Zr(f.assigned_,(b,g)=>{let y=Bi(v,b),I=Bi(h,b),w=g?en(v,b)?t:r:n;if(y===I&&w===t)return;let S=l.concat(b);m.push(w===n?{op:w,path:S}:{op:w,path:S,value:I}),A.push(w===r?{op:n,path:S}:w===n?{op:r,path:S,value:p(y)}:{op:t,path:S,value:p(y)})})}function c(f,l,m,A){let{base_:v,copy_:h}=f,b=0;v.forEach(g=>{if(!h.has(g)){let y=l.concat([b]);m.push({op:n,path:y,value:g}),A.unshift({op:r,path:y,value:g})}b++}),b=0,h.forEach(g=>{if(!v.has(g)){let y=l.concat([b]);m.push({op:r,path:y,value:g}),A.unshift({op:n,path:y,value:g})}b++})}function u(f,l,m,A){m.push({op:t,path:[],value:l===Ji?void 0:l}),A.push({op:t,path:[],value:f})}function s(f,l){return l.forEach(m=>{let{path:A,op:v}=m,h=f;for(let I=0;I<A.length-1;I++){let w=$t(h),S=A[I];typeof S!="string"&&typeof S!="number"&&(S=""+S),(w===0||w===1)&&(S==="__proto__"||S==="constructor")&&fe(19),typeof h=="function"&&S==="prototype"&&fe(19),h=Bi(h,S),typeof h!="object"&&fe(18,A.join("/"))}let b=$t(h),g=d(m.value),y=A[A.length-1];switch(v){case t:switch(b){case 2:return h.set(y,g);case 3:fe(16);default:return h[y]=g}case r:switch(b){case 1:return y==="-"?h.push(g):h.splice(y,0,g);case 2:return h.set(y,g);case 3:return h.add(g);default:return h[y]=g}case n:switch(b){case 1:return h.splice(y,1);case 2:return h.delete(y);case 3:return h.delete(m.value);default:return delete h[y]}default:fe(17,v)}}),f}function d(f){if(!xe(f))return f;if(Array.isArray(f))return f.map(d);if(nn(f))return new Map(Array.from(f.entries()).map(([m,A])=>[m,d(A)]));if(on(f))return new Set(Array.from(f).map(d));let l=Object.create(Qt(f));for(let m in f)l[m]=d(f[m]);return en(f,Xr)&&(l[Xr]=f[Xr]),l}function p(f){return Fe(f)?d(f):f}$f("Patches",{applyPatches_:s,generatePatches_:o,generateReplacementPatches_:u})}var Te=new Kf,rt=Te.produce,Gn=Te.produceWithPatches.bind(Te),aA=Te.setAutoFreeze.bind(Te),sA=Te.setUseStrictShallowCopy.bind(Te),ea=Te.applyPatches.bind(Te),cA=Te.createDraft.bind(Te),uA=Te.finishDraft.bind(Te);function Yf(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Jf(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function Xf(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){let r=e.map(n=>typeof n=="function"?`function ${n.name||"unnamed"}()`:typeof n).join(", ");throw new TypeError(`${t}[${r}]`)}}var vc=e=>Array.isArray(e)?e:[e];function Zf(e){let t=Array.isArray(e[0])?e[0]:e;return Xf(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function em(e,t){let r=[],{length:n}=e;for(let o=0;o<n;o++)r.push(e[o].apply(null,t));return r}var pA=Symbol();var fA=Object.getPrototypeOf({});var tm=class{constructor(e){this.value=e}deref(){return this.value}},rm=typeof WeakRef<"u"?WeakRef:tm,nm=0,Cc=1;function Kn(){return{s:nm,v:void 0,o:null,p:null}}function sr(e,t={}){let r=Kn(),{resultEqualityCheck:n}=t,o,i=0;function a(){let c=r,{length:u}=arguments;for(let p=0,f=u;p<f;p++){let l=arguments[p];if(typeof l=="function"||typeof l=="object"&&l!==null){let m=c.o;m===null&&(c.o=m=new WeakMap);let A=m.get(l);A===void 0?(c=Kn(),m.set(l,c)):c=A}else{let m=c.p;m===null&&(c.p=m=new Map);let A=m.get(l);A===void 0?(c=Kn(),m.set(l,c)):c=A}}let s=c,d;if(c.s===Cc)d=c.v;else if(d=e.apply(null,arguments),i++,n){let p=o?.deref?.()??o;p!=null&&n(p,d)&&(d=p,i!==0&&i--),o=typeof d=="object"&&d!==null||typeof d=="function"?new rm(d):d}return s.s=Cc,s.v=d,d}return a.clearCache=()=>{r=Kn(),a.resetResultsCount()},a.resultsCount=()=>i,a.resetResultsCount=()=>{i=0},a}function Ac(e,...t){let r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...o)=>{let i=0,a=0,c,u={},s=o.pop();typeof s=="object"&&(u=s,s=o.pop()),Yf(s,`createSelector expects an output function after the inputs, but received: [${typeof s}]`);let d={...r,...u},{memoize:p,memoizeOptions:f=[],argsMemoize:l=sr,argsMemoizeOptions:m=[],devModeChecks:A={}}=d,v=vc(f),h=vc(m),b=Zf(o),g=p(function(){return i++,s.apply(null,arguments)},...v),y=!0,I=l(function(){a++;let S=em(b,arguments);return c=g.apply(null,S),c},...h);return Object.assign(I,{resultFunc:s,memoizedResultFunc:g,dependencies:b,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>c,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:p,argsMemoize:l})};return Object.assign(n,{withTypes:()=>n}),n}var ue=Ac(sr),om=Object.assign((e,t=ue)=>{Jf(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);let r=Object.keys(e),n=r.map(i=>e[i]);return t(n,(...i)=>i.reduce((a,c,u)=>(a[r[u]]=c,a),{}))},{withTypes:()=>om});function bc(e){return({dispatch:r,getState:n})=>o=>i=>typeof i=="function"?i(r,n,e):o(i)}var wc=bc(),xc=bc;var im=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?ar:ar.apply(null,arguments)},wA=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},am=e=>e&&typeof e.match=="function";function R(e,t){function r(...n){if(t){let o=t(...n);if(!o)throw new Error(Ve(0));return{type:e,payload:o.payload,..."meta"in o&&{meta:o.meta},..."error"in o&&{error:o.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>Qn(n)&&n.type===e,r}var Fc=class an extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,an.prototype)}static get[Symbol.species](){return an}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new an(...t[0].concat(this)):new an(...t.concat(this))}};function Rc(e){return xe(e)?rt(e,()=>{}):e}function Ec(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function sm(e){return typeof e=="boolean"}var cm=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:o=!0,actionCreatorCheck:i=!0}=t??{},a=new Fc;return r&&(sm(r)?a.push(wc):a.push(xc(r.extraArgument))),a},sn="RTK_autoBatch",ur=()=>e=>({payload:e,meta:{[sn]:!0}}),Pc=e=>t=>{setTimeout(t,e)},um=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),o=!0,i=!1,a=!1,c=new Set,u=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Pc(10):e.type==="callback"?e.queueNotification:Pc(e.timeout),s=()=>{a=!1,i&&(i=!1,c.forEach(d=>d()))};return Object.assign({},n,{subscribe(d){let p=()=>o&&d(),f=n.subscribe(p);return c.add(d),()=>{f(),c.delete(d)}},dispatch(d){try{return o=!d?.meta?.[sn],i=!o,i&&(a||(a=!0,u(s))),n.dispatch(d)}finally{o=!0}}})},lm=e=>function(r){let{autoBatch:n=!0}=r??{},o=new Fc(e);return n&&o.push(um(typeof n=="object"?n:void 0)),o};function Tc(e){let t=cm(),{reducer:r=void 0,middleware:n,devTools:o=!0,preloadedState:i=void 0,enhancers:a=void 0}=e||{},c;if(typeof r=="function")c=r;else if(ze(r))c=ir(r);else throw new Error(Ve(1));let u;typeof n=="function"?u=n(t):u=t();let s=ar;o&&(s=im({trace:!1,...typeof o=="object"&&o}));let d=sc(...u),p=lm(d),f=typeof a=="function"?a(p):p(),l=s(...f);return ji(c,i,l)}function kc(e){let t={},r=[],n,o={addCase(i,a){let c=typeof i=="string"?i:i.type;if(!c)throw new Error(Ve(28));if(c in t)throw new Error(Ve(29));return t[c]=a,o},addMatcher(i,a){return r.push({matcher:i,reducer:a}),o},addDefaultCase(i){return n=i,o}};return e(o),[t,r,n]}function dm(e){return typeof e=="function"}function re(e,t){let[r,n,o]=kc(t),i;if(dm(e))i=()=>Rc(e());else{let c=Rc(e);i=()=>c}function a(c=i(),u){let s=[r[u.type],...n.filter(({matcher:d})=>d(u)).map(({reducer:d})=>d)];return s.filter(d=>!!d).length===0&&(s=[o]),s.reduce((d,p)=>{if(p)if(Fe(d)){let l=p(d,u);return l===void 0?d:l}else{if(xe(d))return rt(d,f=>p(f,u));{let f=p(d,u);if(f===void 0){if(d===null)return d;throw Error("A case reducer on a non-draftable value must not return undefined")}return f}}return d},c)}return a.getInitialState=i,a}var Oc=(e,t)=>am(e)?e.match(t):e(t);function We(...e){return t=>e.some(r=>Oc(r,t))}function cr(...e){return t=>e.every(r=>Oc(r,t))}function Jn(e,t){if(!e||!e.meta)return!1;let r=typeof e.meta.requestId=="string",n=t.indexOf(e.meta.requestStatus)>-1;return r&&n}function cn(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function Xn(...e){return e.length===0?t=>Jn(t,["pending"]):cn(e)?We(...e.map(t=>t.pending)):Xn()(e[0])}function zt(...e){return e.length===0?t=>Jn(t,["rejected"]):cn(e)?We(...e.map(t=>t.rejected)):zt()(e[0])}function un(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?cr(zt(...e),t):cn(e)?cr(zt(...e),t):un()(e[0])}function nt(...e){return e.length===0?t=>Jn(t,["fulfilled"]):cn(e)?We(...e.map(t=>t.fulfilled)):nt()(e[0])}function Zn(...e){return e.length===0?t=>Jn(t,["pending","fulfilled","rejected"]):cn(e)?We(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):Zn()(e[0])}var pm="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",eo=(e=21)=>{let t="",r=e;for(;r--;)t+=pm[Math.random()*64|0];return t},fm=["name","message","stack","code"],ta=class{constructor(e,t){se(this,"_type");this.payload=e,this.meta=t}},Ic=class{constructor(e,t){se(this,"_type");this.payload=e,this.meta=t}},mm=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of fm)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},K=(()=>{function e(t,r,n){let o=R(t+"/fulfilled",(u,s,d,p)=>({payload:u,meta:{...p||{},arg:d,requestId:s,requestStatus:"fulfilled"}})),i=R(t+"/pending",(u,s,d)=>({payload:void 0,meta:{...d||{},arg:s,requestId:u,requestStatus:"pending"}})),a=R(t+"/rejected",(u,s,d,p,f)=>({payload:p,error:(n&&n.serializeError||mm)(u||"Rejected"),meta:{...f||{},arg:d,requestId:s,rejectedWithValue:!!p,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"}}));function c(u){return(s,d,p)=>{let f=n?.idGenerator?n.idGenerator(u):eo(),l=new AbortController,m,A;function v(b){A=b,l.abort()}let h=async function(){let b;try{let y=n?.condition?.(u,{getState:d,extra:p});if(hm(y)&&(y=await y),y===!1||l.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let I=new Promise((w,S)=>{m=()=>{S({name:"AbortError",message:A||"Aborted"})},l.signal.addEventListener("abort",m)});s(i(f,u,n?.getPendingMeta?.({requestId:f,arg:u},{getState:d,extra:p}))),b=await Promise.race([I,Promise.resolve(r(u,{dispatch:s,getState:d,extra:p,requestId:f,signal:l.signal,abort:v,rejectWithValue:(w,S)=>new ta(w,S),fulfillWithValue:(w,S)=>new Ic(w,S)})).then(w=>{if(w instanceof ta)throw w;return w instanceof Ic?o(w.payload,f,u,w.meta):o(w,f,u)})])}catch(y){b=y instanceof ta?a(null,f,u,y.payload,y.meta):a(y,f,u)}finally{m&&l.signal.removeEventListener("abort",m)}return n&&!n.dispatchConditionRejection&&a.match(b)&&b.meta.condition||s(b),b}();return Object.assign(h,{abort:v,requestId:f,arg:u,unwrap(){return h.then(gm)}})}}return Object.assign(c,{pending:i,rejected:a,fulfilled:o,settled:We(a,o),typePrefix:t})}return e.withTypes=()=>e,e})();function gm(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function hm(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Dc=Symbol.for("rtk-slice-createasyncthunk"),IA={[Dc]:K};function ym(e,t){return`${e}/${t}`}function Sm({creators:e}={}){let t=e?.asyncThunk?.[Dc];return function(n){let{name:o,reducerPath:i=o}=n;if(!o)throw new Error(Ve(11));typeof process<"u";let a=(typeof n.reducers=="function"?n.reducers(Cm()):n.reducers)||{},c=Object.keys(a),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(b,g){let y=typeof b=="string"?b:b.type;if(!y)throw new Error(Ve(12));if(y in u.sliceCaseReducersByType)throw new Error(Ve(13));return u.sliceCaseReducersByType[y]=g,s},addMatcher(b,g){return u.sliceMatchers.push({matcher:b,reducer:g}),s},exposeAction(b,g){return u.actionCreators[b]=g,s},exposeCaseReducer(b,g){return u.sliceCaseReducersByName[b]=g,s}};c.forEach(b=>{let g=a[b],y={reducerName:b,type:ym(o,b),createNotation:typeof n.reducers=="function"};bm(g)?xm(y,g,s,t):Am(y,g,s)});function d(){let[b={},g=[],y=void 0]=typeof n.extraReducers=="function"?kc(n.extraReducers):[n.extraReducers],I={...b,...u.sliceCaseReducersByType};return re(n.initialState,w=>{for(let S in I)w.addCase(S,I[S]);for(let S of u.sliceMatchers)w.addMatcher(S.matcher,S.reducer);for(let S of g)w.addMatcher(S.matcher,S.reducer);y&&w.addDefaultCase(y)})}let p=b=>b,f=new Map,l;function m(b,g){return l||(l=d()),l(b,g)}function A(){return l||(l=d()),l.getInitialState()}function v(b,g=!1){function y(w){let S=w[b];return typeof S>"u"&&g&&(S=A()),S}function I(w=p){let S=Ec(f,g,()=>new WeakMap);return Ec(S,w,()=>{let C={};for(let[x,F]of Object.entries(n.selectors??{}))C[x]=vm(F,w,A,g);return C})}return{reducerPath:b,getSelectors:I,get selectors(){return I(y)},selectSlice:y}}let h={name:o,reducer:m,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:A,...v(i),injectInto(b,{reducerPath:g,...y}={}){let I=g??i;return b.inject({reducerPath:I,reducer:m},y),{...h,...v(I,!0)}}};return h}}function vm(e,t,r,n){function o(i,...a){let c=t(i);return typeof c>"u"&&n&&(c=r()),e(c,...a)}return o.unwrapped=e,o}var Wt=Sm();function Cm(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function Am({type:e,reducerName:t,createNotation:r},n,o){let i,a;if("reducer"in n){if(r&&!wm(n))throw new Error(Ve(17));i=n.reducer,a=n.prepare}else i=n;o.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,a?R(e,a):R(e))}function bm(e){return e._reducerDefinitionType==="asyncThunk"}function wm(e){return e._reducerDefinitionType==="reducerWithPrepare"}function xm({type:e,reducerName:t},r,n,o){if(!o)throw new Error(Ve(18));let{payloadCreator:i,fulfilled:a,pending:c,rejected:u,settled:s,options:d}=r,p=o(e,i,d);n.exposeAction(t,p),a&&n.addCase(p.fulfilled,a),c&&n.addCase(p.pending,c),u&&n.addCase(p.rejected,u),s&&n.addMatcher(p.settled,s),n.exposeCaseReducer(t,{fulfilled:a||Yn,pending:c||Yn,rejected:u||Yn,settled:s||Yn})}function Yn(){}var Mc="listener",qc="completed",Nc="cancelled",FA=`task-${Nc}`,TA=`task-${qc}`,kA=`${Mc}-${Nc}`,OA=`${Mc}-${qc}`;var{assign:_c}=Object;var ra="listenerMiddleware";var Rm=_c(R(`${ra}/add`),{withTypes:()=>Rm}),DA=R(`${ra}/removeAll`),Em=_c(R(`${ra}/remove`),{withTypes:()=>Em});var MA=Symbol.for("rtk-state-proxy-original");function Ve(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Re=require("@coveo/bueno"),U=new Re.StringValue({required:!0,emptyAllowed:!1}),le=new Re.StringValue({required:!1,emptyAllowed:!1}),me=new Re.StringValue({required:!0,emptyAllowed:!0}),BA=new Re.StringValue({required:!1,emptyAllowed:!0}),to=new Re.ArrayValue({each:U,required:!0}),Vc=new Re.StringValue({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),ot=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),Me=(e,t)=>{if("required"in t)return{payload:new Re.Schema({value:t}).validate({value:e}).value};let o=new Re.RecordValue({options:{required:!0},values:t}).validate(e);if(o)throw new Re.SchemaValidationError(o);return{payload:e}},M=(e,t)=>{try{return Me(e,t)}catch(r){return{payload:e,error:ot(r)}}},Uc=(e,t,r,n)=>{let o=`Check the initialState of ${n}`;return jc(e,t,r,o,"Controller initialization error")},Lc=(e,t,r,n)=>{let o=`Check the options of ${n}`;return jc(e,t,r,o,"Controller initialization error")},jc=(e,t,r,n,o)=>{try{return t.validate(r,n)}catch(i){throw e.logger.error(i,o),i}};var lr="3.19.0",Bc=["@coveo/atomic","@coveo/quantic"];var na=()=>le,Qc=()=>U,yt=R("configuration/updateBasicConfiguration",e=>M(e,{accessToken:le,environment:new Ce.StringValue({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:le})),Ge=R("configuration/updateSearchConfiguration",e=>M(e,{proxyBaseUrl:new Ce.StringValue({required:!1,url:!0}),pipeline:new Ce.StringValue({required:!1,emptyAllowed:!0}),searchHub:le,timezone:le,locale:le,authenticationProviders:new Ce.ArrayValue({required:!1,each:U})})),Pm={enabled:new Ce.BooleanValue({default:!0}),originContext:na(),originLevel2:na(),originLevel3:na(),proxyBaseUrl:new Ce.StringValue({required:!1,url:!0}),runtimeEnvironment:new Ce.Value,anonymous:new Ce.BooleanValue({default:!1}),deviceId:le,userDisplayName:le,documentLocation:le,trackingId:le,analyticsMode:new Ce.StringValue({constrainTo:["legacy","next"],required:!1,default:"next"}),source:new Ce.RecordValue({options:{required:!1},values:Bc.reduce((e,t)=>(e[t]=Vc,e),{})})},dr=R("configuration/updateAnalyticsConfiguration",e=>M(e,Pm)),pr=R("configuration/analytics/disable"),fr=R("configuration/analytics/enable"),ro=R("configuration/analytics/originlevel2",e=>M(e,{originLevel2:Qc()})),no=R("configuration/analytics/originlevel3",e=>M(e,{originLevel3:Qc()}));var ie=require("@coveo/bueno"),$c={q:new ie.StringValue,enableQuerySyntax:new ie.BooleanValue,aq:new ie.StringValue,cq:new ie.StringValue,firstResult:new ie.NumberValue({min:0}),numberOfResults:new ie.NumberValue({min:0}),sortCriteria:new ie.StringValue,f:new ie.RecordValue,fExcluded:new ie.RecordValue,cf:new ie.RecordValue,nf:new ie.RecordValue,mnf:new ie.RecordValue,df:new ie.RecordValue,debug:new ie.BooleanValue,sf:new ie.RecordValue,tab:new ie.StringValue,af:new ie.RecordValue};var St=R("searchParameters/restore",e=>M(e,$c));var oo=R("debug/enable"),io=R("debug/disable");var ao=()=>!1;var so=re(ao(),e=>{e.addCase(oo,()=>!0).addCase(io,()=>!1).addCase(St,(t,r)=>r.payload.debug??t)});var Hc=require("@coveo/bueno");var mr=R("pipeline/set",e=>M(e,new Hc.StringValue({required:!0,emptyAllowed:!0})));var Im=R("history/undo"),Fm=R("history/redo"),Ke=R("history/snapshot"),gb=K("history/back",async(e,{dispatch:t})=>{t(Im()),await t(Ee())}),hb=K("history/forward",async(e,{dispatch:t})=>{t(Fm()),await t(Ee())}),Ee=K("history/change",async(e,{getState:t})=>t().history.present);var gr=()=>"";var hr=re(gr(),e=>{e.addCase(mr,(t,r)=>r.payload).addCase(Ee.fulfilled,(t,r)=>r.payload?.pipeline??t).addCase(Ge,(t,r)=>r.payload.pipeline||t)});function it(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function E(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function c(d){try{s(n.next(d))}catch(p){a(p)}}function u(d){try{s(n.throw(d))}catch(p){a(p)}}function s(d){d.done?i(d.value):o(d.value).then(c,u)}s((n=n.apply(e,t||[])).next())})}var z;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(z||(z={}));function aa(){return typeof window<"u"}function va(){return typeof navigator<"u"}function yr(){return typeof document<"u"}function sa(){try{return typeof localStorage<"u"}catch{return!1}}function Tm(){try{return typeof sessionStorage<"u"}catch{return!1}}function iu(){return va()&&navigator.cookieEnabled}var km=[z.click,z.custom,z.search,z.view],Om=(e,t)=>km.indexOf(e)!==-1?Object.assign({language:yr()?document.documentElement.lang:"unknown",userAgent:va()?navigator.userAgent:"unknown"},t):t,pn=class e{static set(t,r,n){var o,i,a,c;n&&(i=new Date,i.setTime(i.getTime()+n)),c=window.location.hostname,c.indexOf(".")===-1?zc(t,r,i):(a=c.split("."),o=a[a.length-2]+"."+a[a.length-1],zc(t,r,i,o))}static get(t){for(var r=t+"=",n=document.cookie.split(";"),o=0;o<n.length;o++){var i=n[o];if(i=i.replace(/^\s+/,""),i.lastIndexOf(r,0)===0)return i.substring(r.length,i.length)}return null}static erase(t){e.set(t,"",-1)}};function zc(e,t,r,n){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(n?`;domain=${n}`:"")+";path=/;SameSite=Lax"}function Dm(){return sa()?localStorage:iu()?new fn:Tm()?sessionStorage:new vr}var fn=class e{getItem(t){return pn.get(`${e.prefix}${t}`)}removeItem(t){pn.erase(`${e.prefix}${t}`)}setItem(t,r,n){pn.set(`${e.prefix}${t}`,r,n)}};fn.prefix="coveo_";var ca=class{constructor(){this.cookieStorage=new fn}getItem(t){return localStorage.getItem(t)||this.cookieStorage.getItem(t)}removeItem(t){this.cookieStorage.removeItem(t),localStorage.removeItem(t)}setItem(t,r){localStorage.setItem(t,r),this.cookieStorage.setItem(t,r,31556926e3)}},vr=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},ln="__coveo.analytics.history",au=20,su=1e3*60,cu=75,Cr=class{constructor(t){this.store=t||Dm()}addElement(t){t.internalTime=new Date().getTime(),t=this.cropQueryElement(this.stripEmptyQuery(t));let r=this.getHistoryWithInternalTime();r!=null?this.isValidEntry(t)&&this.setHistory([t].concat(r)):this.setHistory([t])}addElementAsync(t){return E(this,void 0,void 0,function*(){t.internalTime=new Date().getTime(),t=this.cropQueryElement(this.stripEmptyQuery(t));let r=yield this.getHistoryWithInternalTimeAsync();r!=null?this.isValidEntry(t)&&this.setHistory([t].concat(r)):this.setHistory([t])})}getHistory(){let t=this.getHistoryWithInternalTime();return this.stripEmptyQueries(this.stripInternalTime(t))}getHistoryAsync(){return E(this,void 0,void 0,function*(){let t=yield this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(t))})}getHistoryWithInternalTime(){try{let t=this.store.getItem(ln);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){return E(this,void 0,void 0,function*(){try{let t=yield this.store.getItem(ln);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(ln,JSON.stringify(t.slice(0,au)))}catch{}}clear(){try{this.store.removeItem(ln)}catch{}}getMostRecentElement(){let t=this.getHistoryWithInternalTime();return Array.isArray(t)?t.sort((n,o)=>(o.internalTime||0)-(n.internalTime||0))[0]:null}cropQueryElement(t){return t.name&&t.value&&t.name.toLowerCase()==="query"&&(t.value=t.value.slice(0,cu)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>su:!0}stripInternalTime(t){return Array.isArray(t)?t.map(r=>{let{name:n,time:o,value:i}=r;return{name:n,time:o,value:i}}):[]}stripEmptyQuery(t){let{name:r,time:n,value:o}=t;return r&&typeof o=="string"&&r.toLowerCase()==="query"&&o.trim()===""?{name:r,time:n}:t}stripEmptyQueries(t){return t.map(r=>this.stripEmptyQuery(r))}},uu=Object.freeze({__proto__:null,HistoryStore:Cr,MAX_NUMBER_OF_HISTORY_ELEMENTS:au,MAX_VALUE_SIZE:cu,MIN_THRESHOLD_FOR_DUPLICATE_VALUE:su,STORE_KEY:ln,default:Cr}),Mm=(e,t)=>E(void 0,void 0,void 0,function*(){return e===z.view?(yield qm(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),qm=e=>E(void 0,void 0,void 0,function*(){let t=new Cr,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),co,Nm=new Uint8Array(16);function _m(){if(!co&&(co=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!co))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return co(Nm)}var Vm=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function lo(e){return typeof e=="string"&&Vm.test(e)}var ge=[];for(let e=0;e<256;++e)ge.push((e+256).toString(16).slice(1));function lu(e,t=0){return(ge[e[t+0]]+ge[e[t+1]]+ge[e[t+2]]+ge[e[t+3]]+"-"+ge[e[t+4]]+ge[e[t+5]]+"-"+ge[e[t+6]]+ge[e[t+7]]+"-"+ge[e[t+8]]+ge[e[t+9]]+"-"+ge[e[t+10]]+ge[e[t+11]]+ge[e[t+12]]+ge[e[t+13]]+ge[e[t+14]]+ge[e[t+15]]).toLowerCase()}function Um(e){if(!lo(e))throw TypeError("Invalid UUID");let t,r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=t&255,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=t&255,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=t&255,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=t&255,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=t&255,r}function Lm(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var jm="6ba7b810-9dad-11d1-80b4-00c04fd430c8",Bm="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function Qm(e,t,r){function n(o,i,a,c){var u;if(typeof o=="string"&&(o=Lm(o)),typeof i=="string"&&(i=Um(i)),((u=i)===null||u===void 0?void 0:u.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let s=new Uint8Array(16+o.length);if(s.set(i),s.set(o,i.length),s=r(s),s[6]=s[6]&15|t,s[8]=s[8]&63|128,a){c=c||0;for(let d=0;d<16;++d)a[c+d]=s[d];return a}return lu(s)}try{n.name=e}catch{}return n.DNS=jm,n.URL=Bm,n}var $m=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Wc={randomUUID:$m};function Gt(e,t,r){if(Wc.randomUUID&&!t&&!e)return Wc.randomUUID();e=e||{};let n=e.random||(e.rng||_m)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){r=r||0;for(let o=0;o<16;++o)t[r+o]=n[o];return t}return lu(n)}function Hm(e,t,r,n){switch(e){case 0:return t&r^~t&n;case 1:return t^r^n;case 2:return t&r^t&n^r&n;case 3:return t^r^n}}function oa(e,t){return e<<t|e>>>32-t}function zm(e){let t=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof e=="string"){let a=unescape(encodeURIComponent(e));e=[];for(let c=0;c<a.length;++c)e.push(a.charCodeAt(c))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);let n=e.length/4+2,o=Math.ceil(n/16),i=new Array(o);for(let a=0;a<o;++a){let c=new Uint32Array(16);for(let u=0;u<16;++u)c[u]=e[a*64+u*4]<<24|e[a*64+u*4+1]<<16|e[a*64+u*4+2]<<8|e[a*64+u*4+3];i[a]=c}i[o-1][14]=(e.length-1)*8/Math.pow(2,32),i[o-1][14]=Math.floor(i[o-1][14]),i[o-1][15]=(e.length-1)*8&4294967295;for(let a=0;a<o;++a){let c=new Uint32Array(80);for(let l=0;l<16;++l)c[l]=i[a][l];for(let l=16;l<80;++l)c[l]=oa(c[l-3]^c[l-8]^c[l-14]^c[l-16],1);let u=r[0],s=r[1],d=r[2],p=r[3],f=r[4];for(let l=0;l<80;++l){let m=Math.floor(l/20),A=oa(u,5)+Hm(m,s,d,p)+f+t[m]+c[l]>>>0;f=p,p=d,d=oa(s,30)>>>0,s=u,u=A}r[0]=r[0]+u>>>0,r[1]=r[1]+s>>>0,r[2]=r[2]+d>>>0,r[3]=r[3]+p>>>0,r[4]=r[4]+f>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}var Wm=Qm("v5",80,zm),Gc=Wm,du="2.30.44",Kc=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,dn={pageview:"pageview",event:"event"},po=class{constructor({client:t,uuidGenerator:r=Gt}){this.client=t,this.uuidGenerator=r}},ua=class extends po{constructor({client:t,uuidGenerator:r=Gt}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=Kc(window.location),this.lastReferrer=yr()?document.referrer:"",this.addHooks()}getApi(t){switch(t){case"setAction":return this.setAction;default:return null}}setAction(t,r){this.action=t,this.actionData=r}clearData(){this.clearPluginData(),this.action=void 0,this.actionData={}}getLocationInformation(t,r){return Object.assign({hitType:t},this.getNextValues(t,r))}updateLocationInformation(t,r){this.updateLocationForNextPageView(t,r)}getDefaultContextInformation(t){let r={title:yr()?document.title:"",encoding:yr()?document.characterSet:"UTF-8"},n={screenResolution:`${screen.width}x${screen.height}`,screenColor:`${screen.colorDepth}-bit`},o={language:navigator.language,userAgent:navigator.userAgent},i={time:Date.now(),eventId:this.uuidGenerator()};return Object.assign(Object.assign(Object.assign(Object.assign({},i),n),o),r)}updateLocationForNextPageView(t,r){let{pageViewId:n,referrer:o,location:i}=this.getNextValues(t,r);this.lastReferrer=o,this.pageViewId=n,this.currentLocation=i,t===dn.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===dn.pageview?this.nextPageViewId:this.pageViewId,referrer:t===dn.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===dn.pageview?this.getCurrentLocationFromPayload(r):this.currentLocation}}getCurrentLocationFromPayload(t){if(t.page){let r=o=>o.replace(/^\/?(.*)$/,"/$1");return`${(o=>o.split("/").slice(0,3).join("/"))(this.currentLocation)}${r(t.page)}`}else return Kc(window.location)}},vt=class e{constructor(t,r){if(!lo(t))throw Error("Not a valid uuid");this.clientId=t,this.creationDate=Math.floor(r/1e3)}toString(){return this.clientId.replace(/-/g,"")+"."+this.creationDate.toString()}get expired(){let t=Math.floor(Date.now()/1e3)-this.creationDate;return t<0||t>e.expirationTime}validate(t,r){return!this.expired&&this.matchReferrer(t,r)}matchReferrer(t,r){try{let n=new URL(t);return r.some(o=>new RegExp(o.replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*")+"$").test(n.host))}catch{return!1}}static fromString(t){let r=t.split(".");if(r.length!==2)return null;let[n,o]=r;if(n.length!==32||isNaN(parseInt(o)))return null;let i=n.substring(0,8)+"-"+n.substring(8,12)+"-"+n.substring(12,16)+"-"+n.substring(16,20)+"-"+n.substring(20,32);return lo(i)?new e(i,Number.parseInt(o)*1e3):null}};vt.cvo_cid="cvo_cid";vt.expirationTime=120;var la=class extends po{constructor({client:t,uuidGenerator:r=Gt}){super({client:t,uuidGenerator:r})}getApi(t){switch(t){case"decorate":return this.decorate;case"acceptFrom":return this.acceptFrom;default:return null}}decorate(t){return E(this,void 0,void 0,function*(){if(!this.client.getCurrentVisitorId)throw new Error("Could not retrieve current clientId");try{let r=new URL(t),n=yield this.client.getCurrentVisitorId();return r.searchParams.set(vt.cvo_cid,new vt(n,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};la.Id="link";var qe=Object.keys;function uo(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var ia=128,pu=192,Yc=224,Jc=240;function Gm(e){return(e&248)===Jc?4:(e&Jc)===Yc?3:(e&Yc)===pu?2:1}function Km(e,t){if(t<0||e.length<=t)return e;let r=e.indexOf("%",t-2);for(r<0||r>t?r=t:t=r;r>2&&e.charAt(r-3)=="%";){let n=Number.parseInt(e.substring(r-2,r),16);if((n&ia)!=ia)break;if(r-=3,(n&pu)!=ia){t-r>=Gm(n)*3&&(r=t);break}}return e.substring(0,r)}var da={id:"svc_ticket_id",subject:"svc_ticket_subject",description:"svc_ticket_description",category:"svc_ticket_category",productId:"svc_ticket_product_id",custom:"svc_ticket_custom"},Ym=qe(da).map(e=>da[e]),Jm=[...Ym].join("|"),Xm=new RegExp(`^(${Jm}$)`),Zm={svcAction:"svc_action",svcActionData:"svc_action_data"},eg=e=>qe(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let n=da[r]||r;return Object.assign(Object.assign({},t),{[n]:e[r]})},{}),tg=e=>Xm.test(e),rg=[tg],Xc={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},Zc={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},ye={action:"pa",list:"pal",listSource:"pls"},fo={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},ng=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],pa={id:"quoteId",affiliation:"quoteAffiliation"},fa={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},og={add:ye,bookmark_add:ye,bookmark_remove:ye,click:ye,checkout:ye,checkout_option:ye,detail:ye,impression:ye,remove:ye,refund:Object.assign(Object.assign({},ye),fo),purchase:Object.assign(Object.assign({},ye),fo),quickview:ye,quote:Object.assign(Object.assign({},ye),pa),review:Object.assign(Object.assign({},ye),fa)},ig=qe(Xc).map(e=>Xc[e]),ag=qe(Zc).map(e=>Zc[e]),sg=qe(ye).map(e=>ye[e]),cg=qe(fo).map(e=>fo[e]),ug=qe(fa).map(e=>fa[e]),lg=qe(pa).map(e=>pa[e]),dg=[...ig,"custom"].join("|"),pg=[...ag,"custom"].join("|"),fu="(pr[0-9]+)",mu="(il[0-9]+pi[0-9]+)",fg=new RegExp(`^${fu}(${dg})$`),mg=new RegExp(`^(${mu}(${pg}))|(il[0-9]+nm)$`),gg=new RegExp(`^(${sg.join("|")})$`),hg=new RegExp(`^(${cg.join("|")})$`),yg=new RegExp(`^${fu}custom$`),Sg=new RegExp(`^${mu}custom$`),vg=new RegExp(`^(${[...ng,...ug,...lg].join("|")})$`),Cg=e=>fg.test(e),Ag=e=>mg.test(e),bg=e=>gg.test(e),wg=e=>hg.test(e),xg=e=>vg.test(e),Rg=[Ag,Cg,bg,wg,xg],Eg=[yg,Sg],Pg={anonymizeIp:"aip"},Ig={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},Fg={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},Tg=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],kg=Object.assign(Object.assign(Object.assign(Object.assign({},Pg),Ig),Fg),Tg.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),ma=Object.assign(Object.assign({},kg),Zm),Og=e=>{let t=!!e.action&&og[e.action]||{};return qe(e).reduce((r,n)=>{let o=t[n]||ma[n]||n;return Object.assign(Object.assign({},r),{[o]:e[n]})},{})},Dg=qe(ma).map(e=>ma[e]),Mg=e=>Dg.indexOf(e)!==-1,qg=e=>e==="custom",Ng=e=>[...Rg,...rg,Mg,qg].some(t=>t(e)),_g=e=>qe(e).reduce((t,r)=>{let n=Vg(r);return n?Object.assign(Object.assign({},t),Ug(n,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),Vg=e=>{let t;return[...Eg].every(r=>{var n;return t=(n=r.exec(e))===null||n===void 0?void 0:n[1],!t}),t},Ug=(e,t)=>qe(t).reduce((r,n)=>Object.assign(Object.assign({},r),{[`${e}${n}`]:t[n]}),{}),ga=class{constructor(t){this.opts=t}sendEvent(t,r){return E(this,void 0,void 0,function*(){if(!this.isAvailable())throw new Error('navigator.sendBeacon is not supported in this browser. Consider adding a polyfill like "sendbeacon-polyfill".');let{baseUrl:n,preprocessRequest:o}=this.opts,i=yield this.getQueryParamsForEventType(t),{url:a,payload:c}=yield this.preProcessRequestAsPotentialJSONString(`${n}/analytics/${t}?${i}`,r,o),u=this.encodeForEventType(t,c),s=new Blob([u],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(a,s)})}isAvailable(){return"sendBeacon"in navigator}deleteHttpCookieVisitorId(){return Promise.resolve()}preProcessRequestAsPotentialJSONString(t,r,n){return E(this,void 0,void 0,function*(){let o=t,i=r;if(n){let a=yield n({url:t,body:JSON.stringify(r)},"analyticsBeacon"),{url:c,body:u}=a;o=c||t;try{i=JSON.parse(u)}catch(s){console.error("Unable to process the request body as a JSON string",s)}}return{payload:i,url:o}})}encodeForEventType(t,r){return this.isEventTypeLegacy(t)?this.encodeEventToJson(t,r):this.encodeEventToJson(t,r,this.opts.token)}getQueryParamsForEventType(t){return E(this,void 0,void 0,function*(){let{token:r,visitorIdProvider:n}=this.opts,o=yield n.getCurrentVisitorId();return[r&&this.isEventTypeLegacy(t)?`access_token=${r}`:"",o?`visitorId=${o}`:"","discardVisitInfo=true"].filter(i=>!!i).join("&")})}isEventTypeLegacy(t){return[z.click,z.custom,z.search,z.view].indexOf(t)!==-1}encodeEventToJson(t,r,n){let o=`${t}Event=${encodeURIComponent(JSON.stringify(r))}`;return n&&(o=`access_token=${encodeURIComponent(n)}&${o}`),o}},ha=class{sendEvent(t,r){return E(this,void 0,void 0,function*(){return Promise.resolve()})}deleteHttpCookieVisitorId(){return E(this,void 0,void 0,function*(){return Promise.resolve()})}},eu=globalThis.fetch,mo=class{constructor(t){this.opts=t}sendEvent(t,r){return E(this,void 0,void 0,function*(){let{baseUrl:n,visitorIdProvider:o,preprocessRequest:i}=this.opts,a=this.shouldAppendVisitorId(t)?yield this.getVisitorIdParam():"",c={url:`${n}/analytics/${t}${a}`,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(r)},u=Object.assign(Object.assign({},c),i?yield i(c,"analyticsFetch"):{}),{url:s}=u,d=it(u,["url"]),p;try{p=yield eu(s,d)}catch(f){console.error("An error has occured when sending the event.",f);return}if(p.ok){let f=yield p.json();return f.visitorId&&o.setCurrentVisitorId(f.visitorId),f}else{try{p.json()}catch{}throw console.error(`An error has occured when sending the "${t}" event.`,p,r),new Error(`An error has occurred when sending the "${t}" event. Check the console logs for more details.`)}})}deleteHttpCookieVisitorId(){return E(this,void 0,void 0,function*(){let{baseUrl:t}=this.opts,r=`${t}/analytics/visit`;yield eu(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[z.click,z.custom,z.search,z.view].indexOf(t)!==-1}getVisitorIdParam(){return E(this,void 0,void 0,function*(){let{visitorIdProvider:t}=this.opts,r=yield t.getCurrentVisitorId();return r?`?visitor=${r}`:""})}getHeaders(){let{token:t}=this.opts;return Object.assign(Object.assign({},t?{Authorization:`Bearer ${t}`}:{}),{"Content-Type":"application/json"})}},ya=class{constructor(t,r){sa()&&iu()?this.storage=new ca:sa()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new vr),this.client=new mo(t),this.beaconClient=new ga(t),window.addEventListener("beforeunload",()=>{let n=r();for(let{eventType:o,payload:i}of n)this.beaconClient.sendEvent(o,i)})}getClientDependingOnEventType(t){return t==="click"&&this.beaconClient.isAvailable()?this.beaconClient:this.client}},Sa=class{constructor(t,r){this.storage=r||new vr,this.client=new mo(t)}getClientDependingOnEventType(t){return this.client}},go=class{constructor(){this.storage=new vr,this.client=new ha}getClientDependingOnEventType(t){return this.client}},Lg="xx",jg=e=>e?.startsWith(Lg)||!1,Bg=`
|
|
18
|
+
"use strict";var jp=Object.create;var Wr=Object.defineProperty;var Bp=Object.getOwnPropertyDescriptor;var Qp=Object.getOwnPropertyNames;var $p=Object.getPrototypeOf,Hp=Object.prototype.hasOwnProperty;var zp=(e,t,r)=>t in e?Wr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var de=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ds=(e,t)=>{for(var r in t)Wr(e,r,{get:t[r],enumerable:!0})},Ms=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Qp(t))!Hp.call(e,o)&&o!==r&&Wr(e,o,{get:()=>t[o],enumerable:!(n=Bp(t,o))||n.enumerable});return e};var Qe=(e,t,r)=>(r=e!=null?jp($p(e)):{},Ms(t||!e||!e.__esModule?Wr(r,"default",{value:e,enumerable:!0}):r,e)),Wp=e=>Ms(Wr({},"__esModule",{value:!0}),e);var se=(e,t,r)=>zp(e,typeof t!="symbol"?t+"":t,r);var Qs=de(Kr=>{"use strict";var _n=Kr&&Kr.__assign||function(){return _n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},_n.apply(this,arguments)};Object.defineProperty(Kr,"__esModule",{value:!0});var rf={delayFirstAttempt:!1,jitter:"none",maxDelay:1/0,numOfAttempts:10,retry:function(){return!0},startingDelay:100,timeMultiple:2};function nf(e){var t=_n(_n({},rf),e);return t.numOfAttempts<1&&(t.numOfAttempts=1),t}Kr.getSanitizedOptions=nf});var $s=de(Oi=>{"use strict";Object.defineProperty(Oi,"__esModule",{value:!0});function of(e){var t=Math.random()*e;return Math.round(t)}Oi.fullJitter=of});var Hs=de(Di=>{"use strict";Object.defineProperty(Di,"__esModule",{value:!0});function af(e){return e}Di.noJitter=af});var zs=de(Mi=>{"use strict";Object.defineProperty(Mi,"__esModule",{value:!0});var sf=$s(),cf=Hs();function uf(e){switch(e.jitter){case"full":return sf.fullJitter;case"none":default:return cf.noJitter}}Mi.JitterFactory=uf});var Ni=de(qi=>{"use strict";Object.defineProperty(qi,"__esModule",{value:!0});var lf=zs(),df=function(){function e(t){this.options=t,this.attempt=0}return e.prototype.apply=function(){var t=this;return new Promise(function(r){return setTimeout(r,t.jitteredDelay)})},e.prototype.setAttemptNumber=function(t){this.attempt=t},Object.defineProperty(e.prototype,"jitteredDelay",{get:function(){var t=lf.JitterFactory(this.options);return t(this.delay)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"delay",{get:function(){var t=this.options.startingDelay,r=this.options.timeMultiple,n=this.numOfDelayedAttempts,o=t*Math.pow(r,n);return Math.min(o,this.options.maxDelay)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt},enumerable:!0,configurable:!0}),e}();qi.Delay=df});var Ws=de(et=>{"use strict";var pf=et&&et.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},e(t,r)};return function(t,r){e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),ff=et&&et.__awaiter||function(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function c(d){try{s(n.next(d))}catch(p){a(p)}}function u(d){try{s(n.throw(d))}catch(p){a(p)}}function s(d){d.done?i(d.value):o(d.value).then(c,u)}s((n=n.apply(e,t||[])).next())})},mf=et&&et.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,a;return a={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(s){return function(d){return u([s,d])}}function u(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=s[0]&2?o.return:s[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;switch(o=0,i&&(s=[s[0]&2,i.value]),s[0]){case 0:case 1:i=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,o=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){r.label=s[1];break}if(s[0]===6&&r.label<i[1]){r.label=i[1],i=s;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(s);break}i[2]&&r.ops.pop(),r.trys.pop();continue}s=t.call(e,r)}catch(d){s=[6,d],o=0}finally{n=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}};Object.defineProperty(et,"__esModule",{value:!0});var gf=Ni(),hf=function(e){pf(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.apply=function(){return ff(this,void 0,void 0,function(){return mf(this,function(r){return[2,this.isFirstAttempt?!0:e.prototype.apply.call(this)]})})},Object.defineProperty(t.prototype,"isFirstAttempt",{get:function(){return this.attempt===0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt-1},enumerable:!0,configurable:!0}),t}(gf.Delay);et.SkipFirstDelay=hf});var Gs=de(Yr=>{"use strict";var yf=Yr&&Yr.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},e(t,r)};return function(t,r){e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Yr,"__esModule",{value:!0});var Sf=Ni(),vf=function(e){yf(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Sf.Delay);Yr.AlwaysDelay=vf});var Ks=de(_i=>{"use strict";Object.defineProperty(_i,"__esModule",{value:!0});var Cf=Ws(),Af=Gs();function bf(e,t){var r=wf(e);return r.setAttemptNumber(t),r}_i.DelayFactory=bf;function wf(e){return e.delayFirstAttempt?new Af.AlwaysDelay(e):new Cf.SkipFirstDelay(e)}});var Ys=de(Lt=>{"use strict";var Vi=Lt&&Lt.__awaiter||function(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function c(d){try{s(n.next(d))}catch(p){a(p)}}function u(d){try{s(n.throw(d))}catch(p){a(p)}}function s(d){d.done?i(d.value):o(d.value).then(c,u)}s((n=n.apply(e,t||[])).next())})},Ui=Lt&&Lt.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,a;return a={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(s){return function(d){return u([s,d])}}function u(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=s[0]&2?o.return:s[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;switch(o=0,i&&(s=[s[0]&2,i.value]),s[0]){case 0:case 1:i=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,o=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){r.label=s[1];break}if(s[0]===6&&r.label<i[1]){r.label=i[1],i=s;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(s);break}i[2]&&r.ops.pop(),r.trys.pop();continue}s=t.call(e,r)}catch(d){s=[6,d],o=0}finally{n=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}};Object.defineProperty(Lt,"__esModule",{value:!0});var xf=Qs(),Rf=Ks();function Ef(e,t){return t===void 0&&(t={}),Vi(this,void 0,void 0,function(){var r,n;return Ui(this,function(o){switch(o.label){case 0:return r=xf.getSanitizedOptions(t),n=new Pf(e,r),[4,n.execute()];case 1:return[2,o.sent()]}})})}Lt.backOff=Ef;var Pf=function(){function e(t,r){this.request=t,this.options=r,this.attemptNumber=0}return e.prototype.execute=function(){return Vi(this,void 0,void 0,function(){var t,r;return Ui(this,function(n){switch(n.label){case 0:if(this.attemptLimitReached)return[3,7];n.label=1;case 1:return n.trys.push([1,4,,6]),[4,this.applyDelay()];case 2:return n.sent(),[4,this.request()];case 3:return[2,n.sent()];case 4:return t=n.sent(),this.attemptNumber++,[4,this.options.retry(t,this.attemptNumber)];case 5:if(r=n.sent(),!r||this.attemptLimitReached)throw t;return[3,6];case 6:return[3,0];case 7:throw new Error("Something went wrong.")}})})},Object.defineProperty(e.prototype,"attemptLimitReached",{get:function(){return this.attemptNumber>=this.options.numOfAttempts},enumerable:!0,configurable:!0}),e.prototype.applyDelay=function(){return Vi(this,void 0,void 0,function(){var t;return Ui(this,function(r){switch(r.label){case 0:return t=Rf.DelayFactory(this.options,this.attemptNumber),[4,t.apply()];case 1:return r.sent(),[2]}})})},e}()});var Do=de((Na,_a)=>{"use strict";(function(e,t){typeof Na=="object"&&typeof _a<"u"?_a.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs=t()})(Na,function(){"use strict";var e=1e3,t=6e4,r=36e5,n="millisecond",o="second",i="minute",a="hour",c="day",u="week",s="month",d="quarter",p="year",f="date",l="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,A=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(D){var k=["th","st","nd","rd"],T=D%100;return"["+D+(k[(T-20)%10]||k[T]||k[0])+"]"}},h=function(D,k,T){var q=String(D);return!q||q.length>=k?D:""+Array(k+1-q.length).join(T)+D},b={s:h,z:function(D){var k=-D.utcOffset(),T=Math.abs(k),q=Math.floor(T/60),O=T%60;return(k<=0?"+":"-")+h(q,2,"0")+":"+h(O,2,"0")},m:function D(k,T){if(k.date()<T.date())return-D(T,k);var q=12*(T.year()-k.year())+(T.month()-k.month()),O=k.clone().add(q,s),_=T-O<0,V=k.clone().add(q+(_?-1:1),s);return+(-(q+(T-O)/(_?O-V:V-O))||0)},a:function(D){return D<0?Math.ceil(D)||0:Math.floor(D)},p:function(D){return{M:s,y:p,w:u,d:c,D:f,h:a,m:i,s:o,ms:n,Q:d}[D]||String(D||"").toLowerCase().replace(/s$/,"")},u:function(D){return D===void 0}},g="en",y={};y[g]=v;var I="$isDayjsObject",w=function(D){return D instanceof F||!(!D||!D[I])},S=function D(k,T,q){var O;if(!k)return g;if(typeof k=="string"){var _=k.toLowerCase();y[_]&&(O=_),T&&(y[_]=T,O=_);var V=k.split("-");if(!O&&V.length>1)return D(V[0])}else{var L=k.name;y[L]=k,O=L}return!q&&O&&(g=O),O||!q&&g},C=function(D,k){if(w(D))return D.clone();var T=typeof k=="object"?k:{};return T.date=D,T.args=arguments,new F(T)},x=b;x.l=S,x.i=w,x.w=function(D,k){return C(D,{locale:k.$L,utc:k.$u,x:k.$x,$offset:k.$offset})};var F=function(){function D(T){this.$L=S(T.locale,null,!0),this.parse(T),this.$x=this.$x||T.x||{},this[I]=!0}var k=D.prototype;return k.parse=function(T){this.$d=function(q){var O=q.date,_=q.utc;if(O===null)return new Date(NaN);if(x.u(O))return new Date;if(O instanceof Date)return new Date(O);if(typeof O=="string"&&!/Z$/i.test(O)){var V=O.match(m);if(V){var L=V[2]-1||0,Q=(V[7]||"0").substring(0,3);return _?new Date(Date.UTC(V[1],L,V[3]||1,V[4]||0,V[5]||0,V[6]||0,Q)):new Date(V[1],L,V[3]||1,V[4]||0,V[5]||0,V[6]||0,Q)}}return new Date(O)}(T),this.init()},k.init=function(){var T=this.$d;this.$y=T.getFullYear(),this.$M=T.getMonth(),this.$D=T.getDate(),this.$W=T.getDay(),this.$H=T.getHours(),this.$m=T.getMinutes(),this.$s=T.getSeconds(),this.$ms=T.getMilliseconds()},k.$utils=function(){return x},k.isValid=function(){return this.$d.toString()!==l},k.isSame=function(T,q){var O=C(T);return this.startOf(q)<=O&&O<=this.endOf(q)},k.isAfter=function(T,q){return C(T)<this.startOf(q)},k.isBefore=function(T,q){return this.endOf(q)<C(T)},k.$g=function(T,q,O){return x.u(T)?this[q]:this.set(O,T)},k.unix=function(){return Math.floor(this.valueOf()/1e3)},k.valueOf=function(){return this.$d.getTime()},k.startOf=function(T,q){var O=this,_=!!x.u(q)||q,V=x.p(T),L=function(G,te){var oe=x.w(O.$u?Date.UTC(O.$y,te,G):new Date(O.$y,te,G),O);return _?oe:oe.endOf(c)},Q=function(G,te){return x.w(O.toDate()[G].apply(O.toDate("s"),(_?[0,0,0,0]:[23,59,59,999]).slice(te)),O)},W=this.$W,B=this.$M,$=this.$D,j="set"+(this.$u?"UTC":"");switch(V){case p:return _?L(1,0):L(31,11);case s:return _?L(1,B):L(0,B+1);case u:var H=this.$locale().weekStart||0,ne=(W<H?W+7:W)-H;return L(_?$-ne:$+(6-ne),B);case c:case f:return Q(j+"Hours",0);case a:return Q(j+"Minutes",1);case i:return Q(j+"Seconds",2);case o:return Q(j+"Milliseconds",3);default:return this.clone()}},k.endOf=function(T){return this.startOf(T,!1)},k.$set=function(T,q){var O,_=x.p(T),V="set"+(this.$u?"UTC":""),L=(O={},O[c]=V+"Date",O[f]=V+"Date",O[s]=V+"Month",O[p]=V+"FullYear",O[a]=V+"Hours",O[i]=V+"Minutes",O[o]=V+"Seconds",O[n]=V+"Milliseconds",O)[_],Q=_===c?this.$D+(q-this.$W):q;if(_===s||_===p){var W=this.clone().set(f,1);W.$d[L](Q),W.init(),this.$d=W.set(f,Math.min(this.$D,W.daysInMonth())).$d}else L&&this.$d[L](Q);return this.init(),this},k.set=function(T,q){return this.clone().$set(T,q)},k.get=function(T){return this[x.p(T)]()},k.add=function(T,q){var O,_=this;T=Number(T);var V=x.p(q),L=function(B){var $=C(_);return x.w($.date($.date()+Math.round(B*T)),_)};if(V===s)return this.set(s,this.$M+T);if(V===p)return this.set(p,this.$y+T);if(V===c)return L(1);if(V===u)return L(7);var Q=(O={},O[i]=t,O[a]=r,O[o]=e,O)[V]||1,W=this.$d.getTime()+T*Q;return x.w(W,this)},k.subtract=function(T,q){return this.add(-1*T,q)},k.format=function(T){var q=this,O=this.$locale();if(!this.isValid())return O.invalidDate||l;var _=T||"YYYY-MM-DDTHH:mm:ssZ",V=x.z(this),L=this.$H,Q=this.$m,W=this.$M,B=O.weekdays,$=O.months,j=O.meridiem,H=function(te,oe,Ae,De){return te&&(te[oe]||te(q,_))||Ae[oe].slice(0,De)},ne=function(te){return x.s(L%12||12,te,"0")},G=j||function(te,oe,Ae){var De=te<12?"AM":"PM";return Ae?De.toLowerCase():De};return _.replace(A,function(te,oe){return oe||function(Ae){switch(Ae){case"YY":return String(q.$y).slice(-2);case"YYYY":return x.s(q.$y,4,"0");case"M":return W+1;case"MM":return x.s(W+1,2,"0");case"MMM":return H(O.monthsShort,W,$,3);case"MMMM":return H($,W);case"D":return q.$D;case"DD":return x.s(q.$D,2,"0");case"d":return String(q.$W);case"dd":return H(O.weekdaysMin,q.$W,B,2);case"ddd":return H(O.weekdaysShort,q.$W,B,3);case"dddd":return B[q.$W];case"H":return String(L);case"HH":return x.s(L,2,"0");case"h":return ne(1);case"hh":return ne(2);case"a":return G(L,Q,!0);case"A":return G(L,Q,!1);case"m":return String(Q);case"mm":return x.s(Q,2,"0");case"s":return String(q.$s);case"ss":return x.s(q.$s,2,"0");case"SSS":return x.s(q.$ms,3,"0");case"Z":return V}return null}(te)||V.replace(":","")})},k.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},k.diff=function(T,q,O){var _,V=this,L=x.p(q),Q=C(T),W=(Q.utcOffset()-this.utcOffset())*t,B=this-Q,$=function(){return x.m(V,Q)};switch(L){case p:_=$()/12;break;case s:_=$();break;case d:_=$()/3;break;case u:_=(B-W)/6048e5;break;case c:_=(B-W)/864e5;break;case a:_=B/r;break;case i:_=B/t;break;case o:_=B/e;break;default:_=B}return O?_:x.a(_)},k.daysInMonth=function(){return this.endOf(s).$D},k.$locale=function(){return y[this.$L]},k.locale=function(T,q){if(!T)return this.$L;var O=this.clone(),_=S(T,q,!0);return _&&(O.$L=_),O},k.clone=function(){return x.w(this.$d,this)},k.toDate=function(){return new Date(this.valueOf())},k.toJSON=function(){return this.isValid()?this.toISOString():null},k.toISOString=function(){return this.$d.toISOString()},k.toString=function(){return this.$d.toUTCString()},D}(),N=F.prototype;return C.prototype=N,[["$ms",n],["$s",o],["$m",i],["$H",a],["$W",c],["$M",s],["$y",p],["$D",f]].forEach(function(D){N[D[1]]=function(k){return this.$g(k,D[0],D[1])}}),C.extend=function(D,k){return D.$i||(D(k,F,C),D.$i=!0),C},C.locale=S,C.isDayjs=w,C.unix=function(D){return C(1e3*D)},C.en=y[g],C.Ls=y,C.p={},C})});var rl=de((Va,Ua)=>{"use strict";(function(e,t){typeof Va=="object"&&typeof Ua<"u"?Ua.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_quarterOfYear=t()})(Va,function(){"use strict";var e="month",t="quarter";return function(r,n){var o=n.prototype;o.quarter=function(c){return this.$utils().u(c)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(c-1))};var i=o.add;o.add=function(c,u){return c=Number(c),this.$utils().p(u)===t?this.add(3*c,e):i.bind(this)(c,u)};var a=o.startOf;o.startOf=function(c,u){var s=this.$utils(),d=!!s.u(u)||u;if(s.p(c)===t){var p=this.quarter()-1;return d?this.month(3*p).startOf(e).startOf("day"):this.month(3*p+2).endOf(e).endOf("day")}return a.bind(this)(c,u)}}})});var nl=de((La,ja)=>{"use strict";(function(e,t){typeof La=="object"&&typeof ja<"u"?ja.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_customParseFormat=t()})(La,function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,r=/\d/,n=/\d\d/,o=/\d\d?/,i=/\d*[^-_:/,()\s\d]+/,a={},c=function(m){return(m=+m)+(m>68?1900:2e3)},u=function(m){return function(A){this[m]=+A}},s=[/[+-]\d\d:?(\d\d)?|Z/,function(m){(this.zone||(this.zone={})).offset=function(A){if(!A||A==="Z")return 0;var v=A.match(/([+-]|\d\d)/g),h=60*v[1]+(+v[2]||0);return h===0?0:v[0]==="+"?-h:h}(m)}],d=function(m){var A=a[m];return A&&(A.indexOf?A:A.s.concat(A.f))},p=function(m,A){var v,h=a.meridiem;if(h){for(var b=1;b<=24;b+=1)if(m.indexOf(h(b,0,A))>-1){v=b>12;break}}else v=m===(A?"pm":"PM");return v},f={A:[i,function(m){this.afternoon=p(m,!1)}],a:[i,function(m){this.afternoon=p(m,!0)}],Q:[r,function(m){this.month=3*(m-1)+1}],S:[r,function(m){this.milliseconds=100*+m}],SS:[n,function(m){this.milliseconds=10*+m}],SSS:[/\d{3}/,function(m){this.milliseconds=+m}],s:[o,u("seconds")],ss:[o,u("seconds")],m:[o,u("minutes")],mm:[o,u("minutes")],H:[o,u("hours")],h:[o,u("hours")],HH:[o,u("hours")],hh:[o,u("hours")],D:[o,u("day")],DD:[n,u("day")],Do:[i,function(m){var A=a.ordinal,v=m.match(/\d+/);if(this.day=v[0],A)for(var h=1;h<=31;h+=1)A(h).replace(/\[|\]/g,"")===m&&(this.day=h)}],w:[o,u("week")],ww:[n,u("week")],M:[o,u("month")],MM:[n,u("month")],MMM:[i,function(m){var A=d("months"),v=(d("monthsShort")||A.map(function(h){return h.slice(0,3)})).indexOf(m)+1;if(v<1)throw new Error;this.month=v%12||v}],MMMM:[i,function(m){var A=d("months").indexOf(m)+1;if(A<1)throw new Error;this.month=A%12||A}],Y:[/[+-]?\d+/,u("year")],YY:[n,function(m){this.year=c(m)}],YYYY:[/\d{4}/,u("year")],Z:s,ZZ:s};function l(m){var A,v;A=m,v=a&&a.formats;for(var h=(m=A.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(C,x,F){var N=F&&F.toUpperCase();return x||v[F]||e[F]||v[N].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(D,k,T){return k||T.slice(1)})})).match(t),b=h.length,g=0;g<b;g+=1){var y=h[g],I=f[y],w=I&&I[0],S=I&&I[1];h[g]=S?{regex:w,parser:S}:y.replace(/^\[|\]$/g,"")}return function(C){for(var x={},F=0,N=0;F<b;F+=1){var D=h[F];if(typeof D=="string")N+=D.length;else{var k=D.regex,T=D.parser,q=C.slice(N),O=k.exec(q)[0];T.call(x,O),C=C.replace(O,"")}}return function(_){var V=_.afternoon;if(V!==void 0){var L=_.hours;V?L<12&&(_.hours+=12):L===12&&(_.hours=0),delete _.afternoon}}(x),x}}return function(m,A,v){v.p.customParseFormat=!0,m&&m.parseTwoDigitYear&&(c=m.parseTwoDigitYear);var h=A.prototype,b=h.parse;h.parse=function(g){var y=g.date,I=g.utc,w=g.args;this.$u=I;var S=w[1];if(typeof S=="string"){var C=w[2]===!0,x=w[3]===!0,F=C||x,N=w[2];x&&(N=w[2]),a=this.$locale(),!C&&N&&(a=v.Ls[N]),this.$d=function(q,O,_,V){try{if(["x","X"].indexOf(O)>-1)return new Date((O==="X"?1e3:1)*q);var L=l(O)(q),Q=L.year,W=L.month,B=L.day,$=L.hours,j=L.minutes,H=L.seconds,ne=L.milliseconds,G=L.zone,te=L.week,oe=new Date,Ae=B||(Q||W?1:oe.getDate()),De=Q||oe.getFullYear(),pt=0;Q&&!W||(pt=W>0?W-1:oe.getMonth());var tr,rr=$||0,zr=j||0,Ii=H||0,Fi=ne||0;return G?new Date(Date.UTC(De,pt,Ae,rr,zr,Ii,Fi+60*G.offset*1e3)):_?new Date(Date.UTC(De,pt,Ae,rr,zr,Ii,Fi)):(tr=new Date(De,pt,Ae,rr,zr,Ii,Fi),te&&(tr=V(tr).week(te).toDate()),tr)}catch{return new Date("")}}(y,S,I,v),this.init(),N&&N!==!0&&(this.$L=this.locale(N).$L),F&&y!=this.format(S)&&(this.$d=new Date("")),a={}}else if(S instanceof Array)for(var D=S.length,k=1;k<=D;k+=1){w[1]=S[k-1];var T=v.apply(this,w);if(T.isValid()){this.$d=T.$d,this.$L=T.$L,this.init();break}k===D&&(this.$d=new Date(""))}else b.call(this,g)}}})});var ed=de((zE,Zl)=>{"use strict";var sS=/(^|; )Coveo-Pendragon=([^;]*)/;Zl.exports=()=>sS.exec(document.cookie)?.pop()||null});var rd=de((as,ss)=>{"use strict";(function(e,t){typeof as=="object"&&typeof ss<"u"?ss.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_timezone=t()})(as,function(){"use strict";var e={year:0,month:1,day:2,hour:3,minute:4,second:5},t={};return function(r,n,o){var i,a=function(d,p,f){f===void 0&&(f={});var l=new Date(d),m=function(A,v){v===void 0&&(v={});var h=v.timeZoneName||"short",b=A+"|"+h,g=t[b];return g||(g=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:A,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:h}),t[b]=g),g}(p,f);return m.formatToParts(l)},c=function(d,p){for(var f=a(d,p),l=[],m=0;m<f.length;m+=1){var A=f[m],v=A.type,h=A.value,b=e[v];b>=0&&(l[b]=parseInt(h,10))}var g=l[3],y=g===24?0:g,I=l[0]+"-"+l[1]+"-"+l[2]+" "+y+":"+l[4]+":"+l[5]+":000",w=+d;return(o.utc(I).valueOf()-(w-=w%1e3))/6e4},u=n.prototype;u.tz=function(d,p){d===void 0&&(d=i);var f,l=this.utcOffset(),m=this.toDate(),A=m.toLocaleString("en-US",{timeZone:d}),v=Math.round((m-new Date(A))/1e3/60),h=15*-Math.round(m.getTimezoneOffset()/15)-v;if(!Number(h))f=this.utcOffset(0,p);else if(f=o(A,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(h,!0),p){var b=f.utcOffset();f=f.add(l-b,"minute")}return f.$x.$timezone=d,f},u.offsetName=function(d){var p=this.$x.$timezone||o.tz.guess(),f=a(this.valueOf(),p,{timeZoneName:d}).find(function(l){return l.type.toLowerCase()==="timezonename"});return f&&f.value};var s=u.startOf;u.startOf=function(d,p){if(!this.$x||!this.$x.$timezone)return s.call(this,d,p);var f=o(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return s.call(f,d,p).tz(this.$x.$timezone,!0)},o.tz=function(d,p,f){var l=f&&p,m=f||p||i,A=c(+o(),m);if(typeof d!="string")return o(d).tz(m);var v=function(y,I,w){var S=y-60*I*1e3,C=c(S,w);if(I===C)return[S,I];var x=c(S-=60*(C-I)*1e3,w);return C===x?[S,C]:[y-60*Math.min(C,x)*1e3,Math.max(C,x)]}(o.utc(d,l).valueOf(),A,m),h=v[0],b=v[1],g=o(h).utcOffset(b);return g.$x.$timezone=m,g},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(d){i=d}}})});var nd=de((cs,us)=>{"use strict";(function(e,t){typeof cs=="object"&&typeof us<"u"?us.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_utc=t()})(cs,function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g;return function(n,o,i){var a=o.prototype;i.utc=function(l){var m={date:l,utc:!0,args:arguments};return new o(m)},a.utc=function(l){var m=i(this.toDate(),{locale:this.$L,utc:!0});return l?m.add(this.utcOffset(),e):m},a.local=function(){return i(this.toDate(),{locale:this.$L,utc:!1})};var c=a.parse;a.parse=function(l){l.utc&&(this.$u=!0),this.$utils().u(l.$offset)||(this.$offset=l.$offset),c.call(this,l)};var u=a.init;a.init=function(){if(this.$u){var l=this.$d;this.$y=l.getUTCFullYear(),this.$M=l.getUTCMonth(),this.$D=l.getUTCDate(),this.$W=l.getUTCDay(),this.$H=l.getUTCHours(),this.$m=l.getUTCMinutes(),this.$s=l.getUTCSeconds(),this.$ms=l.getUTCMilliseconds()}else u.call(this)};var s=a.utcOffset;a.utcOffset=function(l,m){var A=this.$utils().u;if(A(l))return this.$u?0:A(this.$offset)?s.call(this):this.$offset;if(typeof l=="string"&&(l=function(g){g===void 0&&(g="");var y=g.match(t);if(!y)return null;var I=(""+y[0]).match(r)||["-",0,0],w=I[0],S=60*+I[1]+ +I[2];return S===0?0:w==="+"?S:-S}(l),l===null))return this;var v=Math.abs(l)<=16?60*l:l,h=this;if(m)return h.$offset=v,h.$u=l===0,h;if(l!==0){var b=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(h=this.local().add(v+b,e)).$offset=v,h.$x.$localOffset=b}else h=this.utc();return h};var d=a.format;a.format=function(l){var m=l||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return d.call(this,m)},a.valueOf=function(){var l=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*l},a.isUTC=function(){return!!this.$u},a.toISOString=function(){return this.toDate().toISOString()},a.toString=function(){return this.toDate().toUTCString()};var p=a.toDate;a.toDate=function(l){return l==="s"&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():p.call(this)};var f=a.diff;a.diff=function(l,m,A){if(l&&this.$u===l.$u)return f.call(this,l,m,A);var v=this.local(),h=i(l).local();return f.call(v,h,m,A)}}})});var yd=de((ZP,hd)=>{"use strict";function SS(e){try{return JSON.stringify(e)}catch{return'"[Circular]"'}}hd.exports=vS;function vS(e,t,r){var n=r&&r.stringify||SS,o=1;if(typeof e=="object"&&e!==null){var i=t.length+o;if(i===1)return e;var a=new Array(i);a[0]=n(e);for(var c=1;c<i;c++)a[c]=n(t[c]);return a.join(" ")}if(typeof e!="string")return e;var u=t.length;if(u===0)return e;for(var s="",d=1-o,p=-1,f=e&&e.length||0,l=0;l<f;){if(e.charCodeAt(l)===37&&l+1<f){switch(p=p>-1?p:0,e.charCodeAt(l+1)){case 100:case 102:if(d>=u||t[d]==null)break;p<l&&(s+=e.slice(p,l)),s+=Number(t[d]),p=l+2,l++;break;case 105:if(d>=u||t[d]==null)break;p<l&&(s+=e.slice(p,l)),s+=Math.floor(Number(t[d])),p=l+2,l++;break;case 79:case 111:case 106:if(d>=u||t[d]===void 0)break;p<l&&(s+=e.slice(p,l));var m=typeof t[d];if(m==="string"){s+="'"+t[d]+"'",p=l+2,l++;break}if(m==="function"){s+=t[d].name||"<anonymous>",p=l+2,l++;break}s+=n(t[d]),p=l+2,l++;break;case 115:if(d>=u)break;p<l&&(s+=e.slice(p,l)),s+=String(t[d]),p=l+2,l++;break;case 37:p<l&&(s+=e.slice(p,l)),s+="%",p=l+2,l++,d--;break}++d}++l}return p===-1?e:(p<f&&(s+=e.slice(p)),s)}});var wd=de((eI,zo)=>{"use strict";var Sd=yd();zo.exports=lt;var Rn=MS().console||{},CS={mapHttpRequest:Ho,mapHttpResponse:Ho,wrapRequestSerializer:fs,wrapResponseSerializer:fs,wrapErrorSerializer:fs,req:Ho,res:Ho,err:Cd,errWithCause:Cd};function Et(e,t){return e==="silent"?1/0:t.levels.values[e]}var hs=Symbol("pino.logFuncs"),ms=Symbol("pino.hierarchy"),AS={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function vd(e,t){let r={logger:t,parent:e[ms]};t[ms]=r}function bS(e,t,r){let n={};t.forEach(o=>{n[o]=r[o]?r[o]:Rn[o]||Rn[AS[o]||"log"]||Mr}),e[hs]=n}function wS(e,t){return Array.isArray(e)?e.filter(function(n){return n!=="!stdSerializers.err"}):e===!0?Object.keys(t):!1}function lt(e){e=e||{},e.browser=e.browser||{};let t=e.browser.transmit;if(t&&typeof t.send!="function")throw Error("pino: transmit option must have a send function");let r=e.browser.write||Rn;e.browser.write&&(e.browser.asObject=!0);let n=e.serializers||{},o=wS(e.browser.serialize,n),i=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(i=!1);let a=Object.keys(e.customLevels||{}),c=["error","fatal","warn","info","debug","trace"].concat(a);typeof r=="function"&&c.forEach(function(A){r[A]=r}),(e.enabled===!1||e.browser.disabled)&&(e.level="silent");let u=e.level||"info",s=Object.create(r);s.log||(s.log=Mr),bS(s,c,r),vd({},s),Object.defineProperty(s,"levelVal",{get:p}),Object.defineProperty(s,"level",{get:f,set:l});let d={transmit:t,serialize:o,asObject:e.browser.asObject,formatters:e.browser.formatters,levels:c,timestamp:kS(e),messageKey:e.messageKey||"msg",onChild:e.onChild||Mr};s.levels=xS(e),s.level=u,s.setMaxListeners=s.getMaxListeners=s.emit=s.addListener=s.on=s.prependListener=s.once=s.prependOnceListener=s.removeListener=s.removeAllListeners=s.listeners=s.listenerCount=s.eventNames=s.write=s.flush=Mr,s.serializers=n,s._serialize=o,s._stdErrSerialize=i,s.child=function(...A){return m.call(this,d,...A)},t&&(s._logEvent=gs());function p(){return Et(this.level,this)}function f(){return this._level}function l(A){if(A!=="silent"&&!this.levels.values[A])throw Error("unknown level "+A);this._level=A,Jt(this,d,s,"error"),Jt(this,d,s,"fatal"),Jt(this,d,s,"warn"),Jt(this,d,s,"info"),Jt(this,d,s,"debug"),Jt(this,d,s,"trace"),a.forEach(v=>{Jt(this,d,s,v)})}function m(A,v,h){if(!v)throw new Error("missing bindings for child Pino");h=h||{},o&&v.serializers&&(h.serializers=v.serializers);let b=h.serializers;if(o&&b){var g=Object.assign({},n,b),y=e.browser.serialize===!0?Object.keys(g):o;delete v.serializers,ys([v],y,g,this._stdErrSerialize)}function I(S){this._childLevel=(S._childLevel|0)+1,this.bindings=v,g&&(this.serializers=g,this._serialize=y),t&&(this._logEvent=gs([].concat(S._logEvent.bindings,v)))}I.prototype=this;let w=new I(this);return vd(this,w),w.child=function(...S){return m.call(this,A,...S)},w.level=h.level||this.level,A.onChild(w),w}return s}function xS(e){let t=e.customLevels||{},r=Object.assign({},lt.levels.values,t),n=Object.assign({},lt.levels.labels,RS(t));return{values:r,labels:n}}function RS(e){let t={};return Object.keys(e).forEach(function(r){t[e[r]]=r}),t}lt.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}};lt.stdSerializers=CS;lt.stdTimeFunctions=Object.assign({},{nullTime:Ad,epochTime:bd,unixTime:OS,isoTime:DS});function ES(e){let t=[];e.bindings&&t.push(e.bindings);let r=e[ms];for(;r.parent;)r=r.parent,r.logger.bindings&&t.push(r.logger.bindings);return t.reverse()}function Jt(e,t,r,n){if(Object.defineProperty(e,n,{value:Et(e.level,r)>Et(n,r)?Mr:r[hs][n],writable:!0,enumerable:!0,configurable:!0}),e[n]===Mr){if(!t.transmit)return;let i=t.transmit.level||e.level,a=Et(i,r);if(Et(n,r)<a)return}e[n]=IS(e,t,r,n);let o=ES(e);o.length!==0&&(e[n]=PS(o,e[n]))}function PS(e,t){return function(){return t.apply(this,[...e,...arguments])}}function IS(e,t,r,n){return function(o){return function(){let a=t.timestamp(),c=new Array(arguments.length),u=Object.getPrototypeOf&&Object.getPrototypeOf(this)===Rn?Rn:this;for(var s=0;s<c.length;s++)c[s]=arguments[s];var d=!1;if(t.serialize&&(ys(c,this._serialize,this.serializers,this._stdErrSerialize),d=!0),t.asObject||t.formatters?o.call(u,FS(this,n,c,a,t)):o.apply(u,c),t.transmit){let p=t.transmit.level||e._level,f=Et(p,r),l=Et(n,r);if(l<f)return;TS(this,{ts:a,methodLevel:n,methodValue:l,transmitLevel:p,transmitValue:r.levels.values[t.transmit.level||e._level],send:t.transmit.send,val:Et(e._level,r)},c,d)}}}(e[hs][n])}function FS(e,t,r,n,o){let{level:i,log:a=f=>f}=o.formatters||{},c=r.slice(),u=c[0],s={};if(n&&(s.time=n),i){let f=i(t,e.levels.values[t]);Object.assign(s,f)}else s.level=e.levels.values[t];let d=(e._childLevel|0)+1;if(d<1&&(d=1),u!==null&&typeof u=="object"){for(;d--&&typeof c[0]=="object";)Object.assign(s,c.shift());u=c.length?Sd(c.shift(),c):void 0}else typeof u=="string"&&(u=Sd(c.shift(),c));return u!==void 0&&(s[o.messageKey]=u),a(s)}function ys(e,t,r,n){for(let o in e)if(n&&e[o]instanceof Error)e[o]=lt.stdSerializers.err(e[o]);else if(typeof e[o]=="object"&&!Array.isArray(e[o])&&t)for(let i in e[o])t.indexOf(i)>-1&&i in r&&(e[o][i]=r[i](e[o][i]))}function TS(e,t,r,n=!1){let o=t.send,i=t.ts,a=t.methodLevel,c=t.methodValue,u=t.val,s=e._logEvent.bindings;n||ys(r,e._serialize||Object.keys(e.serializers),e.serializers,e._stdErrSerialize===void 0?!0:e._stdErrSerialize),e._logEvent.ts=i,e._logEvent.messages=r.filter(function(d){return s.indexOf(d)===-1}),e._logEvent.level.label=a,e._logEvent.level.value=c,o(a,e._logEvent,u),e._logEvent=gs(s)}function gs(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function Cd(e){let t={type:e.constructor.name,msg:e.message,stack:e.stack};for(let r in e)t[r]===void 0&&(t[r]=e[r]);return t}function kS(e){return typeof e.timestamp=="function"?e.timestamp:e.timestamp===!1?Ad:bd}function Ho(){return{}}function fs(e){return e}function Mr(){}function Ad(){return!1}function bd(){return Date.now()}function OS(){return Math.round(Date.now()/1e3)}function DS(){return new Date(Date.now()).toISOString()}function MS(){function e(t){return typeof t<"u"&&t}try{return typeof globalThis<"u"||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch{return e(self)||e(window)||e(this)||{}}}zo.exports.default=lt;zo.exports.pino=lt});var oC={};Ds(oC,{DefaultFieldsToInclude:()=>Cs,EcommerceDefaultFieldsToInclude:()=>Ud,HighlightUtils:()=>ki,MinimumFieldsToInclude:()=>oi,ResultTemplatesHelpers:()=>Lp,buildContext:()=>qp,buildController:()=>Ut,buildDictionaryFieldContext:()=>Np,buildInteractiveResult:()=>Dp,buildRecommendationEngine:()=>Td,buildRecommendationList:()=>kp,buildResultTemplatesManager:()=>Vp,getAnalyticsNextApiBaseUrl:()=>Vn,getOrganizationEndpoint:()=>ve,getSampleRecommendationEngineConfiguration:()=>Ss,loadAdvancedSearchQueryActions:()=>BS,loadClickAnalyticsActions:()=>ZS,loadConfigurationActions:()=>LS,loadContextActions:()=>$S,loadDebugActions:()=>JS,loadDictionaryFieldContextActions:()=>HS,loadFieldActions:()=>GS,loadPaginationActions:()=>ks,loadPipelineActions:()=>KS,loadRecommendationActions:()=>XS,loadSearchConfigurationActions:()=>jS,loadSearchHubActions:()=>YS});module.exports=Wp(oC);var ki={};Ds(ki,{escape:()=>nr,getHighlightedSuggestion:()=>Yp,highlightString:()=>Kp});var Us=require("@coveo/bueno");function qs(e){return Array.isArray(e)}function Mn(e){return e.trim()===""}function Ns(e,t){return[...e.reduce((r,n)=>{let o=t(n);return r.has(o)||r.set(o,n),r},new Map).values()]}var Gp=new Set(["1",1,"yes",!0]);function _s(){if(typeof navigator>"u"||typeof window>"u")return!1;let e=navigator,t=window;return[e.globalPrivacyControl,e.doNotTrack,e.msDoNotTrack,t.doNotTrack].some(r=>Gp.has(r))}function Vs(e){let t={};for(let[r,n]of e)t[r]=n;return t}function Gr(e){if(typeof e!="object"||!e)return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}function Kp(e){if(Mn(e.openingDelimiter)||Mn(e.closingDelimiter))throw Error("delimiters should be a non-empty string");if((0,Us.isNullOrUndefined)(e.content)||Mn(e.content))return e.content;if(e.highlights.length===0)return nr(e.content);let t=e.content.length,r="",n=0;for(let o=0;o<e.highlights.length;o++){let i=e.highlights[o],a=i.offset,c=a+i.length;if(c>t)break;r+=nr(e.content.slice(n,a)),r+=e.openingDelimiter,r+=nr(e.content.slice(a,c)),r+=e.closingDelimiter,n=c}return n!==t&&(r+=nr(e.content.slice(n))),r}function Yp(e,t){return e=nr(e),e.replace(/\[(.*?)\]|\{(.*?)\}|\((.*?)\)/g,(r,n,o,i)=>n?Ti(n,t.notMatchDelimiters):o?Ti(o,t.exactMatchDelimiters):i?Ti(i,t.correctionDelimiters):r)}function Ti(e,t){return t?t.open+e+t.close:e}function nr(e){let t={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},r="(?:"+Object.keys(t).join("|")+")",n=RegExp(r),o=RegExp(r,"g");return n.test(e)?e.replace(o,i=>t[i]):e}var vs=require("@coveo/bueno");var qn=e=>e;var Ls=e=>e,js=e=>e,Bs=e=>e;var ic=require("@coveo/bueno");function Nn(){return{answerSnippet:"",documentId:{contentIdKey:"",contentIdValue:""},question:"",relatedQuestions:[],score:0}}function $e(){return{response:{results:[],searchUid:"",totalCountFiltered:0,facets:[],generateAutomaticFacets:{facets:[]},queryCorrections:[],triggers:[],questionAnswer:Nn(),pipeline:"",splitTestRun:"",termsToHighlight:{},phrasesToHighlight:{},extendedResults:{}},duration:0,queryExecuted:"",error:null,automaticallyCorrected:!1,isLoading:!1,results:[],searchResponseId:"",requestId:"",questionAnswer:Nn(),extendedResults:{}}}function ft(e){let{url:t,accessToken:r,organizationId:n,authentication:o,...i}=e;return i}var mt=e=>{let{response:t}=e;return t.body?Jp(e):Xp(t)},Jp=e=>ef(e)?tf(e):Zp(e)?e.body:{message:"unknown",statusCode:0,type:"unknown"},Xp=e=>{let t=JSON.parse(JSON.stringify(e,Object.getOwnPropertyNames(e)));return{...t,message:`Client side error: ${t.message||""}`,statusCode:400,type:"ClientError"}};function Zp(e){return e.body.statusCode!==void 0}function ef(e){return e.body.exception!==void 0}var tf=e=>({message:e.body.exception.code,statusCode:e.response.status,type:e.body.exception.code});var ec=Qe(Ys(),1);var If="recommendation-internal-options",bC=Symbol.for(If);var He=new Error("Failed to load reducers."),or=class extends Error{constructor(){super(),this.name="ExpiredToken",this.message="The token being used to perform the request is expired."}};var jt=class extends Error{constructor(r,n){super();se(this,"statusCode");this.name="Disconnected",this.message=`Client could not connect to the following URL: ${r}`,this.statusCode=n??0}};function Js(e){let t=[];for(let r in e){let n=encodeURIComponent(r),o=encodeURIComponent(e[r]);t.push(`${n}=${o}`)}return t.join("&")}function Xs(e){return typeof e!="object"||!e?!1:Object.values(e).every(Ff)}function Ff(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function Zs(e){return e===429}var _e=class e{static async call(t){let r=Tf(t),{logger:n}=t,o=await e.preprocessRequest(r,t);n.info(o,"Platform request");let{url:i,...a}=o,c=async()=>{let u=await fetch(i,a);if(Zs(u.status))throw u;return u};try{let u=await(0,ec.backOff)(c,{retry:s=>{let d=s&&Zs(s.status);return d&&n.info("Platform retrying request"),d}});switch(u.status){case 419:case 401:throw n.info("Platform renewing token"),new or;case 404:throw new jt(i,u.status);default:return n.info({response:u,requestInfo:o},"Platform response"),u}}catch(u){return u.message==="Failed to fetch"?new jt(i):u}}static async preprocessRequest(t,r){let{origin:n,preprocessRequest:o,logger:i,requestMetadata:a}=r,{signal:c,...u}=t,s=Gr(u);try{let d=await o(t,n,a);return{...t,...d}}catch(d){i.error(d,"Platform request preprocessing failed. Returning default request options.")}return s}};function ve(e,t="prod",r="platform"){let n=t==="prod"?"":t,o=r==="platform"?"":`.${r}`;return`https://${e}${o}.org${n}.coveo.com`}function gt(e,t="prod"){return`${ve(e,t)}/rest/search/v2`}function Vn(e,t="prod"){return`${ve(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function Tf(e){let{url:t,method:r,requestParams:n,contentType:o,accessToken:i,signal:a}=e,c=e.method==="POST"||e.method==="PUT",u=kf(n,o);return{url:t,method:r,headers:{"Content-Type":o,Authorization:`Bearer ${i}`,...e.headers},...c&&{body:u},signal:a}}function kf(e,t){return t==="application/x-www-form-urlencoded"?Xs(e)?Js(e):"":JSON.stringify(e)}var ht=class{constructor(){se(this,"currentAbortController",null)}async enqueue(t,r){let n=this.currentAbortController,o=this.currentAbortController=new AbortController;n&&(r.warnOnAbort&&r.logger.warn("Cancelling current pending search query"),n.abort());try{return await t(o?.signal??null)}finally{this.currentAbortController===o&&(this.currentAbortController=null)}}};var Jr=class{constructor(t){se(this,"_basePath");se(this,"_params",{});this._basePath=t}addParam(t,r){this._params={...this.params,[t]:r}}get basePath(){return this._basePath}get params(){return this._params}get hasParams(){return Object.entries(this._params).length}get href(){return this.hasParams?`${this.basePath}?${Object.entries(this.params).map(([t,r])=>`${t}=${encodeURIComponent(r)}`).join("&")}`:this.basePath}};function tc(e){return((e.headers.get("content-type")||"").split(";").find(n=>n.indexOf("charset=")!==-1)||"").split("=")[1]||"UTF-8"}var tt=(e,t,r,n)=>{let o=new Jr(`${e.url}${n}`);return o.addParam("organizationId",e.organizationId),e.authentication&&o.addParam("authentication",e.authentication),{accessToken:e.accessToken,method:t,contentType:r,url:o.href,origin:"searchApiFetch"}};var rc=async(e,t)=>{let r=await _e.call({...tt(e,"POST","application/x-www-form-urlencoded","/html"),requestParams:ft(e),requestMetadata:{method:"html"},...t});if(r instanceof Error)throw r;let n=tc(r),o=await r.arrayBuffer(),a=new TextDecoder(n).decode(o);return Of(a)?{success:a}:{error:mt({response:r,body:a})}};function Of(e){return typeof e=="string"}function Df(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function Mf(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function Un(e,t){if(t&&e.name==="AbortError")return{error:Mf(e)};if(e instanceof jt)return{error:Df(e)};throw e}var Ln=class{constructor(t){this.options=t;se(this,"apiCallsQueues",{unknown:new ht,mainSearch:new ht,facetValues:new ht,foldingCollection:new ht,instantResults:new ht})}async plan(t){let r=await _e.call({...tt(t,"POST","application/json","/plan"),requestParams:ft(t),requestMetadata:{method:"plan"},...this.options});if(r instanceof Error)return Un(r);let n=await r.json();return Nf(n)?{success:n}:{error:mt({response:r,body:n})}}async querySuggest(t){let r=await _e.call({...tt(t,"POST","application/json","/querySuggest"),requestMetadata:{method:"querySuggest"},requestParams:ft(t),...this.options});if(r instanceof Error)return Un(r);let n=await r.json(),o={response:r,body:n};return qf(n)?{success:(await this.options.postprocessQuerySuggestResponseMiddleware(o)).body}:{error:mt(o)}}async search(t,r){let n=r?.origin??"unknown",o=await this.apiCallsQueues[n].enqueue(c=>_e.call({...tt(t,"POST","application/json",""),requestParams:ft(t),requestMetadata:{method:"search",origin:r?.origin},...this.options,signal:c??void 0}),{logger:this.options.logger,warnOnAbort:!r?.disableAbortWarning});if(o instanceof Error)return Un(o,r?.disableAbortWarning);let i=await o.json(),a={response:o,body:i};return nc(i)?(a.body=oc(i),{success:(await this.options.postprocessSearchResponseMiddleware(a)).body}):{error:mt(a)}}async facetSearch(t){let r=await _e.call({...tt(t,"POST","application/json","/facet"),requestParams:ft(t),requestMetadata:{method:"facetSearch"},...this.options});if(r instanceof Error)throw r;let n=await r.json(),o={response:r,body:n};return(await this.options.postprocessFacetSearchResponseMiddleware(o)).body}async recommendations(t){let r=await _e.call({...tt(t,"POST","application/json",""),requestParams:ft(t),requestMetadata:{method:"recommendations"},...this.options});if(r instanceof Error)throw r;let n=await r.json();if(nc(n)){let o={response:r,body:n};return o.body=oc(n),{success:(await this.options.postprocessSearchResponseMiddleware(o)).body}}return{error:mt({response:r,body:n})}}async html(t){return rc(t,{...this.options})}async fieldDescriptions(t){let r=await _e.call({...tt(t,"GET","application/json","/fields"),requestParams:{},requestMetadata:{method:"fieldDescriptions"},...this.options});if(r instanceof Error)throw r;let n=await r.json();return _f(n)?{success:n}:{error:mt({response:r,body:n})}}},jn=e=>e.success!==void 0,be=e=>e.error!==void 0;function nc(e){return e.results!==void 0}function oc(e){let t=Nn();return(0,ic.isNullOrUndefined)(e.questionAnswer)?(e.questionAnswer=t,e):(e.questionAnswer={...t,...e.questionAnswer},e)}function qf(e){return e.completions!==void 0}function Nf(e){return e.preprocessingOutput!==void 0}function _f(e){return e.fields!==void 0}var Ce=require("@coveo/bueno");function pe(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Vf=typeof Symbol=="function"&&Symbol.observable||"@@observable",ac=Vf,Li=()=>Math.random().toString(36).substring(7).split("").join("."),Uf={INIT:`@@redux/INIT${Li()}`,REPLACE:`@@redux/REPLACE${Li()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Li()}`},Bn=Uf;function ze(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function ji(e,t,r){if(typeof e!="function")throw new Error(pe(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(pe(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(pe(1));return r(ji)(e,t)}let n=e,o=t,i=new Map,a=i,c=0,u=!1;function s(){a===i&&(a=new Map,i.forEach((v,h)=>{a.set(h,v)}))}function d(){if(u)throw new Error(pe(3));return o}function p(v){if(typeof v!="function")throw new Error(pe(4));if(u)throw new Error(pe(5));let h=!0;s();let b=c++;return a.set(b,v),function(){if(h){if(u)throw new Error(pe(6));h=!1,s(),a.delete(b),i=null}}}function f(v){if(!ze(v))throw new Error(pe(7));if(typeof v.type>"u")throw new Error(pe(8));if(typeof v.type!="string")throw new Error(pe(17));if(u)throw new Error(pe(9));try{u=!0,o=n(o,v)}finally{u=!1}return(i=a).forEach(b=>{b()}),v}function l(v){if(typeof v!="function")throw new Error(pe(10));n=v,f({type:Bn.REPLACE})}function m(){let v=p;return{subscribe(h){if(typeof h!="object"||h===null)throw new Error(pe(11));function b(){let y=h;y.next&&y.next(d())}return b(),{unsubscribe:v(b)}},[ac](){return this}}}return f({type:Bn.INIT}),{dispatch:f,subscribe:p,getState:d,replaceReducer:l,[ac]:m}}function Lf(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:Bn.INIT})>"u")throw new Error(pe(12));if(typeof r(void 0,{type:Bn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(pe(13))})}function ir(e){let t=Object.keys(e),r={};for(let a=0;a<t.length;a++){let c=t[a];typeof e[c]=="function"&&(r[c]=e[c])}let n=Object.keys(r),o,i;try{Lf(r)}catch(a){i=a}return function(c={},u){if(i)throw i;let s=!1,d={};for(let p=0;p<n.length;p++){let f=n[p],l=r[f],m=c[f],A=l(m,u);if(typeof A>"u"){let v=u&&u.type;throw new Error(pe(14))}d[f]=A,s=s||A!==m}return s=s||n.length!==Object.keys(c).length,s?d:c}}function ar(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function sc(...e){return t=>(r,n)=>{let o=t(r,n),i=()=>{throw new Error(pe(15))},a={getState:o.getState,dispatch:(u,...s)=>i(u,...s)},c=e.map(u=>u(a));return i=ar(...c)(o.dispatch),{...o,dispatch:i}}}function Qn(e){return ze(e)&&"type"in e&&typeof e.type=="string"}var Ji=Symbol.for("immer-nothing"),Xr=Symbol.for("immer-draftable"),we=Symbol.for("immer-state");function fe(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Qt=Object.getPrototypeOf;function Fe(e){return!!e&&!!e[we]}function xe(e){return e?pc(e)||Array.isArray(e)||!!e[Xr]||!!e.constructor?.[Xr]||nn(e)||on(e):!1}var jf=Object.prototype.constructor.toString();function pc(e){if(!e||typeof e!="object")return!1;let t=Qt(e);if(t===null)return!0;let r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object?!0:typeof r=="function"&&Function.toString.call(r)===jf}function Xi(e){return Fe(e)||fe(15,e),e[we].base_}function Zr(e,t){$t(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function $t(e){let t=e[we];return t?t.type_:Array.isArray(e)?1:nn(e)?2:on(e)?3:0}function en(e,t){return $t(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Bi(e,t){return $t(e)===2?e.get(t):e[t]}function fc(e,t,r){let n=$t(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function Bf(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function nn(e){return e instanceof Map}function on(e){return e instanceof Set}function Bt(e){return e.copy_||e.base_}function Hi(e,t){if(nn(e))return new Map(e);if(on(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=pc(e);if(t===!0||t==="class_only"&&!r){let n=Object.getOwnPropertyDescriptors(e);delete n[we];let o=Reflect.ownKeys(n);for(let i=0;i<o.length;i++){let a=o[i],c=n[a];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(n[a]={configurable:!0,writable:!0,enumerable:c.enumerable,value:e[a]})}return Object.create(Qt(e),n)}else{let n=Qt(e);if(n!==null&&r)return{...e};let o=Object.create(n);return Object.assign(o,e)}}function zn(e,t=!1){return Wn(e)||Fe(e)||!xe(e)||($t(e)>1&&(e.set=e.add=e.clear=e.delete=Qf),Object.freeze(e),t&&Object.entries(e).forEach(([r,n])=>zn(n,!0))),e}function Qf(){fe(2)}function Wn(e){return Object.isFrozen(e)}var zi={};function Ht(e){let t=zi[e];return t||fe(0,e),t}function $f(e,t){zi[e]||(zi[e]=t)}var tn;function mc(){return tn}function Hf(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function cc(e,t){t&&(Ht("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Wi(e){Gi(e),e.drafts_.forEach(zf),e.drafts_=null}function Gi(e){e===tn&&(tn=e.parent_)}function uc(e){return tn=Hf(tn,e)}function zf(e){let t=e[we];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function lc(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[we].modified_&&(Wi(t),fe(4)),xe(e)&&(e=$n(t,e),t.parent_||Hn(t,e)),t.patches_&&Ht("Patches").generateReplacementPatches_(r[we].base_,e,t.patches_,t.inversePatches_)):e=$n(t,r,[]),Wi(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Ji?e:void 0}function $n(e,t,r){if(Wn(t))return t;let n=t[we];if(!n)return Zr(t,(o,i)=>dc(e,n,t,o,i,r)),t;if(n.scope_!==e)return t;if(!n.modified_)return Hn(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;let o=n.copy_,i=o,a=!1;n.type_===3&&(i=new Set(o),o.clear(),a=!0),Zr(i,(c,u)=>dc(e,n,o,c,u,r,a)),Hn(e,o,!1),r&&e.patches_&&Ht("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function dc(e,t,r,n,o,i,a){if(Fe(o)){let c=i&&t&&t.type_!==3&&!en(t.assigned_,n)?i.concat(n):void 0,u=$n(e,o,c);if(fc(r,n,u),Fe(u))e.canAutoFreeze_=!1;else return}else a&&r.add(o);if(xe(o)&&!Wn(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;$n(e,o),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,n)&&Hn(e,o)}}function Hn(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&zn(t,r)}function Wf(e,t){let r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:mc(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},o=n,i=Zi;r&&(o=[n],i=rn);let{revoke:a,proxy:c}=Proxy.revocable(o,i);return n.draft_=c,n.revoke_=a,c}var Zi={get(e,t){if(t===we)return e;let r=Bt(e);if(!en(r,t))return Gf(e,r,t);let n=r[t];return e.finalized_||!xe(n)?n:n===Qi(e.base_,t)?($i(e),e.copy_[t]=Yi(n,e)):n},has(e,t){return t in Bt(e)},ownKeys(e){return Reflect.ownKeys(Bt(e))},set(e,t,r){let n=gc(Bt(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let o=Qi(Bt(e),t),i=o?.[we];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(Bf(r,o)&&(r!==void 0||en(e.base_,t)))return!0;$i(e),Ki(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Qi(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,$i(e),Ki(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=Bt(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){fe(11)},getPrototypeOf(e){return Qt(e.base_)},setPrototypeOf(){fe(12)}},rn={};Zr(Zi,(e,t)=>{rn[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});rn.deleteProperty=function(e,t){return rn.set.call(this,e,t,void 0)};rn.set=function(e,t,r){return Zi.set.call(this,e[0],t,r,e[0])};function Qi(e,t){let r=e[we];return(r?Bt(r):e)[t]}function Gf(e,t,r){let n=gc(t,r);return n?"value"in n?n.value:n.get?.call(e.draft_):void 0}function gc(e,t){if(!(t in e))return;let r=Qt(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Qt(r)}}function Ki(e){e.modified_||(e.modified_=!0,e.parent_&&Ki(e.parent_))}function $i(e){e.copy_||(e.copy_=Hi(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Kf=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){let i=r;r=t;let a=this;return function(u=i,...s){return a.produce(u,d=>r.call(this,d,...s))}}typeof r!="function"&&fe(6),n!==void 0&&typeof n!="function"&&fe(7);let o;if(xe(t)){let i=uc(this),a=Yi(t,void 0),c=!0;try{o=r(a),c=!1}finally{c?Wi(i):Gi(i)}return cc(i,n),lc(o,i)}else if(!t||typeof t!="object"){if(o=r(t),o===void 0&&(o=t),o===Ji&&(o=void 0),this.autoFreeze_&&zn(o,!0),n){let i=[],a=[];Ht("Patches").generateReplacementPatches_(t,o,i,a),n(i,a)}return o}else fe(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(a,...c)=>this.produceWithPatches(a,u=>t(u,...c));let n,o;return[this.produce(t,r,(a,c)=>{n=a,o=c}),n,o]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){xe(e)||fe(8),Fe(e)&&(e=hc(e));let t=uc(this),r=Yi(e,void 0);return r[we].isManual_=!0,Gi(t),r}finishDraft(e,t){let r=e&&e[we];(!r||!r.isManual_)&&fe(9);let{scope_:n}=r;return cc(n,t),lc(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let o=t[r];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}r>-1&&(t=t.slice(r+1));let n=Ht("Patches").applyPatches_;return Fe(e)?n(e,t):this.produce(e,o=>n(o,t))}};function Yi(e,t){let r=nn(e)?Ht("MapSet").proxyMap_(e,t):on(e)?Ht("MapSet").proxySet_(e,t):Wf(e,t);return(t?t.scope_:mc()).drafts_.push(r),r}function hc(e){return Fe(e)||fe(10,e),yc(e)}function yc(e){if(!xe(e)||Wn(e))return e;let t=e[we],r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Hi(e,t.scope_.immer_.useStrictShallowCopy_)}else r=Hi(e,!0);return Zr(r,(n,o)=>{fc(r,n,yc(o))}),t&&(t.finalized_=!1),r}function Sc(){let t="replace",r="add",n="remove";function o(f,l,m,A){switch(f.type_){case 0:case 2:return a(f,l,m,A);case 1:return i(f,l,m,A);case 3:return c(f,l,m,A)}}function i(f,l,m,A){let{base_:v,assigned_:h}=f,b=f.copy_;b.length<v.length&&([v,b]=[b,v],[m,A]=[A,m]);for(let g=0;g<v.length;g++)if(h[g]&&b[g]!==v[g]){let y=l.concat([g]);m.push({op:t,path:y,value:p(b[g])}),A.push({op:t,path:y,value:p(v[g])})}for(let g=v.length;g<b.length;g++){let y=l.concat([g]);m.push({op:r,path:y,value:p(b[g])})}for(let g=b.length-1;v.length<=g;--g){let y=l.concat([g]);A.push({op:n,path:y})}}function a(f,l,m,A){let{base_:v,copy_:h}=f;Zr(f.assigned_,(b,g)=>{let y=Bi(v,b),I=Bi(h,b),w=g?en(v,b)?t:r:n;if(y===I&&w===t)return;let S=l.concat(b);m.push(w===n?{op:w,path:S}:{op:w,path:S,value:I}),A.push(w===r?{op:n,path:S}:w===n?{op:r,path:S,value:p(y)}:{op:t,path:S,value:p(y)})})}function c(f,l,m,A){let{base_:v,copy_:h}=f,b=0;v.forEach(g=>{if(!h.has(g)){let y=l.concat([b]);m.push({op:n,path:y,value:g}),A.unshift({op:r,path:y,value:g})}b++}),b=0,h.forEach(g=>{if(!v.has(g)){let y=l.concat([b]);m.push({op:r,path:y,value:g}),A.unshift({op:n,path:y,value:g})}b++})}function u(f,l,m,A){m.push({op:t,path:[],value:l===Ji?void 0:l}),A.push({op:t,path:[],value:f})}function s(f,l){return l.forEach(m=>{let{path:A,op:v}=m,h=f;for(let I=0;I<A.length-1;I++){let w=$t(h),S=A[I];typeof S!="string"&&typeof S!="number"&&(S=""+S),(w===0||w===1)&&(S==="__proto__"||S==="constructor")&&fe(19),typeof h=="function"&&S==="prototype"&&fe(19),h=Bi(h,S),typeof h!="object"&&fe(18,A.join("/"))}let b=$t(h),g=d(m.value),y=A[A.length-1];switch(v){case t:switch(b){case 2:return h.set(y,g);case 3:fe(16);default:return h[y]=g}case r:switch(b){case 1:return y==="-"?h.push(g):h.splice(y,0,g);case 2:return h.set(y,g);case 3:return h.add(g);default:return h[y]=g}case n:switch(b){case 1:return h.splice(y,1);case 2:return h.delete(y);case 3:return h.delete(m.value);default:return delete h[y]}default:fe(17,v)}}),f}function d(f){if(!xe(f))return f;if(Array.isArray(f))return f.map(d);if(nn(f))return new Map(Array.from(f.entries()).map(([m,A])=>[m,d(A)]));if(on(f))return new Set(Array.from(f).map(d));let l=Object.create(Qt(f));for(let m in f)l[m]=d(f[m]);return en(f,Xr)&&(l[Xr]=f[Xr]),l}function p(f){return Fe(f)?d(f):f}$f("Patches",{applyPatches_:s,generatePatches_:o,generateReplacementPatches_:u})}var Te=new Kf,rt=Te.produce,Gn=Te.produceWithPatches.bind(Te),aA=Te.setAutoFreeze.bind(Te),sA=Te.setUseStrictShallowCopy.bind(Te),ea=Te.applyPatches.bind(Te),cA=Te.createDraft.bind(Te),uA=Te.finishDraft.bind(Te);function Yf(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Jf(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function Xf(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){let r=e.map(n=>typeof n=="function"?`function ${n.name||"unnamed"}()`:typeof n).join(", ");throw new TypeError(`${t}[${r}]`)}}var vc=e=>Array.isArray(e)?e:[e];function Zf(e){let t=Array.isArray(e[0])?e[0]:e;return Xf(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function em(e,t){let r=[],{length:n}=e;for(let o=0;o<n;o++)r.push(e[o].apply(null,t));return r}var pA=Symbol();var fA=Object.getPrototypeOf({});var tm=class{constructor(e){this.value=e}deref(){return this.value}},rm=typeof WeakRef<"u"?WeakRef:tm,nm=0,Cc=1;function Kn(){return{s:nm,v:void 0,o:null,p:null}}function sr(e,t={}){let r=Kn(),{resultEqualityCheck:n}=t,o,i=0;function a(){let c=r,{length:u}=arguments;for(let p=0,f=u;p<f;p++){let l=arguments[p];if(typeof l=="function"||typeof l=="object"&&l!==null){let m=c.o;m===null&&(c.o=m=new WeakMap);let A=m.get(l);A===void 0?(c=Kn(),m.set(l,c)):c=A}else{let m=c.p;m===null&&(c.p=m=new Map);let A=m.get(l);A===void 0?(c=Kn(),m.set(l,c)):c=A}}let s=c,d;if(c.s===Cc)d=c.v;else if(d=e.apply(null,arguments),i++,n){let p=o?.deref?.()??o;p!=null&&n(p,d)&&(d=p,i!==0&&i--),o=typeof d=="object"&&d!==null||typeof d=="function"?new rm(d):d}return s.s=Cc,s.v=d,d}return a.clearCache=()=>{r=Kn(),a.resetResultsCount()},a.resultsCount=()=>i,a.resetResultsCount=()=>{i=0},a}function Ac(e,...t){let r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...o)=>{let i=0,a=0,c,u={},s=o.pop();typeof s=="object"&&(u=s,s=o.pop()),Yf(s,`createSelector expects an output function after the inputs, but received: [${typeof s}]`);let d={...r,...u},{memoize:p,memoizeOptions:f=[],argsMemoize:l=sr,argsMemoizeOptions:m=[],devModeChecks:A={}}=d,v=vc(f),h=vc(m),b=Zf(o),g=p(function(){return i++,s.apply(null,arguments)},...v),y=!0,I=l(function(){a++;let S=em(b,arguments);return c=g.apply(null,S),c},...h);return Object.assign(I,{resultFunc:s,memoizedResultFunc:g,dependencies:b,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>c,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:p,argsMemoize:l})};return Object.assign(n,{withTypes:()=>n}),n}var ue=Ac(sr),om=Object.assign((e,t=ue)=>{Jf(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);let r=Object.keys(e),n=r.map(i=>e[i]);return t(n,(...i)=>i.reduce((a,c,u)=>(a[r[u]]=c,a),{}))},{withTypes:()=>om});function bc(e){return({dispatch:r,getState:n})=>o=>i=>typeof i=="function"?i(r,n,e):o(i)}var wc=bc(),xc=bc;var im=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?ar:ar.apply(null,arguments)},wA=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},am=e=>e&&typeof e.match=="function";function R(e,t){function r(...n){if(t){let o=t(...n);if(!o)throw new Error(Ve(0));return{type:e,payload:o.payload,..."meta"in o&&{meta:o.meta},..."error"in o&&{error:o.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>Qn(n)&&n.type===e,r}var Fc=class an extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,an.prototype)}static get[Symbol.species](){return an}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new an(...t[0].concat(this)):new an(...t.concat(this))}};function Rc(e){return xe(e)?rt(e,()=>{}):e}function Ec(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function sm(e){return typeof e=="boolean"}var cm=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:o=!0,actionCreatorCheck:i=!0}=t??{},a=new Fc;return r&&(sm(r)?a.push(wc):a.push(xc(r.extraArgument))),a},sn="RTK_autoBatch",ur=()=>e=>({payload:e,meta:{[sn]:!0}}),Pc=e=>t=>{setTimeout(t,e)},um=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),o=!0,i=!1,a=!1,c=new Set,u=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Pc(10):e.type==="callback"?e.queueNotification:Pc(e.timeout),s=()=>{a=!1,i&&(i=!1,c.forEach(d=>d()))};return Object.assign({},n,{subscribe(d){let p=()=>o&&d(),f=n.subscribe(p);return c.add(d),()=>{f(),c.delete(d)}},dispatch(d){try{return o=!d?.meta?.[sn],i=!o,i&&(a||(a=!0,u(s))),n.dispatch(d)}finally{o=!0}}})},lm=e=>function(r){let{autoBatch:n=!0}=r??{},o=new Fc(e);return n&&o.push(um(typeof n=="object"?n:void 0)),o};function Tc(e){let t=cm(),{reducer:r=void 0,middleware:n,devTools:o=!0,preloadedState:i=void 0,enhancers:a=void 0}=e||{},c;if(typeof r=="function")c=r;else if(ze(r))c=ir(r);else throw new Error(Ve(1));let u;typeof n=="function"?u=n(t):u=t();let s=ar;o&&(s=im({trace:!1,...typeof o=="object"&&o}));let d=sc(...u),p=lm(d),f=typeof a=="function"?a(p):p(),l=s(...f);return ji(c,i,l)}function kc(e){let t={},r=[],n,o={addCase(i,a){let c=typeof i=="string"?i:i.type;if(!c)throw new Error(Ve(28));if(c in t)throw new Error(Ve(29));return t[c]=a,o},addMatcher(i,a){return r.push({matcher:i,reducer:a}),o},addDefaultCase(i){return n=i,o}};return e(o),[t,r,n]}function dm(e){return typeof e=="function"}function re(e,t){let[r,n,o]=kc(t),i;if(dm(e))i=()=>Rc(e());else{let c=Rc(e);i=()=>c}function a(c=i(),u){let s=[r[u.type],...n.filter(({matcher:d})=>d(u)).map(({reducer:d})=>d)];return s.filter(d=>!!d).length===0&&(s=[o]),s.reduce((d,p)=>{if(p)if(Fe(d)){let l=p(d,u);return l===void 0?d:l}else{if(xe(d))return rt(d,f=>p(f,u));{let f=p(d,u);if(f===void 0){if(d===null)return d;throw Error("A case reducer on a non-draftable value must not return undefined")}return f}}return d},c)}return a.getInitialState=i,a}var Oc=(e,t)=>am(e)?e.match(t):e(t);function We(...e){return t=>e.some(r=>Oc(r,t))}function cr(...e){return t=>e.every(r=>Oc(r,t))}function Jn(e,t){if(!e||!e.meta)return!1;let r=typeof e.meta.requestId=="string",n=t.indexOf(e.meta.requestStatus)>-1;return r&&n}function cn(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function Xn(...e){return e.length===0?t=>Jn(t,["pending"]):cn(e)?We(...e.map(t=>t.pending)):Xn()(e[0])}function zt(...e){return e.length===0?t=>Jn(t,["rejected"]):cn(e)?We(...e.map(t=>t.rejected)):zt()(e[0])}function un(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?cr(zt(...e),t):cn(e)?cr(zt(...e),t):un()(e[0])}function nt(...e){return e.length===0?t=>Jn(t,["fulfilled"]):cn(e)?We(...e.map(t=>t.fulfilled)):nt()(e[0])}function Zn(...e){return e.length===0?t=>Jn(t,["pending","fulfilled","rejected"]):cn(e)?We(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):Zn()(e[0])}var pm="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",eo=(e=21)=>{let t="",r=e;for(;r--;)t+=pm[Math.random()*64|0];return t},fm=["name","message","stack","code"],ta=class{constructor(e,t){se(this,"_type");this.payload=e,this.meta=t}},Ic=class{constructor(e,t){se(this,"_type");this.payload=e,this.meta=t}},mm=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of fm)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},K=(()=>{function e(t,r,n){let o=R(t+"/fulfilled",(u,s,d,p)=>({payload:u,meta:{...p||{},arg:d,requestId:s,requestStatus:"fulfilled"}})),i=R(t+"/pending",(u,s,d)=>({payload:void 0,meta:{...d||{},arg:s,requestId:u,requestStatus:"pending"}})),a=R(t+"/rejected",(u,s,d,p,f)=>({payload:p,error:(n&&n.serializeError||mm)(u||"Rejected"),meta:{...f||{},arg:d,requestId:s,rejectedWithValue:!!p,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"}}));function c(u){return(s,d,p)=>{let f=n?.idGenerator?n.idGenerator(u):eo(),l=new AbortController,m,A;function v(b){A=b,l.abort()}let h=async function(){let b;try{let y=n?.condition?.(u,{getState:d,extra:p});if(hm(y)&&(y=await y),y===!1||l.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let I=new Promise((w,S)=>{m=()=>{S({name:"AbortError",message:A||"Aborted"})},l.signal.addEventListener("abort",m)});s(i(f,u,n?.getPendingMeta?.({requestId:f,arg:u},{getState:d,extra:p}))),b=await Promise.race([I,Promise.resolve(r(u,{dispatch:s,getState:d,extra:p,requestId:f,signal:l.signal,abort:v,rejectWithValue:(w,S)=>new ta(w,S),fulfillWithValue:(w,S)=>new Ic(w,S)})).then(w=>{if(w instanceof ta)throw w;return w instanceof Ic?o(w.payload,f,u,w.meta):o(w,f,u)})])}catch(y){b=y instanceof ta?a(null,f,u,y.payload,y.meta):a(y,f,u)}finally{m&&l.signal.removeEventListener("abort",m)}return n&&!n.dispatchConditionRejection&&a.match(b)&&b.meta.condition||s(b),b}();return Object.assign(h,{abort:v,requestId:f,arg:u,unwrap(){return h.then(gm)}})}}return Object.assign(c,{pending:i,rejected:a,fulfilled:o,settled:We(a,o),typePrefix:t})}return e.withTypes=()=>e,e})();function gm(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function hm(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Dc=Symbol.for("rtk-slice-createasyncthunk"),IA={[Dc]:K};function ym(e,t){return`${e}/${t}`}function Sm({creators:e}={}){let t=e?.asyncThunk?.[Dc];return function(n){let{name:o,reducerPath:i=o}=n;if(!o)throw new Error(Ve(11));typeof process<"u";let a=(typeof n.reducers=="function"?n.reducers(Cm()):n.reducers)||{},c=Object.keys(a),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(b,g){let y=typeof b=="string"?b:b.type;if(!y)throw new Error(Ve(12));if(y in u.sliceCaseReducersByType)throw new Error(Ve(13));return u.sliceCaseReducersByType[y]=g,s},addMatcher(b,g){return u.sliceMatchers.push({matcher:b,reducer:g}),s},exposeAction(b,g){return u.actionCreators[b]=g,s},exposeCaseReducer(b,g){return u.sliceCaseReducersByName[b]=g,s}};c.forEach(b=>{let g=a[b],y={reducerName:b,type:ym(o,b),createNotation:typeof n.reducers=="function"};bm(g)?xm(y,g,s,t):Am(y,g,s)});function d(){let[b={},g=[],y=void 0]=typeof n.extraReducers=="function"?kc(n.extraReducers):[n.extraReducers],I={...b,...u.sliceCaseReducersByType};return re(n.initialState,w=>{for(let S in I)w.addCase(S,I[S]);for(let S of u.sliceMatchers)w.addMatcher(S.matcher,S.reducer);for(let S of g)w.addMatcher(S.matcher,S.reducer);y&&w.addDefaultCase(y)})}let p=b=>b,f=new Map,l;function m(b,g){return l||(l=d()),l(b,g)}function A(){return l||(l=d()),l.getInitialState()}function v(b,g=!1){function y(w){let S=w[b];return typeof S>"u"&&g&&(S=A()),S}function I(w=p){let S=Ec(f,g,()=>new WeakMap);return Ec(S,w,()=>{let C={};for(let[x,F]of Object.entries(n.selectors??{}))C[x]=vm(F,w,A,g);return C})}return{reducerPath:b,getSelectors:I,get selectors(){return I(y)},selectSlice:y}}let h={name:o,reducer:m,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:A,...v(i),injectInto(b,{reducerPath:g,...y}={}){let I=g??i;return b.inject({reducerPath:I,reducer:m},y),{...h,...v(I,!0)}}};return h}}function vm(e,t,r,n){function o(i,...a){let c=t(i);return typeof c>"u"&&n&&(c=r()),e(c,...a)}return o.unwrapped=e,o}var Wt=Sm();function Cm(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function Am({type:e,reducerName:t,createNotation:r},n,o){let i,a;if("reducer"in n){if(r&&!wm(n))throw new Error(Ve(17));i=n.reducer,a=n.prepare}else i=n;o.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,a?R(e,a):R(e))}function bm(e){return e._reducerDefinitionType==="asyncThunk"}function wm(e){return e._reducerDefinitionType==="reducerWithPrepare"}function xm({type:e,reducerName:t},r,n,o){if(!o)throw new Error(Ve(18));let{payloadCreator:i,fulfilled:a,pending:c,rejected:u,settled:s,options:d}=r,p=o(e,i,d);n.exposeAction(t,p),a&&n.addCase(p.fulfilled,a),c&&n.addCase(p.pending,c),u&&n.addCase(p.rejected,u),s&&n.addMatcher(p.settled,s),n.exposeCaseReducer(t,{fulfilled:a||Yn,pending:c||Yn,rejected:u||Yn,settled:s||Yn})}function Yn(){}var Mc="listener",qc="completed",Nc="cancelled",FA=`task-${Nc}`,TA=`task-${qc}`,kA=`${Mc}-${Nc}`,OA=`${Mc}-${qc}`;var{assign:_c}=Object;var ra="listenerMiddleware";var Rm=_c(R(`${ra}/add`),{withTypes:()=>Rm}),DA=R(`${ra}/removeAll`),Em=_c(R(`${ra}/remove`),{withTypes:()=>Em});var MA=Symbol.for("rtk-state-proxy-original");function Ve(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Re=require("@coveo/bueno"),U=new Re.StringValue({required:!0,emptyAllowed:!1}),le=new Re.StringValue({required:!1,emptyAllowed:!1}),me=new Re.StringValue({required:!0,emptyAllowed:!0}),BA=new Re.StringValue({required:!1,emptyAllowed:!0}),to=new Re.ArrayValue({each:U,required:!0}),Vc=new Re.StringValue({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),ot=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),Me=(e,t)=>{if("required"in t)return{payload:new Re.Schema({value:t}).validate({value:e}).value};let o=new Re.RecordValue({options:{required:!0},values:t}).validate(e);if(o)throw new Re.SchemaValidationError(o);return{payload:e}},M=(e,t)=>{try{return Me(e,t)}catch(r){return{payload:e,error:ot(r)}}},Uc=(e,t,r,n)=>{let o=`Check the initialState of ${n}`;return jc(e,t,r,o,"Controller initialization error")},Lc=(e,t,r,n)=>{let o=`Check the options of ${n}`;return jc(e,t,r,o,"Controller initialization error")},jc=(e,t,r,n,o)=>{try{return t.validate(r,n)}catch(i){throw e.logger.error(i,o),i}};var lr="3.19.1",Bc=["@coveo/atomic","@coveo/quantic"];var na=()=>le,Qc=()=>U,yt=R("configuration/updateBasicConfiguration",e=>M(e,{accessToken:le,environment:new Ce.StringValue({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:le})),Ge=R("configuration/updateSearchConfiguration",e=>M(e,{proxyBaseUrl:new Ce.StringValue({required:!1,url:!0}),pipeline:new Ce.StringValue({required:!1,emptyAllowed:!0}),searchHub:le,timezone:le,locale:le,authenticationProviders:new Ce.ArrayValue({required:!1,each:U})})),Pm={enabled:new Ce.BooleanValue({default:!0}),originContext:na(),originLevel2:na(),originLevel3:na(),proxyBaseUrl:new Ce.StringValue({required:!1,url:!0}),runtimeEnvironment:new Ce.Value,anonymous:new Ce.BooleanValue({default:!1}),deviceId:le,userDisplayName:le,documentLocation:le,trackingId:le,analyticsMode:new Ce.StringValue({constrainTo:["legacy","next"],required:!1,default:"next"}),source:new Ce.RecordValue({options:{required:!1},values:Bc.reduce((e,t)=>(e[t]=Vc,e),{})})},dr=R("configuration/updateAnalyticsConfiguration",e=>M(e,Pm)),pr=R("configuration/analytics/disable"),fr=R("configuration/analytics/enable"),ro=R("configuration/analytics/originlevel2",e=>M(e,{originLevel2:Qc()})),no=R("configuration/analytics/originlevel3",e=>M(e,{originLevel3:Qc()}));var ie=require("@coveo/bueno"),$c={q:new ie.StringValue,enableQuerySyntax:new ie.BooleanValue,aq:new ie.StringValue,cq:new ie.StringValue,firstResult:new ie.NumberValue({min:0}),numberOfResults:new ie.NumberValue({min:0}),sortCriteria:new ie.StringValue,f:new ie.RecordValue,fExcluded:new ie.RecordValue,cf:new ie.RecordValue,nf:new ie.RecordValue,mnf:new ie.RecordValue,df:new ie.RecordValue,debug:new ie.BooleanValue,sf:new ie.RecordValue,tab:new ie.StringValue,af:new ie.RecordValue};var St=R("searchParameters/restore",e=>M(e,$c));var oo=R("debug/enable"),io=R("debug/disable");var ao=()=>!1;var so=re(ao(),e=>{e.addCase(oo,()=>!0).addCase(io,()=>!1).addCase(St,(t,r)=>r.payload.debug??t)});var Hc=require("@coveo/bueno");var mr=R("pipeline/set",e=>M(e,new Hc.StringValue({required:!0,emptyAllowed:!0})));var Im=R("history/undo"),Fm=R("history/redo"),Ke=R("history/snapshot"),gb=K("history/back",async(e,{dispatch:t})=>{t(Im()),await t(Ee())}),hb=K("history/forward",async(e,{dispatch:t})=>{t(Fm()),await t(Ee())}),Ee=K("history/change",async(e,{getState:t})=>t().history.present);var gr=()=>"";var hr=re(gr(),e=>{e.addCase(mr,(t,r)=>r.payload).addCase(Ee.fulfilled,(t,r)=>r.payload?.pipeline??t).addCase(Ge,(t,r)=>r.payload.pipeline||t)});function it(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function E(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function c(d){try{s(n.next(d))}catch(p){a(p)}}function u(d){try{s(n.throw(d))}catch(p){a(p)}}function s(d){d.done?i(d.value):o(d.value).then(c,u)}s((n=n.apply(e,t||[])).next())})}var z;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(z||(z={}));function aa(){return typeof window<"u"}function va(){return typeof navigator<"u"}function yr(){return typeof document<"u"}function sa(){try{return typeof localStorage<"u"}catch{return!1}}function Tm(){try{return typeof sessionStorage<"u"}catch{return!1}}function iu(){return va()&&navigator.cookieEnabled}var km=[z.click,z.custom,z.search,z.view],Om=(e,t)=>km.indexOf(e)!==-1?Object.assign({language:yr()?document.documentElement.lang:"unknown",userAgent:va()?navigator.userAgent:"unknown"},t):t,pn=class e{static set(t,r,n){var o,i,a,c;n&&(i=new Date,i.setTime(i.getTime()+n)),c=window.location.hostname,c.indexOf(".")===-1?zc(t,r,i):(a=c.split("."),o=a[a.length-2]+"."+a[a.length-1],zc(t,r,i,o))}static get(t){for(var r=t+"=",n=document.cookie.split(";"),o=0;o<n.length;o++){var i=n[o];if(i=i.replace(/^\s+/,""),i.lastIndexOf(r,0)===0)return i.substring(r.length,i.length)}return null}static erase(t){e.set(t,"",-1)}};function zc(e,t,r,n){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(n?`;domain=${n}`:"")+";path=/;SameSite=Lax"}function Dm(){return sa()?localStorage:iu()?new fn:Tm()?sessionStorage:new vr}var fn=class e{getItem(t){return pn.get(`${e.prefix}${t}`)}removeItem(t){pn.erase(`${e.prefix}${t}`)}setItem(t,r,n){pn.set(`${e.prefix}${t}`,r,n)}};fn.prefix="coveo_";var ca=class{constructor(){this.cookieStorage=new fn}getItem(t){return localStorage.getItem(t)||this.cookieStorage.getItem(t)}removeItem(t){this.cookieStorage.removeItem(t),localStorage.removeItem(t)}setItem(t,r){localStorage.setItem(t,r),this.cookieStorage.setItem(t,r,31556926e3)}},vr=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},ln="__coveo.analytics.history",au=20,su=1e3*60,cu=75,Cr=class{constructor(t){this.store=t||Dm()}addElement(t){t.internalTime=new Date().getTime(),t=this.cropQueryElement(this.stripEmptyQuery(t));let r=this.getHistoryWithInternalTime();r!=null?this.isValidEntry(t)&&this.setHistory([t].concat(r)):this.setHistory([t])}addElementAsync(t){return E(this,void 0,void 0,function*(){t.internalTime=new Date().getTime(),t=this.cropQueryElement(this.stripEmptyQuery(t));let r=yield this.getHistoryWithInternalTimeAsync();r!=null?this.isValidEntry(t)&&this.setHistory([t].concat(r)):this.setHistory([t])})}getHistory(){let t=this.getHistoryWithInternalTime();return this.stripEmptyQueries(this.stripInternalTime(t))}getHistoryAsync(){return E(this,void 0,void 0,function*(){let t=yield this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(t))})}getHistoryWithInternalTime(){try{let t=this.store.getItem(ln);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){return E(this,void 0,void 0,function*(){try{let t=yield this.store.getItem(ln);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(ln,JSON.stringify(t.slice(0,au)))}catch{}}clear(){try{this.store.removeItem(ln)}catch{}}getMostRecentElement(){let t=this.getHistoryWithInternalTime();return Array.isArray(t)?t.sort((n,o)=>(o.internalTime||0)-(n.internalTime||0))[0]:null}cropQueryElement(t){return t.name&&t.value&&t.name.toLowerCase()==="query"&&(t.value=t.value.slice(0,cu)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>su:!0}stripInternalTime(t){return Array.isArray(t)?t.map(r=>{let{name:n,time:o,value:i}=r;return{name:n,time:o,value:i}}):[]}stripEmptyQuery(t){let{name:r,time:n,value:o}=t;return r&&typeof o=="string"&&r.toLowerCase()==="query"&&o.trim()===""?{name:r,time:n}:t}stripEmptyQueries(t){return t.map(r=>this.stripEmptyQuery(r))}},uu=Object.freeze({__proto__:null,HistoryStore:Cr,MAX_NUMBER_OF_HISTORY_ELEMENTS:au,MAX_VALUE_SIZE:cu,MIN_THRESHOLD_FOR_DUPLICATE_VALUE:su,STORE_KEY:ln,default:Cr}),Mm=(e,t)=>E(void 0,void 0,void 0,function*(){return e===z.view?(yield qm(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),qm=e=>E(void 0,void 0,void 0,function*(){let t=new Cr,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),co,Nm=new Uint8Array(16);function _m(){if(!co&&(co=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!co))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return co(Nm)}var Vm=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function lo(e){return typeof e=="string"&&Vm.test(e)}var ge=[];for(let e=0;e<256;++e)ge.push((e+256).toString(16).slice(1));function lu(e,t=0){return(ge[e[t+0]]+ge[e[t+1]]+ge[e[t+2]]+ge[e[t+3]]+"-"+ge[e[t+4]]+ge[e[t+5]]+"-"+ge[e[t+6]]+ge[e[t+7]]+"-"+ge[e[t+8]]+ge[e[t+9]]+"-"+ge[e[t+10]]+ge[e[t+11]]+ge[e[t+12]]+ge[e[t+13]]+ge[e[t+14]]+ge[e[t+15]]).toLowerCase()}function Um(e){if(!lo(e))throw TypeError("Invalid UUID");let t,r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=t&255,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=t&255,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=t&255,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=t&255,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=t&255,r}function Lm(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var jm="6ba7b810-9dad-11d1-80b4-00c04fd430c8",Bm="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function Qm(e,t,r){function n(o,i,a,c){var u;if(typeof o=="string"&&(o=Lm(o)),typeof i=="string"&&(i=Um(i)),((u=i)===null||u===void 0?void 0:u.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let s=new Uint8Array(16+o.length);if(s.set(i),s.set(o,i.length),s=r(s),s[6]=s[6]&15|t,s[8]=s[8]&63|128,a){c=c||0;for(let d=0;d<16;++d)a[c+d]=s[d];return a}return lu(s)}try{n.name=e}catch{}return n.DNS=jm,n.URL=Bm,n}var $m=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Wc={randomUUID:$m};function Gt(e,t,r){if(Wc.randomUUID&&!t&&!e)return Wc.randomUUID();e=e||{};let n=e.random||(e.rng||_m)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){r=r||0;for(let o=0;o<16;++o)t[r+o]=n[o];return t}return lu(n)}function Hm(e,t,r,n){switch(e){case 0:return t&r^~t&n;case 1:return t^r^n;case 2:return t&r^t&n^r&n;case 3:return t^r^n}}function oa(e,t){return e<<t|e>>>32-t}function zm(e){let t=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof e=="string"){let a=unescape(encodeURIComponent(e));e=[];for(let c=0;c<a.length;++c)e.push(a.charCodeAt(c))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);let n=e.length/4+2,o=Math.ceil(n/16),i=new Array(o);for(let a=0;a<o;++a){let c=new Uint32Array(16);for(let u=0;u<16;++u)c[u]=e[a*64+u*4]<<24|e[a*64+u*4+1]<<16|e[a*64+u*4+2]<<8|e[a*64+u*4+3];i[a]=c}i[o-1][14]=(e.length-1)*8/Math.pow(2,32),i[o-1][14]=Math.floor(i[o-1][14]),i[o-1][15]=(e.length-1)*8&4294967295;for(let a=0;a<o;++a){let c=new Uint32Array(80);for(let l=0;l<16;++l)c[l]=i[a][l];for(let l=16;l<80;++l)c[l]=oa(c[l-3]^c[l-8]^c[l-14]^c[l-16],1);let u=r[0],s=r[1],d=r[2],p=r[3],f=r[4];for(let l=0;l<80;++l){let m=Math.floor(l/20),A=oa(u,5)+Hm(m,s,d,p)+f+t[m]+c[l]>>>0;f=p,p=d,d=oa(s,30)>>>0,s=u,u=A}r[0]=r[0]+u>>>0,r[1]=r[1]+s>>>0,r[2]=r[2]+d>>>0,r[3]=r[3]+p>>>0,r[4]=r[4]+f>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}var Wm=Qm("v5",80,zm),Gc=Wm,du="2.30.44",Kc=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,dn={pageview:"pageview",event:"event"},po=class{constructor({client:t,uuidGenerator:r=Gt}){this.client=t,this.uuidGenerator=r}},ua=class extends po{constructor({client:t,uuidGenerator:r=Gt}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=Kc(window.location),this.lastReferrer=yr()?document.referrer:"",this.addHooks()}getApi(t){switch(t){case"setAction":return this.setAction;default:return null}}setAction(t,r){this.action=t,this.actionData=r}clearData(){this.clearPluginData(),this.action=void 0,this.actionData={}}getLocationInformation(t,r){return Object.assign({hitType:t},this.getNextValues(t,r))}updateLocationInformation(t,r){this.updateLocationForNextPageView(t,r)}getDefaultContextInformation(t){let r={title:yr()?document.title:"",encoding:yr()?document.characterSet:"UTF-8"},n={screenResolution:`${screen.width}x${screen.height}`,screenColor:`${screen.colorDepth}-bit`},o={language:navigator.language,userAgent:navigator.userAgent},i={time:Date.now(),eventId:this.uuidGenerator()};return Object.assign(Object.assign(Object.assign(Object.assign({},i),n),o),r)}updateLocationForNextPageView(t,r){let{pageViewId:n,referrer:o,location:i}=this.getNextValues(t,r);this.lastReferrer=o,this.pageViewId=n,this.currentLocation=i,t===dn.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===dn.pageview?this.nextPageViewId:this.pageViewId,referrer:t===dn.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===dn.pageview?this.getCurrentLocationFromPayload(r):this.currentLocation}}getCurrentLocationFromPayload(t){if(t.page){let r=o=>o.replace(/^\/?(.*)$/,"/$1");return`${(o=>o.split("/").slice(0,3).join("/"))(this.currentLocation)}${r(t.page)}`}else return Kc(window.location)}},vt=class e{constructor(t,r){if(!lo(t))throw Error("Not a valid uuid");this.clientId=t,this.creationDate=Math.floor(r/1e3)}toString(){return this.clientId.replace(/-/g,"")+"."+this.creationDate.toString()}get expired(){let t=Math.floor(Date.now()/1e3)-this.creationDate;return t<0||t>e.expirationTime}validate(t,r){return!this.expired&&this.matchReferrer(t,r)}matchReferrer(t,r){try{let n=new URL(t);return r.some(o=>new RegExp(o.replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*")+"$").test(n.host))}catch{return!1}}static fromString(t){let r=t.split(".");if(r.length!==2)return null;let[n,o]=r;if(n.length!==32||isNaN(parseInt(o)))return null;let i=n.substring(0,8)+"-"+n.substring(8,12)+"-"+n.substring(12,16)+"-"+n.substring(16,20)+"-"+n.substring(20,32);return lo(i)?new e(i,Number.parseInt(o)*1e3):null}};vt.cvo_cid="cvo_cid";vt.expirationTime=120;var la=class extends po{constructor({client:t,uuidGenerator:r=Gt}){super({client:t,uuidGenerator:r})}getApi(t){switch(t){case"decorate":return this.decorate;case"acceptFrom":return this.acceptFrom;default:return null}}decorate(t){return E(this,void 0,void 0,function*(){if(!this.client.getCurrentVisitorId)throw new Error("Could not retrieve current clientId");try{let r=new URL(t),n=yield this.client.getCurrentVisitorId();return r.searchParams.set(vt.cvo_cid,new vt(n,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};la.Id="link";var qe=Object.keys;function uo(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var ia=128,pu=192,Yc=224,Jc=240;function Gm(e){return(e&248)===Jc?4:(e&Jc)===Yc?3:(e&Yc)===pu?2:1}function Km(e,t){if(t<0||e.length<=t)return e;let r=e.indexOf("%",t-2);for(r<0||r>t?r=t:t=r;r>2&&e.charAt(r-3)=="%";){let n=Number.parseInt(e.substring(r-2,r),16);if((n&ia)!=ia)break;if(r-=3,(n&pu)!=ia){t-r>=Gm(n)*3&&(r=t);break}}return e.substring(0,r)}var da={id:"svc_ticket_id",subject:"svc_ticket_subject",description:"svc_ticket_description",category:"svc_ticket_category",productId:"svc_ticket_product_id",custom:"svc_ticket_custom"},Ym=qe(da).map(e=>da[e]),Jm=[...Ym].join("|"),Xm=new RegExp(`^(${Jm}$)`),Zm={svcAction:"svc_action",svcActionData:"svc_action_data"},eg=e=>qe(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let n=da[r]||r;return Object.assign(Object.assign({},t),{[n]:e[r]})},{}),tg=e=>Xm.test(e),rg=[tg],Xc={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},Zc={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},ye={action:"pa",list:"pal",listSource:"pls"},fo={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},ng=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],pa={id:"quoteId",affiliation:"quoteAffiliation"},fa={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},og={add:ye,bookmark_add:ye,bookmark_remove:ye,click:ye,checkout:ye,checkout_option:ye,detail:ye,impression:ye,remove:ye,refund:Object.assign(Object.assign({},ye),fo),purchase:Object.assign(Object.assign({},ye),fo),quickview:ye,quote:Object.assign(Object.assign({},ye),pa),review:Object.assign(Object.assign({},ye),fa)},ig=qe(Xc).map(e=>Xc[e]),ag=qe(Zc).map(e=>Zc[e]),sg=qe(ye).map(e=>ye[e]),cg=qe(fo).map(e=>fo[e]),ug=qe(fa).map(e=>fa[e]),lg=qe(pa).map(e=>pa[e]),dg=[...ig,"custom"].join("|"),pg=[...ag,"custom"].join("|"),fu="(pr[0-9]+)",mu="(il[0-9]+pi[0-9]+)",fg=new RegExp(`^${fu}(${dg})$`),mg=new RegExp(`^(${mu}(${pg}))|(il[0-9]+nm)$`),gg=new RegExp(`^(${sg.join("|")})$`),hg=new RegExp(`^(${cg.join("|")})$`),yg=new RegExp(`^${fu}custom$`),Sg=new RegExp(`^${mu}custom$`),vg=new RegExp(`^(${[...ng,...ug,...lg].join("|")})$`),Cg=e=>fg.test(e),Ag=e=>mg.test(e),bg=e=>gg.test(e),wg=e=>hg.test(e),xg=e=>vg.test(e),Rg=[Ag,Cg,bg,wg,xg],Eg=[yg,Sg],Pg={anonymizeIp:"aip"},Ig={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},Fg={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},Tg=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],kg=Object.assign(Object.assign(Object.assign(Object.assign({},Pg),Ig),Fg),Tg.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),ma=Object.assign(Object.assign({},kg),Zm),Og=e=>{let t=!!e.action&&og[e.action]||{};return qe(e).reduce((r,n)=>{let o=t[n]||ma[n]||n;return Object.assign(Object.assign({},r),{[o]:e[n]})},{})},Dg=qe(ma).map(e=>ma[e]),Mg=e=>Dg.indexOf(e)!==-1,qg=e=>e==="custom",Ng=e=>[...Rg,...rg,Mg,qg].some(t=>t(e)),_g=e=>qe(e).reduce((t,r)=>{let n=Vg(r);return n?Object.assign(Object.assign({},t),Ug(n,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),Vg=e=>{let t;return[...Eg].every(r=>{var n;return t=(n=r.exec(e))===null||n===void 0?void 0:n[1],!t}),t},Ug=(e,t)=>qe(t).reduce((r,n)=>Object.assign(Object.assign({},r),{[`${e}${n}`]:t[n]}),{}),ga=class{constructor(t){this.opts=t}sendEvent(t,r){return E(this,void 0,void 0,function*(){if(!this.isAvailable())throw new Error('navigator.sendBeacon is not supported in this browser. Consider adding a polyfill like "sendbeacon-polyfill".');let{baseUrl:n,preprocessRequest:o}=this.opts,i=yield this.getQueryParamsForEventType(t),{url:a,payload:c}=yield this.preProcessRequestAsPotentialJSONString(`${n}/analytics/${t}?${i}`,r,o),u=this.encodeForEventType(t,c),s=new Blob([u],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(a,s)})}isAvailable(){return"sendBeacon"in navigator}deleteHttpCookieVisitorId(){return Promise.resolve()}preProcessRequestAsPotentialJSONString(t,r,n){return E(this,void 0,void 0,function*(){let o=t,i=r;if(n){let a=yield n({url:t,body:JSON.stringify(r)},"analyticsBeacon"),{url:c,body:u}=a;o=c||t;try{i=JSON.parse(u)}catch(s){console.error("Unable to process the request body as a JSON string",s)}}return{payload:i,url:o}})}encodeForEventType(t,r){return this.isEventTypeLegacy(t)?this.encodeEventToJson(t,r):this.encodeEventToJson(t,r,this.opts.token)}getQueryParamsForEventType(t){return E(this,void 0,void 0,function*(){let{token:r,visitorIdProvider:n}=this.opts,o=yield n.getCurrentVisitorId();return[r&&this.isEventTypeLegacy(t)?`access_token=${r}`:"",o?`visitorId=${o}`:"","discardVisitInfo=true"].filter(i=>!!i).join("&")})}isEventTypeLegacy(t){return[z.click,z.custom,z.search,z.view].indexOf(t)!==-1}encodeEventToJson(t,r,n){let o=`${t}Event=${encodeURIComponent(JSON.stringify(r))}`;return n&&(o=`access_token=${encodeURIComponent(n)}&${o}`),o}},ha=class{sendEvent(t,r){return E(this,void 0,void 0,function*(){return Promise.resolve()})}deleteHttpCookieVisitorId(){return E(this,void 0,void 0,function*(){return Promise.resolve()})}},eu=globalThis.fetch,mo=class{constructor(t){this.opts=t}sendEvent(t,r){return E(this,void 0,void 0,function*(){let{baseUrl:n,visitorIdProvider:o,preprocessRequest:i}=this.opts,a=this.shouldAppendVisitorId(t)?yield this.getVisitorIdParam():"",c={url:`${n}/analytics/${t}${a}`,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(r)},u=Object.assign(Object.assign({},c),i?yield i(c,"analyticsFetch"):{}),{url:s}=u,d=it(u,["url"]),p;try{p=yield eu(s,d)}catch(f){console.error("An error has occured when sending the event.",f);return}if(p.ok){let f=yield p.json();return f.visitorId&&o.setCurrentVisitorId(f.visitorId),f}else{try{p.json()}catch{}throw console.error(`An error has occured when sending the "${t}" event.`,p,r),new Error(`An error has occurred when sending the "${t}" event. Check the console logs for more details.`)}})}deleteHttpCookieVisitorId(){return E(this,void 0,void 0,function*(){let{baseUrl:t}=this.opts,r=`${t}/analytics/visit`;yield eu(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[z.click,z.custom,z.search,z.view].indexOf(t)!==-1}getVisitorIdParam(){return E(this,void 0,void 0,function*(){let{visitorIdProvider:t}=this.opts,r=yield t.getCurrentVisitorId();return r?`?visitor=${r}`:""})}getHeaders(){let{token:t}=this.opts;return Object.assign(Object.assign({},t?{Authorization:`Bearer ${t}`}:{}),{"Content-Type":"application/json"})}},ya=class{constructor(t,r){sa()&&iu()?this.storage=new ca:sa()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new vr),this.client=new mo(t),this.beaconClient=new ga(t),window.addEventListener("beforeunload",()=>{let n=r();for(let{eventType:o,payload:i}of n)this.beaconClient.sendEvent(o,i)})}getClientDependingOnEventType(t){return t==="click"&&this.beaconClient.isAvailable()?this.beaconClient:this.client}},Sa=class{constructor(t,r){this.storage=r||new vr,this.client=new mo(t)}getClientDependingOnEventType(t){return this.client}},go=class{constructor(){this.storage=new vr,this.client=new ha}getClientDependingOnEventType(t){return this.client}},Lg="xx",jg=e=>e?.startsWith(Lg)||!1,Bg=`
|
|
19
19
|
We've detected you're using React Native but have not provided the corresponding runtime,
|
|
20
20
|
for an optimal experience please use the "coveo.analytics/react-native" subpackage.
|
|
21
21
|
Follow the Readme on how to set it up: https://github.com/coveo/coveo.analytics.js#using-react-native
|