/*! * * Constructor.io JavaScript Client, version 2.55.0 * (c) 2015-2024 Constructor.io * --- * Constructor Search uses artificial intelligence to provide AI-first search, browse, and recommendations results that increase conversions and revenue. * - https://constructor.io * - https://github.com/Constructor-io/constructorio-client-javascript * --- * Includes code from the 'browserify/events' library, licensed under the MIT License. * For full license details, see the library documentation. * */ (()=>{var nt=typeof require!="undefined"?require:r=>{throw new Error('Dynamic require of "'+r+'" is not supported')};var yi=(r,t)=>()=>(r&&(t=r(r=0)),t);var N=(r,t)=>()=>(t||r((t={exports:{}}).exports,t),t.exports);var wi,U,E=yi(()=>{wi={BUNDLED:"true"},U={env:wi}});var X=N((pn,fe)=>{E();function bi(r){return r&&r.__esModule?r:{default:r}}fe.exports=bi,fe.exports.__esModule=!0,fe.exports.default=fe.exports});var $=N((yn,de)=>{E();function ki(r,t){if(!(r instanceof t))throw new TypeError("Cannot call a class as a function")}de.exports=ki,de.exports.__esModule=!0,de.exports.default=de.exports});var ee=N((wn,ve)=>{E();function st(r,t){for(var e=0;e{E();(function(){Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:function(e){"use strict";if(e==null)throw new TypeError("Cannot convert first argument to object");for(var i=Object(e),n=1;nc;c++){var a=o[c],u=Object.getOwnPropertyDescriptor(s,a);u!==void 0&&u.enumerable&&(i[a]=s[a])}}}return i}});function r(e){let i;try{i=window[e];let n="__storage_test__";return i.setItem(n,n),i.removeItem(n),!0}catch(n){return n instanceof DOMException&&n.name==="QuotaExceededError"&&i&&i.length!==0}}var t=function(e){var i={user_agent:null,persist:!0,cookie_name_client_id:"ConstructorioID_client_id",cookie_name_session_id:"ConstructorioID_session_id",cookie_name_session_data:"ConstructorioID_session",cookie_domain:null,cookie_secure:null,cookie_samesite:null,cookie_days_to_live:365,local_name_client_id:"_constructorio_search_client_id",local_name_session_id:"_constructorio_search_session_id",local_name_session_data:"_constructorio_search_session",on_node:typeof window=="undefined",session_is_new:null,new_to_beacon:null,client_id_storage_location:"cookie",session_id_storage_location:"local"};if(Object.assign(this,i,e),!this.client_id)if(!this.on_node&&this.persist){var n;this.client_id_storage_location==="cookie"&&(n=this.get_cookie(this.cookie_name_client_id),n&&(this.delete_cookie(this.cookie_name_client_id),this.set_cookie(this.cookie_name_client_id,n))),this.client_id_storage_location==="local"&&(n=this.get_local_object(this.local_name_client_id)),this.client_id=n||this.generate_client_id()}else this.client_id=this.generate_client_id();this.session_id||(!this.on_node&&this.persist?this.session_id=this.generate_session_id():this.session_id=1),this.on_node||(this.user_agent=this.user_agent||window&&window.navigator&&window.navigator.userAgent)};t.prototype.set_cookie=function(e,i){if(!this.on_node&&this.persist){var n=new Date(Date.now()+this.cookie_days_to_live*24*60*60*1e3),s=e+"="+i+"; expires="+n.toUTCString()+"; path=/";return this.cookie_domain&&(s+="; domain="+this.cookie_domain),this.cookie_secure&&(s+="; secure"),this.cookie_samesite&&(s+="; samesite="+this.cookie_samesite),document.cookie=s,s}return null},t.prototype.get_cookie=function(e){for(var i=e+"=",n=document.cookie.split(";"),s=0;sn-s?c=f:c=f+1),this.session_id=c,this.session_is_new=!(o&&f===c),o&&o.newToBeacon&&(this.new_to_beacon=!0);let a={sessionId:c,lastTime:n};return this.session_is_new&&(a.newToBeacon=!0),this.session_id_storage_location==="local"&&(this.set_local_object(this.local_name_session_id,c),this.set_local_object(this.local_name_session_data,a)),this.session_id_storage_location==="cookie"&&(this.cookie_domain&&(this.delete_cookie(this.cookie_name_session_id),this.delete_cookie(this.cookie_name_session_data)),this.set_cookie(this.cookie_name_session_id,c),this.set_cookie(this.cookie_name_session_data,JSON.stringify(a))),c},typeof Le!="undefined"&&typeof nt!="undefined"&&(Le.exports=t)})()});var he=N((kn,oe)=>{E();function Be(r){return oe.exports=Be=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},oe.exports.__esModule=!0,oe.exports.default=oe.exports,Be(r)}oe.exports=Be,oe.exports.__esModule=!0,oe.exports.default=oe.exports});var ct=N(Fe=>{E();var at;(function(r){typeof DO_NOT_EXPORT_CRC=="undefined"?typeof Fe=="object"?r(Fe):typeof define=="function"&&define.amd?define(function(){var t={};return r(t),t}):r(at={}):r(at={})})(function(r){r.version="1.2.2";function t(){for(var v=0,A=new Array(256),g=0;g!=256;++g)v=g,v=v&1?-306674912^v>>>1:v>>>1,v=v&1?-306674912^v>>>1:v>>>1,v=v&1?-306674912^v>>>1:v>>>1,v=v&1?-306674912^v>>>1:v>>>1,v=v&1?-306674912^v>>>1:v>>>1,v=v&1?-306674912^v>>>1:v>>>1,v=v&1?-306674912^v>>>1:v>>>1,v=v&1?-306674912^v>>>1:v>>>1,A[g]=v;return typeof Int32Array!="undefined"?new Int32Array(A):A}var e=t();function i(v){var A=0,g=0,k=0,C=typeof Int32Array!="undefined"?new Int32Array(4096):new Array(4096);for(k=0;k!=256;++k)C[k]=v[k];for(k=0;k!=256;++k)for(g=v[k],A=256+k;A<4096;A+=256)g=C[A]=g>>>8^v[g&255];var q=[];for(k=1;k!=16;++k)q[k-1]=typeof Int32Array!="undefined"?C.subarray(k*256,k*256+256):C.slice(k*256,k*256+256);return q}var n=i(e),s=n[0],o=n[1],c=n[2],f=n[3],a=n[4],u=n[5],l=n[6],d=n[7],_=n[8],y=n[9],h=n[10],p=n[11],S=n[12],b=n[13],w=n[14];function O(v,A){for(var g=A^-1,k=0,C=v.length;k>>8^e[(g^v.charCodeAt(k++))&255];return~g}function R(v,A){for(var g=A^-1,k=v.length-15,C=0;C>8&255]^S[v[C++]^g>>16&255]^p[v[C++]^g>>>24]^h[v[C++]]^y[v[C++]]^_[v[C++]]^d[v[C++]]^l[v[C++]]^u[v[C++]]^a[v[C++]]^f[v[C++]]^c[v[C++]]^o[v[C++]]^s[v[C++]]^e[v[C++]];for(k+=15;C>>8^e[(g^v[C++])&255];return~g}function m(v,A){for(var g=A^-1,k=0,C=v.length,q=0,B=0;k>>8^e[(g^q)&255]:q<2048?(g=g>>>8^e[(g^(192|q>>6&31))&255],g=g>>>8^e[(g^(128|q&63))&255]):q>=55296&&q<57344?(q=(q&1023)+64,B=v.charCodeAt(k++)&1023,g=g>>>8^e[(g^(240|q>>8&7))&255],g=g>>>8^e[(g^(128|q>>2&63))&255],g=g>>>8^e[(g^(128|B>>6&15|(q&3)<<4))&255],g=g>>>8^e[(g^(128|B&63))&255]):(g=g>>>8^e[(g^(224|q>>12&15))&255],g=g>>>8^e[(g^(128|q>>6&63))&255],g=g>>>8^e[(g^(128|q&63))&255]);return~g}r.table=e,r.bstr=O,r.buf=R,r.str=m})});var Se=N((qn,lt)=>{E();"use strict";function te(r){var t;try{t=window[r];var e="__storage_test__";return t.setItem(e,e),t.removeItem(e),!0}catch(i){return i instanceof DOMException&&i.name==="QuotaExceededError"&&t&&t.length!==0}}var qi={overflow:{},get:function(t){var e=this.overflow[t];if(e)return e;if(!te("sessionStorage")||typeof sessionStorage=="undefined")return null;var i=sessionStorage.getItem(t);if(i)try{return JSON.parse(i)}catch(n){return i}return null},set:function(t,e){try{sessionStorage.setItem(t,JSON.stringify(e))}catch(i){this.overflow[t]=e}},remove:function(t){var e;(e=this.overflow)!==null&&e!==void 0&&e[t]&&delete this.overflow[t],(te("sessionStorage")||typeof sessionStorage!="undefined")&&sessionStorage.removeItem(t)},key:function(t){var e,i;if(!te("sessionStorage")||typeof sessionStorage=="undefined"){var n;return(n=Object.keys(this.overflow))===null||n===void 0?void 0:n[t]}var s=(e=sessionStorage)===null||e===void 0?void 0:e.key(t),o=((i=sessionStorage)===null||i===void 0?void 0:i.length)||0;if(t>=o){var c,f=t-o;return(c=Object.keys(this.overflow))===null||c===void 0?void 0:c[f]}return s},length:function(){var t=Object.keys(this.overflow).length;return!te("sessionStorage")||typeof sessionStorage=="undefined"?t:sessionStorage.length+t},clear:function(){this.overflow={},(te("sessionStorage")||typeof sessionStorage!="undefined")&&sessionStorage.clear()}},Si={overflow:{},get:function(t){var e=this.overflow[t];if(e)return e;if(!te("localStorage")||typeof localStorage=="undefined")return null;var i=localStorage.getItem(t);if(i)try{return JSON.parse(i)}catch(n){return i}return null},set:function(t,e){try{localStorage.setItem(t,JSON.stringify(e))}catch(i){this.overflow[t]=e}},remove:function(t){var e;(e=this.overflow)!==null&&e!==void 0&&e[t]&&delete this.overflow[t],(te("localStorage")||typeof localStorage!="undefined")&&localStorage.removeItem(t)},key:function(t){var e,i;if(!te("localStorage")||typeof localStorage=="undefined"){var n;return(n=Object.keys(this.overflow))===null||n===void 0?void 0:n[t]}var s=(e=localStorage)===null||e===void 0?void 0:e.key(t),o=((i=localStorage)===null||i===void 0?void 0:i.length)||0;if(t>=o){var c,f=t-o;return(c=Object.keys(this.overflow))===null||c===void 0?void 0:c[f]}return s},length:function(){var t=Object.keys(this.overflow).length;return!te("localStorage")||typeof localStorage=="undefined"?t:localStorage.length+t},clear:function(){this.overflow={},(te("localStorage")||typeof localStorage!="undefined")&&localStorage.clear()}},Ei={local:Si,session:qi,canUseStorage:te};lt.exports=Ei});var Z=N((Sn,vt)=>{E();"use strict";var Ci=X(),ft=Ci(he()),dt=ct(),ze=Se(),je="_constructorio_purchase_order_ids",Ri=[{pattern:/[\w\-+\\.]+@([\w-]+\.)+[\w-]{2,4}/,replaceWith:""},{pattern:/^(?:\+\d{11,12}|\+\d{1,3}\s\d{3}\s\d{3}\s\d{3,4}|\(\d{3}\)\d{7}|\(\d{3}\)\s\d{3}\s\d{4}|\(\d{3}\)\d{3}-\d{4}|\(\d{3}\)\s\d{3}-\d{4})$/,replaceWith:""},{pattern:/^(?:4[0-9]{15}|(?:5[1-5][0-9]{2}|222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|6(?:011|5[0-9]{2})[0-9]{12}|(?:2131|1800|35\d{3})\d{11})$/,replaceWith:""}],W={trimNonBreakingSpaces:function(t){return t.replace(/\s/g," ").trim()},encodeURIComponentRFC3986:function(t){return encodeURIComponent(t).replace(/[!'()*]/g,function(e){return"%".concat(e.charCodeAt(0).toString(16).toUpperCase())})},cleanParams:function(t){var e={};return Object.keys(t).forEach(function(i){var n=t[i];typeof n=="string"?e[i]=W.trimNonBreakingSpaces(n):e[i]=n}),e},throwHttpErrorFromResponse:function(t,e){return e.json().then(function(i){throw t.message=i.message,t.status=e.status,t.statusText=e.statusText,t.url=e.url,t.headers=e.headers,t})},canUseDOM:function(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)},addEventListener:function(t,e,i){W.canUseDOM()&&window.addEventListener(t,e,i)},removeEventListener:function(t,e,i){W.canUseDOM()&&window.removeEventListener(t,e,i)},getNavigator:function(){return W.canUseDOM()?window.navigator:{userAgent:"",webdriver:!1}},isNil:function(t){return t==null},getWindowLocation:function(){return W.canUseDOM()?window.location:{}},dispatchEvent:function(t){W.canUseDOM()&&window.dispatchEvent(t)},createCustomEvent:function(t,e){if(W.canUseDOM())try{return new window.CustomEvent(t,{detail:e})}catch(n){var i=document.createEvent("CustomEvent");return i.initCustomEvent(t,!1,!1,e),i}return null},hasOrderIdRecord:function(t){var e=t.orderId,i=t.apiKey,n=e;i&&(n="".concat(i,"-").concat(e));var s=dt.str(n.toString()),o=ze.local.get(je);return typeof o=="string"&&(o=JSON.parse(o)),o&&o.includes(s)?!0:null},addOrderIdRecord:function(t){var e=t.orderId,i=t.apiKey,n=e;i&&(n="".concat(i,"-").concat(e));var s=dt.str(n.toString()),o=ze.local.get(je);if(typeof o=="string"&&(o=JSON.parse(o)),o){if(o.includes(s))return;o.length>=10&&(o=o.slice(-9)),o.push(s)}else o=[s];ze.local.set(je,o)},applyNetworkTimeout:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,n=t&&t.networkParameters&&t.networkParameters.timeout,s=e&&e.timeout,o=s||n;typeof o=="number"&&i&&setTimeout(function(){return i.abort()},o)},stringify:function(t,e,i){if(!t)return"";var n=[];return Object.keys(t).forEach(function(s){var o=t[s],c=W.encodeURIComponentRFC3986(s),f;if(o!=null){var a=e?"".concat(e,"%5B").concat(c,"%5D"):c;Array.isArray(o)?f=W.stringify(o,a,"array"):(0,ft.default)(o)==="object"?f=W.stringify(o,a,"object"):i==="object"?f="".concat(a,"=").concat(W.encodeURIComponentRFC3986(o)):f="".concat(e||c,"=").concat(W.encodeURIComponentRFC3986(o)),n.push(f)}}),n.join("&")},toSnakeCase:function(t){return t.replace(/[A-Z]/g,function(e){return"_".concat(e.toLowerCase())})},toSnakeCaseKeys:function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i={};return Object.keys(t).forEach(function(n){var s=W.toSnakeCase(n);i[s]=e&&(0,ft.default)(t[n])==="object"&&!Array.isArray(t[n])?W.toSnakeCaseKeys(t[n],e):t[n]}),i},containsPii:function(t,e){var i=t.toLowerCase();return e.test(i)},obfuscatePiiRequest:function(t){var e=t;try{var i,n,s,o=new URL(t),c=o==null||(i=o.pathname)===null||i===void 0?void 0:i.split("/"),f=o==null||(n=o.search)===null||n===void 0||(s=n.split("&"))===null||s===void 0?void 0:s.map(function(a){var u;return(u=a.split("="))===null||u===void 0?void 0:u[1]});Ri.forEach(function(a){var u=a.pattern,l=a.replaceWith;c.forEach(function(d){var _=decodeURIComponent(d);W.containsPii(_,u)&&(e=e.replaceAll(d,l))}),f.forEach(function(d){var _=decodeURIComponent(d);W.containsPii(_,u)&&(e=e.replaceAll(_,l))})})}catch(a){}return e},convertResponseToJson:function(t){return t.ok?t.json().catch(function(){return t.text().then(function(e){throw new Error("Server responded with an invalid JSON object. Response code: ".concat(t.code,", Response: ").concat(e))})}):W.throwHttpErrorFromResponse(new Error,t)},addHTTPSToString:function(t){if(typeof t!="string")return null;var e=t.startsWith("https://"),i=t.startsWith("http://");if(!e&&i)return t.replace("http","https");if(!i&&!e){var n="https://".concat(t);return n}return t}};vt.exports=W});var ue=N((En,gt)=>{E();"use strict";var ht=X(),Ai=ht($()),Oi=ht(ee()),Ee=Z(),Ti=function(){function r(t){var e=this;(0,Ai.default)(this,r),this.events=[],this.enabled=!(t&&t.enabled===!1),this.waitForBeacon=!(t&&t.waitForBeacon===!1),this.active=this.enabled,this.waitForBeacon&&(this.active=!1,Ee.canUseDOM()&&(window.ConstructorioAutocomplete||window.ConstructorioBeacon||window.ConstructorioTracker)&&this.enabled&&(this.active=!0,this.dispatchEvents()),Ee.addEventListener("cio.beacon.loaded",function(){e.enabled&&(e.active=!0,e.dispatchEvents())}))}return(0,Oi.default)(r,[{key:"queue",value:function(e,i){this.events.push({name:e,data:i}),this.active&&this.dispatchEvents()}},{key:"dispatchEvents",value:function(){for(;this.events.length;){var e=this.events.shift(),i=e.name,n=e.data,s="cio.client.".concat(i);Ee.dispatchEvent(Ee.createCustomEvent(s,n))}}}]),r}();gt.exports=Ti});var wt=N((Cn,yt)=>{E();"use strict";var _t=X(),xi=_t($()),Ii=_t(ee()),Ui=ue(),ie=Z();function pt(r,t,e){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,n=e.apiKey,s=e.version,o=e.serviceUrl,c=e.sessionId,f=e.clientId,a=e.userId,u=e.segments,l=e.testCells,d={c:s};if(d.key=n,d.i=f,d.s=c,!r||typeof r!="string")throw new Error("query is a required parameter of type string");if(l&&Object.keys(l).forEach(function(q){d["ef-".concat(q)]=l[q]}),u&&u.length&&(d.us=u),a&&(d.ui=String(a)),t){var _=t.offset,y=t.page,h=t.resultsPerPage,p=t.filters,S=t.sortBy,b=t.sortOrder,w=t.section,O=t.fmtOptions,R=t.hiddenFields,m=t.hiddenFacets,v=t.variationsMap,A=t.qsParam,g=t.preFilterExpression;ie.isNil(_)||(d.offset=_),ie.isNil(y)||(d.page=y),ie.isNil(h)||(d.num_results_per_page=h),p&&(d.filters=p),S&&(d.sort_by=S),b&&(d.sort_order=b),w&&(d.section=w),O&&(d.fmt_options=O),R&&(d.fmt_options?d.fmt_options.hidden_fields=R:d.fmt_options={hidden_fields:R}),m&&(d.fmt_options?d.fmt_options.hidden_facets=m:d.fmt_options={hidden_facets:m}),v&&(d.variations_map=JSON.stringify(v)),g&&(d.pre_filter_expression=JSON.stringify(g)),A&&(d.qs=JSON.stringify(A))}d._dt=Date.now(),d=ie.cleanParams(d);var k=ie.stringify(d),C=i?"search/natural_language":"search";return"".concat(o,"/").concat(C,"/").concat(ie.encodeURIComponentRFC3986(ie.trimNonBreakingSpaces(r)),"?").concat(k)}var Ni=function(){function r(t){(0,xi.default)(this,r),this.options=t||{},this.eventDispatcher=new Ui(t.eventDispatcher)}return(0,Ii.default)(r,[{key:"getSearchResults",value:function(e,i){var n=this,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,c=this.options.fetch,f;if(typeof AbortController=="function"){var a=new AbortController;f=a&&a.signal,ie.applyNetworkTimeout(this.options,s,a)}try{o=pt(e,i,this.options)}catch(u){return Promise.reject(u)}return c(o,{signal:f}).then(ie.convertResponseToJson).then(function(u){if(u.response&&u.response.results)return u.result_id&&u.response.results.forEach(function(l){l.result_id=u.result_id}),n.eventDispatcher.queue("search.getSearchResults.completed",u),u;if(u.response&&u.response.redirect)return n.eventDispatcher.queue("search.getSearchResults.completed",u),u;throw new Error("getSearchResults response data is malformed")})}},{key:"getVoiceSearchResults",value:function(e,i){var n=this,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,c=this.options.fetch,f;if(typeof AbortController=="function"){var a=new AbortController;f=a&&a.signal,ie.applyNetworkTimeout(this.options,s,a)}try{var u=!0;o=pt(e,i,this.options,u)}catch(l){return Promise.reject(l)}return c(o,{signal:f}).then(ie.convertResponseToJson).then(function(l){if(l.response&&l.response.results)return l.result_id&&l.response.results.forEach(function(d){d.result_id=l.result_id}),n.eventDispatcher.queue("search.getVoiceSearchResults.completed",l),l;if(l.response&&l.response.redirect)return n.eventDispatcher.queue("search.getVoiceSearchResults.completed",l),l;throw new Error("getVoiceSearchResults response data is malformed")})}}]),r}();yt.exports=Ni});var Ce=N((Rn,ge)=>{E();function Di(r,t,e){return t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}ge.exports=Di,ge.exports.__esModule=!0,ge.exports.default=ge.exports});var mt=N((An,kt)=>{E();"use strict";var Pe=X(),Li=Pe($()),Bi=Pe(ee()),Fi=Pe(Ce());function bt(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);t&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(r,n).enumerable})),e.push.apply(e,i)}return e}function Re(r){for(var t=1;t3&&arguments[3]!==void 0?arguments[3]:{},c,f=this.options.fetch,a;if(typeof AbortController=="function"){var u=new AbortController;a=u&&u.signal,P.applyNetworkTimeout(this.options,o,u)}try{c=ji(e,i,n,this.options)}catch(l){return Promise.reject(l)}return f(c,{signal:a}).then(P.convertResponseToJson).then(function(l){if(l.response&&l.response.results)return l.result_id&&l.response.results.forEach(function(d){d.result_id=l.result_id}),s.eventDispatcher.queue("browse.getBrowseResults.completed",l),l;throw new Error("getBrowseResults response data is malformed")})}},{key:"getBrowseResultsForItemIds",value:function(e,i){var n=this,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,c=this.options.fetch,f;if(typeof AbortController=="function"){var a=new AbortController;f=a&&a.signal,P.applyNetworkTimeout(this.options,s,a)}try{o=Pi(e,i,this.options)}catch(u){return Promise.reject(u)}return c(o,{signal:f}).then(P.convertResponseToJson).then(function(u){if(u.response&&u.response.results)return u.result_id&&u.response.results.forEach(function(l){l.result_id=u.result_id}),n.eventDispatcher.queue("browse.getBrowseResultsForItemIds.completed",u),u;throw new Error("getBrowseResultsForItemIds response data is malformed")})}},{key:"getBrowseGroups",value:function(e){var i=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=this.options.fetch,o=this.options.serviceUrl,c=_e(e,this.options),f;if(typeof AbortController=="function"){var a=new AbortController;f=a&&a.signal,P.applyNetworkTimeout(this.options,n,a)}delete c._dt;var u=P.stringify(c),l="".concat(o,"/browse/groups?").concat(u);return s(l,{signal:f}).then(P.convertResponseToJson).then(function(d){if(d.response&&d.response.groups)return i.eventDispatcher.queue("browse.getBrowseGroups.completed",d),d;throw new Error("getBrowseGroups response data is malformed")})}},{key:"getBrowseFacets",value:function(e,i){var n=this,s,o=this.options.fetch,c;if(typeof AbortController=="function"){var f=new AbortController;c=f&&f.signal,P.applyNetworkTimeout(this.options,i,f)}try{s=Mi(e,this.options)}catch(a){return Promise.reject(a)}return o(s,{signal:c}).then(P.convertResponseToJson).then(function(a){if(a.response&&a.response.facets)return n.eventDispatcher.queue("browse.getBrowseFacets.completed",a),a;throw new Error("getBrowseFacets response data is malformed")})}},{key:"getBrowseFacetOptions",value:function(e){var i=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,c=this.options.fetch,f;if(typeof AbortController=="function"){var a=new AbortController;f=a&&a.signal,P.applyNetworkTimeout(this.options,s,a)}try{o=Ji(e,n,this.options)}catch(u){return Promise.reject(u)}return c(o,{signal:f}).then(P.convertResponseToJson).then(function(u){if(u.response&&u.response.facets)return i.eventDispatcher.queue("browse.getBrowseFacetOptions.completed",u),u;throw new Error("getBrowseFacetOptions response data is malformed")})}}]),r}();kt.exports=Gi});var Et=N((On,St)=>{E();"use strict";var qt=X(),Ki=qt($()),Hi=qt(ee()),Wi=ue(),ce=Z(),Vi=ce.convertResponseToJson,Qi=ce.cleanParams,Yi=ce.applyNetworkTimeout,Xi=ce.trimNonBreakingSpaces,Zi=ce.encodeURIComponentRFC3986,$i=ce.stringify;function er(r,t,e){var i=e.apiKey,n=e.version,s=e.serviceUrl,o=e.sessionId,c=e.clientId,f=e.userId,a=e.segments,u=e.testCells,l={c:n};if(l.key=i,l.i=c,l.s=o,!r||typeof r!="string")throw new Error("query is a required parameter of type string");if(u&&Object.keys(u).forEach(function(m){l["ef-".concat(m)]=u[m]}),a&&a.length&&(l.us=a),f&&(l.ui=String(f)),t){var d=t.numResults,_=t.resultsPerSection,y=t.filters,h=t.filtersPerSection,p=t.hiddenFields,S=t.variationsMap,b=t.preFilterExpression,w=t.qsParam;d&&(l.num_results=d),_&&Object.keys(_).forEach(function(m){l["num_results_".concat(m)]=_[m]}),y&&(l.filters=y),h&&Object.keys(h).forEach(function(m){l["filters[".concat(m,"]")]=h[m]}),b&&(l.pre_filter_expression=JSON.stringify(b)),p&&(l.fmt_options?l.fmt_options.hidden_fields=p:l.fmt_options={hidden_fields:p}),S&&(l.variations_map=JSON.stringify(S)),w&&(l.qs=JSON.stringify(w))}l._dt=Date.now(),l=Qi(l);var O=$i(l),R=r.replace(/^\//,"|");return"".concat(s,"/autocomplete/").concat(Zi(Xi(R)),"?").concat(O)}var tr=function(){function r(t){(0,Ki.default)(this,r),this.options=t||{},this.eventDispatcher=new Wi(t.eventDispatcher)}return(0,Hi.default)(r,[{key:"getAutocompleteResults",value:function(e,i){var n=this,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,c=this.options.fetch,f;if(typeof AbortController=="function"){var a=new AbortController;f=a&&a.signal,Yi(this.options,s,a)}try{o=er(e,i,this.options)}catch(u){return Promise.reject(u)}return c(o,{signal:f}).then(Vi).then(function(u){if(u.sections){if(u.result_id){var l=Object.keys(u.sections);l.forEach(function(d){var _=u.sections[d];_.length&&_.forEach(function(y){y.result_id=u.result_id})})}return n.eventDispatcher.queue("autocomplete.getAutocompleteResults.completed",u),u}throw new Error("getAutocompleteResults response data is malformed")})}}]),r}();St.exports=tr});var At=N((Tn,Rt)=>{E();"use strict";var Ct=X(),ir=Ct($()),rr=Ct(ee()),nr=ue(),ae=Z();function or(r,t,e){var i=e.apiKey,n=e.version,s=e.serviceUrl,o=e.sessionId,c=e.userId,f=e.clientId,a=e.segments,u={c:n};if(u.key=i,u.i=f,u.s=o,!r||typeof r!="string")throw new Error("podId is a required parameter of type string");if(a&&a.length&&(u.us=a),c&&(u.ui=String(c)),t){var l=t.numResults,d=t.itemIds,_=t.section,y=t.term,h=t.filters,p=t.variationsMap,S=t.hiddenFields,b=t.preFilterExpression;ae.isNil(l)||(u.num_results=l),d&&(u.item_id=d),_&&(u.section=_),y&&(u.term=y),h&&(u.filters=h),S&&(u.fmt_options?u.fmt_options.hidden_fields=S:u.fmt_options={hidden_fields:S}),p&&(u.variations_map=JSON.stringify(p)),b&&(u.pre_filter_expression=JSON.stringify(b))}u=ae.cleanParams(u);var w=ae.stringify(u);return"".concat(s,"/recommendations/v1/pods/").concat(ae.encodeURIComponentRFC3986(ae.trimNonBreakingSpaces(r)),"?").concat(w)}var sr=function(){function r(t){(0,ir.default)(this,r),this.options=t||{},this.eventDispatcher=new nr(t.eventDispatcher)}return(0,rr.default)(r,[{key:"getRecommendations",value:function(e,i){var n=this,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,c=this.options.fetch,f;if(typeof AbortController=="function"){var a=new AbortController;f=a&&a.signal,ae.applyNetworkTimeout(this.options,s,a)}try{o=or(e,i,this.options)}catch(u){return Promise.reject(u)}return c(o,{signal:f}).then(ae.convertResponseToJson).then(function(u){if(u.response&&u.response.results)return u.result_id&&u.response.results.forEach(function(l){l.result_id=u.result_id}),n.eventDispatcher.queue("recommendations.getRecommendations.completed",u),u;throw new Error("getRecommendations response data is malformed")})}}]),r}();Rt.exports=sr});var zt=N((xn,Je)=>{E();"use strict";var ur=X(),Me=ur(he()),le=(typeof Reflect=="undefined"?"undefined":(0,Me.default)(Reflect))==="object"?Reflect:null,Ot=le&&typeof le.apply=="function"?le.apply:function(t,e,i){return Function.prototype.apply.call(t,e,i)},Ae;le&&typeof le.ownKeys=="function"?Ae=le.ownKeys:Object.getOwnPropertySymbols?Ae=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Ae=function(t){return Object.getOwnPropertyNames(t)};function ar(r){console&&console.warn&&console.warn(r)}var Tt=Number.isNaN||function(t){return t!==t};function L(){L.init.call(this)}Je.exports=L;Je.exports.once=dr;L.EventEmitter=L;L.prototype._events=void 0;L.prototype._eventsCount=0;L.prototype._maxListeners=void 0;var xt=10;function Oe(r){if(typeof r!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+(0,Me.default)(r))}Object.defineProperty(L,"defaultMaxListeners",{enumerable:!0,get:function(){return xt},set:function(t){if(typeof t!="number"||t<0||Tt(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");xt=t}});L.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};L.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||Tt(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function It(r){return r._maxListeners===void 0?L.defaultMaxListeners:r._maxListeners}L.prototype.getMaxListeners=function(){return It(this)};L.prototype.emit=function(t){for(var e=[],i=1;i0&&(o=e[0]),o instanceof Error)throw o;var c=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw c.context=o,c}var f=s[t];if(f===void 0)return!1;if(typeof f=="function")Ot(f,this,e);else for(var a=f.length,u=Bt(f,a),i=0;i0&&o.length>n&&!o.warned){o.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=r,c.type=t,c.count=o.length,ar(c)}return r}L.prototype.addListener=function(t,e){return Ut(this,t,e,!1)};L.prototype.on=L.prototype.addListener;L.prototype.prependListener=function(t,e){return Ut(this,t,e,!0)};function cr(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function Nt(r,t,e){var i={fired:!1,wrapFn:void 0,target:r,type:t,listener:e},n=cr.bind(i);return n.listener=e,i.wrapFn=n,n}L.prototype.once=function(t,e){return Oe(e),this.on(t,Nt(this,t,e)),this};L.prototype.prependOnceListener=function(t,e){return Oe(e),this.prependListener(t,Nt(this,t,e)),this};L.prototype.removeListener=function(t,e){var i,n,s,o,c;if(Oe(e),n=this._events,n===void 0)return this;if(i=n[t],i===void 0)return this;if(i===e||i.listener===e)--this._eventsCount==0?this._events=Object.create(null):(delete n[t],n.removeListener&&this.emit("removeListener",t,i.listener||e));else if(typeof i!="function"){for(s=-1,o=i.length-1;o>=0;o--)if(i[o]===e||i[o].listener===e){c=i[o].listener,s=o;break}if(s<0)return this;s===0?i.shift():lr(i,s),i.length===1&&(n[t]=i[0]),n.removeListener!==void 0&&this.emit("removeListener",t,c||e)}return this};L.prototype.off=L.prototype.removeListener;L.prototype.removeAllListeners=function(t){var e,i,n;if(i=this._events,i===void 0)return this;if(i.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):i[t]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete i[t]),this;if(arguments.length===0){var s=Object.keys(i),o;for(n=0;n=0;n--)this.removeListener(t,e[n]);return this};function Dt(r,t,e){var i=r._events;if(i===void 0)return[];var n=i[t];return n===void 0?[]:typeof n=="function"?e?[n.listener||n]:[n]:e?fr(n):Bt(n,n.length)}L.prototype.listeners=function(t){return Dt(this,t,!0)};L.prototype.rawListeners=function(t){return Dt(this,t,!1)};L.listenerCount=function(r,t){return typeof r.listenerCount=="function"?r.listenerCount(t):Lt.call(r,t)};L.prototype.listenerCount=Lt;function Lt(r){var t=this._events;if(t!==void 0){var e=t[r];if(typeof e=="function")return 1;if(e!==void 0)return e.length}return 0}L.prototype.eventNames=function(){return this._eventsCount>0?Ae(this._events):[]};function Bt(r,t){for(var e=new Array(t),i=0;i{E();"use strict";jt.exports=["Googlebot/","Googlebot-Mobile","Googlebot-Image","Googlebot-News","Googlebot-Video","AdsBot-Google([^-]|$)","AdsBot-Google-Mobile","Feedfetcher-Google","Mediapartners-Google","Mediapartners \\(Googlebot\\)","APIs-Google","bingbot","Slurp","[wW]get","curl","LinkedInBot","Python-urllib","python-requests","libwww","httpunit","nutch","Go-http-client","phpcrawl","msnbot","jyxobot","FAST-WebCrawler","FAST Enterprise Crawler","BIGLOTRON","Teoma","convera","seekbot","Gigabot","Gigablast","exabot","ia_archiver","GingerCrawler","webmon ","HTTrack","grub\\.org","UsineNouvelleCrawler","antibot","netresearchserver","speedy","fluffy","bibnum\\.bnf","findlink","msrbot","panscient","yacybot","AISearchBot","ips-agent","tagoobot","MJ12bot","woriobot","yanga","buzzbot","mlbot","YandexBot","yandex\\.com/bots","purebot","Linguee Bot","CyberPatrol","voilabot","Baiduspider","citeseerxbot","spbot","twengabot","postrank","turnitinbot","scribdbot","page2rss","sitebot","linkdex","Adidxbot","blekkobot","ezooms","dotbot","Mail\\.RU_Bot","discobot","heritrix","findthatfile","europarchive\\.org","NerdByNature\\.Bot","sistrix crawler","Ahrefs(Bot|SiteAudit)","fuelbot","CrunchBot","centurybot9","IndeedBot","mappydata","woobot","ZoominfoBot","PrivacyAwareBot","Multiviewbot","SWIMGBot","Grobbot","eright","Apercite","semanticbot","Aboundex","domaincrawler","wbsearchbot","summify","CCBot","edisterbot","seznambot","ec2linkfinder","gslfbot","aiHitBot","intelium_bot","facebookexternalhit","Yeti","RetrevoPageAnalyzer","lb-spider","Sogou","lssbot","careerbot","wotbox","wocbot","ichiro","DuckDuckBot","lssrocketcrawler","drupact","webcompanycrawler","acoonbot","openindexspider","gnam gnam spider","web-archive-net\\.com\\.bot","backlinkcrawler","coccoc","integromedb","content crawler spider","toplistbot","it2media-domain-crawler","ip-web-crawler\\.com","siteexplorer\\.info","elisabot","proximic","changedetection","arabot","WeSEE:Search","niki-bot","CrystalSemanticsBot","rogerbot","360Spider","psbot","InterfaxScanBot","CC Metadata Scaper","g00g1e\\.net","GrapeshotCrawler","urlappendbot","brainobot","fr-crawler","binlar","SimpleCrawler","Twitterbot","cXensebot","smtbot","bnf\\.fr_bot","A6-Indexer","ADmantX","Facebot","OrangeBot/","memorybot","AdvBot","MegaIndex","SemanticScholarBot","ltx71","nerdybot","xovibot","BUbiNG","Qwantify","archive\\.org_bot","Applebot","TweetmemeBot","crawler4j","findxbot","S[eE][mM]rushBot","yoozBot","lipperhey","Y!J","Domain Re-Animator Bot","AddThis","Screaming Frog SEO Spider","MetaURI","Scrapy","Livelap[bB]ot","OpenHoseBot","CapsuleChecker","collection@infegy\\.com","IstellaBot","DeuSu/","betaBot","Cliqzbot/","MojeekBot/","netEstate NE Crawler","SafeSearch microdata crawler","Gluten Free Crawler/","Sonic","Sysomos","Trove","deadlinkchecker","Slack-ImgProxy","Embedly","RankActiveLinkBot","iskanie","SafeDNSBot","SkypeUriPreview","Veoozbot","Slackbot","redditbot","datagnionbot","Google-Adwords-Instant","adbeat_bot","WhatsApp","contxbot","pinterest","electricmonk","GarlikCrawler","BingPreview/","vebidoobot","FemtosearchBot","Yahoo Link Preview","MetaJobBot","DomainStatsBot","mindUpBot","Daum/","Jugendschutzprogramm-Crawler","Xenu Link Sleuth","Pcore-HTTP","moatbot","KosmioBot","pingdom","PhantomJS","Gowikibot","PiplBot","Discordbot","TelegramBot","Jetslide","newsharecounts","James BOT","Barkrowler","TinEye","SocialRankIOBot","trendictionbot","Ocarinabot","epicbot","Primalbot","DuckDuckGo-Favicons-Bot","GnowitNewsbot","Leikibot","LinkArchiver","YaK/","PaperLiBot","Digg Deeper","dcrawl","Snacktory","AndersPinkBot","Fyrebot","EveryoneSocialBot","Mediatoolkitbot","Luminator-robots","ExtLinksBot","SurveyBot","NING/","okhttp","Nuzzel","omgili","PocketParser","YisouSpider","um-LN","ToutiaoSpider","MuckRack","Jamie's Spider","AHC/","NetcraftSurveyAgent","Laserlikebot","Apache-HttpClient","AppEngine-Google","Jetty","Upflow","Thinklab","Traackr\\.com","Twurly","Mastodon","http_get","DnyzBot","botify","007ac9 Crawler","BehloolBot","BrandVerity","check_http","BDCbot","ZumBot","EZID","ICC-Crawler","ArchiveBot","^LCC ","filterdb\\.iss\\.net/crawler","BLP_bbot","BomboraBot","Buck/","Companybook-Crawler","Genieo","magpie-crawler","MeltwaterNews","Moreover","newspaper/","ScoutJet","(^| )sentry/","StorygizeBot","UptimeRobot","OutclicksBot","seoscanners","Hatena","Google Web Preview","MauiBot","AlphaBot","SBL-BOT","IAS crawler","adscanner","Netvibes","acapbot","Baidu-YunGuanCe","bitlybot","blogmuraBot","Bot\\.AraTurka\\.com","bot-pge\\.chlooe\\.com","BoxcarBot","BTWebClient","ContextAd Bot","Digincore bot","Disqus","Feedly","Fetch/","Fever","Flamingo_SearchEngine","FlipboardProxy","g2reader-bot","imrbot","K7MLWCBot","Kemvibot","Landau-Media-Spider","linkapediabot","vkShare","Siteimprove\\.com","BLEXBot/","DareBoost","ZuperlistBot/","Miniflux/","Feedspotbot/","Diffbot/","SEOkicks","tracemyfile","Nimbostratus-Bot","Bytespider"]});var Kt=N((Un,Gt)=>{E();"use strict";var Mt=X(),hr=Mt($()),gr=Mt(ee()),Ge=Se(),_r=Pt(),Ke=Z(),He="_constructorio_is_human",Jt=["scroll","resize","touchmove","mouseover","mousemove","keydown","keypress","keyup","focus"],pr=function(){function r(){var t=this;(0,hr.default)(this,r),this.isHumanBoolean=this.getIsHumanFromSessionStorage();var e=function i(){t.isHumanBoolean=!0,Ge.session.set(He,!0),Jt.forEach(function(n){Ke.removeEventListener(n,i,!0)})};this.isHumanBoolean||Jt.forEach(function(i){Ke.addEventListener(i,e,!0)})}return(0,gr.default)(r,[{key:"getIsHumanFromSessionStorage",value:function(){return!!Ge.session.get(He)||!1}},{key:"isHuman",value:function(){return this.isHumanBoolean||!!Ge.session.get(He)}},{key:"isBot",value:function(){if(this.getIsHumanFromSessionStorage())return!1;var e=Ke.getNavigator(),i=e.userAgent,n=e.webdriver,s=new RegExp("(".concat(_r.join("|"),")"));return Boolean(i.match(s))||Boolean(n)}}]),r}();Gt.exports=pr});var Vt=N((Nn,Wt)=>{E();"use strict";var Ht=X(),yr=Ht($()),wr=Ht(ee()),We=Se(),br=Kt(),Ve=Z(),kr=Z(),mr=kr.obfuscatePiiRequest,Qe="_constructorio_requests",qr=18e4,Sr=function(){function r(t,e){var i=this;(0,yr.default)(this,r),this.options=t,this.eventemitter=e,this.humanity=new br,this.requestPending=!1,this.pageUnloading=!1,this.sendTrackingEvents=!!(t&&t.sendTrackingEvents===!0),Ve.addEventListener("beforeunload",function(){i.pageUnloading=!0}),this.sendTrackingEvents&&this.send()}return(0,wr.default)(r,[{key:"queue",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"GET",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};if(this.sendTrackingEvents&&!this.humanity.isBot()){var o=r.get(),c=mr(e);o.push({url:c,method:i,body:n,networkParameters:s}),r.set(o)}}},{key:"sendEvents",value:function(){var e=this,i=this.options.fetch,n=r.get();if((!Ve.canUseDOM()||this.humanity.isHuman())&&!this.requestPending&&!this.pageUnloading&&n.length){var s,o=n.shift(),c=o,f=c.networkParameters,a,u=this;if(r.set(n),f&&typeof AbortController=="function"){var l=new AbortController;a=l.signal,Ve.applyNetworkTimeout(this.options,f,l)}if(typeof o=="string"&&(o={url:o,method:"GET"}),o.url){var d=o.url.match(/\?.*_dt=([^&]+)/),_=parseInt(d&&d[1],10),y=+new Date;if(_&&Number.isInteger(_)&&y-_>qr){this.sendTrackingEvents=!1,r.remove();return}}o.method==="GET"&&(s=i(o.url,{signal:a})),o.method==="POST"&&(s=i(o.url,{method:o.method,body:JSON.stringify(o.body),mode:"cors",headers:{"Content-Type":"text/plain"},signal:a})),s&&(this.requestPending=!0,s.then(function(h){h.ok?(u.eventemitter&&u.eventemitter.emit("success",{url:o.url,method:o.method,message:"ok"}),e.requestPending=!1,e.send()):h.json().then(function(p){u.eventemitter&&u.eventemitter.emit("error",{url:o.url,method:o.method,message:p&&p.message}),e.requestPending=!1,e.send()}).catch(function(p){u.eventemitter&&u.eventemitter.emit("error",{url:o.url,method:o.method,message:p.type}),e.requestPending=!1,e.send()})}).catch(function(h){u.eventemitter&&u.eventemitter.emit("error",{url:o.url,method:o.method,message:h&&h.toString&&h.toString()}),e.requestPending=!1,e.send()}))}}},{key:"send",value:function(){this.sendTrackingEvents&&(this.options&&this.options.trackingSendDelay===0?this.sendEvents():setTimeout(this.sendEvents.bind(this),this.options&&this.options.trackingSendDelay||250))}}],[{key:"get",value:function(){return We.local.get(Qe)||[]}},{key:"set",value:function(e){!e||Array.isArray(e)&&e.length===0?r.remove():We.local.set(Qe,e);var i=r.get();Array.isArray(i)&&i.length!==e.length&&(this.sendTrackingEvents=!1,r.remove())}},{key:"remove",value:function(){We.local.remove(Qe)}}]),r}();Wt.exports=Sr});var $t=N((Dn,Zt)=>{E();"use strict";var Te=X(),z=Te(he()),Er=Te(Ce()),Cr=Te($()),Rr=Te(ee());function Qt(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);t&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(r,n).enumerable})),e.push.apply(e,i)}return e}function x(r){for(var t=1;t0&&arguments[0]!==void 0?arguments[0]:{},i="".concat(this.options.serviceUrl,"/v2/behavioral_action/session_start?");return this.requests.queue("".concat(i).concat(D({},this.options)),"POST",void 0,e),this.requests.send(),!0}},{key:"trackSessionStart",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i="".concat(this.options.serviceUrl,"/behavior?"),n={action:"session_start"};return this.requests.queue("".concat(i).concat(D(n,this.options)),void 0,void 0,e),this.requests.send(),!0}},{key:"trackInputFocusV2",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s="".concat(this.options.serviceUrl,"/v2/behavioral_action/focus?"),o={},c=i.analyticsTags,f=c===void 0?null:c;f&&(o.analytics_tags=f),o.user_input=e;var a="POST",u=M(o,x(x({},this.options),{},{requestMethod:a}));return this.requests.queue("".concat(s).concat(D({},this.options)),a,u,n),this.requests.send(),!0}},{key:"trackInputFocus",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i="".concat(this.options.serviceUrl,"/behavior?"),n={action:"focus"};return this.requests.queue("".concat(i).concat(D(n,this.options)),void 0,void 0,e),this.requests.send(),!0}},{key:"trackItemDetailLoad",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e&&(0,z.default)(e)==="object"&&!Array.isArray(e)){var n="".concat(this.options.serviceUrl,"/v2/behavioral_action/item_detail_load?"),s={},o={},c=e.item_name,f=e.name,a=e.item_id,u=e.customer_id,l=e.customerId,d=l===void 0?u:l,_=e.variation_id,y=e.itemName,h=y===void 0?c||f:y,p=e.itemId,S=p===void 0?a||d:p,b=e.variationId,w=b===void 0?_:b,O=e.url,R=e.analyticsTags;h&&(o.item_name=h),S&&(o.item_id=S),w&&(o.variation_id=w),R&&(o.analytics_tags=R),O&&(o.url=O);var m="".concat(n).concat(D(s,this.options)),v="POST",A=M(o,x(x({},this.options),{},{requestMethod:v}));return this.requests.queue(m,v,A,i),this.requests.send(),!0}return this.requests.send(),new Error("parameters are required of type object")}},{key:"trackAutocompleteSelectV2",value:function(e,i){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(e&&typeof e=="string"){if(i&&(0,z.default)(i)==="object"&&!Array.isArray(i)){var s="".concat(this.options.serviceUrl,"/v2/behavioral_action/autocomplete_select?"),o=i.original_query,c=i.originalQuery,f=c===void 0?o:c,a=i.user_input,u=i.userInput,l=u===void 0?f||a:u,d=i.original_section,_=i.section,y=_===void 0?d:_,h=i.tr,p=i.group_id,S=i.groupId,b=S===void 0?p:S,w=i.item_id,O=i.itemId,R=O===void 0?w:O,m=i.variation_id,v=i.variationId,A=v===void 0?m:v,g={},k={user_input:l,tr:h,group_id:b,item_id:R,variation_id:A,item_name:e,section:y};y&&(g.section=y);var C="".concat(s).concat(D(g,this.options)),q="POST",B=M(k,x(x({},this.options),{},{requestMethod:q}));return this.requests.queue(C,q,B,n),this.requests.send(),!0}return this.requests.send(),new Error("parameters are required of type object")}return this.requests.send(),new Error("term is a required parameter of type string")}},{key:"trackAutocompleteSelect",value:function(e,i){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(e&&typeof e=="string"){if(i&&(0,z.default)(i)==="object"&&!Array.isArray(i)){var s="".concat(this.options.serviceUrl,"/autocomplete/").concat(T.encodeURIComponentRFC3986(T.trimNonBreakingSpaces(e)),"/select?"),o={},c=i.original_query,f=i.originalQuery,a=f===void 0?c:f,u=i.section,l=i.original_section,d=i.originalSection,_=d===void 0?l:d,y=i.tr,h=i.group_id,p=i.groupId,S=p===void 0?h:p,b=i.display_name,w=i.displayName,O=w===void 0?b:w;return a&&(o.original_query=a),y&&(o.tr=y),(_||u)&&(o.section=_||u),S&&(o.group={group_id:S,display_name:O}),this.requests.queue("".concat(s).concat(D(o,this.options)),void 0,void 0,n),this.requests.send(),!0}return this.requests.send(),new Error("parameters are required of type object")}return this.requests.send(),new Error("term is a required parameter of type string")}},{key:"trackSearchSubmitV2",value:function(e,i){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(e&&typeof e=="string"){if(i&&(0,z.default)(i)==="object"&&!Array.isArray(i)){var s="".concat(this.options.serviceUrl,"/v2/behavioral_action/search_submit?"),o=i.original_query,c=i.originalQuery,f=c===void 0?o:c,a=i.user_input,u=i.userInput,l=u===void 0?f||a:u,d=i.group_id,_=i.groupId,y=_===void 0?d:_,h=i.section,p=i.analyticsTags,S=p===void 0?null:p,b={},w={user_input:l,search_term:e,section:h};y&&(w.filters={group_id:y}),h&&(b.section=h),S&&(w.analytics_tags=S);var O="".concat(s).concat(D(b,this.options)),R="POST",m=M(w,x(x({},this.options),{},{requestMethod:R}));return this.requests.queue(O,R,m,n),this.requests.send(),!0}return this.requests.send(),new Error("parameters are required of type object")}return this.requests.send(),new Error("term is a required parameter of type string")}},{key:"trackSearchSubmit",value:function(e,i){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(e&&typeof e=="string"){if(i&&(0,z.default)(i)==="object"&&!Array.isArray(i)){var s="".concat(this.options.serviceUrl,"/autocomplete/").concat(T.encodeURIComponentRFC3986(T.trimNonBreakingSpaces(e)),"/search?"),o={},c=i.original_query,f=i.originalQuery,a=f===void 0?c:f,u=i.group_id,l=i.groupId,d=l===void 0?u:l,_=i.display_name,y=i.displayName,h=y===void 0?_:y;return a&&(o.original_query=a),d&&(o.group={group_id:d,display_name:h}),this.requests.queue("".concat(s).concat(D(o,this.options)),void 0,void 0,n),this.requests.send(),!0}return this.requests.send(),new Error("parameters are required of type object")}return this.requests.send(),new Error("term is a required parameter of type string")}},{key:"trackSearchResultsLoadedV2",value:function(e,i){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(e&&typeof e=="string"){if(i&&(0,z.default)(i)==="object"&&!Array.isArray(i)){var s="".concat(this.options.serviceUrl,"/v2/behavioral_action/search_result_load?"),o=i.num_results,c=i.numResults,f=c===void 0?o:c,a=i.result_count,u=i.resultCount,l=u===void 0?f||a:u,d=i.customer_ids,_=i.item_ids,y=i.items,h=y===void 0?d||_:y,p=i.result_page,S=i.resultPage,b=S===void 0?p:S,w=i.result_id,O=i.resultId,R=O===void 0?w:O,m=i.sort_order,v=i.sortOrder,A=v===void 0?m:v,g=i.sort_by,k=i.sortBy,C=k===void 0?g:k,q=i.selected_filters,B=i.selectedFilters,J=B===void 0?q:B,F=i.url,G=i.section,K={},I;h&&Array.isArray(h)&&h.length!==0&&(I=h,typeof h[0]=="string"||typeof h[0]=="number"?I=h.map(function(j){return{item_id:String(j)}}):I=h.map(function(j){return T.toSnakeCaseKeys(j,!1)})),G&&(K.section=G);var Q={search_term:e,result_count:l,items:I,result_page:b,result_id:R,sort_order:A,sort_by:C,selected_filters:J,url:F,section:G},H="".concat(s).concat(D(K,this.options)),V="POST",Y=M(Q,x(x({},this.options),{},{requestMethod:V}));return this.requests.queue(H,V,Y,n),this.requests.send(),!0}return this.requests.send(),new Error("parameters are required of type object")}return this.requests.send(),new Error("term is a required parameter of type string")}},{key:"trackSearchResultsLoaded",value:function(e,i){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(e&&typeof e=="string"){if(i&&(0,z.default)(i)==="object"&&!Array.isArray(i)){var s="".concat(this.options.serviceUrl,"/behavior?"),o={action:"search-results",term:e},c=i.num_results,f=i.numResults,a=f===void 0?c:f,u=i.customer_ids,l=i.customerIds,d=l===void 0?u:l,_=i.item_ids,y=i.itemIds,h=y===void 0?_:y,p;return T.isNil(a)||(o.num_results=a),h&&Array.isArray(h)?p=h:d&&Array.isArray(d)&&(p=d),p&&Array.isArray(p)&&p.length&&(o.customer_ids=p.slice(0,100).join(",")),this.requests.queue("".concat(s).concat(D(o,this.options)),void 0,void 0,n),this.requests.send(),!0}return this.requests.send(),new Error("parameters are required of type object")}return this.requests.send(),new Error("term is a required parameter of type string")}},{key:"trackSearchResultClickV2",value:function(e,i){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(e&&typeof e=="string"){if(i&&(0,z.default)(i)==="object"&&!Array.isArray(i)){var s="".concat(this.options.serviceUrl,"/v2/behavioral_action/search_result_click?"),o=i.num_results,c=i.customer_id,f=i.item_id,a=i.itemId,u=a===void 0?c||f:a,l=i.name,d=i.item_name,_=i.itemName,y=_===void 0?l||d:_,h=i.variation_id,p=i.variationId,S=p===void 0?h:p,b=i.result_id,w=i.resultId,O=w===void 0?b:w,R=i.result_count,m=i.resultCount,v=m===void 0?o||R:m,A=i.result_page,g=i.resultPage,k=g===void 0?A:g,C=i.result_position_on_page,q=i.resultPositionOnPage,B=q===void 0?C:q,J=i.num_results_per_page,F=i.numResultsPerPage,G=F===void 0?J:F,K=i.selected_filters,I=i.selectedFilters,Q=I===void 0?K:I,H=i.section,V={item_name:y,item_id:u,variation_id:S,result_id:O,result_count:v,result_page:k,result_position_on_page:B,num_results_per_page:G,selected_filters:Q,section:H,search_term:e},Y={};H&&(Y.section=H);var j="".concat(s).concat(D(Y,this.options)),ne="POST",se=M(V,x(x({},this.options),{},{requestMethod:ne}));return this.requests.queue(j,ne,se,n),this.requests.send(),!0}return this.requests.send(),new Error("parameters are required of type object")}return this.requests.send(),new Error("term is a required parameter of type string")}},{key:"trackSearchResultClick",value:function(e,i){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(e&&typeof e=="string"){if(i&&(0,z.default)(i)==="object"&&!Array.isArray(i)){var s="".concat(this.options.serviceUrl,"/autocomplete/").concat(T.encodeURIComponentRFC3986(T.trimNonBreakingSpaces(e)),"/click_through?"),o={},c=i.item_name,f=i.name,a=i.itemName,u=a===void 0?c||f:a,l=i.item_id,d=i.itemId,_=d===void 0?l:d,y=i.customer_id,h=i.customerId,p=h===void 0?y||_:h,S=i.variation_id,b=i.variationId,w=b===void 0?S:b,O=i.result_id,R=i.resultId,m=R===void 0?O:R,v=i.item_is_convertible,A=i.itemIsConvertible,g=A===void 0?v:A,k=i.section;return u&&(o.name=u),p&&(o.customer_id=p),w&&(o.variation_id=w),m&&(o.result_id=m),typeof g=="boolean"&&(o.item_is_convertible=g),k&&(o.section=k),this.requests.queue("".concat(s).concat(D(o,this.options)),void 0,void 0,n),this.requests.send(),!0}return this.requests.send(),new Error("parameters are required of type object")}return this.requests.send(),new Error("term is a required parameter of type string")}},{key:"trackConversion",value:function(e,i){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(i&&(0,z.default)(i)==="object"&&!Array.isArray(i)){var s=e||"TERM_UNKNOWN",o="".concat(this.options.serviceUrl,"/v2/behavioral_action/conversion?"),c={},f={},a=i.name,u=i.item_name,l=i.itemName,d=l===void 0?u||a:l,_=i.customer_id,y=i.customerId,h=y===void 0?_:y,p=i.item_id,S=i.itemId,b=S===void 0?p||h:S,w=i.variation_id,O=i.variationId,R=O===void 0?w:O,m=i.revenue,v=i.section,A=v===void 0?"Products":v,g=i.display_name,k=i.displayName,C=k===void 0?g:k,q=i.type,B=i.is_custom_type,J=i.isCustomType,F=J===void 0?B:J;b&&(f.item_id=b),d&&(f.item_name=d),R&&(f.variation_id=R),(m||m===0)&&(f.revenue=m.toString()),A&&(c.section=A,f.section=A),s&&(f.search_term=s),q&&(f.type=q),F&&(f.is_custom_type=F),C&&(f.display_name=C);var G="".concat(o).concat(D(c,this.options)),K="POST",I=M(f,x(x({},this.options),{},{requestMethod:K}));return this.requests.queue(G,K,I,n),this.requests.send(),!0}return this.requests.send(),new Error("parameters are required of type object")}},{key:"trackPurchase",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e&&(0,z.default)(e)==="object"&&!Array.isArray(e)){var n="".concat(this.options.serviceUrl,"/v2/behavioral_action/purchase?"),s={},o={},c=e.items,f=e.revenue,a=e.order_id,u=e.orderId,l=u===void 0?a:u,d=e.section,_=e.analyticsTags,y=this.options.apiKey;if(l){if(T.hasOrderIdRecord({orderId:l,apiKey:y}))return!1;T.addOrderIdRecord({orderId:l,apiKey:y}),o.order_id=l}c&&Array.isArray(c)&&(o.items=c.slice(0,100).map(function(b){return T.toSnakeCaseKeys(b,!1)})),(f||f===0)&&(o.revenue=f),d?s.section=d:s.section="Products",_&&(o.analytics_tags=_);var h="".concat(n).concat(D(s,this.options)),p="POST",S=M(o,x(x({},this.options),{},{requestMethod:p}));return this.requests.queue(h,p,S,i),this.requests.send(),!0}return this.requests.send(),new Error("parameters are required of type object")}},{key:"trackRecommendationView",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e&&(0,z.default)(e)==="object"&&!Array.isArray(e)){var n="".concat(this.options.serviceUrl,"/v2/behavioral_action/recommendation_result_view?"),s={},o=e.result_count,c=e.resultCount,f=c===void 0?o:c,a=e.result_page,u=e.resultPage,l=u===void 0?a:u,d=e.result_id,_=e.resultId,y=_===void 0?d:_,h=e.section,p=e.url,S=e.pod_id,b=e.podId,w=b===void 0?S:b,O=e.num_results_viewed,R=e.numResultsViewed,m=R===void 0?O:R,v=e.items,A=e.analyticsTags;T.isNil(f)||(s.result_count=f),T.isNil(l)||(s.result_page=l),y&&(s.result_id=y),h?s.section=h:s.section="Products",p&&(s.url=p),w&&(s.pod_id=w),T.isNil(m)||(s.num_results_viewed=m),v&&Array.isArray(v)&&(s.items=v.slice(0,100).map(function(q){return T.toSnakeCaseKeys(q,!1)})),A&&(s.analytics_tags=A);var g="".concat(n).concat(D({},this.options)),k="POST",C=M(s,x(x({},this.options),{},{requestMethod:k}));return this.requests.queue(g,k,C,i),this.requests.send(),!0}return this.requests.send(),new Error("parameters are required of type object")}},{key:"trackRecommendationClick",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e&&(0,z.default)(e)==="object"&&!Array.isArray(e)){var n="".concat(this.options.serviceUrl,"/v2/behavioral_action/recommendation_result_click?"),s={},o=e.variation_id,c=e.variationId,f=c===void 0?o:c,a=e.section,u=a===void 0?"Products":a,l=e.result_id,d=e.resultId,_=d===void 0?l:d,y=e.result_count,h=e.resultCount,p=h===void 0?y:h,S=e.result_page,b=e.resultPage,w=b===void 0?S:b,O=e.result_position_on_page,R=e.resultPositionOnPage,m=R===void 0?O:R,v=e.num_results_per_page,A=e.numResultsPerPage,g=A===void 0?v:A,k=e.pod_id,C=e.podId,q=C===void 0?k:C,B=e.strategy_id,J=e.strategyId,F=J===void 0?B:J,G=e.item_id,K=e.itemId,I=K===void 0?G:K,Q=e.item_name,H=e.itemName,V=H===void 0?Q:H,Y=e.analyticsTags;f&&(s.variation_id=f),u&&(s.section=u),_&&(s.result_id=_),T.isNil(p)||(s.result_count=p),T.isNil(w)||(s.result_page=w),T.isNil(m)||(s.result_position_on_page=m),T.isNil(g)||(s.num_results_per_page=g),q&&(s.pod_id=q),F&&(s.strategy_id=F),I&&(s.item_id=I),V&&(s.item_name=V),Y&&(s.analytics_tags=Y);var j="".concat(n).concat(D({},this.options)),ne="POST",se=M(s,x(x({},this.options),{},{requestMethod:ne}));return this.requests.queue(j,ne,se,i),this.requests.send(),!0}return this.requests.send(),new Error("parameters are required of type object")}},{key:"trackBrowseResultsLoaded",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e&&(0,z.default)(e)==="object"&&!Array.isArray(e)){var n="".concat(this.options.serviceUrl,"/v2/behavioral_action/browse_result_load?"),s={},o=e.section,c=o===void 0?"Products":o,f=e.result_count,a=e.resultCount,u=a===void 0?f:a,l=e.result_page,d=e.resultPage,_=d===void 0?l:d,y=e.result_id,h=e.resultId,p=h===void 0?y:h,S=e.selected_filters,b=e.selectedFilters,w=b===void 0?S:b,O=e.url,R=e.sort_order,m=e.sortOrder,v=m===void 0?R:m,A=e.sort_by,g=e.sortBy,k=g===void 0?A:g,C=e.filter_name,q=e.filterName,B=q===void 0?C:q,J=e.filter_value,F=e.filterValue,G=F===void 0?J:F,K=e.items,I=e.analyticsTags;c&&(s.section=c),T.isNil(u)||(s.result_count=u),T.isNil(_)||(s.result_page=_),p&&(s.result_id=p),w&&(s.selected_filters=w),O&&(s.url=O),v&&(s.sort_order=v),k&&(s.sort_by=k),B&&(s.filter_name=B),G&&(s.filter_value=G),K&&Array.isArray(K)&&(s.items=K.slice(0,100).map(function(Y){return T.toSnakeCaseKeys(Y,!1)})),I&&(s.analytics_tags=I);var Q="".concat(n).concat(D({},this.options)),H="POST",V=M(s,x(x({},this.options),{},{requestMethod:H}));return this.requests.queue(Q,H,V,i),this.requests.send(),!0}return this.requests.send(),new Error("parameters are required of type object")}},{key:"trackBrowseResultClick",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e&&(0,z.default)(e)==="object"&&!Array.isArray(e)){var n="".concat(this.options.serviceUrl,"/v2/behavioral_action/browse_result_click?"),s={},o=e.section,c=o===void 0?"Products":o,f=e.variation_id,a=e.variationId,u=a===void 0?f:a,l=e.result_id,d=e.resultId,_=d===void 0?l:d,y=e.result_count,h=e.resultCount,p=h===void 0?y:h,S=e.result_page,b=e.resultPage,w=b===void 0?S:b,O=e.result_position_on_page,R=e.resultPositionOnPage,m=R===void 0?O:R,v=e.num_results_per_page,A=e.numResultsPerPage,g=A===void 0?v:A,k=e.selected_filters,C=e.selectedFilters,q=C===void 0?k:C,B=e.filter_name,J=e.filterName,F=J===void 0?B:J,G=e.filter_value,K=e.filterValue,I=K===void 0?G:K,Q=e.customer_id,H=e.customerId,V=H===void 0?Q:H,Y=e.item_id,j=e.itemId,ne=j===void 0?V||Y:j,se=e.item_name,De=e.name,et=e.itemName,tt=et===void 0?se||De:et,it=e.analyticsTags;c&&(s.section=c),u&&(s.variation_id=u),_&&(s.result_id=_),T.isNil(p)||(s.result_count=p),T.isNil(w)||(s.result_page=w),T.isNil(m)||(s.result_position_on_page=m),T.isNil(g)||(s.num_results_per_page=g),q&&(s.selected_filters=q),F&&(s.filter_name=F),I&&(s.filter_value=I),ne&&(s.item_id=ne),tt&&(s.item_name=tt),it&&(s.analytics_tags=it);var _i="".concat(n).concat(D({},this.options)),rt="POST",pi=M(s,x(x({},this.options),{},{requestMethod:rt}));return this.requests.queue(_i,rt,pi,i),this.requests.send(),!0}return this.requests.send(),new Error("parameters are required of type object")}},{key:"trackGenericResultClick",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if((0,z.default)(e)==="object"){var n="".concat(this.options.serviceUrl,"/v2/behavioral_action/result_click?"),s={},o=e.item_id,c=e.itemId,f=c===void 0?o:c,a=e.item_name,u=e.itemName,l=u===void 0?a:u,d=e.variation_id,_=e.variationId,y=_===void 0?d:_,h=e.section,p=h===void 0?"Products":h,S=e.analyticsTags;if(f){s.section=p,s.item_id=f,l&&(s.item_name=l),y&&(s.variation_id=y),S&&(s.analytics_tags=S);var b="".concat(n).concat(D({},this.options)),w="POST",O=M(s,x(x({},this.options),{},{requestMethod:w}));return this.requests.queue(b,w,O,i),this.requests.send(),!0}}return this.requests.send(),new Error('A parameters object with an "itemId" property is required.')}},{key:"trackQuizResultsLoaded",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e&&(0,z.default)(e)==="object"&&!Array.isArray(e)){var n="".concat(this.options.serviceUrl,"/v2/behavioral_action/quiz_result_load?"),s=e.quiz_id,o=e.quizId,c=o===void 0?s:o,f=e.quiz_version_id,a=e.quizVersionId,u=a===void 0?f:a,l=e.quiz_session_id,d=e.quizSessionId,_=d===void 0?l:d,y=e.url,h=e.section,p=h===void 0?"Products":h,S=e.result_count,b=e.resultCount,w=b===void 0?S:b,O=e.result_id,R=e.resultId,m=R===void 0?O:R,v=e.result_page,A=e.resultPage,g=A===void 0?v:A,k=e.items,C={},q={};if(k&&Array.isArray(k)&&(q.items=k.slice(0,100).map(function(G){return T.toSnakeCaseKeys(G,!1)})),typeof c!="string")return new Error('"quizId" is a required parameter of type string');if(typeof u!="string")return new Error('"quizVersionId" is a required parameter of type string');if(typeof _!="string")return new Error('"quizSessionId" is a required parameter of type string');if(typeof y!="string")return new Error('"url" is a required parameter of type string');if(q.quiz_id=c,q.quiz_version_id=u,q.quiz_session_id=_,q.url=y,!T.isNil(p)){if(typeof p!="string")return new Error('"section" must be a string');C.section=p,q.section=p}if(!T.isNil(w)){if(typeof w!="number")return new Error('"resultCount" must be a number');q.result_count=w}if(!T.isNil(m)){if(typeof m!="string")return new Error('"resultId" must be a string');q.result_id=m}if(!T.isNil(g)){if(typeof g!="number")return new Error('"resultPage" must be a number');q.result_page=g}var B="".concat(n).concat(D(C,this.options)),J="POST",F=M(q,x(x({},this.options),{},{requestMethod:J}));return this.requests.queue(B,J,F,i),this.requests.send(),!0}return this.requests.send(),new Error("parameters are required of type object")}},{key:"trackQuizResultClick",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e&&(0,z.default)(e)==="object"&&!Array.isArray(e)){var n="".concat(this.options.serviceUrl,"/v2/behavioral_action/quiz_result_click?"),s=e.quiz_id,o=e.quizId,c=o===void 0?s:o,f=e.quiz_version_id,a=e.quizVersionId,u=a===void 0?f:a,l=e.quiz_session_id,d=e.quizSessionId,_=d===void 0?l:d,y=e.item_id,h=e.itemId,p=h===void 0?y:h,S=e.item_name,b=e.itemName,w=b===void 0?S:b,O=e.result_count,R=e.resultCount,m=R===void 0?O:R,v=e.result_id,A=e.resultId,g=A===void 0?v:A,k=e.result_page,C=e.resultPage,q=C===void 0?k:C,B=e.num_results_per_page,J=e.numResultsPerPage,F=J===void 0?B:J,G=e.result_position_on_page,K=e.resultPositionOnPage,I=K===void 0?G:K,Q=e.section,H=Q===void 0?"Products":Q,V=e.variationId,Y={},j={};if(typeof c!="string")return new Error('"quizId" is a required parameter of type string');if(typeof u!="string")return new Error('"quizVersionId" is a required parameter of type string');if(typeof _!="string")return new Error('"quizSessionId" is a required parameter of type string');if(typeof p!="string"&&typeof w!="string")return new Error('"itemId" or "itemName" is a required parameter of type string');if(j.quiz_id=c,j.quiz_version_id=u,j.quiz_session_id=_,!T.isNil(p)){if(typeof p!="string")return new Error('"itemId" must be a string');j.item_id=p}if(!T.isNil(w)){if(typeof w!="string")return new Error('"itemName" must be a string');j.item_name=w}if(!T.isNil(V)){if(typeof V!="string")return new Error('"variationId" must be a string');j.variation_id=V}if(!T.isNil(H)){if(typeof H!="string")return new Error('"section" must be a string');Y.section=H}if(!T.isNil(m)){if(typeof m!="number")return new Error('"resultCount" must be a number');j.result_count=m}if(!T.isNil(g)){if(typeof g!="string")return new Error('"resultId" must be a string');j.result_id=g}if(!T.isNil(q)){if(typeof q!="number")return new Error('"resultPage" must be a number');j.result_page=q}if(!T.isNil(F)){if(typeof F!="number")return new Error('"numResultsPerPage" must be a number');j.num_results_per_page=F}if(!T.isNil(I)){if(typeof I!="number")return new Error('"resultPositionOnPage" must be a number');j.result_position_on_page=I}var ne="".concat(n).concat(D(Y,this.options)),se="POST",De=M(j,x(x({},this.options),{},{requestMethod:se}));return this.requests.queue(ne,se,De,i),this.requests.send(),!0}return this.requests.send(),new Error("parameters are required of type object")}},{key:"trackQuizConversion",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e&&(0,z.default)(e)==="object"&&!Array.isArray(e)){var n="".concat(this.options.serviceUrl,"/v2/behavioral_action/quiz_conversion?"),s=e.quiz_id,o=e.quizId,c=o===void 0?s:o,f=e.quiz_version_id,a=e.quizVersionId,u=a===void 0?f:a,l=e.quiz_session_id,d=e.quizSessionId,_=d===void 0?l:d,y=e.item_id,h=e.itemId,p=h===void 0?y:h,S=e.item_name,b=e.itemName,w=b===void 0?S:b,O=e.variation_id,R=e.variationId,m=R===void 0?O:R,v=e.revenue,A=e.section,g=A===void 0?"Products":A,k=e.type,C=e.is_custom_type,q=e.isCustomType,B=q===void 0?C:q,J=e.display_name,F=e.displayName,G=F===void 0?J:F,K={},I={};if(typeof c!="string")return new Error('"quizId" is a required parameter of type string');if(typeof u!="string")return new Error('"quizVersionId" is a required parameter of type string');if(typeof _!="string")return new Error('"quizSessionId" is a required parameter of type string');if(typeof p!="string"&&typeof w!="string")return new Error('"itemId" or "itemName" is a required parameter of type string');if(I.quiz_id=c,I.quiz_version_id=u,I.quiz_session_id=_,!T.isNil(p)){if(typeof p!="string")return new Error('"itemId" must be a string');I.item_id=p}if(!T.isNil(w)){if(typeof w!="string")return new Error('"itemName" must be a string');I.item_name=w}if(!T.isNil(m)){if(typeof m!="string")return new Error('"variationId" must be a string');I.variation_id=m}if(!T.isNil(v)){if(typeof v!="string")return new Error('"revenue" must be a string');I.revenue=v}if(!T.isNil(g)){if(typeof g!="string")return new Error('"section" must be a string');I.section=g}if(!T.isNil(k)){if(typeof k!="string")return new Error('"type" must be a string');I.type=k}if(!T.isNil(B)){if(typeof B!="boolean")return new Error('"isCustomType" must be a boolean');I.is_custom_type=B}if(!T.isNil(G)){if(typeof G!="string")return new Error('"displayName" must be a string');I.display_name=G}var Q="".concat(n).concat(D(K,this.options)),H="POST",V=M(I,x(x({},this.options),{},{requestMethod:H}));return this.requests.queue(Q,H,V,i),this.requests.send(),!0}return this.requests.send(),new Error("parameters are required of type object")}},{key:"trackAssistantSubmit",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e&&(0,z.default)(e)==="object"&&!Array.isArray(e)){var n="".concat(this.options.serviceUrl,"/v2/behavioral_action/assistant_submit?"),s=e.section,o=e.intent,c={intent:o,section:s},f="".concat(n).concat(D({},this.options)),a="POST",u=M(c,x(x({},this.options),{},{requestMethod:a}));return this.requests.queue(f,a,u,i),this.requests.send(),!0}return this.requests.send(),new Error("parameters are required of type object")}},{key:"trackAssistantResultLoadStarted",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e&&(0,z.default)(e)==="object"&&!Array.isArray(e)){var n="".concat(this.options.serviceUrl,"/v2/behavioral_action/assistant_result_load_start?"),s=e.section,o=e.intentResultId,c=e.intent,f={intent_result_id:o,intent:c,section:s},a="".concat(n).concat(D({},this.options)),u="POST",l=M(f,x(x({},this.options),{},{requestMethod:u}));return this.requests.queue(a,u,l,i),this.requests.send(),!0}return this.requests.send(),new Error("parameters are required of type object")}},{key:"trackAssistantResultLoadFinished",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e&&(0,z.default)(e)==="object"&&!Array.isArray(e)){var n="".concat(this.options.serviceUrl,"/v2/behavioral_action/assistant_result_load_finish?"),s=e.section,o=e.searchResultCount,c=e.intentResultId,f=e.intent,a={intent_result_id:c,section:s,intent:f,search_result_count:o},u="".concat(n).concat(D({},this.options)),l="POST",d=M(a,x(x({},this.options),{},{requestMethod:l}));return this.requests.queue(u,l,d,i),this.requests.send(),!0}return this.requests.send(),new Error("parameters are required of type object")}},{key:"trackAssistantResultClick",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e&&(0,z.default)(e)==="object"&&!Array.isArray(e)){var n="".concat(this.options.serviceUrl,"/v2/behavioral_action/assistant_search_result_click?"),s=e.section,o=s===void 0?"Products":s,c=e.variationId,f=e.intentResultId,a=e.searchResultId,u=e.itemId,l=e.itemName,d=e.intent,_={section:o,variation_id:c,intent_result_id:f,search_result_id:a,item_id:u,item_name:l,intent:d},y="".concat(n).concat(D({},this.options)),h="POST",p=M(_,x(x({},this.options),{},{requestMethod:h}));return this.requests.queue(y,h,p,i),this.requests.send(),!0}return this.requests.send(),new Error("parameters are required of type object")}},{key:"trackAssistantResultView",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e&&(0,z.default)(e)==="object"&&!Array.isArray(e)){var n="".concat(this.options.serviceUrl,"/v2/behavioral_action/assistant_search_result_view?"),s=e.section,o=s===void 0?"Products":s,c=e.items,f=e.numResultsViewed,a=e.intentResultId,u=e.searchResultId,l=e.intent,d={section:o,intent_result_id:a,search_result_id:u,num_results_viewed:f,items:c&&Array.isArray(c)&&c.slice(0,100).map(function(p){return T.toSnakeCaseKeys(p,!1)}),intent:l},_="".concat(n).concat(D({},this.options)),y="POST",h=M(d,x(x({},this.options),{},{requestMethod:y}));return this.requests.queue(_,y,h,i),this.requests.send(),!0}return this.requests.send(),new Error("parameters are required of type object")}},{key:"trackAssistantSearchSubmit",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e&&(0,z.default)(e)==="object"&&!Array.isArray(e)){var n="".concat(this.options.serviceUrl,"/v2/behavioral_action/assistant_search_submit?"),s=e.section,o=e.intent,c=e.searchTerm,f=e.searchResultId,a=e.intentResultId,u={intent:o,section:s,search_term:c,search_result_id:f,intent_result_id:a},l="".concat(n).concat(D({},this.options)),d="POST",_=M(u,x(x({},this.options),{},{requestMethod:d}));return this.requests.queue(l,d,_,i),this.requests.send(),!0}return this.requests.send(),new Error("parameters is a required parameter of type object")}},{key:"on",value:function(e,i){return e!=="success"&&e!=="error"?new Error('messageType must be a string of value "success" or "error"'):!i||typeof i!="function"?new Error("callback is required and must be a function"):(this.eventemitter.on(e,i),!0)}}]),r}();Xt.RequestQueue=Yt;Zt.exports=Xt});var ei=N(xe=>{E();"use strict";Object.defineProperty(xe,"__esModule",{value:!0});xe.default=void 0;var Or="2.55.0";xe.default=Or});var Ye=N((Bn,pe)=>{E();function Tr(r,t){(t==null||t>r.length)&&(t=r.length);for(var e=0,i=new Array(t);e{E();var xr=Ye();function Ir(r){if(Array.isArray(r))return xr(r)}ye.exports=Ir,ye.exports.__esModule=!0,ye.exports.default=ye.exports});var ii=N((zn,we)=>{E();function Ur(r){if(typeof Symbol!="undefined"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}we.exports=Ur,we.exports.__esModule=!0,we.exports.default=we.exports});var ni=N((jn,be)=>{E();var ri=Ye();function Nr(r,t){if(!!r){if(typeof r=="string")return ri(r,t);var e=Object.prototype.toString.call(r).slice(8,-1);if(e==="Object"&&r.constructor&&(e=r.constructor.name),e==="Map"||e==="Set")return Array.from(r);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return ri(r,t)}}be.exports=Nr,be.exports.__esModule=!0,be.exports.default=be.exports});var oi=N((Pn,ke)=>{E();function Dr(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}ke.exports=Dr,ke.exports.__esModule=!0,ke.exports.default=ke.exports});var si=N((Mn,me)=>{E();var Lr=ti(),Br=ii(),Fr=ni(),zr=oi();function jr(r){return Lr(r)||Br(r)||Fr(r)||zr()}me.exports=jr,me.exports.__esModule=!0,me.exports.default=me.exports});var ai=N((Jn,ui)=>{E();"use strict";var Ie=X(),Pr=Ie($()),Mr=Ie(ee()),Jr=Ie(si()),Gr=Ie(he()),Kr=ue(),re=Z();function Xe(r,t,e,i){var n=e.apiKey,s=e.clientId,o=e.sessionId,c=e.segments,f=e.userId,a=e.version,u=e.quizzesServiceUrl,l={c:a},d="";if(l.key=n,l.i=s,l.s=o,c&&c.length&&(l.us=c),f&&(l.ui=String(f)),!r||typeof r!="string")throw new Error("quizId is a required parameter of type string");if(i==="results"&&((0,Gr.default)(t.answers)!=="object"||!Array.isArray(t.answers)||t.answers.length===0))throw new Error("answers is a required parameter of type array");if(t){var _=t.section,y=t.answers,h=t.quizSessionId,p=t.quizVersionId,S=t.page,b=t.resultsPerPage,w=t.filters,O=t.fmtOptions,R=t.hiddenFields;_&&(l.section=_),p&&(l.quiz_version_id=p),h&&(l.quiz_session_id=h),y&&y.length&&(d="&".concat(re.stringify({a:y.map(function(v){return(0,Jr.default)(v).join(",")})}))),re.isNil(S)||(l.page=S),re.isNil(b)||(l.num_results_per_page=b),w&&(l.filters=w),O&&(l.fmt_options=O),R&&(l.fmt_options?l.fmt_options.hidden_fields=R:l.fmt_options={hidden_fields:R})}l._dt=Date.now(),l=re.cleanParams(l);var m=re.stringify(l);return"".concat(u,"/v1/quizzes/").concat(encodeURIComponent(r),"/").concat(encodeURIComponent(i),"/?").concat(m).concat(d)}var Hr=function(){function r(t){(0,Pr.default)(this,r),this.options=t||{},this.eventDispatcher=new Kr(t.eventDispatcher)}return(0,Mr.default)(r,[{key:"getQuizNextQuestion",value:function(e,i){var n=this,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,c=this.options.fetch,f=new AbortController,a=f.signal;try{o=Xe(e,i,this.options,"next")}catch(u){return Promise.reject(u)}return re.applyNetworkTimeout(this.options,s,f),c(o,{signal:a}).then(re.convertResponseToJson).then(function(u){if(u.quiz_version_id)return n.eventDispatcher.queue("quizzes.getQuizNextQuestion.completed",u),u;throw new Error("getQuizNextQuestion response data is malformed")})}},{key:"getQuizResults",value:function(e,i){var n=this,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,c=this.options.fetch,f=new AbortController,a=f.signal;try{o=Xe(e,i,this.options,"results")}catch(u){return Promise.reject(u)}return re.applyNetworkTimeout(this.options,s,f),c(o,{signal:a}).then(re.convertResponseToJson).then(function(u){if(u.quiz_version_id)return n.eventDispatcher.queue("quizzes.getQuizResults.completed",u),u;throw new Error("getQuizResults response data is malformed")})}},{key:"getQuizResultsConfig",value:function(e,i){var n=this,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,c=this.options.fetch,f=new AbortController,a=f.signal;try{o=Xe(e,i,this.options,"results_config")}catch(u){return Promise.reject(u)}return re.applyNetworkTimeout(this.options,s,f),c(o,{signal:a}).then(re.convertResponseToJson).then(function(u){if(u.quiz_version_id)return n.eventDispatcher.queue("quizzes.getQuizResultsConfig.completed",u),u;throw new Error("getQuizResultsConfig response data is malformed")})}}]),r}();ui.exports=Hr});var di=N((Gn,Ne)=>{E();"use strict";var Ze=X(),Wr=Ze($()),Vr=Ze(ee()),Qr=Ze(Ce()),Ue=Z(),Yr=Ue.cleanParams,Xr=Ue.trimNonBreakingSpaces,Zr=Ue.encodeURIComponentRFC3986,$r=Ue.stringify;function ci(r,t,e){var i=e.apiKey,n=e.version,s=e.sessionId,o=e.clientId,c=e.userId,f=e.segments,a=e.testCells,u=e.assistantServiceUrl,l={c:n};if(l.key=i,l.i=o,l.s=s,!r||typeof r!="string")throw new Error("intent is a required parameter of type string");if(!t.domain||typeof t.domain!="string")throw new Error("parameters.domain is a required parameter of type string");if(a&&Object.keys(a).forEach(function(p){l["ef-".concat(p)]=a[p]}),f&&f.length&&(l.us=f),c&&(l.ui=String(c)),t){var d=t.domain,_=t.numResultsPerPage;d&&(l.domain=d),_&&(l.num_results_per_page=_)}l._dt=Date.now(),l=Yr(l);var y=$r(l),h=r.replace(/^\//,"|");return"".concat(u,"/v1/intent/").concat(Zr(Xr(h)),"?").concat(y)}function li(r,t,e){var i=function(s){r.addEventListener(s,function(o){var c=JSON.parse(o.data);t.enqueue({type:s,data:c})})};Object.values(e).forEach(function(n){n!==e.END&&i(n)}),r.addEventListener(e.END,function(){t.close(),r.close()}),r.onerror=function(n){t.error(n),r.close()}}var fi=function(){function r(t){(0,Wr.default)(this,r),this.options=t||{}}return(0,Vr.default)(r,[{key:"getAssistantResultsStream",value:function(e,i){var n,s;try{var o=ci(e,i,this.options);n=new EventSource(o),s=new ReadableStream({start:function(u){li(n,u,r.EventTypes)},cancel:function(){n.close()}})}catch(a){if(s){var c;(c=s)===null||c===void 0||c.cancel()}else{var f;(f=n)===null||f===void 0||f.close()}throw new Error(a.message)}return s}}]),r}();(0,Qr.default)(fi,"EventTypes",{START:"start",GROUP:"group",SEARCH_RESULT:"search_result",ARTICLE_REFERENCE:"article_reference",RECIPE_INFO:"recipe_info",RECIPE_INSTRUCTIONS:"recipe_instructions",SERVER_ERROR:"server_error",IMAGE_META:"image_meta",END:"end"});Ne.exports=fi;Ne.exports.createAssistantUrl=ci;Ne.exports.setupEventListeners=li});var hn=N((Kn,gi)=>{E();"use strict";var vi=X(),en=vi($()),tn=vi(ee()),rn=ut(),nn=wt(),on=mt(),sn=Et(),un=At(),hi=$t(),an=ue(),qe=Z(),cn=ei(),ln=cn.default,fn=ai(),dn=di(),vn=function(){var t="ciojs-client-",e=[];return qe.canUseDOM()||e.push("domless"),typeof U!="undefined"&&typeof U.env!="undefined"&&U.env.BUNDLED&&e.push("bundled"),"".concat(t).concat(e.join("-")).concat(e.length?"-":"").concat(ln)},$e=function(){function r(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};(0,en.default)(this,r);var e=t.apiKey,i=t.version,n=t.serviceUrl,s=t.quizzesServiceUrl,o=t.assistantServiceUrl,c=t.segments,f=t.testCells,a=t.clientId,u=t.sessionId,l=t.userId,d=t.fetch,_=t.trackingSendDelay,y=t.sendReferrerWithTrackingEvents,h=t.sendTrackingEvents,p=t.eventDispatcher,S=t.idOptions,b=t.beaconMode,w=t.networkParameters;if(!e||typeof e!="string")throw new Error("API key is a required parameter of type string");var O,R,m=typeof window!="undefined"&&window.CLIENT_VERSION;if(qe.canUseDOM()){var v=new rn(S||{});O=v.session_id,R=v.client_id}else{if(!u||typeof u!="number")throw new Error("sessionId is a required user parameter of type number");if(!a||typeof a!="string")throw new Error("clientId is a required user parameter of type string")}var A=n&&n.replace(/\/$/,"");this.options={apiKey:e,version:i||m||vn(),serviceUrl:qe.addHTTPSToString(A)||"https://ac.cnstrc.com",quizzesServiceUrl:s&&s.replace(/\/$/,"")||"https://quizzes.cnstrc.com",assistantServiceUrl:o&&o.replace(/\/$/,"")||"https://assistant.cnstrc.com",sessionId:u||O,clientId:a||R,userId:l,segments:c,testCells:f,fetch:d||fetch,trackingSendDelay:_,sendTrackingEvents:h,sendReferrerWithTrackingEvents:y,eventDispatcher:p,beaconMode:b!==!1,networkParameters:w||{}},this.search=new nn(this.options),this.browse=new on(this.options),this.autocomplete=new sn(this.options),this.recommendations=new un(this.options),this.tracker=new hi(this.options),this.quizzes=new fn(this.options),this.assistant=new dn(this.options),new an(t.eventDispatcher).queue("instantiated",this.options)}return(0,tn.default)(r,[{key:"setClientOptions",value:function(e){if(Object.keys(e).length){var i=e.apiKey,n=e.segments,s=e.testCells,o=e.sessionId,c=e.userId,f=c===void 0?"":c;i&&(this.options.apiKey=i),n&&(this.options.segments=n),s&&(this.options.testCells=s),o&&!qe.canUseDOM()&&(this.options.sessionId=o),this.options.userId=f}}}]),r}();$e.Tracker=hi;qe.canUseDOM()&&(window.ConstructorioClient=$e);gi.exports=$e});hn();})(); /*! crc32.js (C) 2014-present SheetJS -- http://sheetjs.com */