PageSourceSearch

https://www.everlaw.com/static/bundle/searchModal/searchModal.js?ts=2026-09-24T20:09:06.754Z

js everlaw.com collected 2026-09-24 22:00:23 UTC 109,611 bytes, 8 lines download raw bytes

1(()=>{var Pi=Object.create;var Mt=Object.defineProperty;var wi=Object.getOwnPropertyDescriptor;var Oi=Object.getOwnPropertyNames;var Ei=Object.getPrototypeOf,Ti=Object.prototype.hasOwnProperty;var q=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}};var _i=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Oi(t))!Ti.call(e,i)&&i!==n&&Mt(e,i,{get:()=>t[i],enumerable:!(r=wi(t,i))||r.enumerable});return e};var Ge=(e,t,n)=>(n=e!=null?Pi(Ei(e)):{},_i(t||!e||!e.__esModule?Mt(n,"default",{value:e,enumerable:!0}):n,e));var Vt=q((Xe,Ye)=>{(function(e,t){typeof Xe=="object"&&typeof Ye<"u"?Ye.exports=t():typeof define=="function"&&define.amd?define(t):(e=e||self).algoliasearch=t()})(Xe,(function(){"use strict";function e(s,a,o){return a in s?Object.defineProperty(s,a,{value:o,enumerable:!0,configurable:!0,writable:!0}):s[a]=o,s}function t(s,a){var o=Object.keys(s);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(s);a&&(u=u.filter((function(h){return Object.getOwnPropertyDescriptor(s,h).enumerable}))),o.push.apply(o,u)}return o}function n(s){for(var a=1;a<arguments.length;a++){var o=arguments[a]!=null?arguments[a]:{};a%2?t(Object(o),!0).forEach((function(u){e(s,u,o[u])})):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(o)):t(Object(o)).forEach((function(u){Object.defineProperty(s,u,Object.getOwnPropertyDescriptor(o,u))}))}return s}function r(s,a){if(s==null)return{};var o,u,h=(function(b,p){if(b==null)return{};var R,P,j={},T=Object.keys(b);for(P=0;P<T.length;P++)R=T[P],p.indexOf(R)>=0||(j[R]=b[R]);return j})(s,a);if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(s);for(u=0;u<y.length;u++)o=y[u],a.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(s,o)&&(h[o]=s[o])}return h}function i(s,a){return(function(o){if(Array.isArray(o))return o})(s)||(function(o,u){if(Symbol.iterator in Object(o)||Object.prototype.toString.call(o)==="[object Arguments]"){var h=[],y=!0,b=!1,p=void 0;try{for(var R,P=o[Symbol.iterator]();!(y=(R=P.next()).done)&&(h.push(R.value),!u||h.length!==u);y=!0);}catch(j){b=!0,p=j}finally{try{y||P.return==null||P.return()}finally{if(b)throw p}}return h}})(s,a)||(function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")})()}function c(s){return(function(a){if(Array.isArray(a)){for(var o=0,u=new Array(a.length);o<a.length;o++)u[o]=a[o];return u}})(s)||(function(a){if(Symbol.iterator in Object(a)||Object.prototype.toString.call(a)==="[object Arguments]")return Array.from(a)})(s)||(function(){throw new TypeError("Invalid attempt to spread non-iterable instance")})()}function f(s){var a,o="algoliasearch-client-js-".concat(s.key),u=function(){return a===void 0&&(a=s.localStorage||window.localStorage),a},h=function(){return JSON.parse(u().getItem(o)||"{}")},y=function(p){u().setItem(o,JSON.stringify(p))},b=function(){var p=s.timeToLive?1e3*s.timeToLive:null,R=h(),P=Object.fromEntries(Object.entries(R).filter((function(T){return i(T,2)[1].timestamp!==void 0})));if(y(P),p){var j=Object.fromEntries(Object.entries(P).filter((function(T){var E=i(T,2)[1],A=new Date().getTime();return!(E.timestamp+p<A)})));y(j)}};return{get:function(p,R){var P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}};return Promise.resolve().then((function(){b();var j=JSON.stringify(p);return h()[j]})).then((function(j){return Promise.all([j?j.value:R(),j!==void 0])})).then((function(j){var T=i(j,2),E=T[0],A=T[1];return Promise.all([E,A||P.miss(E)])})).then((function(j){return i(j,1)[0]}))},set:function(p,R){return Promise.resolve().then((function(){var P=h();return P[JSON.stringify(p)]={timestamp:new Date().getTime(),value:R},u().setItem(o,JSON.stringify(P)),R}))},delete:function(p){return Promise.resolve().then((function(){var R=h();delete R[JSON.stringify(p)],u().setItem(o,JSON.stringify(R))}))},clear:function(){return Promise.resolve().then((function(){u().removeItem(o)}))}}}function d(s){var a=c(s.caches),o=a.shift();return o===void 0?{get:function(u,h){var y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}},b=h();return b.then((function(p){return Promise.all([p,y.miss(p)])})).then((function(p){return i(p,1)[0]}))},set:function(u,h){return Promise.resolve(h)},delete:function(u){return Promise.resolve()},clear:function(){return Promise.resolve()}}:{get:function(u,h){var y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}};return o.get(u,h,y).catch((function(){return d({caches:a}).get(u,h,y)}))},set:function(u,h){return o.set(u,h).catch((function(){return d({caches:a}).set(u,h)}))},delete:function(u){return o.delete(u).catch((function(){return d({caches:a}).delete(u)}))}
1,clear:function(){return o.clear().catch((function(){return d({caches:a}).clear()}))}}}function l(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{serializable:!0},a={};return{get:function(o,u){var h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}},y=JSON.stringify(o);if(y in a)return Promise.resolve(s.serializable?JSON.parse(a[y]):a[y]);var b=u(),p=h&&h.miss||function(){return Promise.resolve()};return b.then((function(R){return p(R)})).then((function(){return b}))},set:function(o,u){return a[JSON.stringify(o)]=s.serializable?JSON.stringify(u):u,Promise.resolve(u)},delete:function(o){return delete a[JSON.stringify(o)],Promise.resolve()},clear:function(){return a={},Promise.resolve()}}}function v(s,a,o){var u={"x-algolia-api-key":o,"x-algolia-application-id":a};return{headers:function(){return s===D.WithinHeaders?u:{}},queryParameters:function(){return s===D.WithinQueryParameters?u:{}}}}function m(s){var a=0;return s((function o(){return a++,new Promise((function(u){setTimeout((function(){u(s(o))}),Math.min(100*a,1e3))}))}))}function g(s){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(o,u){return Promise.resolve()};return Object.assign(s,{wait:function(o){return g(s.then((function(u){return Promise.all([a(u,o),u])})).then((function(u){return u[1]})))}})}function w(s){for(var a=s.length-1;a>0;a--){var o=Math.floor(Math.random()*(a+1)),u=s[a];s[a]=s[o],s[o]=u}return s}function O(s,a){return a&&Object.keys(a).forEach((function(o){s[o]=a[o](s)})),s}function F(s){for(var a=arguments.length,o=new Array(a>1?a-1:0),u=1;u<a;u++)o[u-1]=arguments[u];var h=0;return s.replace(/%s/g,(function(){return encodeURIComponent(o[h++])}))}var D={WithinQueryParameters:0,WithinHeaders:1};function k(s,a){var o=s||{},u=o.data||{};return Object.keys(o).forEach((function(h){["timeout","headers","queryParameters","data","cacheable"].indexOf(h)===-1&&(u[h]=o[h])})),{data:Object.entries(u).length>0?u:void 0,timeout:o.timeout||a,headers:o.headers||{},queryParameters:o.queryParameters||{},cacheable:o.cacheable}}var H={Read:1,Write:2,Any:3},L=1,B=2,Z=3;function se(s){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:L;return n(n({},s),{},{status:a,lastUpdate:Date.now()})}function X(s){return typeof s=="string"?{protocol:"https",url:s,accept:H.Any}:{protocol:s.protocol||"https",url:s.url,accept:s.accept||H.Any}}var ee="DELETE",C="GET",I="POST",ue="PUT";function Be(s,a){return Promise.all(a.map((function(o){return s.get(o,(function(){return Promise.resolve(se(o))}))}))).then((function(o){var u=o.filter((function(b){return(function(p){return p.status===L||Date.now()-p.lastUpdate>12e4})(b)})),h=o.filter((function(b){return(function(p){return p.status===Z&&Date.now()-p.lastUpdate<=12e4})(b)})),y=[].concat(c(u),c(h));return{getTimeout:function(b,p){return(h.length===0&&b===0?1:h.length+3+b)*p},statelessHosts:y.length>0?y.map((function(b){return X(b)})):a}}))}function Oe(s,a,o,u){var h=[],y=(function(E,A){if(!(E.method===C||E.data===void 0&&A.data===void 0)){var _=Array.isArray(E.data)?E.data:n(n({},E.data),A.data);return JSON.stringify(_)}})(o,u),b=(function(E,A){var _=n(n({},E.headers),A.headers),S={};return Object.keys(_).forEach((function(N){var W=_[N];S[N.toLowerCase()]=W})),S})(s,u),p=o.method,R=o.method!==C?{}:n(n({},o.data),u.data),P=n(n(n({"x-algolia-agent":s.userAgent.value},s.queryParameters),R),u.queryParameters),j=0,T=function E(A,_){var S=A.pop();if(S===void 0)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact [email protected].",transporterStackTrace:_t(h)};var N={data:y,headers:b,method:p,url:ur(S,o.path,P),connectTimeout:_(j,s.timeouts.connect),responseTimeout:_(j,u.timeout)},W=function(J){var M={request:N,response:J,host:S,triesLeft:A.length};return h.push(M),M},ye={onSuccess:function(J){return(function(M){try{return JSON.parse(M.content)}catch(ae){throw(function(te,le){return{name:"DeserializationError",message:te,response:le}})(ae.message,M)}})(J)},onRetry:function(J){var M=W(J);return J.isTimedOut&&j++,Promise.all([s.logger.info("Retryable failure",kt(M)),s.hostsCache.set(S,se(S,J.isTimedOut?Z:B))]).then((function(){return E(A,_)}))},onFail:function(J){throw W(J),(function(M,ae){var te=M.content,le=M.status,Re=te;try{Re=JSON.parse(te).message}catch{}return(function(Te,$e,xi){return{name:"ApiError",message:Te,status:$e,transporterStackTrace:xi}})(Re,le,ae)})(J,_t(h))}};return s.requester.send(N).then((function(J){return(function(M,ae){return(function(te){var le=te.status;return te.isTimedOut||(function(Re){var Te=Re.isTimedOut,$e=Re.status;return!Te&&~~$e==0})(te)||~~(le/100)!=2&&~~(le/100)!=4})(M)?ae.onRetry(M):~~(M.status/100)==2?ae.onSuccess(M):ae.onFail(M)})(J,ye)}))};return Be(s.hostsCache,a).then((function(E){return T(c(E.statelessHosts).reverse(),E.getTimeout)}))}function pe(s){var a=s.hostsCache,o=s.logger,u=s.requester,h=s.requestsCache,y=s.responsesCache,b=s.timeouts,p=s.userAgent,R=s.hosts,P=s.queryParameters,j={hostsCache:a,logger:o,requester:u,requestsCache:h,responsesCache:y,timeouts:b,userAgent:p,headers:s.headers,queryParameters:P,hosts:R.map((function(T){return X(T)})),read:function(T,E){var A=k(E,j.timeouts.read),_=function(){return Oe(j,j.hosts.filter((function(N){return(N.accept&H.Read)!=0})),T,A)};
1if((A.cacheable!==void 0?A.cacheable:T.cacheable)!==!0)return _();var S={request:T,mappedRequestOptions:A,transporter:{queryParameters:j.queryParameters,headers:j.headers}};return j.responsesCache.get(S,(function(){return j.requestsCache.get(S,(function(){return j.requestsCache.set(S,_()).then((function(N){return Promise.all([j.requestsCache.delete(S),N])}),(function(N){return Promise.all([j.requestsCache.delete(S),Promise.reject(N)])})).then((function(N){var W=i(N,2);return W[0],W[1]}))}))}),{miss:function(N){return j.responsesCache.set(S,N)}})},write:function(T,E){return Oe(j,j.hosts.filter((function(A){return(A.accept&H.Write)!=0})),T,k(E,j.timeouts.write))}};return j}function cr(s){var a={value:"Algolia for JavaScript (".concat(s,")"),add:function(o){var u="; ".concat(o.segment).concat(o.version!==void 0?" (".concat(o.version,")"):"");return a.value.indexOf(u)===-1&&(a.value="".concat(a.value).concat(u)),a}};return a}function ur(s,a,o){var u=Tt(o),h="".concat(s.protocol,"://").concat(s.url,"/").concat(a.charAt(0)==="/"?a.substr(1):a);return u.length&&(h+="?".concat(u)),h}function Tt(s){return Object.keys(s).map((function(a){return F("%s=%s",a,(o=s[a],Object.prototype.toString.call(o)==="[object Object]"||Object.prototype.toString.call(o)==="[object Array]"?JSON.stringify(s[a]):s[a]));var o})).join("&")}function _t(s){return s.map((function(a){return kt(a)}))}function kt(s){var a=s.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return n(n({},s),{},{request:n(n({},s.request),{},{headers:n(n({},s.request.headers),a)})})}var fr=function(s){return function(a,o){return s.transporter.write({method:I,path:"2/abtests",data:a},o)}},hr=function(s){return function(a,o){return s.transporter.write({method:ee,path:F("2/abtests/%s",a)},o)}},lr=function(s){return function(a,o){return s.transporter.read({method:C,path:F("2/abtests/%s",a)},o)}},dr=function(s){return function(a){return s.transporter.read({method:C,path:"2/abtests"},a)}},mr=function(s){return function(a,o){return s.transporter.write({method:I,path:F("2/abtests/%s/stop",a)},o)}},pr=function(s){return function(a){return s.transporter.read({method:C,path:"1/strategies/personalization"},a)}},vr=function(s){return function(a,o){return s.transporter.write({method:I,path:"1/strategies/personalization",data:a},o)}};function Me(s){return(function a(o){return s.request(o).then((function(u){if(s.batch!==void 0&&s.batch(u.hits),!s.shouldStop(u))return u.cursor?a({cursor:u.cursor}):a({page:(o.page||0)+1})}))})({})}var gr=function(s){return function(a,o){var u=o||{},h=u.queryParameters,y=r(u,["queryParameters"]),b=n({acl:a},h!==void 0?{queryParameters:h}:{});return g(s.transporter.write({method:I,path:"1/keys",data:b},y),(function(p,R){return m((function(P){return ve(s)(p.key,R).catch((function(j){if(j.status!==404)throw j;return P()}))}))}))}},yr=function(s){return function(a,o,u){var h=k(u);return h.queryParameters["X-Algolia-User-ID"]=a,s.transporter.write({method:I,path:"1/clusters/mapping",data:{cluster:o}},h)}},Rr=function(s){return function(a,o,u){return s.transporter.write({method:I,path:"1/clusters/mapping/batch",data:{users:a,cluster:o}},u)}},br=function(s){return function(a,o){return g(s.transporter.write({method:I,path:F("/1/dictionaries/%s/batch",a),data:{clearExistingDictionaryEntries:!0,requests:{action:"addEntry",body:[]}}},o),(function(u,h){return fe(s)(u.taskID,h)}))}},Ee=function(s){return function(a,o,u){return g(s.transporter.write({method:I,path:F("1/indexes/%s/operation",a),data:{operation:"copy",destination:o}},u),(function(h,y){return ge(s)(a,{methods:{waitTask:U}}).waitTask(h.taskID,y)}))}},Fr=function(s){return function(a,o,u){return Ee(s)(a,o,n(n({},u),{},{scope:[ze.Rules]}))}},jr=function(s){return function(a,o,u){return Ee(s)(a,o,n(n({},u),{},{scope:[ze.Settings]}))}},xr=function(s){return function(a,o,u){return Ee(s)(a,o,n(n({},u),{},{scope:[ze.Synonyms]}))}},Pr=function(s){return function(a,o){return a.method===C?s.transporter.read(a,o):s.transporter.write(a,o)}},wr=function(s){return function(a,o){return g(s.transporter.write({method:ee,path:F("1/keys/%s",a)},o),(function(u,h){return m((function(y){return ve(s)(a,h).then(y).catch((function(b){if(b.status!==404)throw b}))}))}))}},Or=function(s){return function(a,o,u){var h=o.map((function(y){return{action:"deleteEntry",body:{objectID:y}}}));return g(s.transporter.write({method:I,path:F("/1/dictionaries/%s/batch",a),data:{clearExistingDictionaryEntries:!1,requests:h}},u),(function(y,b){return fe(s)(y.taskID,b)}))}},ve=function(s){return function(a,o){return s.transporter.read({method:C,path:F("1/keys/%s",a)},o)}},It=function(s){return function(a,o){return s.transporter.read({method:C,path:F("1/task/%s",a.toString())},o)}},Er=function(s){return function(a){return s.transporter.read({method:C,path:"/1/dictionaries/*/settings"},a)}},Tr=function(s){return function(a){return s.transporter.read({method:C,path:"1/logs"},a)}},_r=function(s){return function(a){return s.transporter.read({method:C,path:"1/clusters/mapping/top"},a)}},kr=function(s){return function(a,o){return s.transporter.read({method:C,path:F("1/clusters/mapping/%s",a)},o)}},Ir=function(s){return function(a){var o=a||{},u=o.retrieveMappings,h=r(o,["retrieveMappings"]);return u===!0&&(h.getClusters=!0),s.transporter.read({method:C,path:"1/clusters/mapping/pending"},h)}},ge=function(s){return function(a){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u={transporter:s.transporter,appId:s.appId,indexName:a};return O(u,o.methods)}},Ar=function(s){return function(a){return s.transporter.read({method:C,path:"1/keys"},a)}},Dr=function(s){return function(a){return s.transporter.read({method:C,path:"1/clusters"},a)}},Sr=function(s){return function(a){return s.transporter.read({method:C,path:"1/indexes"},a)}},qr=function(s){return function(a){return s.transporter.read({method:C,path:"1/clusters/mapping"},a)}},Cr=function(s){return function(a,o,u){return g(s.transporter.write({method:I,path:F("1/indexes/%s/operation",a),data:{operation:"move",destination:o}},u),(function(h,y){return ge(s)(a,{methods:{waitTask:U}}).waitTask(h.taskID,y)}))}},Hr=function(s){return function(a,o){return g(s.transporter.write({method:I,path:"1/indexes/*/batch",data:{requests:a}},o),(function(u,h){return Promise.all(Object.keys(u.taskID).map((function(y){return ge(s)(y,{methods:{waitTask:U}}).waitTask(u.taskID[y],h)})))}))}},Nr=function(s){return function(a,o){return s.transporter.read({method:I,path:"1/indexes/*/objects",data:{requests:a}},o)}},At=function(s){return function(a,o){var u=a.map((function(h){return n(n({},h),{},{params:Tt(h.params||{})})}));return s.transporter.read({method:I,path:"1/indexes/*/queries",data:{requests:u},cacheable:!0},o)}},Dt=function(s){return function(a,o){return Promise.all(a.map((function(u){var h=u.params,y=h.facetName,b=h.facetQuery,p=r(h,["facetName","facetQuery"]);return ge(s)(u.indexName,{methods:{searchForFacetValues:Qt}}).searchForFacetValues(y,b,n(n({},o),p))})))}},Qr=function(s){return function(a,o){var u=k(o);return u.queryParameters["X-Algolia-User-ID"]=a,s.transporter.write({method:ee,path:"1/clusters/mapping"},u)}},Ur=function(s){return function(a,o,u){var h=o.map((function(y){return{action:"addEntry",body:y}}));return g(s.transporter.write({method:I,path:F("/1/dictionaries/%s/batch",a),data:{clearExistingDictionaryEntries:!0,requests:h}},u),(function(y,b){return fe(s)(y.taskID,b)}))}},Lr=function(s){return function(a,o){return g(s.transporter.write({method:I,path:F("1/keys/%s/restore",a)},o),(function(u,h){return m((function(y){return ve(s)(a,h).catch((function(b){if(b.status!==404)throw b;return y()}))}))}))}},Br=function(s){return function(a,o,u){var h=o.map((function(y){return{action:"addEntry",body:y}}));return g(s.transporter.write({method:I,path:F("/1/dictionaries/%s/batch",a),data:{clearExistingDictionaryEntries:!1,requests:h}},u),(function(y,b){return fe(s)(y.taskID,b)}))}},Mr=function(s){return function(a,o,u){return s.transporter.read({method:I,path:F("/1/dictionaries/%s/search",a),data:{query:o}
1,cacheable:!0},u)}},Vr=function(s){return function(a,o){return s.transporter.read({method:I,path:"1/clusters/mapping/search",data:{query:a}},o)}},Wr=function(s){return function(a,o){return g(s.transporter.write({method:ue,path:"/1/dictionaries/*/settings",data:a},o),(function(u,h){return fe(s)(u.taskID,h)}))}},Jr=function(s){return function(a,o){var u=Object.assign({},o),h=o||{},y=h.queryParameters,b=r(h,["queryParameters"]),p=y?{queryParameters:y}:{},R=["acl","indexes","referers","restrictSources","queryParameters","description","maxQueriesPerIPPerHour","maxHitsPerQuery"];return g(s.transporter.write({method:ue,path:F("1/keys/%s",a),data:p},b),(function(P,j){return m((function(T){return ve(s)(a,j).then((function(E){return(function(A){return Object.keys(u).filter((function(_){return R.indexOf(_)!==-1})).every((function(_){if(Array.isArray(A[_])&&Array.isArray(u[_])){var S=A[_];return S.length===u[_].length&&S.every((function(N,W){return N===u[_][W]}))}return A[_]===u[_]}))})(E)?Promise.resolve():T()}))}))}))}},fe=function(s){return function(a,o){return m((function(u){return It(s)(a,o).then((function(h){return h.status!=="published"?u():void 0}))}))}},St=function(s){return function(a,o){return g(s.transporter.write({method:I,path:F("1/indexes/%s/batch",s.indexName),data:{requests:a}},o),(function(u,h){return U(s)(u.taskID,h)}))}},Kr=function(s){return function(a){return Me(n(n({shouldStop:function(o){return o.cursor===void 0}},a),{},{request:function(o){return s.transporter.read({method:I,path:F("1/indexes/%s/browse",s.indexName),data:o},a)}}))}},zr=function(s){return function(a){var o=n({hitsPerPage:1e3},a);return Me(n(n({shouldStop:function(u){return u.hits.length<o.hitsPerPage}},o),{},{request:function(u){return Ut(s)("",n(n({},o),u)).then((function(h){return n(n({},h),{},{hits:h.hits.map((function(y){return delete y._highlightResult,y}))})}))}}))}},$r=function(s){return function(a){var o=n({hitsPerPage:1e3},a);return Me(n(n({shouldStop:function(u){return u.hits.length<o.hitsPerPage}},o),{},{request:function(u){return Lt(s)("",n(n({},o),u)).then((function(h){return n(n({},h),{},{hits:h.hits.map((function(y){return delete y._highlightResult,y}))})}))}}))}},Ve=function(s){return function(a,o,u){var h=u||{},y=h.batchSize,b=r(h,["batchSize"]),p={taskIDs:[],objectIDs:[]};return g((function R(){var P,j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,T=[];for(P=j;P<a.length&&(T.push(a[P]),T.length!==(y||1e3));P++);return T.length===0?Promise.resolve(p):St(s)(T.map((function(E){return{action:o,body:E}})),b).then((function(E){return p.objectIDs=p.objectIDs.concat(E.objectIDs),p.taskIDs.push(E.taskID),P++,R(P)}))})(),(function(R,P){return Promise.all(R.taskIDs.map((function(j){return U(s)(j,P)})))}))}},Gr=function(s){return function(a){return g(s.transporter.write({method:I,path:F("1/indexes/%s/clear",s.indexName)},a),(function(o,u){return U(s)(o.taskID,u)}))}},Xr=function(s){return function(a){var o=a||{},u=o.forwardToReplicas,h=k(r(o,["forwardToReplicas"]));return u&&(h.queryParameters.forwardToReplicas=1),g(s.transporter.write({method:I,path:F("1/indexes/%s/rules/clear",s.indexName)},h),(function(y,b){return U(s)(y.taskID,b)}))}},Yr=function(s){return function(a){var o=a||{},u=o.forwardToReplicas,h=k(r(o,["forwardToReplicas"]));return u&&(h.queryParameters.forwardToReplicas=1),g(s.transporter.write({method:I,path:F("1/indexes/%s/synonyms/clear",s.indexName)},h),(function(y,b){return U(s)(y.taskID,b)}))}},Zr=function(s){return function(a,o){return g(s.transporter.write({method:I,path:F("1/indexes/%s/deleteByQuery",s.indexName),data:a},o),(function(u,h){return U(s)(u.taskID,h)}))}},ei=function(s){return function(a){return g(s.transporter.write({method:ee,path:F("1/indexes/%s",s.indexName)},a),(function(o,u){return U(s)(o.taskID,u)}))}},ti=function(s){return function(a,o){return g(qt(s)([a],o).then((function(u){return{taskID:u.taskIDs[0]}})),(function(u,h){return U(s)(u.taskID,h)}))}},qt=function(s){return function(a,o){var u=a.map((function(h){return{objectID:h}}));return Ve(s)(u,he.DeleteObject,o)}},ni=function(s){return function(a,o){var u=o||{},h=u.forwardToReplicas,y=k(r(u,["forwardToReplicas"]));return h&&(y.queryParameters.forwardToReplicas=1),g(s.transporter.write({method:ee,path:F("1/indexes/%s/rules/%s",s.indexName,a)},y),(function(b,p){return U(s)(b.taskID,p)}))}},ri=function(s){return function(a,o){var u=o||{},h=u.forwardToReplicas,y=k(r(u,["forwardToReplicas"]));return h&&(y.queryParameters.forwardToReplicas=1),g(s.transporter.write({method:ee,path:F("1/indexes/%s/synonyms/%s",s.indexName,a)},y),(function(b,p){return U(s)(b.taskID,p)}))}},ii=function(s){return function(a){return Ct(s)(a).then((function(){return!0}
1)).catch((function(o){if(o.status!==404)throw o;return!1}))}},si=function(s){return function(a,o,u){return s.transporter.read({method:I,path:F("1/answers/%s/prediction",s.indexName),data:{query:a,queryLanguages:o},cacheable:!0},u)}},ai=function(s){return function(a,o){var u=o||{},h=u.query,y=u.paginate,b=r(u,["query","paginate"]),p=0;return(function R(){return Nt(s)(h||"",n(n({},b),{},{page:p})).then((function(P){for(var j=0,T=Object.entries(P.hits);j<T.length;j++){var E=i(T[j],2),A=E[0],_=E[1];if(a(_))return{object:_,position:parseInt(A,10),page:p}}if(p++,y===!1||p>=P.nbPages)throw{name:"ObjectNotFoundError",message:"Object not found."};return R()}))})()}},oi=function(s){return function(a,o){return s.transporter.read({method:C,path:F("1/indexes/%s/%s",s.indexName,a)},o)}},ci=function(){return function(s,a){for(var o=0,u=Object.entries(s.hits);o<u.length;o++){var h=i(u[o],2),y=h[0];if(h[1].objectID===a)return parseInt(y,10)}return-1}},ui=function(s){return function(a,o){var u=o||{},h=u.attributesToRetrieve,y=r(u,["attributesToRetrieve"]),b=a.map((function(p){return n({indexName:s.indexName,objectID:p},h?{attributesToRetrieve:h}:{})}));return s.transporter.read({method:I,path:"1/indexes/*/objects",data:{requests:b}},y)}},fi=function(s){return function(a,o){return s.transporter.read({method:C,path:F("1/indexes/%s/rules/%s",s.indexName,a)},o)}},Ct=function(s){return function(a){return s.transporter.read({method:C,path:F("1/indexes/%s/settings",s.indexName),data:{getVersion:2}},a)}},hi=function(s){return function(a,o){return s.transporter.read({method:C,path:F("1/indexes/%s/synonyms/%s",s.indexName,a)},o)}},li=function(s){return function(a,o){return g(Ht(s)([a],o).then((function(u){return{objectID:u.objectIDs[0],taskID:u.taskIDs[0]}})),(function(u,h){return U(s)(u.taskID,h)}))}},Ht=function(s){return function(a,o){var u=o||{},h=u.createIfNotExists,y=r(u,["createIfNotExists"]),b=h?he.PartialUpdateObject:he.PartialUpdateObjectNoCreate;return Ve(s)(a,b,y)}},di=function(s){return function(a,o){var u=o||{},h=u.safe,y=u.autoGenerateObjectIDIfNotExist,b=u.batchSize,p=r(u,["safe","autoGenerateObjectIDIfNotExist","batchSize"]),R=function(_,S,N,W){return g(s.transporter.write({method:I,path:F("1/indexes/%s/operation",_),data:{operation:N,destination:S}},W),(function(ye,J){return U(s)(ye.taskID,J)}))},P=Math.random().toString(36).substring(7),j="".concat(s.indexName,"_tmp_").concat(P),T=We({appId:s.appId,transporter:s.transporter,indexName:j}),E=[],A=R(s.indexName,j,"copy",n(n({},p),{},{scope:["settings","synonyms","rules"]}));return E.push(A),g((h?A.wait(p):A).then((function(){var _=T(a,n(n({},p),{},{autoGenerateObjectIDIfNotExist:y,batchSize:b}));return E.push(_),h?_.wait(p):_})).then((function(){var _=R(j,s.indexName,"move",p);return E.push(_),h?_.wait(p):_})).then((function(){return Promise.all(E)})).then((function(_){var S=i(_,3),N=S[0],W=S[1],ye=S[2];return{objectIDs:W.objectIDs,taskIDs:[N.taskID].concat(c(W.taskIDs),[ye.taskID])}})),(function(_,S){return Promise.all(E.map((function(N){return N.wait(S)})))}))}},mi=function(s){return function(a,o){return Je(s)(a,n(n({},o),{},{clearExistingRules:!0}))}},pi=function(s){return function(a,o){return Ke(s)(a,n(n({},o),{},{clearExistingSynonyms:!0}))}},vi=function(s){return function(a,o){return g(We(s)([a],o).then((function(u){return{objectID:u.objectIDs[0],taskID:u.taskIDs[0]}})),(function(u,h){return U(s)(u.taskID,h)}))}},We=function(s){return function(a,o){var u=o||{},h=u.autoGenerateObjectIDIfNotExist,y=r(u,["autoGenerateObjectIDIfNotExist"]),b=h?he.AddObject:he.UpdateObject;if(b===he.UpdateObject){var p=!0,R=!1,P=void 0;try{for(var j,T=a[Symbol.iterator]();!(p=(j=T.next()).done);p=!0)if(j.value.objectID===void 0)return g(Promise.reject({name:"MissingObjectIDError",message:"All objects must have an unique objectID (like a primary key) to be valid. Algolia is also able to generate objectIDs automatically but *it's not recommended*. To do it, use the `{'autoGenerateObjectIDIfNotExist': true}` option."}))}catch(E){R=!0,P=E}finally{try{p||T.return==null||T.return()}finally{if(R)throw P}}}return Ve(s)(a,b,y)}},gi=function(s){return function(a,o){return Je(s)([a],o)}},Je=function(s){return function(a,o){var u=o||{},h=u.forwardToReplicas,y=u.clearExistingRules,b=k(r(u,["forwardToReplicas","clearExistingRules"]));return h&&(b.queryParameters.forwardToReplicas=1),y&&(b.queryParameters.clearExistingRules=1),g(s.transporter.write({method:I,path:F("1/indexes/%s/rules/batch",s.indexName),data:a}
1,b),(function(p,R){return U(s)(p.taskID,R)}))}},yi=function(s){return function(a,o){return Ke(s)([a],o)}},Ke=function(s){return function(a,o){var u=o||{},h=u.forwardToReplicas,y=u.clearExistingSynonyms,b=u.replaceExistingSynonyms,p=k(r(u,["forwardToReplicas","clearExistingSynonyms","replaceExistingSynonyms"]));return h&&(p.queryParameters.forwardToReplicas=1),(b||y)&&(p.queryParameters.replaceExistingSynonyms=1),g(s.transporter.write({method:I,path:F("1/indexes/%s/synonyms/batch",s.indexName),data:a},p),(function(R,P){return U(s)(R.taskID,P)}))}},Nt=function(s){return function(a,o){return s.transporter.read({method:I,path:F("1/indexes/%s/query",s.indexName),data:{query:a},cacheable:!0},o)}},Qt=function(s){return function(a,o,u){return s.transporter.read({method:I,path:F("1/indexes/%s/facets/%s/query",s.indexName,a),data:{facetQuery:o},cacheable:!0},u)}},Ut=function(s){return function(a,o){return s.transporter.read({method:I,path:F("1/indexes/%s/rules/search",s.indexName),data:{query:a}},o)}},Lt=function(s){return function(a,o){return s.transporter.read({method:I,path:F("1/indexes/%s/synonyms/search",s.indexName),data:{query:a}},o)}},Ri=function(s){return function(a,o){var u=o||{},h=u.forwardToReplicas,y=k(r(u,["forwardToReplicas"]));return h&&(y.queryParameters.forwardToReplicas=1),g(s.transporter.write({method:ue,path:F("1/indexes/%s/settings",s.indexName),data:a},y),(function(b,p){return U(s)(b.taskID,p)}))}},U=function(s){return function(a,o){return m((function(u){return(function(h){return function(y,b){return h.transporter.read({method:C,path:F("1/indexes/%s/task/%s",h.indexName,y.toString())},b)}})(s)(a,o).then((function(h){return h.status!=="published"?u():void 0}))}))}},he={AddObject:"addObject",UpdateObject:"updateObject",PartialUpdateObject:"partialUpdateObject",PartialUpdateObjectNoCreate:"partialUpdateObjectNoCreate",DeleteObject:"deleteObject",DeleteIndex:"delete",ClearIndex:"clear"},ze={Settings:"settings",Synonyms:"synonyms",Rules:"rules"},bi=1,Fi=2,ji=3;function Bt(s,a,o){var u,h={appId:s,apiKey:a,timeouts:{connect:1,read:2,write:30},requester:{send:function(p){return new Promise((function(R){var P=new XMLHttpRequest;P.open(p.method,p.url,!0),Object.keys(p.headers).forEach((function(A){return P.setRequestHeader(A,p.headers[A])}));var j,T=function(A,_){return setTimeout((function(){P.abort(),R({status:0,content:_,isTimedOut:!0})}),1e3*A)},E=T(p.connectTimeout,"Connection timeout");P.onreadystatechange=function(){P.readyState>P.OPENED&&j===void 0&&(clearTimeout(E),j=T(p.responseTimeout,"Socket timeout"))},P.onerror=function(){P.status===0&&(clearTimeout(E),clearTimeout(j),R({content:P.responseText||"Network request failed",status:P.status,isTimedOut:!1}))},P.onload=function(){clearTimeout(E),clearTimeout(j),R({content:P.responseText,status:P.status,isTimedOut:!1})},P.send(p.data)}))}},logger:(u=ji,{debug:function(p,R){return bi>=u&&console.debug(p,R),Promise.resolve()},info:function(p,R){return Fi>=u&&console.info(p,R),Promise.resolve()},error:function(p,R){return console.error(p,R),Promise.resolve()}}),responsesCache:l(),requestsCache:l({serializable:!1}),hostsCache:d({caches:[f({key:"".concat("4.22.0","-").concat(s)}),l()]}),userAgent:cr("4.22.0").add({segment:"Browser"})},y=n(n({},h),o),b=function(){return function(p){return(function(R){var P=R.region||"us",j=v(D.WithinHeaders,R.appId,R.apiKey),T=pe(n(n({hosts:[{url:"personalization.".concat(P,".algolia.com")}]},R),{},{headers:n(n(n({},j.headers()),{"content-type":"application/json"}),R.headers),queryParameters:n(n({},j.queryParameters()),R.queryParameters)}));return O({appId:R.appId,transporter:T},R.methods)})(n(n(n({},h),p),{},{methods:{getPersonalizationStrategy:pr,setPersonalizationStrategy:vr}}))}};return(function(p){var R=p.appId,P=v(p.authMode!==void 0?p.authMode:D.WithinHeaders,R,p.apiKey),j=pe(n(n({hosts:[{url:"".concat(R,"-dsn.algolia.net"),accept:H.Read},{url:"".concat(R,".algolia.net"),accept:H.Write}].concat(w([{url:"".concat(R,"-1.algolianet.com")},{url:"".concat(R,"-2.algolianet.com")},{url:"".concat(R,"-3.algolianet.com")}]))},p),{},{headers:n(n(n({},P.headers()),{"content-type":"application/x-www-form-urlencoded"}),p.headers),queryParameters:n(n({},P.queryParameters()),p.queryParameters)}));return O({transporter:j,appId:R,addAlgoliaAgent:function(T,E){j.userAgent.add({segment:T,version:E})},clearCache:function(){return Promise.all([j.requestsCache.clear(),j.responsesCache.clear()]).then((function(){}))}},p.methods)})(n(n({},y),{},{methods:{search:At,searchForFacetValues:Dt,multipleBatch:Hr,multipleGetObjects:Nr,multipleQueries:At,copyIndex:Ee,copySettings:jr,copySynonyms:xr,copyRules:Fr,moveIndex:Cr,listIndices:Sr,getLogs:Tr,listCluster
1s:Dr,multipleSearchForFacetValues:Dt,getApiKey:ve,addApiKey:gr,listApiKeys:Ar,updateApiKey:Jr,deleteApiKey:wr,restoreApiKey:Lr,assignUserID:yr,assignUserIDs:Rr,getUserID:kr,searchUserIDs:Vr,listUserIDs:qr,getTopUserIDs:_r,removeUserID:Qr,hasPendingMappings:Ir,clearDictionaryEntries:br,deleteDictionaryEntries:Or,getDictionarySettings:Er,getAppTask:It,replaceDictionaryEntries:Ur,saveDictionaryEntries:Br,searchDictionaryEntries:Mr,setDictionarySettings:Wr,waitAppTask:fe,customRequest:Pr,initIndex:function(p){return function(R){return ge(p)(R,{methods:{batch:St,delete:ei,findAnswers:si,getObject:oi,getObjects:ui,saveObject:vi,saveObjects:We,search:Nt,searchForFacetValues:Qt,waitTask:U,setSettings:Ri,getSettings:Ct,partialUpdateObject:li,partialUpdateObjects:Ht,deleteObject:ti,deleteObjects:qt,deleteBy:Zr,clearObjects:Gr,browseObjects:Kr,getObjectPosition:ci,findObject:ai,exists:ii,saveSynonym:yi,saveSynonyms:Ke,getSynonym:hi,searchSynonyms:Lt,browseSynonyms:$r,deleteSynonym:ri,clearSynonyms:Yr,replaceAllObjects:di,replaceAllSynonyms:pi,searchRules:Ut,getRule:fi,deleteRule:ni,saveRule:gi,saveRules:Je,replaceAllRules:mi,browseRules:zr,clearRules:Xr}})}},initAnalytics:function(){return function(p){return(function(R){var P=R.region||"us",j=v(D.WithinHeaders,R.appId,R.apiKey),T=pe(n(n({hosts:[{url:"analytics.".concat(P,".algolia.com")}]},R),{},{headers:n(n(n({},j.headers()),{"content-type":"application/json"}),R.headers),queryParameters:n(n({},j.queryParameters()),R.queryParameters)}));return O({appId:R.appId,transporter:T},R.methods)})(n(n(n({},h),p),{},{methods:{addABTest:fr,getABTest:lr,getABTests:dr,stopABTest:mr,deleteABTest:hr}}))}},initPersonalization:b,initRecommendation:function(){return function(p){return y.logger.info("The `initRecommendation` method is deprecated. Use `initPersonalization` instead."),b()(p)}}}}))}return Bt.version="4.22.0",Bt}))});var be=q((Pa,Wt)=>{"use strict";function ki(e){return typeof e=="object"&&e!==null?Ze(Array.isArray(e)?[]:{},e):e}function _e(e){return typeof e=="function"||Array.isArray(e)||Object.prototype.toString.call(e)==="[object Object]"}function Ze(e,t){if(e===t)return e;for(var n in t)if(!(!Object.prototype.hasOwnProperty.call(t,n)||n==="__proto__"||n==="constructor")){var r=t[n],i=e[n];typeof i<"u"&&typeof r>"u"||(_e(i)&&_e(r)?e[n]=Ze(i,r):e[n]=ki(r))}return e}function Ii(e){_e(e)||(e={});for(var t=1,n=arguments.length;t<n;t++){var r=arguments[t];_e(r)&&Ze(e,r)}return e}Wt.exports=Ii});var ke=q((wa,Jt)=>{"use strict";Jt.exports=function(){var t=Array.prototype.slice.call(arguments);return t.reduceRight(function(n,r){return Object.keys(Object(r)).forEach(function(i){r[i]!==void 0&&(n[i]!==void 0&&delete n[i],n[i]=r[i])}),n},{})}});var zt=q((Oa,Kt)=>{"use strict";function Ai(e,t){return e.filter(function(n,r){return t.indexOf(n)>-1&&e.indexOf(n)===r})}Kt.exports=Ai});var Fe=q((Ea,$t)=>{"use strict";$t.exports=function(t,n){if(Array.isArray(t)){for(var r=0;r<t.length;r++)if(n(t[r]))return t[r]}}});var Yt=q((Ta,Xt)=>{"use strict";function Gt(e){if(typeof e=="number")return e;if(typeof e=="string")return parseFloat(e);if(Array.isArray(e))return e.map(Gt);throw new Error("The value should be a number, a parsable string or an array of those.")}Xt.exports=Gt});var Ie=q((_a,Zt)=>{"use strict";function Di(e,t){if(e===null)return{};var n={},r=Object.keys(e),i,c;for(c=0;c<r.length;c++)i=r[c],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}Zt.exports=Di});var Ae=q((ka,en)=>{"use strict";function Si(e){return e&&Object.keys(e).length>0}en.exports=Si});var nn=q((Ia,tn)=>{"use strict";tn.exports=function(t){return t===null?!1:/^[a-zA-Z0-9_-]{1,64}$/.test(t)}});var sn=q((Aa,rn)=>{"use strict";var qi=ke(),Ci=Ie(),Hi=Ae(),oe={addRefinement:function(t,n,r){if(oe.isRefined(t,n,r))return t;var i=""+r,c=t[n]?t[n].concat(i):[i],f={};return f[n]=c,qi({},f,t)},removeRefinement:function(t,n,r){if(r===void 0)return oe.clearRefinement(t,function(c,f){return n===f});var i=""+r;return oe.clearRefinement(t,function(c,f){return n===f&&i===c})},toggleRefinement:function(t,n,r){if(r===void 0)throw new Error("toggleRefinement should be used with a value");return oe.isRefined(t,n,r)?oe.removeRefinement(t,n,r):oe.addRefinement(t,n,r)},clearRefinement:function(t,n,r){if(n===void 0)return Hi(t)?{}:t;if(typeof n=="string")return Ci(t,[n]);if(typeof n=="function"){var i=!1,c=Object.keys(t).reduce(function(f,d){var l=t[d]||[],v=l.filter(function(m){return!n(m,d,r)});return v.length!==l.length&&(i=!0),f[d]=v,f},{});return i?c:t}},isRefined:function(t,n,r){var i=!!t[n]&&t[n].length>0;if(r===void 0||!i)return i;var c=""+r;return t[n].indexOf(c)!==-1}};rn.exports=oe});var st=q((Da,un)=>{"use strict";var nt=be(),et=ke(),an=zt(),cn=Fe(),tt=Yt(),on=Ie(),rt=Ae(),Ni=nn(),Q=sn();function it(e,t){return Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every(function(n,r){return it(t[r],n)}):e===t}function Qi(e,t){return cn(e,function(n){return it(n,t)})}function K(e){var t=e?K._parseNumbers(e):{};t.userToken!==void 0&&!Ni(t.userToken)&&console.warn("[algoliasearch-helper] The `userToken` parameter is invali
1d. This can lead to wrong analytics.\n  - Format: [a-zA-Z0-9_-]{1,64}"),this.facets=t.facets||[],this.disjunctiveFacets=t.disjunctiveFacets||[],this.hierarchicalFacets=t.hierarchicalFacets||[],this.facetsRefinements=t.facetsRefinements||{},this.facetsExcludes=t.facetsExcludes||{},this.disjunctiveFacetsRefinements=t.disjunctiveFacetsRefinements||{},this.numericRefinements=t.numericRefinements||{},this.tagRefinements=t.tagRefinements||[],this.hierarchicalFacetsRefinements=t.hierarchicalFacetsRefinements||{};var n=this;Object.keys(t).forEach(function(r){var i=K.PARAMETERS.indexOf(r)!==-1,c=t[r]!==void 0;!i&&c&&(n[r]=t[r])})}K.PARAMETERS=Object.keys(new K);K._parseNumbers=function(e){if(e instanceof K)return e;var t={},n=["aroundPrecision","aroundRadius","getRankingInfo","minWordSizefor2Typos","minWordSizefor1Typo","page","maxValuesPerFacet","distinct","minimumAroundRadius","hitsPerPage","minProximity"];if(n.forEach(function(i){var c=e[i];if(typeof c=="string"){var f=parseFloat(c);t[i]=isNaN(f)?c:f}}),Array.isArray(e.insideBoundingBox)&&(t.insideBoundingBox=e.insideBoundingBox.map(function(i){return Array.isArray(i)?i.map(function(c){return parseFloat(c)}):i})),e.numericRefinements){var r={};Object.keys(e.numericRefinements).forEach(function(i){var c=e.numericRefinements[i]||{};r[i]={},Object.keys(c).forEach(function(f){var d=c[f],l=d.map(function(v){return Array.isArray(v)?v.map(function(m){return typeof m=="string"?parseFloat(m):m}):typeof v=="string"?parseFloat(v):v});r[i][f]=l})}),t.numericRefinements=r}return nt({},e,t)};K.make=function(t){var n=new K(t),r=t.hierarchicalFacets||[];return r.forEach(function(i){if(i.rootPath){var c=n.getHierarchicalRefinement(i.name);c.length>0&&c[0].indexOf(i.rootPath)!==0&&(n=n.clearRefinements(i.name)),c=n.getHierarchicalRefinement(i.name),c.length===0&&(n=n.toggleHierarchicalFacetRefinement(i.name,i.rootPath))}}),n};K.validate=function(e,t){var n=t||{};return e.tagFilters&&n.tagRefinements&&n.tagRefinements.length>0?new Error("[Tags] Cannot switch from the managed tag API to the advanced API. It is probably an error, if it is really what you want, you should first clear the tags with clearTags method."):e.tagRefinements.length>0&&n.tagFilters?new Error("[Tags] Cannot switch from the advanced tag API to the managed API. It is probably an error, if it is not, you should first clear the tags with clearTags method."):e.numericFilters&&n.numericRefinements&&rt(n.numericRefinements)?new Error("[Numeric filters] Can't switch from the advanced to the managed API. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):rt(e.numericRefinements)&&n.numericFilters?new Error("[Numeric filters] Can't switch from the managed API to the advanced. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):null};K.prototype={constructor:K,clearRefinements:function(t){var n={numericRefinements:this._clearNumericRefinements(t),facetsRefinements:Q.clearRefinement(this.facetsRefinements,t,"conjunctiveFacet"),facetsExcludes:Q.clearRefinement(this.facetsExcludes,t,"exclude"),disjunctiveFacetsRefinements:Q.clearRefinement(this.disjunctiveFacetsRefinements,t,"disjunctiveFacet"),hierarchicalFacetsRefinements:Q.clearRefinement(this.hierarchicalFacetsRefinements,t,"hierarchicalFacet")};return n.numericRefinements===this.numericRefinements&&n.facetsRefinements===this.facetsRefinements&&n.facetsExcludes===this.facetsExcludes&&n.disjunctiveFacetsRefinements===this.disjunctiveFacetsRefinements&&n.hierarchicalFacetsRefinements===this.hierarchicalFacetsRefinements?this:this.setQueryParameters(n)},clearTags:function(){return this.tagFilters===void 0&&this.tagRefinements.length===0?this:this.setQueryParameters({tagFilters:void 0,tagRefinements:[]})},setIndex:function(t){return t===this.index?this:this.setQueryParameters({index:t})},setQuery:function(t){return t===this.query?this:this.setQueryParameters({query:t})},setPage:function(t){return t===this.page?this:this.setQueryParameters({page:t})},setFacets:function(t){return this.setQueryParameters({facets:t})},setDisjunctiveFacets:function(t){return this.setQueryParameters({disjunctiveFacets:t})},setHitsPerPage:function(t){return this.hitsPerPage===t?this:this.setQueryParameters({hitsPerPage:t})},setTypoTolerance:function(t){return this.typoTolerance===t?this:this.setQueryParameters({typoTolerance:t})},addNumericRefinement:function(e,t,n){var r=tt(n);if(this.isNumericRefined(e,t,r))return this;var i=nt({},this.numericRefinements);return i[e]=nt({},i[e]),i[e][t]?(i[e][t]=i[e][t].slice(),i[e][t].push(r)):i[e][t]=[r],this.setQueryParameters({numericRefinements:i})},getConjunctiveRefinements:function(e){return this.isConjunctiveFacet(e)?this.facetsRefinements[e]||[]:[]},getDisjunctiveRefinements:function(e){return this.isDisjunctiveFacet(e)?this.disjunctiveFacetsRefinements[e]||[]:[]},getHierarchicalRefinement:function(e){return this.hierarchicalFacetsRefinements[e]||[]},getExcludeRefinements:function(e){return this.isConjunctiveFacet(e)?this.facetsExcludes[e]||[]:[]},removeNumericRefinement:function(e,t,n){return n!==void 0?this.isNumericRefined(e,t,n)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(r,i){return i===e&&r.op===t&&it(r.val,tt(n))})}):this:t!==void 0?this.isNumericRefined(e,t)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(r,i){return i===e&&r.op===t})}):this:this.isNumericRefined(e)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(r,i){return i===e})}):this},getNumericRefinements:function(e){return this.numericRefinements[e]||{}},getNumericRefinement:function(e,t){return this.numericRefinements[e]&&this.numericRefinements[e][t]},_clearNumericRefinements:function(t){if(t===void 0)return rt(this.numericRefinements)?{}:this.numericRefinements;if(typeof t=="string")return on(this.numericRefinements,[t]);if(typeof t=="function"){var n=!1,r=this.numericRefinements,i=Object.keys(r).reduce(function(c,f){var d=r[f],l={};return d=d||{}
1,Object.keys(d).forEach(function(v){var m=d[v]||[],g=[];m.forEach(function(w){var O=t({val:w,op:v},f,"numeric");O||g.push(w)}),g.length!==m.length&&(n=!0),l[v]=g}),c[f]=l,c},{});return n?i:this.numericRefinements}},addFacet:function(t){return this.isConjunctiveFacet(t)?this:this.setQueryParameters({facets:this.facets.concat([t])})},addDisjunctiveFacet:function(t){return this.isDisjunctiveFacet(t)?this:this.setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.concat([t])})},addHierarchicalFacet:function(t){if(this.isHierarchicalFacet(t.name))throw new Error("Cannot declare two hierarchical facets with the same name: `"+t.name+"`");return this.setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.concat([t])})},addFacetRefinement:function(t,n){if(!this.isConjunctiveFacet(t))throw new Error(t+" is not defined in the facets attribute of the helper configuration");return Q.isRefined(this.facetsRefinements,t,n)?this:this.setQueryParameters({facetsRefinements:Q.addRefinement(this.facetsRefinements,t,n)})},addExcludeRefinement:function(t,n){if(!this.isConjunctiveFacet(t))throw new Error(t+" is not defined in the facets attribute of the helper configuration");return Q.isRefined(this.facetsExcludes,t,n)?this:this.setQueryParameters({facetsExcludes:Q.addRefinement(this.facetsExcludes,t,n)})},addDisjunctiveFacetRefinement:function(t,n){if(!this.isDisjunctiveFacet(t))throw new Error(t+" is not defined in the disjunctiveFacets attribute of the helper configuration");return Q.isRefined(this.disjunctiveFacetsRefinements,t,n)?this:this.setQueryParameters({disjunctiveFacetsRefinements:Q.addRefinement(this.disjunctiveFacetsRefinements,t,n)})},addTagRefinement:function(t){if(this.isTagRefined(t))return this;var n={tagRefinements:this.tagRefinements.concat(t)};return this.setQueryParameters(n)},removeFacet:function(t){return this.isConjunctiveFacet(t)?this.clearRefinements(t).setQueryParameters({facets:this.facets.filter(function(n){return n!==t})}):this},removeDisjunctiveFacet:function(t){return this.isDisjunctiveFacet(t)?this.clearRefinements(t).setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.filter(function(n){return n!==t})}):this},removeHierarchicalFacet:function(t){return this.isHierarchicalFacet(t)?this.clearRefinements(t).setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.filter(function(n){return n.name!==t})}):this},removeFacetRefinement:function(t,n){if(!this.isConjunctiveFacet(t))throw new Error(t+" is not defined in the facets attribute of the helper configuration");return Q.isRefined(this.facetsRefinements,t,n)?this.setQueryParameters({facetsRefinements:Q.removeRefinement(this.facetsRefinements,t,n)}):this},removeExcludeRefinement:function(t,n){if(!this.isConjunctiveFacet(t))throw new Error(t+" is not defined in the facets attribute of the helper configuration");return Q.isRefined(this.facetsExcludes,t,n)?this.setQueryParameters({facetsExcludes:Q.removeRefinement(this.facetsExcludes,t,n)}):this},removeDisjunctiveFacetRefinement:function(t,n){if(!this.isDisjunctiveFacet(t))throw new Error(t+" is not defined in the disjunctiveFacets attribute of the helper configuration");return Q.isRefined(this.disjunctiveFacetsRefinements,t,n)?this.setQueryParameters({disjunctiveFacetsRefinements:Q.removeRefinement(this.disjunctiveFacetsRefinements,t,n)}):this},removeTagRefinement:function(t){if(!this.isTagRefined(t))return this;var n={tagRefinements:this.tagRefinements.filter(function(r){return r!==t})};return this.setQueryParameters(n)},toggleRefinement:function(t,n){return this.toggleFacetRefinement(t,n)},toggleFacetRefinement:function(t,n){if(this.isHierarchicalFacet(t))return this.toggleHierarchicalFacetRefinement(t,n);if(this.isConjunctiveFacet(t))return this.toggleConjunctiveFacetRefinement(t,n);if(this.isDisjunctiveFacet(t))return this.toggleDisjunctiveFacetRefinement(t,n);throw new Error("Cannot refine the undeclared facet "+t+"; it should be added to the helper options facets, disjunctiveFacets or hierarchicalFacets")},toggleConjunctiveFacetRefinement:function(t,n){if(!this.isConjunctiveFacet(t))throw new Error(t+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsRefinements:Q.toggleRefinement(this.facetsRefinements,t,n)})},toggleExcludeFacetRefinement:function(t,n){if(!this.isConjunctiveFacet(t))throw new Error(t+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsExcludes:Q.toggleRefinement(this.facetsExcludes,t,n)})},toggleDisjunctiveFacetRefinement:function(t,n){if(!this.isDisjunctiveFacet(t))throw new Error(t+" is not defined in the disjunctiveFacets attribute of the helper configuration");return this.setQueryParameters({disjunctiveFacetsRefinements:Q.toggleRefinement(this.disjunctiveFacetsRefinements,t,n)})},toggleHierarchicalFacetRefinement:function(t,n){if(!this.isHierarchicalFacet(t))throw new Error(t+" is not defined in the hierarchicalFacets attribute of the helper configuration");var r=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(t)),i={},c=this.hierarchicalFacetsRefinements[t]!==void 0&&this.hierarchicalFacetsRefinements[t].length>0&&(this.hierarchicalFacetsRefinements[t][0]===n||this.hierarchicalFacetsRefinements[t][0].indexOf(n+r)===0);return c?n.indexOf(r)===-1?i[t]=[]:i[t]=[n.slice(0,n.lastIndexOf(r))]:i[t]=[n],this.setQueryParameters({hierarchicalFacetsRefinements:et({},i,this.hierarchicalFacetsRefinements)})},addHierarchicalFacetRefinement:function(e,t){if(this.isHierarchicalFacetRefined(e))throw new Error(e+" is already refined.");if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration.");var n={};return n[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:et({},n,this.hierarchicalFacetsRefinements)})},removeHierarchicalFacetRefinement:function(e){if(!this.isHierarchicalFacetRefined(e))return this;var t={};return t[e]=[],this.setQueryParameters({hierarchicalFacetsRefinements:et({},t,this.hierarchicalFacetsRefinements)})},toggleTagRefinement:function(t){return this.isTagRefined(t)?this.removeTagRefinement(t):this.addTagRefinement(t)},isDisjunctiveFacet:function(e){return this.disjunctiveFacets.indexOf(e)>-1},isHierarchicalFacet:function(e){return this.getHierarchicalFacetByName(e)!==void 0},isConjunctiveFacet:function(e){return this.facets.indexOf(e)>-1},isFacetRefined:function(t,n){return this.isConjunctiveFacet(t)?Q.isRefined(this.facetsRefinements,t,n):!1},isExcludeRefined:function(t,n){return this.isConjunctiveFacet(t)?Q.isRefined(this.facetsExcludes,t,n):!1},isDisjunctiveFacetRefined:function(t,n){return this.isDisjunctiveFacet(t)?Q.isRefined(this.disjunctiveFacetsRefinements,t,n):!1},isHierarchicalFacetRefined:function(t,n){if(!this.isHierarchicalFacet(t))return!1;var r=this.getHierarchicalRefinement(t);return n?r.indexOf(n)!==-1:r.length>0},isNumericRefined:function(t,n,r){if(r===void 0&&n===void 0)return!!this.numericRefinements[t];var i=this.numericRefinements[t]&&this.numericRefinements[t][n]!==void 0;if(r===void 0||!i)return i;var c=tt(r),f=Qi(this.numericRefinements[t][n],c)!==void 0;return i&&f},isTagRefined:function(t){return this.tagRefinements.indexOf(t)!==-1},getRefinedDisjunctiveFacets:function(){var t=this,n=an(Object.keys(this.numericRefinements).filter(function(r){return Object.keys(t.numericRefinements[r]).length>0}),this.disjunctiveFacets);return Object.keys(this.disjunctiveFacetsRefinements).filter(function(r){return t.disjunctiveFacetsRefinements[r].length>0}).concat(n).concat(this.getRefinedHierarchicalFacets())},getRefinedHierarchicalFacets:function(){var t=this;return an(this.hierarchicalFacets.map(function(n){return n.name}),Object.keys(this.hierarchicalFacetsRefinements).filter(function(n){return t.hierarchicalFacetsRefinements[n].length>0}))},getUnrefinedDisjunctiveFacets:function(){var e=this.getRefinedDisjunctiveFacets();return this.disjunctiveFacets.filter(function(t){return e.indexOf(t)===-1})},managedParameters:["index","facets","disjunctiveFacets","facetsRefinements","hierarchicalFacets","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacetsRefinements"],getQueryParams:function(){var t=this.managedParameters,n={},r=this;
1return Object.keys(this).forEach(function(i){var c=r[i];t.indexOf(i)===-1&&c!==void 0&&(n[i]=c)}),n},setQueryParameter:function(t,n){if(this[t]===n)return this;var r={};return r[t]=n,this.setQueryParameters(r)},setQueryParameters:function(t){if(!t)return this;var n=K.validate(this,t);if(n)throw n;var r=this,i=K._parseNumbers(t),c=Object.keys(this).reduce(function(d,l){return d[l]=r[l],d},{}),f=Object.keys(i).reduce(function(d,l){var v=d[l]!==void 0,m=i[l]!==void 0;return v&&!m?on(d,[l]):(m&&(d[l]=i[l]),d)},c);return new this.constructor(f)},resetPage:function(){return this.page===void 0?this:this.setPage(0)},_getHierarchicalFacetSortBy:function(e){return e.sortBy||["isRefined:desc","name:asc"]},_getHierarchicalFacetSeparator:function(e){return e.separator||" > "},_getHierarchicalRootPath:function(e){return e.rootPath||null},_getHierarchicalShowParentLevel:function(e){return typeof e.showParentLevel=="boolean"?e.showParentLevel:!0},getHierarchicalFacetByName:function(e){return cn(this.hierarchicalFacets,function(t){return t.name===e})},getHierarchicalFacetBreadcrumb:function(e){if(!this.isHierarchicalFacet(e))return[];var t=this.getHierarchicalRefinement(e)[0];if(!t)return[];var n=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e)),r=t.split(n);return r.map(function(i){return i.trim()})},toString:function(){return JSON.stringify(this,null,2)}};un.exports=K});var at=q((Sa,fn)=>{"use strict";function Ui(e,t){if(e!==t){var n=e!==void 0,r=e===null,i=t!==void 0,c=t===null;if(!c&&e>t||r&&i||!n)return 1;if(!r&&e<t||c&&n||!i)return-1}return 0}function Li(e,t,n){if(!Array.isArray(e))return[];Array.isArray(n)||(n=[]);var r=e.map(function(i,c){return{criteria:t.map(function(f){return i[f]}),index:c,value:i}});return r.sort(function(c,f){for(var d=-1;++d<c.criteria.length;){var l=Ui(c.criteria[d],f.criteria[d]);if(l)return d>=n.length?l:n[d]==="desc"?-l:l}return c.index-f.index}),r.map(function(i){return i.value})}fn.exports=Li});var ln=q((qa,hn)=>{"use strict";hn.exports=function(t){return Array.isArray(t)?t.filter(Boolean):[]}});var mn=q((Ca,dn)=>{"use strict";dn.exports=function(t,n){if(!Array.isArray(t))return-1;for(var r=0;r<t.length;r++)if(n(t[r]))return r;return-1}});var ot=q((Ha,pn)=>{"use strict";var Bi=Fe();pn.exports=function(t,n){var r=(n||[]).map(function(i){return i.split(":")});return t.reduce(function(c,f){var d=f.split(":"),l=Bi(r,function(v){return v[0]===d[0]});return d.length>1||!l?(c[0].push(d[0]),c[1].push(d[1]),c):(c[0].push(l[0]),c[1].push(l[1]),c)},[[],[]])}});var De=q((Na,vn)=>{"use strict";function Mi(e){return typeof e!="string"?e:String(e).replace(/^-/,"\\-")}function Vi(e){return typeof e!="string"?e:e.replace(/^\\-/,"-")}vn.exports={escapeFacetValue:Mi,unescapeFacetValue:Vi}});var Rn=q((Qa,yn)=>{"use strict";yn.exports=Gi;var Wi=at(),Ji=Fe(),Ki=ot(),gn=De(),zi=gn.escapeFacetValue,$i=gn.unescapeFacetValue;function Gi(e){return function(n,r){var i=e.hierarchicalFacets[r],c=e.hierarchicalFacetsRefinements[i.name]&&e.hierarchicalFacetsRefinements[i.name][0]||"",f=e._getHierarchicalFacetSeparator(i),d=e._getHierarchicalRootPath(i),l=e._getHierarchicalShowParentLevel(i),v=Ki(e._getHierarchicalFacetSortBy(i)),m=n.every(function(O){return O.exhaustive}),g=Xi(v,f,d,l,c),w=n;return d&&(w=n.slice(d.split(f).length)),w.reduce(g,{name:e.hierarchicalFacets[r].name,count:null,isRefined:!0,path:null,escapedValue:null,exhaustive:m,data:null})}}function Xi(e,t,n,r,i){return function(f,d,l){var v=f;if(l>0){var m=0;for(v=f;m<l;){var g=v&&Array.isArray(v.data)?v.data:[];v=Ji(g,function(O){return O.isRefined}),m++}}if(v){var w=Object.keys(d.data).map(function(O){return[O,d.data[O]]}).filter(function(O){var F=O[0];return Yi(F,v.path||n,i,t,n,r)});v.data=Wi(w.map(function(O){var F=O[0],D=O[1];return Zi(D,F,t,$i(i),d.exhaustive)}),e[0],e[1])}return f}}function Yi(e,t,n,r,i,c){return i&&(e.indexOf(i)!==0||i===e)?!1:!i&&e.indexOf(r)===-1||i&&e.split(r).length-i.split(r).length===1||e.indexOf(r)===-1&&n.indexOf(r)===-1||n.indexOf(e)===0||e.indexOf(t+r)===0&&(c||e.indexOf(n)===0)}function Zi(e,t,n,r,i){var c=t.split(n);return{name:c[c.length-1].trim(),path:t,escapedValue:zi(t),count:e,isRefined:r===t||r.indexOf(t+n)===0,exhaustive:i,data:null}}});var ht=q((Ua,Tn)=>{"use strict";var es=be(),Se=ke(),xn=at(),ct=ln(),G=Fe(),je=mn(),ts=ot(),Pn=De(),bn=Pn.escapeFacetValue,wn=Pn.unescapeFacetValue,ns=Rn();function Fn(e){var t={};return e.forEach(function(n,r){t[n]=r}),t}function ut(e,t,n){t&&t[n]&&(e.stats=t[n])}function rs(e,t){return G(e,function(r){var i=r.attributes||[];return i.indexOf(t)>-1})}function ne(e,t,n){var r=t[0];this._rawResults=t;var i=this;Object.keys(r).forEach(function(m){i[m]=r[m]}),Object.keys(n||{}
1).forEach(function(m){i[m]=n[m]}),this.processingTimeMS=t.reduce(function(m,g){return g.processingTimeMS===void 0?m:m+g.processingTimeMS},0),this.disjunctiveFacets=[],this.hierarchicalFacets=e.hierarchicalFacets.map(function(){return[]}),this.facets=[];var c=e.getRefinedDisjunctiveFacets(),f=Fn(e.facets),d=Fn(e.disjunctiveFacets),l=1,v=r.facets||{};Object.keys(v).forEach(function(m){var g=v[m],w=rs(e.hierarchicalFacets,m);if(w){var O=w.attributes.indexOf(m),F=je(e.hierarchicalFacets,function(L){return L.name===w.name});i.hierarchicalFacets[F][O]={attribute:m,data:g,exhaustive:r.exhaustiveFacetsCount}}else{var D=e.disjunctiveFacets.indexOf(m)!==-1,k=e.facets.indexOf(m)!==-1,H;D&&(H=d[m],i.disjunctiveFacets[H]={name:m,data:g,exhaustive:r.exhaustiveFacetsCount},ut(i.disjunctiveFacets[H],r.facets_stats,m)),k&&(H=f[m],i.facets[H]={name:m,data:g,exhaustive:r.exhaustiveFacetsCount},ut(i.facets[H],r.facets_stats,m))}}),this.hierarchicalFacets=ct(this.hierarchicalFacets),c.forEach(function(m){var g=t[l],w=g&&g.facets?g.facets:{},O=e.getHierarchicalFacetByName(m);
1Object.keys(w).forEach(function(F){var D=w[F],k;if(O){k=je(e.hierarchicalFacets,function(B){return B.name===O.name});var H=je(i.hierarchicalFacets[k],function(B){return B.attribute===F});if(H===-1)return;i.hierarchicalFacets[k][H].data=es({},i.hierarchicalFacets[k][H].data,D)}else{k=d[F];var L=r.facets&&r.facets[F]||{};i.disjunctiveFacets[k]={name:F,data:Se({},D,L),exhaustive:g.exhaustiveFacetsCount},ut(i.disjunctiveFacets[k],g.facets_stats,F),e.disjunctiveFacetsRefinements[F]&&e.disjunctiveFacetsRefinements[F].forEach(function(B){!i.disjunctiveFacets[k].data[B]&&e.disjunctiveFacetsRefinements[F].indexOf(wn(B))>-1&&(i.disjunctiveFacets[k].data[B]=0)})}}),l++}),e.getRefinedHierarchicalFacets().forEach(function(m){var g=e.getHierarchicalFacetByName(m),w=e._getHierarchicalFacetSeparator(g),O=e.getHierarchicalRefinement(m);O.length===0||O[0].split(w).length<2||t.slice(l).forEach(function(F){var D=F&&F.facets?F.facets:{};Object.keys(D).forEach(function(k){var H=D[k],L=je(e.hierarchicalFacets,function(X){return X.name===g.name}),B=je(i.hierarchicalFacets[L],function(X){return X.attribute===k});if(B!==-1){var Z={};if(O.length>0){var se=O[0].split(w)[0];Z[se]=i.hierarchicalFacets[L][B].data[se]}i.hierarchicalFacets[L][B].data=Se(Z,H,i.hierarchicalFacets[L][B].data)}}),l++})}),Object.keys(e.facetsExcludes).forEach(function(m){var g=e.facetsExcludes[m],w=f[m];i.facets[w]={name:m,data:r.facets[m],exhaustive:r.exhaustiveFacetsCount},g.forEach(function(O){i.facets[w]=i.facets[w]||{name:m},i.facets[w].data=i.facets[w].data||{},i.facets[w].data[O]=0})}),this.hierarchicalFacets=this.hierarchicalFacets.map(ns(e)),this.facets=ct(this.facets),this.disjunctiveFacets=ct(this.disjunctiveFacets),this._state=e}ne.prototype.getFacetByName=function(e){function t(n){return n.name===e}return G(this.facets,t)||G(this.disjunctiveFacets,t)||G(this.hierarchicalFacets,t)};function is(e,t){function n(l){return l.name===t}if(e._state.isConjunctiveFacet(t)){var r=G(e.facets,n);return r?Object.keys(r.data).map(function(l){var v=bn(l);return{name:l,escapedValue:v,count:r.data[l],isRefined:e._state.isFacetRefined(t,v),isExcluded:e._state.isExcludeRefined(t,l)}}):[]}else if(e._state.isDisjunctiveFacet(t)){var i=G(e.disjunctiveFacets,n);return i?Object.keys(i.data).map(function(l){var v=bn(l);return{name:l,escapedValue:v,count:i.data[l],isRefined:e._state.isDisjunctiveFacetRefined(t,v)}}):[]}else if(e._state.isHierarchicalFacet(t)){var c=G(e.hierarchicalFacets,n);if(!c)return c;var f=e._state.getHierarchicalFacetByName(t),d=wn(e._state.getHierarchicalRefinement(t)[0]||"").split(e._state._getHierarchicalFacetSeparator(f));return d.unshift(t),On(c,d,0),c}}function On(e,t,n){e.isRefined=e.name===t[n],e.data&&e.data.forEach(function(r){On(r,t,n+1)})}function En(e,t,n,r){if(r=r||0,Array.isArray(t))return e(t,n[r]);if(!t.data||t.data.length===0)return t;var i=t.data.map(function(d){return En(e,d,n,r+1)}),c=e(i,n[r]),f=Se({data:c},t);return f}ne.DEFAULT_SORT=["isRefined:desc","count:desc","name:asc"];function ss(e,t){return t.sort(e)}function as(e,t){var n=[],r=[],i=t.order||[],c=i.reduce(function(l,v,m){return l[v]=m,l},{});e.forEach(function(l){var v=l.path||l.name;c[v]!==void 0?n[c[v]]=l:r.push(l)}),n=n.filter(function(l){return l});var f=t.sortRemainingBy,d;return f==="hidden"?n:(f==="alpha"?d=[["path","name"],["asc","asc"]]:d=[["count"],["desc"]],n.concat(xn(r,d[0],d[1])))}function os(e,t){return e.renderingContent&&e.renderingContent.facetOrdering&&e.renderingContent.facetOrdering.values&&e.renderingContent.facetOrdering.values[t]}ne.prototype.getFacetValues=function(e,t){var n=is(this,e);if(n){var r=Se({},t,{sortBy:ne.DEFAULT_SORT,facetOrdering:!(t&&t.sortBy)}),i=this,c;if(Array.isArray(n))c=[e];else{var f=i._state.getHierarchicalFacetByName(n.name);c=f.attributes}return En(function(d,l){if(r.facetOrdering){var v=os(i,l);if(v)return as(d,v)}if(Array.isArray(r.sortBy)){var m=ts(r.sortBy,ne.DEFAULT_SORT);return xn(d,m[0],m[1])}else if(typeof r.sortBy=="function")return ss(r.sortBy,d);throw new Error("options.sortBy is optional but if defined it must be either an array of str
1ing (predicates) or a sorting function")},n,c)}};ne.prototype.getFacetStats=function(e){if(this._state.isConjunctiveFacet(e))return jn(this.facets,e);if(this._state.isDisjunctiveFacet(e))return jn(this.disjunctiveFacets,e)};function jn(e,t){var n=G(e,function(r){return r.name===t});return n&&n.stats}ne.prototype.getRefinements=function(){var e=this._state,t=this,n=[];return Object.keys(e.facetsRefinements).forEach(function(r){e.facetsRefinements[r].forEach(function(i){n.push(ft(e,"facet",r,i,t.facets))})}),Object.keys(e.facetsExcludes).forEach(function(r){e.facetsExcludes[r].forEach(function(i){n.push(ft(e,"exclude",r,i,t.facets))})}),Object.keys(e.disjunctiveFacetsRefinements).forEach(function(r){e.disjunctiveFacetsRefinements[r].forEach(function(i){n.push(ft(e,"disjunctive",r,i,t.disjunctiveFacets))})}),Object.keys(e.hierarchicalFacetsRefinements).forEach(function(r){e.hierarchicalFacetsRefinements[r].forEach(function(i){n.push(cs(e,r,i,t.hierarchicalFacets))})}),Object.keys(e.numericRefinements).forEach(function(r){var i=e.numericRefinements[r];
1Object.keys(i).forEach(function(c){i[c].forEach(function(f){n.push({type:"numeric",attributeName:r,name:f,numericValue:f,operator:c})})})}),e.tagRefinements.forEach(function(r){n.push({type:"tag",attributeName:"_tags",name:r})}),n};function ft(e,t,n,r,i){var c=G(i,function(l){return l.name===n}),f=c&&c.data&&c.data[r]?c.data[r]:0,d=c&&c.exhaustive||!1;return{type:t,attributeName:n,name:r,count:f,exhaustive:d}}function cs(e,t,n,r){var i=e.getHierarchicalFacetByName(t),c=e._getHierarchicalFacetSeparator(i),f=n.split(c),d=G(r,function(w){return w.name===t}),l=f.reduce(function(w,O){var F=w&&G(w.data,function(D){return D.name===O});return F!==void 0?F:w},d),v=l&&l.count||0,m=l&&l.exhaustive||!1,g=l&&l.path||"";return{type:"hierarchical",attributeName:t,name:g,count:v,exhaustive:m}}Tn.exports=ne});var lt=q((La,kn)=>{function V(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}kn.exports=V;V.prototype._events=void 0;V.prototype._maxListeners=void 0;V.defaultMaxListeners=10;V.prototype.setMaxListeners=function(e){if(!us(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this};V.prototype.emit=function(e){var t,n,r,i,c,f;if(this._events||(this._events={}),e==="error"&&(!this._events.error||xe(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;var d=new Error('Uncaught, unspecified "error" event. ('+t+")");throw d.context=t,d}if(n=this._events[e],_n(n))return!1;if(Y(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:i=Array.prototype.slice.call(arguments,1),n.apply(this,i)}else if(xe(n))for(i=Array.prototype.slice.call(arguments,1),f=n.slice(),r=f.length,c=0;c<r;c++)f[c].apply(this,i);return!0};V.prototype.addListener=function(e,t){var n;if(!Y(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,Y(t.listener)?t.listener:t),this._events[e]?xe(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,xe(this._events[e])&&!this._events[e].warned&&(_n(this._maxListeners)?n=V.defaultMaxListeners:n=this._maxListeners,n&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),typeof console.trace=="function"&&console.trace())),this};V.prototype.on=V.prototype.addListener;V.prototype.once=function(e,t){if(!Y(t))throw TypeError("listener must be a function");var n=!1;function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}return r.listener=t,this.on(e,r),this};V.prototype.removeListener=function(e,t){var n,r,i,c;if(!Y(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=this._events[e],i=n.length,r=-1,n===t||Y(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(xe(n)){for(c=i;c-- >0;)if(n[c]===t||n[c].listener&&n[c].listener===t){r=c;break}if(r<0)return this;n.length===1?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this};V.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[e]&&delete this._events[e],this;if(arguments.length===0){for(t in this._events)t!=="removeListener"&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],Y(n))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this};V.prototype.listeners=function(e){var t;return!this._events||!this._events[e]?t=[]:Y(this._events[e])?t=[this._events[e]]:t=this._events[e].slice(),t};V.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(Y(t))return 1;if(t)return t.length}return 0};V.listenerCount=function(e,t){return e.listenerCount(t)};function Y(e){return typeof e=="function"}function us(e){return typeof e=="number"}function xe(e){return typeof e=="object"&&e!==null}function _n(e){return e===void 0}});var dt=q((Ba,In)=>{"use strict";function fs(e,t){e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}In.exports=fs});var Dn=q((Ma,An)=>{"use strict";var hs=lt(),ls=dt();function qe(e,t){this.main=e,this.fn=t,this.lastResults=null}ls(qe,hs);qe.prototype.detach=function(){this.removeAllListeners(),this.main.detachDerivedHelper(this)};qe.prototype.getModifiedState=function(e){return this.fn(e)};An.exports=qe});var qn=q((Va,Sn)=>{"use strict";var mt=be();function pt(e){return Object.keys(e).sort(function(t,n){return t.localeCompare(n)}).reduce(function(t,n){return t[n]=e[n],t},{})}var z={_getQueries:function(t,n){var r=[];return r.push({indexName:t,params:z._getHitsSearchParams(n)}
1),n.getRefinedDisjunctiveFacets().forEach(function(i){r.push({indexName:t,params:z._getDisjunctiveFacetSearchParams(n,i)})}),n.getRefinedHierarchicalFacets().forEach(function(i){var c=n.getHierarchicalFacetByName(i),f=n.getHierarchicalRefinement(i),d=n._getHierarchicalFacetSeparator(c);if(f.length>0&&f[0].split(d).length>1){var l=f[0].split(d).slice(0,-1).reduce(function(m,g,w){return m.concat({attribute:c.attributes[w],value:w===0?g:[m[m.length-1].value,g].join(d)})},[]);l.forEach(function(v,m){var g=z._getDisjunctiveFacetSearchParams(n,v.attribute,m===0);function w(D){return c.attributes.some(function(k){return k===D.split(":")[0]})}var O=(g.facetFilters||[]).reduce(function(D,k){if(Array.isArray(k)){var H=k.filter(function(L){return!w(L)});H.length>0&&D.push(H)}return typeof k=="string"&&!w(k)&&D.push(k),D},[]),F=l[m-1];m>0?g.facetFilters=O.concat(F.attribute+":"+F.value):g.facetFilters=O.length>0?O:void 0,r.push({indexName:t,params:g})})}}),r},_getHitsSearchParams:function(e){var t=e.facets.concat(e.disjunctiveFacets).concat(z._getHitsHierarchicalFacetsAttributes(e)),n=z._getFacetFilters(e),r=z._getNumericFilters(e),i=z._getTagFilters(e),c={facets:t.indexOf("*")>-1?["*"]:t,tagFilters:i};return n.length>0&&(c.facetFilters=n),r.length>0&&(c.numericFilters=r),pt(mt({},e.getQueryParams(),c))},_getDisjunctiveFacetSearchParams:function(e,t,n){var r=z._getFacetFilters(e,t,n),i=z._getNumericFilters(e,t),c=z._getTagFilters(e),f={hitsPerPage:0,page:0,analytics:!1,clickAnalytics:!1};c.length>0&&(f.tagFilters=c);var d=e.getHierarchicalFacetByName(t);return d?f.facets=z._getDisjunctiveHierarchicalFacetAttribute(e,d,n):f.facets=t,i.length>0&&(f.numericFilters=i),r.length>0&&(f.facetFilters=r),pt(mt({},e.getQueryParams(),f))},_getNumericFilters:function(e,t){if(e.numericFilters)return e.numericFilters;var n=[];return Object.keys(e.numericRefinements).forEach(function(r){var i=e.numericRefinements[r]||{};
1Object.keys(i).forEach(function(c){var f=i[c]||[];t!==r&&f.forEach(function(d){if(Array.isArray(d)){var l=d.map(function(v){return r+c+v});n.push(l)}else n.push(r+c+d)})})}),n},_getTagFilters:function(e){return e.tagFilters?e.tagFilters:e.tagRefinements.join(",")},_getFacetFilters:function(e,t,n){var r=[],i=e.facetsRefinements||{};Object.keys(i).forEach(function(l){var v=i[l]||[];v.forEach(function(m){r.push(l+":"+m)})});var c=e.facetsExcludes||{};Object.keys(c).forEach(function(l){var v=c[l]||[];v.forEach(function(m){r.push(l+":-"+m)})});var f=e.disjunctiveFacetsRefinements||{};Object.keys(f).forEach(function(l){var v=f[l]||[];if(!(l===t||!v||v.length===0)){var m=[];v.forEach(function(g){m.push(l+":"+g)}),r.push(m)}});var d=e.hierarchicalFacetsRefinements||{};return Object.keys(d).forEach(function(l){var v=d[l]||[],m=v[0];if(m!==void 0){var g=e.getHierarchicalFacetByName(l),w=e._getHierarchicalFacetSeparator(g),O=e._getHierarchicalRootPath(g),F,D;if(t===l){if(m.indexOf(w)===-1||!O&&n===!0||O&&O.split(w).length===m.split(w).length)return;O?(D=O.split(w).length-1,m=O):(D=m.split(w).length-2,m=m.slice(0,m.lastIndexOf(w))),F=g.attributes[D]}else D=m.split(w).length-1,F=g.attributes[D];F&&r.push([F+":"+m])}}),r},_getHitsHierarchicalFacetsAttributes:function(e){var t=[];return e.hierarchicalFacets.reduce(function(r,i){var c=e.getHierarchicalRefinement(i.name)[0];if(!c)return r.push(i.attributes[0]),r;var f=e._getHierarchicalFacetSeparator(i),d=c.split(f).length,l=i.attributes.slice(0,d+1);return r.concat(l)},t)},_getDisjunctiveHierarchicalFacetAttribute:function(e,t,n){var r=e._getHierarchicalFacetSeparator(t);if(n===!0){var i=e._getHierarchicalRootPath(t),c=0;return i&&(c=i.split(r).length),[t.attributes[c]]}var f=e.getHierarchicalRefinement(t.name)[0]||"",d=f.split(r).length-1;return t.attributes.slice(0,d+1)},getSearchForFacetQuery:function(e,t,n,r){var i=r.isDisjunctiveFacet(e)?r.clearRefinements(e):r,c={facetQuery:t,facetName:e};return typeof n=="number"&&(c.maxFacetHits=n),pt(mt({},z._getHitsSearchParams(i),c))}};Sn.exports=z});var vt=q((Wa,Cn)=>{"use strict";Cn.exports="3.11.3"});var Ln=q((Ja,Un)=>{"use strict";var yt=st(),gt=ht(),ds=Dn(),de=qn(),ms=lt(),ps=dt(),vs=Ae(),gs=Ie(),ys=be(),Hn=vt(),Rs=De().escapeFacetValue;function x(e,t,n){typeof e.addAlgoliaAgent=="function"&&e.addAlgoliaAgent("JS Helper ("+Hn+")"),this.setClient(e);var r=n||{};r.index=t,this.state=yt.make(r),this.lastResults=null,this._queryId=0,this._lastQueryIdReceived=-1,this.derivedHelpers=[],this._currentNbQueries=0}ps(x,ms);x.prototype.search=function(){return this._search({onlyWithDerivedHelpers:!1}),this};x.prototype.searchOnlyWithDerivedHelpers=function(){return this._search({onlyWithDerivedHelpers:!0}),this};x.prototype.getQuery=function(){var e=this.state;return de._getHitsSearchParams(e)};x.prototype.searchOnce=function(e,t){var n=e?this.state.setQueryParameters(e):this.state,r=de._getQueries(n.index,n),i=this;if(this._currentNbQueries++,this.emit("searchOnce",{state:n}),t){this.client.search(r).then(function(c){i._currentNbQueries--,i._currentNbQueries===0&&i.emit("searchQueueEmpty"),t(null,new gt(n,c.results),n)}).catch(function(c){i._currentNbQueries--,i._currentNbQueries===0&&i.emit("searchQueueEmpty"),t(c,null,n)});return}return this.client.search(r).then(function(c){return i._currentNbQueries--,i._currentNbQueries===0&&i.emit("searchQueueEmpty"),{content:new gt(n,c.results),state:n,_originalResponse:c}},function(c){throw i._currentNbQueries--,i._currentNbQueries===0&&i.emit("searchQueueEmpty"),c})};x.prototype.findAnswers=function(e){console.warn("[algoliasearch-helper] answers is no longer supported");var t=this.state,n=this.derivedHelpers[0];if(!n)return Promise.resolve([]);var r=n.getModifiedState(t),i=ys({attributesForPrediction:e.attributesForPrediction,nbHits:e.nbHits},{params:gs(de._getHitsSearchParams(r),["attributesToSnippet","hitsPerPage","restrictSearchableAttributes","snippetEllipsisText"])}),c="search for answers was called, but this client does not have a function client.initIndex(index).findAnswers";if(typeof this.client.initIndex!="function")throw new Error(c);var f=this.client.initIndex(r.index);if(typeof f.findAnswers!="function")throw new Error(c);return f.findAnswers(r.query,e.queryLanguages,i)};x.prototype.searchForFacetValues=function(e,t,n,r){var i=typeof this.client.searchForFacetValues=="function",c=typeof this.client.initIndex=="function";if(!i&&!c&&typeof this.client.search!="function")throw new Error("search for facet values (searchable) was called, but this client does not have a function client.searchForFacetValues or client.initIndex(index).searchForFacetValues");var f=this.state.setQueryParameters(r||{}),d=f.isDisjunctiveFacet(e),l=de.getSearchForFacetQuery(e,t,n,f);this._currentNbQueries++;var v=this,m;return i?m=this.client.searchForFacetValues([{indexName:f.index,params:l}]):c?m=this.client.initIndex(f.index).searchForFacetValues(l):(delete l.facetName,m=this.client.search([{type:"facet",facet:e,indexName:f.index,params:l}]).then(function(w){return w.results[0]}
1)),this.emit("searchForFacetValues",{state:f,facet:e,query:t}),m.then(function(w){return v._currentNbQueries--,v._currentNbQueries===0&&v.emit("searchQueueEmpty"),w=Array.isArray(w)?w[0]:w,w.facetHits.forEach(function(O){O.escapedValue=Rs(O.value),O.isRefined=d?f.isDisjunctiveFacetRefined(e,O.escapedValue):f.isFacetRefined(e,O.escapedValue)}),w},function(g){throw v._currentNbQueries--,v._currentNbQueries===0&&v.emit("searchQueueEmpty"),g})};x.prototype.setQuery=function(e){return this._change({state:this.state.resetPage().setQuery(e),isPageReset:!0}),this};x.prototype.clearRefinements=function(e){return this._change({state:this.state.resetPage().clearRefinements(e),isPageReset:!0}),this};x.prototype.clearTags=function(){return this._change({state:this.state.resetPage().clearTags(),isPageReset:!0}),this};x.prototype.addDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this};x.prototype.addDisjunctiveRefine=function(){return this.addDisjunctiveFacetRefinement.apply(this,arguments)};x.prototype.addHierarchicalFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addHierarchicalFacetRefinement(e,t),isPageReset:!0}),this};x.prototype.addNumericRefinement=function(e,t,n){return this._change({state:this.state.resetPage().addNumericRefinement(e,t,n),isPageReset:!0}),this};x.prototype.addFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addFacetRefinement(e,t),isPageReset:!0}),this};x.prototype.addRefine=function(){return this.addFacetRefinement.apply(this,arguments)};x.prototype.addFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().addExcludeRefinement(e,t),isPageReset:!0}),this};x.prototype.addExclude=function(){return this.addFacetExclusion.apply(this,arguments)};x.prototype.addTag=function(e){return this._change({state:this.state.resetPage().addTagRefinement(e),isPageReset:!0}),this};x.prototype.removeNumericRefinement=function(e,t,n){return this._change({state:this.state.resetPage().removeNumericRefinement(e,t,n),isPageReset:!0}),this};x.prototype.removeDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this};x.prototype.removeDisjunctiveRefine=function(){return this.removeDisjunctiveFacetRefinement.apply(this,arguments)};x.prototype.removeHierarchicalFacetRefinement=function(e){return this._change({state:this.state.resetPage().removeHierarchicalFacetRefinement(e),isPageReset:!0}),this};x.prototype.removeFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeFacetRefinement(e,t),isPageReset:!0}),this};x.prototype.removeRefine=function(){return this.removeFacetRefinement.apply(this,arguments)};x.prototype.removeFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().removeExcludeRefinement(e,t),isPageReset:!0}),this};x.prototype.removeExclude=function(){return this.removeFacetExclusion.apply(this,arguments)};x.prototype.removeTag=function(e){return this._change({state:this.state.resetPage().removeTagRefinement(e),isPageReset:!0}),this};x.prototype.toggleFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().toggleExcludeFacetRefinement(e,t),isPageReset:!0}),this};x.prototype.toggleExclude=function(){return this.toggleFacetExclusion.apply(this,arguments)};x.prototype.toggleRefinement=function(e,t){return this.toggleFacetRefinement(e,t)};x.prototype.toggleFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().toggleFacetRefinement(e,t),isPageReset:!0}),this};x.prototype.toggleRefine=function(){return this.toggleFacetRefinement.apply(this,arguments)};x.prototype.toggleTag=function(e){return this._change({state:this.state.resetPage().toggleTagRefinement(e),isPageReset:!0}),this};x.prototype.nextPage=function(){var e=this.state.page||0;return this.setPage(e+1)};x.prototype.previousPage=function(){var e=this.state.page||0;return this.setPage(e-1)};function Nn(e){if(e<0)throw new Error("Page requested below 0.");return this._change({state:this.state.setPage(e),isPageReset:!1}),this}x.prototype.setCurrentPage=Nn;x.prototype.setPage=Nn;x.prototype.setIndex=function(e){return this._change({state:this.state.resetPage().setIndex(e),isPageReset:!0}),this};x.prototype.setQueryParameter=function(e,t){return this._change({state:this.state.resetPage().setQueryParameter(e,t),isPageReset:!0}),this};x.prototype.setState=function(e){return this._change({state:yt.make(e),isPageReset:!1}),this};x.prototype.overrideStateWithoutTriggeringChangeEvent=function(e){return this.state=new yt(e),this};
1x.prototype.hasRefinements=function(e){return vs(this.state.getNumericRefinements(e))?!0:this.state.isConjunctiveFacet(e)?this.state.isFacetRefined(e):this.state.isDisjunctiveFacet(e)?this.state.isDisjunctiveFacetRefined(e):this.state.isHierarchicalFacet(e)?this.state.isHierarchicalFacetRefined(e):!1};x.prototype.isExcluded=function(e,t){return this.state.isExcludeRefined(e,t)};x.prototype.isDisjunctiveRefined=function(e,t){return this.state.isDisjunctiveFacetRefined(e,t)};x.prototype.hasTag=function(e){return this.state.isTagRefined(e)};x.prototype.isTagRefined=function(){return this.hasTagRefinements.apply(this,arguments)};x.prototype.getIndex=function(){return this.state.index};function Qn(){return this.state.page}x.prototype.getCurrentPage=Qn;x.prototype.getPage=Qn;x.prototype.getTags=function(){return this.state.tagRefinements};x.prototype.getRefinements=function(e){var t=[];if(this.state.isConjunctiveFacet(e)){var n=this.state.getConjunctiveRefinements(e);n.forEach(function(f){t.push({value:f,type:"conjunctive"})});var r=this.state.getExcludeRefinements(e);r.forEach(function(f){t.push({value:f,type:"exclude"})})}else if(this.state.isDisjunctiveFacet(e)){var i=this.state.getDisjunctiveRefinements(e);i.forEach(function(f){t.push({value:f,type:"disjunctive"})})}var c=this.state.getNumericRefinements(e);return Object.keys(c).forEach(function(f){var d=c[f];t.push({value:d,operator:f,type:"numeric"})}),t};x.prototype.getNumericRefinement=function(e,t){return this.state.getNumericRefinement(e,t)};x.prototype.getHierarchicalFacetBreadcrumb=function(e){return this.state.getHierarchicalFacetBreadcrumb(e)};x.prototype._search=function(e){var t=this.state,n=[],r=[];e.onlyWithDerivedHelpers||(r=de._getQueries(t.index,t),n.push({state:t,queriesCount:r.length,helper:this}),this.emit("search",{state:t,results:this.lastResults}));var i=this.derivedHelpers.map(function(d){var l=d.getModifiedState(t),v=de._getQueries(l.index,l);return n.push({state:l,queriesCount:v.length,helper:d}),d.emit("search",{state:l,results:d.lastResults}),v}),c=Array.prototype.concat.apply(r,i),f=this._queryId++;this._currentNbQueries++;try{this.client.search(c).then(this._dispatchAlgoliaResponse.bind(this,n,f)).catch(this._dispatchAlgoliaError.bind(this,f))}catch(d){this.emit("error",{error:d})}};x.prototype._dispatchAlgoliaResponse=function(e,t,n){if(!(t<this._lastQueryIdReceived)){this._currentNbQueries-=t-this._lastQueryIdReceived,this._lastQueryIdReceived=t,this._currentNbQueries===0&&this.emit("searchQueueEmpty");var r=n.results.slice();e.forEach(function(i){var c=i.state,f=i.queriesCount,d=i.helper,l=r.splice(0,f),v=d.lastResults=new gt(c,l);d.emit("result",{results:v,state:c})})}};x.prototype._dispatchAlgoliaError=function(e,t){e<this._lastQueryIdReceived||(this._currentNbQueries-=e-this._lastQueryIdReceived,this._lastQueryIdReceived=e,this.emit("error",{error:t}),this._currentNbQueries===0&&this.emit("searchQueueEmpty"))};x.prototype.containsRefinement=function(e,t,n,r){return e||t.length!==0||n.length!==0||r.length!==0};x.prototype._hasDisjunctiveRefinements=function(e){return this.state.disjunctiveRefinements[e]&&this.state.disjunctiveRefinements[e].length>0};x.prototype._change=function(e){var t=e.state,n=e.isPageReset;t!==this.state&&(this.state=t,this.emit("change",{state:this.state,results:this.lastResults,isPageReset:n}))};x.prototype.clearCache=function(){return this.client.clearCache&&this.client.clearCache(),this};x.prototype.setClient=function(e){return this.client===e?this:(typeof e.addAlgoliaAgent=="function"&&e.addAlgoliaAgent("JS Helper ("+Hn+")"),this.client=e,this)};x.prototype.getClient=function(){return this.client};x.prototype.derive=function(e){var t=new ds(this,e);return this.derivedHelpers.push(t),t};x.prototype.detachDerivedHelper=function(e){var t=this.derivedHelpers.indexOf(e);if(t===-1)throw new Error("Derived helper already detached");this.derivedHelpers.splice(t,1)};x.prototype.hasPendingRequests=function(){return this._currentNbQueries>0};Un.exports=x});var Vn=q((Ka,Mn)=>{"use strict";var Bn=Ln(),bs=st(),Fs=ht();function Pe(e,t,n){return new Bn(e,t,n)}Pe.version=vt();Pe.AlgoliaSearchHelper=Bn;Pe.SearchParameters=bs;Pe.SearchResults=Fs;Mn.exports=Pe});var ir=q((Za,rr)=>{function Ra(e,t){let n=(e||"production").toLowerCase(),r=t||"en-US";return["development","qa","staging"].includes(n)?`public-qa-${r}`:`public-${r}`}rr.exports=Ra});var sr=Ge(Vt()),ar=Ge(Vn());function Wn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ce(e){return(function(t){if(Array.isArray(t))return Rt(t)})(e)||(function(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)})(e)||(function(t,n){if(t){if(typeof t=="string")return Rt(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Rt(t,n)}})(e)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
2In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function Rt(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Jn,bt,ce,Ft,Kn,zn=(Jn=["a[href]","area[href]",'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',"select:not([disabled]):not([aria-hidden])","textarea:not([disabled]):not([aria-hidden])","button:not([disabled]):not([aria-hidden])","iframe","object","embed","[contenteditable]",'[tabindex]:not
2([tabindex^="-"])'],bt=(function(){function e(i){var c=i.targetModal,f=i.triggers,d=f===void 0?[]:f,l=i.onShow,v=l===void 0?function(){}:l,m=i.onClose,g=m===void 0?function(){}:m,w=i.openTrigger,O=w===void 0?"data-micromodal-trigger":w,F=i.closeTrigger,D=F===void 0?"data-micromodal-close":F,k=i.openClass,H=k===void 0?"is-open":k,L=i.disableScroll,B=L!==void 0&&L,Z=i.disableFocus,se=Z!==void 0&&Z,X=i.awaitCloseAnimation,ee=X!==void 0&&X,C=i.awaitOpenAnimation,I=C!==void 0&&C,ue=i.debugMode,Be=ue!==void 0&&ue;(function(Oe,pe){if(!(Oe instanceof pe))throw new TypeError("Cannot call a class as a function")})(this,e),this.modal=document.getElementById(c),this.config={debugMode:Be,disableScroll:B,openTrigger:O,closeTrigger:D,openClass:H,onShow:v,onClose:g,awaitCloseAnimation:ee,awaitOpenAnimation:I,disableFocus:se},d.length>0&&this.registerTriggers.apply(this,Ce(d)),this.onClick=this.onClick.bind(this),this.onKeydown=this.onKeydown.bind(this)}var t,n,r;return t=e,(n=[{key:"registerTriggers",value:function(){for(var i=this,c=arguments.length,f=new Array(c),d=0;d<c;d++)f[d]=arguments[d];f.filter(Boolean).forEach((function(l){l.addEventListener("click",(function(v){return i.showModal(v)}))}))}},{key:"showModal",value:function(){var i=this,c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;if(this.activeElement=document.activeElement,this.modal.setAttribute("aria-hidden","false"),this.modal.classList.add(this.config.openClass),this.scrollBehaviour("disable"),this.addEventListeners(),this.config.awaitOpenAnimation){var f=function d(){i.modal.removeEventListener("animationend",d,!1),i.setFocusToFirstNode()};this.modal.addEventListener("animationend",f,!1)}else this.setFocusToFirstNode();this.config.onShow(this.modal,this.activeElement,c)}},{key:"closeModal",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,c=this.modal;if(this.modal.setAttribute("aria-hidden","true"),this.removeEventListeners(),this.scrollBehaviour("enable"),this.activeElement&&this.activeElement.focus&&this.activeElement.focus(),this.config.onClose(this.modal,this.activeElement,i),this.config.awaitCloseAnimation){var f=this.config.openClass;this.modal.addEventListener("animationend",(function d(){c.classList.remove(f),c.removeEventListener("animationend",d,!1)}),!1)}else c.classList.remove(this.config.openClass)}},{key:"closeModalById",value:function(i){this.modal=document.getElementById(i),this.modal&&this.closeModal()}},{key:"scrollBehaviour",value:function(i){if(this.config.disableScroll){var c=document.querySelector("body");switch(i){case"enable":Object.assign(c.style,{overflow:""});break;case"disable":Object.assign(c.style,{overflow:"hidden"})}}}},{key:"addEventListeners",value:function(){this.modal.addEventListener("touchstart",this.onClick),this.modal.addEventListener("click",this.onClick),document.addEventListener("keydown",this.onKeydown)}},{key:"removeEventListeners",value:function(){this.modal.removeEventListener("touchstart",this.onClick),this.modal.removeEventListener("click",this.onClick),document.removeEventListener("keydown",this.onKeydown)}},{key:"onClick",value:function(i){(i.target.hasAttribute(this.config.closeTrigger)||i.target.parentNode.hasAttribute(this.config.closeTrigger))&&(i.preventDefault(),i.stopPropagation(),this.closeModal(i))}},{key:"onKeydown",value:function(i){i.keyCode===27&&this.closeModal(i),i.keyCode===9&&this.retainFocus(i)}},{key:"getFocusableNodes",value:function(){var i=this.modal.querySelectorAll(Jn);return Array.apply(void 0,Ce(i))}},{key:"setFocusToFirstNode",value:function(){var i=this;if(!this.config.disableFocus){var c=this.getFocusableNodes();if(c.length!==0){var f=c.filter((function(d){return!d.hasAttribute(i.config.closeTrigger)}));f.length>0&&f[0].focus(),f.length===0&&c[0].focus()}}}},{key:"retainFocus",value:function(i){var c=this.getFocusableNodes();if(c.length!==0)if(c=c.filter((function(d){return d.offsetParent!==null})),this.modal.contains(document.activeElement)){var f=c.indexOf(document.activeElement);i.shiftKey&&f===0&&(c[c.length-1].focus(),i.preventDefault()),!i.shiftKey&&c.length>0&&f===c.length-1&&(c[0].focus(),i.preventDefault())}else c[0].focus()}}])&&Wn(t.prototype,n),r&&Wn(t,r),e})(),ce=null,Ft=function(e){if(!document.getElementById(e))return console.warn("MicroModal: \u2757Seems like you have missed %c'".concat(e,"'"),"background-color: #f8f9fa;color: #50596c;font-weight: bold;","ID somewhere in your code. Refer example below to resolve it."),console.warn("%cExample:","background-color: #f8f9fa;color: #50596c;font-weight: bold;",'<div class="modal" id="'.concat(e,'"></div>')),!1},Kn=function(e,t){if((function(r){r.length<=0&&(console.warn("MicroModal: \u2757Please specify at least one %c'micromodal-trigger'","background-color: #f8f9fa;color: #50596c;font-weight: bold;","data attribute."),console.warn("%cExample:","background-color: #f8f9fa;color: #50596c;font-weight: bold;",'<a href="#" data-micromodal-trigger="my-modal"></a>'))})(e),!t)return!0;for(var n in t)Ft(n);return!0},{init:function(e){var t=Object.assign({},{openTrigger:"data-micromodal-trigger"},e),n=Ce(document.querySelectorAll("[".concat(t.openTrigger,"]"))),r=(function(f,d){var l=[];return f.forEach((function(v){var m=v.attributes[d].value;l[m]===void 0&&(l[m]=[]),l[m].push(v)})),l})(n,t.openTrigger);if(t.debugMode!==!0||Kn(n,r)!==!1)for(var i in r){var c=r[i];t.targetModal=i,t.triggers=Ce(c),ce=new bt(t)}},show:function(e,t){var n=t||{};n.targetModal=e,n.debugMode===!0&&Ft(e)===!1||(ce&&ce.removeEventListeners(),(ce=new bt(n)).showModal())},close:function(e){e?ce.closeModalById(e):ce.closeModal()}});typeof window<"u"&&(window.MicroModal=zn);var He=zn;var Ne="2.17.3";function $(e){return e.reduce(function(i,n){var r=i.events,i=i.additionalParams;return"index"in n?{additionalParams:i,events:r.concat([n])}:{events:r,additionalParams:n}},{events:[],additionalParams:void 0})}var js=function(){try{return!!navigator.cookieEnabled}catch{return!1}},xs=function(){try{return!!navigator.sendBeacon}catch{return!1}},Ps=function(){try{return!!XMLHttpRequest}catch{return!1}},ws=function(){try{return fetch!==void 0}catch{return!1}},me=function(){};function Os(){try{var e="__test_localStorage__";return globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),globalThis.localStorage}catch{}}me.get=function(e){var t=(t=this.store)==null?void 0:t.getItem(e);if(!t)return null;try{return JSON.parse(t)}catch{return null}},me.set=function(e,t){var n;try{(n=this.store)!=null&&n.setItem(e,JSON.stringify(t))}catch{console.error("Unable to set "+e+" in localStorage, storage may be full.")}},me.remove=function(e){var t;(t=this.store)!=null&&t.removeItem(e)},me.store=Os();var Gn="AlgoliaObjectQueryCache",Es=5e3,Ts=1e3;
2function xt(){var e;return(e=me.get(Gn))!=null?e:{}}function Xn(e){me.set(Gn,_s(e))}function _s(e){return Object.keys(e).length>Es?ks(e):e}function ks(e){return e=Object.entries(e).sort(function(t,n){return t=t[1][1],n[1][1]-t}),e.slice(0,e.length-Ts-1).reduce(function(t,i){var r=i[0],i=i[1];return Object.assign(Object.assign({},t),((t={})[r]=i,t))},{})}function Pt(e,t){return e+"_"+t}function wt(e,t,n){var r=xt();r[Pt(e,t)]=[n,Date.now()],Xn(r)}function Is(e,t){return xt()[Pt(e,t)]}function As(e,t){var n=xt();t.forEach(function(r){delete n[Pt(e,r)]}),Xn(n)}var we=function(e){return e===void 0},Ds=function(e){return typeof e=="number"},re=function(e){return typeof e=="function"},Ss=function(e){return typeof e?.then=="function"};function qs(e){return function(t){for(var n=[],r=arguments.length-1;0<r--;)n[r]=arguments[r+1];if(t&&re(e[t]))return e[t].apply(e,n);console.warn("The method `"+t+"` doesn't exist.")}}var Cs=["insights-js ("+Ne+")","insights-js-browser-esm ("+Ne+")"];function Hs(e){this._ua.indexOf(e)===-1&&this._ua.push(e)}function Ns(e){return re(e)&&e(this.version),this.version}function Ot(e,t){var n={};for(i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]]);return n}function Qs(e){return e.map(function(t){var n,r;return!Us(t)||(n=[],r=(r=t.objectIDs)==null?void 0:r.map(function(i,c){var f=(f=t.objectData)==null?void 0:f[c];return f!=null&&f.queryID?f:((c=((c=Is(t.index,i))!=null?c:[])[0])&&n.push(i),Object.assign(Object.assign({},f),{queryID:c}))}),n.length===0)?t:Object.assign(Object.assign({},t),{objectData:r,objectIDsWithInferredQueryID:n})})}function Us(e){return!e.queryID&&e.eventType==="conversion"}function Ls(e){return function(t,n){var r=this;if(this._userHasOptedOut)return Promise.resolve(!1);if(!(!we(this._apiKey)&&!we(this._appId)||(i=n?.headers)!=null&&i["X-Algolia-Application-Id"]&&((i=n?.headers)!=null&&i["X-Algolia-API-Key"])))throw new Error("Before calling any methods on the analytics, you first need to call the 'init' function with appId and apiKey parameters or provide custom credentials in additional parameters.");!this._userToken&&this._anonymousUserToken&&this.setAnonymousUserToken(!0);var i=(n!=null&&n.inferQueryID?Qs(t):t).map(function(l){var f=l.filters,d=Ot(l,["filters"]),l=Object.assign(Object.assign({},d),{userToken:(d=l?.userToken)!=null?d:r._userToken,authenticatedUserToken:(d=l?.authenticatedUserToken)!=null?d:r._authenticatedUserToken});return we(f)||(l.filters=f.map(encodeURIComponent)),l});return i.length===0?Promise.resolve(!1):(t=Ms(e,this._ua,this._endpointOrigin,i,this._appId,this._apiKey,n?.headers),Ss(t)?t.then(Bs(i)):t)}}function Bs(e){return function(t){return t&&e.filter(function(c){var r=c.eventType,i=c.eventSubtype,c=c.objectIDs;return r==="conversion"&&i==="purchase"&&c?.length}).forEach(function(n){return As(n.index,n.objectIDs)}),t}}function Ms(e,t,n,r,i,c,v){var d=(v=v===void 0?{}:v)["X-Algolia-Application-Id"],l=v["X-Algolia-API-Key"],v=Ot(v,["X-Algolia-Application-Id","X-Algolia-API-Key"]),m=Object.assign({"X-Algolia-Application-Id":d??i,"X-Algolia-API-Key":l??c,"X-Algolia-Agent":encodeURIComponent(t.join("; "))},v);return e(n+"/1/events?"+Object.keys(m).map(function(g){return g+"="+m[g]}).join("&"),{events:r})}function jt(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return(e==="x"?t:3&t|8).toString(16)})}var Qe="_ALGOLIA",Yn=2592e6,Zn=function(e,t,i){var r=new Date,i=(r.setTime(r.getTime()+i),"expires="+r.toUTCString());document.cookie=e+"="+t+";"+i+";path=/"},er=function(e){for(var t=e+"=",n=document.cookie.split(";"),r=0;r<n.length;r++){for(var i=n[r];i.charAt(0)===" ";)i=i.substring(1);if(i.indexOf(t)===0)return i.substring(t.length,i.length)}return""};function Vs(e){return typeof e!="number"&&e.indexOf("anonymous-")===0}function Ws(){var e=er(Qe);!this._userToken||e&&e!==""&&e.indexOf("anonymous-")===0||Zn(Qe,this._userToken,this._cookieDuration)}function Js(e){(e=e!==void 0&&e)?this.setUserToken("anonymous-"+jt()):js()&&((e=er(Qe))&&e!==""&&e.indexOf("anonymous-")===0?this.setUserToken(e):(e=this.setUserToken("anonymous-"+jt()),Zn(Qe,e,this._cookieDuration)))}function Ks(e){return this._userToken=e,re(this._onUserTokenChangeCallback)&&this._onUserTokenChangeCallback(this._userToken),this._userToken}function zs(e,t){return re(t)&&t(null,this._userToken),this._userToken}function $s(e,t){this._onUserTokenChangeCallback=e,t&&t.immediate&&re(this._onUserTokenChangeCallback)&&this._onUserTokenChangeCallback(this._userToken)}function Gs(e){return this._authenticatedUserToken=e,re(this._onAuthenticatedUserTokenChangeCallback)&&this._onAuthenticatedUserTokenChangeCallback(this._authenticatedUserToken),this._authenticatedUserToken}function Xs(e,t){return re(t)&&t(null,this._authenticatedUserToken),this._authenticatedUserToken}function Ys(e,t){this._onAuthenticatedUserTokenChangeCallback=e,t&&t.immediate&&re(this._onAuthenticatedUserTokenChangeCallback)&&this._onAuthenticatedUserTokenChangeCallback(this._authenticatedUserToken)}function ie(e,t){return t.map(function(n){return Object.assign({eventType:e},n)})}function Ue(e,t,n){return n.map(function(r){return Object.assign({eventType:e,eventSubtype:t},r)})}function Zs(){for(var e=this,t=[],n=arguments.length;n--;)t[n]=arguments[n];var i=$(t),r=i.events,i=i.additionalParams;return r.forEach(function(c){var f=c.index,d=c.queryID;return c.objectIDs.forEach(function(l){return!e._userHasOptedOut&&wt(f,l,d)})}),this.sendEvents(ie("click",r),i)}function ea(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=$(e),n=r.events,r=r.additionalParams;return this.sendEvents(ie("click",n),r)}function ta(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=$(e),n=r.events,r=r.additionalParams;return this.sendEvents(ie("click",n),r)}function na(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=$(e),n=r.events,r=r.additionalParams;return this.sendEvents(ie("conversion",n),r)}function ra(){for(var e=this,t=[],n=arguments.length;n--;)t[n]=arguments[n];var i=$(t),r=i.events,i=i.additionalParams;return r.forEach(function(c){var f=c.index,d=c.queryID,l=c.objectIDs,v=c.objectData;return l.forEach(function(m,g){g=(g=(g=v?.[g])==null?void 0:g.queryID)!=null?g:d,!e._userHasOptedOut&&g&&wt(f,m,g)})}),this.sendEvents(Ue("conversion","addToCart",r),i)}function ia(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=$(e),n=r.events,r=r.additionalParams;return this.sendEvents(Ue("conversion","purchase",n),r)}function sa(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=$(e),n=r.events,r=r.additionalParams;return this.sendEvents(ie("conversion",n),r)}function aa(){for(var e=this,t=[],n=arguments.length;n--;)t[n]=arguments[n];var i=$(t),r=i.events,i=i.additionalParams;return r.forEach(function(c){var f=c.index,d=c.objectIDs,l=c.objectData;return d.forEach(function(v,m){m=(m=l?.[m])==null?void 0:m.queryID,!e._userHasOptedOut&&m&&wt(f,v,m)})}),this.sendEvents(Ue("conversion","addToCart",r),i)}function oa(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=$(e),n=r.events,r=r.additionalParams;return this.sendEvents(Ue("conversion","purchase",n),r)}function ca(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=$(e),n=r.events,r=r.additionalParams;return this.sendEvents(ie("conversion",n),r)}var $n=["de","us"];function ua(e){var t;if(!we((e=e===void 0?{}:e).region)&&$n.indexOf(e.region)===-1)throw new Error("optional region is incorrect, please provide either one of: "+$n.join(", ")+".");
2if(!(we(e.cookieDuration)||Ds(e.cookieDuration)&&isFinite(e.cookieDuration)&&Math.floor(e.cookieDuration)===e.cookieDuration))throw new Error("optional cookieDuration is incorrect, expected an integer.");fa(this,e,{_userHasOptedOut:!!e.userHasOptedOut,_region:e.region,_host:e.host,_anonymousUserToken:(t=e.anonymousUserToken)==null||t,_useCookie:(t=e.useCookie)!=null&&t,_cookieDuration:e.cookieDuration||6*Yn}),this._endpointOrigin=this._host||(this._region?"https://insights."+this._region+".algolia.io":"https://insights.algolia.io"),this._ua=[].concat(Cs),e.authenticatedUserToken&&this.setAuthenticatedUserToken(e.authenticatedUserToken),e.userToken?this.setUserToken(e.userToken):this._userToken||this._userHasOptedOut||!this._useCookie?ha(this)&&this.saveTokenAsCookie():this.setAnonymousUserToken()}function fa(e,t,n){var r=t.partial,i=Ot(t,["partial"]);r||Object.assign(e,n),Object.assign(e,Object.keys(i).reduce(function(c,f){return Object.assign(Object.assign({},c),((c={})["_"+f]=i[f],c))},{}))}function ha(e){return e._userToken!==void 0&&Vs(e._userToken)&&e._useCookie&&!e._userHasOptedOut}function la(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=$(e),n=r.events,r=r.additionalParams;return this.sendEvents(ie("view",n),r)}function da(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=$(e),n=r.events,r=r.additionalParams;return this.sendEvents(ie("view",n),r)}var ma=function(e){e=e.requestFn,this._endpointOrigin="https://insights.algolia.io",this._anonymousUserToken=!0,this._userHasOptedOut=!1,this._useCookie=!1,this._cookieDuration=6*Yn,this._ua=[],this.version=Ne,this.sendEvents=Ls(e).bind(this),this.init=ua.bind(this),this.addAlgoliaAgent=Hs.bind(this),this.saveTokenAsCookie=Ws.bind(this),this.setUserToken=Ks.bind(this),this.setAnonymousUserToken=Js.bind(this),this.getUserToken=zs.bind(this),this.onUserTokenChange=$s.bind(this),this.setAuthenticatedUserToken=Gs.bind(this),this.getAuthenticatedUserToken=Xs.bind(this),this.onAuthenticatedUserTokenChange=Ys.bind(this),this.clickedObjectIDsAfterSearch=Zs.bind(this),this.clickedObjectIDs=ea.bind(this),this.clickedFilters=ta.bind(this),this.convertedObjectIDsAfterSearch=na.bind(this),this.purchasedObjectIDsAfterSearch=ia.bind(this),this.addedToCartObjectIDsAfterSearch=ra.bind(this),this.convertedObjectIDs=sa.bind(this),this.addedToCartObjectIDs=aa.bind(this),this.purchasedObjectIDs=oa.bind(this),this.convertedFilters=ca.bind(this),this.viewedObjectIDs=la.bind(this),this.viewedFilters=da.bind(this),this.getVersion=Ns.bind(this)};function pa(n){var t,n=qs(new ma({requestFn:n}));if(typeof window=="object"&&!window.AlgoliaAnalyticsObject){for(;t=jt(),window[t]!==void 0;);window.AlgoliaAnalyticsObject=t,window[window.AlgoliaAnalyticsObject]=n}return n.version=Ne,n}var tr=function(e,t){return new Promise(function(n,r){var i=JSON.stringify(t),c=new XMLHttpRequest;c.addEventListener("readystatechange",function(){c.readyState===4&&c.status===200?n(!0):c.readyState===4&&n(!1)}),c.addEventListener("error",function(){return r()}),c.addEventListener("timeout",function(){return n(!1)}),c.open("POST",e),c.setRequestHeader("Content-Type","application/json"),c.send(i)})},va=function(e,t){var n=JSON.stringify(t),n=navigator.sendBeacon(e,n);return Promise.resolve(!!n||tr(e,t))},ga=function(e,t){return new Promise(function(n,r){fetch(e,{method:"POST",body:JSON.stringify(t),headers:{"Content-Type":"application/json"}}).then(function(i){n(i.status===200)}).catch(function(i){r(i)})})};function ya(){if(xs())return va;if(Ps())return tr;if(ws())return ga;throw new Error("Could not find a supported HTTP request client in this environment.")}var nr=pa(ya());var Le=nr;var or=Ge(ir()),{registerModule:ba}=window,Fa="G0UEB6YYJ8",ja="064e94d836edc8ac8649f1c71468f264",Et=class{constructor(t){this.element=t,this.initialize()}bindEvents(){this.element.addEventListener("showmodal",this.handleShowModal.bind(this)),this.ui.$close.addEventListener("click",this.handleClose.bind(this)),this.ui.$input.addEventListener("input",this.handleInput.bind(this)),this.ui.$modalContainer.addEventListener("click",this.handleContainerClick.bind(this)),this.searchHelper.on("result",this.handleSearchResults.bind(this))}bindUI(){this.ui={},this.ui.$close=this.element.querySelector('[data-ref="close"]'),this.ui.$input=this.element.querySelector('[data-ref="input"]'),this.ui.$modalContainer=this.element.querySelector(".modal__container"),this.ui.$resultsList=this.element.querySelector('[data-ref="results-list"]'),this.ui.$resultsPlaceholder=this.element.querySelector('[data-ref="results-placeholder"]'),this.ui.$resultTemplate=this.element.querySelector('[data-ref="result-template"]'),this.ui.$searchQuery=this.element.querySelector('[data-ref="search-query"]'),this.ui.$results=this.element.querySelector('[data-ref="results"]')}getPrettierName(t){let n={webinar:"Webinars",trainingResource:"Training Resources",trainingWorkflow:"Training Resources"};return t in n?n[t]:t}normalizeResultPermalink(t,n){return t.contentType==="trainingWorkflow"||t.contentType!=="trainingResource"||this.currentPagePath==="/training/resources/"?n:n.startsWith("#")?`/training/resources/${n}`:!t.videoUrl&&/^https?:\/\//i.test(n)?n:/^https?:\/\//i.test(n)?`/training/resources/?resource=${encodeURIComponent(t.objectID)}`:n}getResultMetadata(t){let n="",r={category:t.category,title:t.title,permalink:t._uri,objectID:t.objectID};return(t.contentType==="post"||t.contentType==="webinar"||t.contentType==="trainingResource"||t.contentType==="trainingWorkflow")&&(n=(t.thumbnailText||t.text||t.description||"").trim(),r.resourceType=this.getPrettierName(t.type)),r.excerpt=n.split(" ").slice(0,30).filter(i=>i).join(" "),n.length>r.excerpt.length&&(r.excerpt+="..."),t.marketoIdentifier&&t.category==="Downloadable Resource"&&(r.marketoIdentifier=t.marketoIdentifier),r}handleClose(){He.close(this.modalId),this.resetModal()}handleContainerClick(t){t.stopPropagation()}handleInput(t){clearTimeout(this.debounceTimeout),this.searchQuery=t.target.value,this.searchQuery.length>0?this.debounceTimeout=setTimeout(async()=>{this.searchHelper.setQuery(this.searchQuery).search()},500):(this.searchResults=[],this.renderResults())}handleSearchResults(t){this.queryID=t.results?.queryID,this.searchResults=t.results?.hits||[],this.searchResults=this.searchResults.filter(n=>{let r=n.type.toLowerCase();
2if(this.types.includes(r))return n}),this.renderResults()}handleShowModal(){He.show(this.modalId,{awaitCloseAnimation:!0,disableScroll:!0,onShow:()=>{document.body.classList.add("modal-is-open")},onClose:()=>{this.resetModal(),document.body.classList.remove("modal-is-open")}})}initialize(){this.bindUI(),this.setVars(),this.bindEvents(),He.init()}renderResults(){this.ui.$resultsList.replaceChildren(),this.searchResults.forEach((t,n)=>{let r=this.ui.$resultTemplate.content.firstElementChild.cloneNode(!0),i=this.getResultMetadata(t),{category:c,excerpt:f,objectID:d,permalink:l,resourceType:v,title:m}=i;l=this.normalizeResultPermalink(t,l);try{this.currentPagePath==="/training/resources/"&&r.addEventListener("click",()=>{this.handleClose()},{once:!0})}catch{console.error("Error: Browser does not support URL API")}let g=r.querySelector('[data-ref="result-permalink"]');g.setAttribute("data-search-hit-type",t.contentType||""),r.querySelector('[data-ref="result-excerpt"]').innerText=f,g.href=l,r.querySelector('[data-ref="result-title"]').textContent=m,r.querySelector('[data-ref="result-type"]').innerText=v;let w=t._uri||"",O=t.contentType==="trainingResource"&&!t.videoUrl&&/^https?:\/\//i.test(w);c?r.querySelector('[data-ref="result-category"]').innerText=c:r.querySelector('[data-ref="result-category"]').remove(),(O||t.contentType==="trainingWorkflow")&&(g.target="_blank",g.rel="noopener noreferrer"),t.marketoIdentifier&&g.setAttribute("data-marketo-identifier",t.marketoIdentifier),g.addEventListener("click",()=>{Le("clickedObjectIDsAfterSearch",{eventName:"Search Result Clicked",index:this.getIndex(),queryID:this.queryID,objectIDs:[d],positions:[n+1]})}),this.ui.$resultsList.appendChild(r)}),this.ui.$searchQuery.innerText=this.searchQuery,this.ui.$resultsList.setAttribute("aria-hidden",this.searchQuery.length===0||this.searchResults.length===0),this.ui.$resultsPlaceholder.setAttribute("aria-hidden",this.searchQuery.length===0||this.searchResults.length>0),this.searchResults.length&&Le("viewedObjectIDs",{eventName:"Search Hits Viewed",index:this.getIndex(),objectIDs:this.searchResults.map(t=>t.objectID),queryID:this.queryID})}resetModal(){this.ui.$input.value="",this.searchQuery="",this.searchResults=[],this.renderResults()}getIndex(){let t=this.element.dataset.searchEnvironment||"production";return(0,or.default)(t,this.lang)}setVars(){this.debounceTimeout=null,this.lang=document.documentElement.lang,this.modalId=this.element.dataset.modalId,this.scope=this.element.getAttribute("data-search-scope")||"",this.types=this.scope.split(",").map(t=>t.trim()).filter(t=>t.length>0),Le("init",{appId:Fa,apiKey:ja,useCookie:!0}),this.searchClient=(0,sr.default)("G0UEB6YYJ8","195525021b740a37c597c6bcde232ffa"),this.searchHelper=(0,ar.default)(this.searchClient,this.getIndex(),{clickAnalytics:!0,disjunctiveFacets:["type"],facets:["excludeFromResourceCenter","excludeFromResourceHub"]}),this.types.forEach(t=>{this.searchHelper.addDisjunctiveFacetRefinement("type",t.toLowerCase())}),this.searchHelper.addFacetExclusion("excludeFromResourceCenter",!0),this.searchHelper.addFacetExclusion("excludeFromResourceHub",!0),this.searchQuery="",this.searchResults=[],this.currentPagePath=new URL(window.location.href).pathname}};ba("SearchModal",Et);})();
3/*! Bundled license information:
4
5algoliasearch/dist/algoliasearch.umd.js:
6  (*! algoliasearch.umd.js | 4.22.0 | © Algolia, inc. | https://github.com/algolia/algoliasearch-client-javascript *)
7*/
8//# sourceMappingURL=searchModal.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.