vendor: 4,462 bytes, line 1
1!function(){var e={207:function(e,t,r){e.exports=r(452)},452:function(e){var t=function(e){"use strict";var t,r=Object.prototype,n=r.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",i=a.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var a=t&&t.prototype instanceof v?t:v,o=Object.create(a.prototype),c=new P(n||[]);return o._invoke=function(e,t,r){var n=d;return function(a,o){if(n===p)throw new Error("Generator is already running");if(n===h){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var c=r.delegate;if(c){var i=O(c,r);if(i){if(i===m)continue;return i}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===d)throw n=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var s=l(e,t,r);if("normal"===s.type){if(n=r.done?h:f,s.arg===m)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n=h,r.method="throw",r.arg=s.arg)}}}(e,r,c),o}function l(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var d="suspendedStart",f="suspendedYield",p="executing",h="completed",m={};function v(){}function g(){}function y(){}var b={};s(b,o,(function(){return this}));var w=Object.getPrototypeOf,_=w&&w(w(T([])));_&&_!==r&&n.call(_,o)&&(b=_);var E=y.prototype=v.prototype=Object.create(b);function L(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function r(a,o,c,i){var s=l(e[a],e,o);if("throw"!==s.type){var u=s.arg,d=u.value;return d&&"object"==typeof d&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,c,i)}),(function(e){r("throw",e,c,i)})):t.resolve(d).then((function(e){u.value=e,c(u)}),(function(e){return r("throw",e,c,i)}))}i(s.arg)}var a;this._invoke=function(e,n){function o(){return new t((function(t,a){r(e,n,t,a)}))}return a=a?a.then(o,o):o()}}function O(e,r){var n=e.iterator[r.method];if(n===t){if(r.delegate=null,"throw"===r.method){if(e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method))return m;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var a=l(n,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var o=a.arg;return o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function T(e){if(e){var r=e[o];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,c=function r(){for(;++a<e.length;)if(n.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return c.next=c}}return{next:k}}function k(){return{value:t,done:!0}}return g.prototype=y,s(E,"constructor",y),s(y,"constructor",g),g.displayName=s(y,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,i,"GeneratorFunction")),e.prototype=Object.create(E),e},e.awrap=function(e){return{__await:e}},L(x.prototype),s(x.prototype,c,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var c=new x(u(t,r,n,a),o);return e.isGeneratorFunction(r)?c:c.next().then((function(e){return e.done?e.value:c.next()}))},L(E),s(E,i,"Generator"),s(E,o,(function(){return this})),s(E,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=T,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEac
1h(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function a(n,a){return i.type="throw",i.arg=e,r.next=n,a&&(r.method="next",r.arg=t),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var c=this.tryEntries[o],i=c.completion;if("root"===c.tryLoc)return a("end");if(c.tryLoc<=this.prev){var s=n.call(c,"catchLoc"),u=n.call(c,"finallyLoc");if(s&&u){if(this.prev<c.catchLoc)return a(c.catchLoc,!0);if(this.prev<c.finallyLoc)return a(c.finallyLoc)}else if(s){if(this.prev<c.catchLoc)return a(c.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<c.finallyLoc)return a(c.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var c=o?o.completion:{};return c.type=e,c.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(c)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}}},t={};function r(n){var a=t[n];if(void 0!==a)return a.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,r),o.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){"use strict";function e(e,t,r,n,a,o,c){try{var i=e[o](c),s=i.value}catch(e){return void r(e)}i.done?t(s):Promise.resolve(s).then(n,a)}function t(t){return function(){var r=this,n=arguments;return new Promise((function(a,o){var c=t.apply(r,n);function i(t){e(c,a,o,i,s,"next",t)}function s(t){e(c,a,o,i,s,"throw",t)}i(void 0)}))}}var n=r(207),a=r.n(n),o="__saas__suggestions__",c="__saas__queryString__",i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[o,c];null==e||e.forEach((function(e){return sessionStorage.removeItem(e)}))},s=function(e){var t=e.storageKey,r=e.defaultValue,n=e.parse;return void 0===n||n?JSON.parse(sessionStorage.getItem(t)||r):sessionStorage.getItem(t)||r},u=function(e){var t=e.storageKey,r=e.data,n=e.stringify,a=void 0===n||n;sessionStorage.setItem(t,a?JSON.stringify(r):r)},l=function(e){var t=e.searchContainer,r=document.createElement("span");return r.classList.add("cmp-saas__search-clear-button"),r.addEventListener("click",(function(){var e;r.classList.add("cmp-saas__search-clear-button--hide");var n=null===(e=t.getElementsByClassName("cmp-saas__search-input"))||void 0===e?void 0:e[0];if(n){n.value="",n.focus(),i();var a=t.querySelector("#cmp-saas-suggestions");a&&a.remove()}})),r},d=function(e){var t=e.searchButtonText,r=document.createElement("button");return r.classList.add("cmp-saas__button"),r.type="submit",r.textContent=t,r};function f(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var p="q",h={tabSwitch:"saas-tab-switch",searchResultItemClick:"saas-search-result-item-click",facetsSelect:"saas-facets-select",autoSuggestSelect:"saas-autosuggest-select",searchSubmit:"saas-search-submit",loadMore:"saas-load-more-click"},m=function(e){var t=e.name,r=e.data;return new CustomEvent(t,{bubbles:!0,detail:r})},v=function(e,t,r,n,a){var o=new URL("".concat(window.location.origin).concat(e));return o.searchParams.set(p,t),r&&o.searchParams.set("page",r.toString()),n&&a&&Object.keys(a).forEac
1h((function(e){var t=a[e].toString();o.searchParams.append(n,"".concat(e,":").concat(t))})),o.toString()},g=function(){var e=t(a().mark((function e(t,r,n,o,c){var i,s;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,i=v(t,r,n,o,c),e.next=4,fetch(i);case 4:return s=e.sent,e.next=7,s.json();case 7:return e.abrupt("return",e.sent);case 10:return e.prev=10,e.t0=e.catch(0),e.abrupt("return",null);case 13:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(t,r,n,a,o){return e.apply(this,arguments)}}(),y=g;function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function w(e,t){if(e){if("string"==typeof e)return b(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?b(e,t):void 0}}function _(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o=[],c=!0,i=!1;try{for(r=r.call(e);!(c=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);c=!0);}catch(e){i=!0,a=e}finally{try{c||null==r.return||r.return()}finally{if(i)throw a}}return o}}(e,t)||w(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function E(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function L(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?E(Object(r),!0).forEach((function(t){f(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):E(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var x=function(e,t){var r=t.value,n=t.hits;return L(L({},e),f({},r,n))},O=function(e){return null==e?void 0:e.reduce(x,{})},S=function(e){if(e.facetFilters){var t,r={facetFilters:f({},e.title,L({},(t=e.facetFilters,(null==t?void 0:t.items.reduce((function(e,t){var r,n=null==(r=t.filterFieldOptions)?void 0:r.sort((function(e,t){var r=e.value.toLowerCase(),n=t.value.toLowerCase();return r>n?1:n>r?-1:0})),a=O(n);return L(L({},e),f({},t.filterFieldLabel,a))}),{}))||null)))};window.appState=r}};window.appState={facetFilters:{}};var j=function(e){var t=new URL(window.location.href),r=new URLSearchParams(t.search);r.set(p,e),window.history.replaceState({},"","".concat(window.location.pathname,"?").concat(r.toString()).concat(window.location.hash))};function P(e){return function(e){if(Array.isArray(e))return b(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||w(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var T=function(e){var t=e.title,r=e.description,n=e.url,a=e.bestBet,o=document.createElement("div");o.classList.add("cmp-saas__results-item"),a&&o.classList.add("cmp-saas__results-item--best-bet");var c=document.createElement("span");c.classList.add("cmp-saas__results-item-link-text"),c.innerHTML=n;var i=document.createElement("h3");i.classList.add("cmp-saas__results-item-title"),i.innerHTML=t;var s=document.createElement("p");s.classList.add("cmp-saas__results-item-description"),s.innerHTML=r;var u=document.createElement("a");return u.classList.add("cmp-saas__results-item-url"),u.href=n,u.appendChild(c),u.appendChild(i),u.appendChild(s),o.appendChild(u),o},k=function(e){var r=e.loadMoreButtonText,n=e.page,o=e.tabUrl,c=e.searchValue,i=e.searchResultsElement,s=e.queryParameterName,u=document.createElement("button");return u.classList.add("cmp-saas__load-more-button"),u.dataset.page="".concat(n),u.innerText=r,u.addEventListener("click",function(){var e=t(a().mark((function e(t){var r,l,d,f,p,v,g;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return f=u.dataset.page||n,p=null!=i&&i.dataset.facets?JSON.parse(i.dataset.facets):{},e.next=4,y(o,c,+f,s,p);case 4:v=e.sent,u.dataset.page="".concat(+f+1),null===(r=t.target)||void 0===r||r.dispatchEvent(m({name:h.loadMore,data:{page:"".concat(+f+1),searchValue:c,tabUrl:o,selectedFacets:p,selectedSearchTab:null===(l=document.querySelector(".cmp-saas"))||void 0===l?void 0:l.getAttribute("data-selected-tab")}})),g=null===(d=i.getElementsByClassName("cmp-saas__results-items"))||void 0===d?void 0:d[0],null==v||v.results.forEac
1h((function(e){var t=T(e);g.appendChild(t)})),g&&i.insertBefore(g,u),null!=v&&v.showLoadMoreButton||u.remove();case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),u},C=function(e){return e.map((function(e){var t=T(e);return null==t||t.addEventListener("click",(function(t){var r;null===(r=t.target)||void 0===r||r.dispatchEvent(m({name:h.searchResultItemClick,data:{title:e.title,url:e.url,bestBet:e.bestBet}}))})),t}))},F=function(e){var t=e.searchItems,r=e.tabId,n=document.createElement("div");n.classList.add("cmp-saas__results");var a=document.createElement("div");return a.classList.add("cmp-saas__results-items"),n.dataset.tab=r,C(t).forEach((function(e){a.appendChild(e)})),n.appendChild(a),n};function N(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function I(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?N(Object(r),!0).forEach((function(t){f(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):N(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var q=function(e){var r=e.value,n=e.filterFieldName,o=e.tabUrl,c=e.searchValue,i=e.queryParameterName,s=e.loadMoreButtonText,u=document.createElement("div");u.classList.add("cmp-sass__facet");var l=document.createElement("input");l.classList.add("cmp-sass__facet-input"),l.type="checkbox",l.id=r;var d=document.querySelector('[data-selected="true"]'),p=(null!=d&&d.dataset.facets?JSON.parse(d.dataset.facets):{})[n];l.checked=!!p&&p.includes(r),l.addEventListener("change",function(){var e=t(a().mark((function e(t){var u,l,d,p,v,g,b,w,_,E,L;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u=(null==t?void 0:t.target).checked,l=document.querySelector('[data-selected="true"]')){e.next=4;break}return e.abrupt("return");case 4:return d=null!=l&&l.dataset.facets?JSON.parse(l.dataset.facets):{},p=d[n]||[],v=u?[].concat(P(p),[r]):p.filter((function(e){return e!==r})),g=I(I({},d),{},f({},n,v)),l.dataset.facets=JSON.stringify(g),e.next=11,y(o,c,1,i,g);case 11:b=e.sent,null==(w=l.querySelectorAll(":not([class*=cmp-sass__facet])"))||w.forEach((function(e){e.remove()})),b&&((E=document.createElement("div")).classList.add("cmp-saas__results-items"),C(b.results).forEach((function(e){E.appendChild(e)})),null===(_=t.target)||void 0===_||_.dispatchEvent(m({name:h.facetsSelect,data:{value:r,searchValue:c,filterFieldName:n,queryParameterName:i}})),null==l||l.appendChild(E),b.showLoadMoreButton&&(L=k({loadMoreButtonText:s,page:2,tabUrl:o,searchValue:c,searchResultsElement:l,queryParameterName:i}),l.appendChild(L)));case 16:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());var v=document.createElement("label");return v.classList.add("cmp-sass__facet-label"),v.innerText="".concat(r),v.htmlFor=r,u.appendChild(l),u.appendChild(v),u};function R(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function A(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?R(Object(r),!0).forEach((function(t){f(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):R(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var B=function(e){var t=e.filterFieldLabel,r=e.filterFieldName,n=e.filterFieldOptions,a=e.tabUrl,o=e.searchValue,c=e.queryParameterName,i=e.tabId,s=e.loadMoreButtonText,u=e.title,l=document.createElement("div");l.classList.add("cmp-sass__facets-group");var d=document.createElement("h4");d.innerText=t,d.classList.add("cmp-sass__facets-group-title"),l.appendChild(d);var p=function(e){var t,r=e.title,n=e.filterFieldLabel,a=null===(t=window.appState.facetFilters)||void 0===t?void 0:t[r][n];return Object.entries(a||{}).reduce((function(e,t){var r=_(t,2),n=r[0];return r[1],L(L({},e),{},f({},n,0))}),{})}({title:u,filterFieldLabel:t}
1),h=O(n),m=A(A({},p),h);return Object.entries(m).forEach((function(e){var t=_(e,2),n=t[0],d=t[1],f=q({value:n,hits:d,filterFieldName:r,tabUrl:a,searchValue:o,queryParameterName:c,tabId:i,loadMoreButtonText:s,title:u});l.appendChild(f)})),l},U="cmp-saas__results",D="".concat(U,"--show"),M="".concat(U,"--hide"),V=function(e){var t=e.querySelector(".cmp-saas__autosuggest");null==t||t.remove()},G=function(e){e.querySelectorAll(".cmp-saas__tab").forEach((function(e){e.remove()}))},H=function(e){e.querySelectorAll(".cmp-saas__results").forEach((function(e){e.remove()}))},J=function(e){e.removeAttribute("data-selected-tab")},K=function(e){var t=e.tabId,r=e.title,n=e.tabNumberOfResults,a=e.searchContainer,o=document.createElement("button");o.classList.add("cmp-saas__tab");var c=document.createElement("span");c.innerHTML=r;var i=document.createElement("span");return i.innerHTML=" (".concat(n,")"),o.appendChild(c),o.appendChild(i),o.addEventListener("click",(function(e){var o=a.querySelectorAll(".cmp-saas__results");a.dataset.selectedTab=t,window.location.hash=t,null==o||o.forEach((function(a){var o,c=a;if(c.dataset.tab===t)return c.classList.add(D),c.classList.remove(M),void(c.dataset.selected="true");c.classList.remove(D),c.classList.add(M),c.dataset.selected="false",null===(o=e.target)||void 0===o||o.dispatchEvent(m({name:h.tabswitch,data:{tabId:t,title:r,tabNumberOfResults:n}}))}))})),o},Q="cmp-saas__results",Y="".concat(Q,"--show"),z="".concat(Q,"--hide"),$=function(e){var t=e.tabResult,r=e.searchValue,n=e.searchForm,a=e.searchFormParent,o=e.loadMoreButtonText,c=e.searchContainer,i=t.resultsTotal,s=t.showLoadMoreButton,u=t.tabId,l=t.title,d=t.results,f=t.url,p=t.facetFilters;if(i){var h;c&&window.location.hash?c.dataset.selectedTab=window.location.hash.replace("#",""):c&&0===t.index&&(c.dataset.selectedTab=t.tabId);var m=K({tabId:u,title:l,tabNumberOfResults:i,searchContainer:c}),v=F({searchItems:d,tabId:u});null==n||null===(h=n.parentNode)||void 0===h||h.insertBefore(m,n.nextSibling);var g=document.createElement("div");if(g.classList.add("cmp-sass__facets-groups"),null==p||p.items.forEach((function(e){var t=B({filterFieldLabel:e.filterFieldLabel,filterFieldName:e.filterFieldName,filterFieldOptions:e.filterFieldOptions,tabUrl:f,searchValue:r,queryParameterName:p.queryParameterName,tabId:u,loadMoreButtonText:o,title:l});null==g||g.appendChild(t)})),p&&v.prepend(g),null==a||a.appendChild(v),s){var y=k({loadMoreButtonText:o,page:2,tabUrl:f,searchValue:r,searchResultsElement:v});null==v||v.appendChild(y)}if((null==c?void 0:c.dataset.selectedTab)!==u)return v.classList.remove(Y),v.classList.add(z),void(v.dataset.selected="false");v.dataset.selected="true",v.classList.remove(z),v.classList.add(Y)}},W=function(e,t){var r=new URL(window.location.href);r.searchParams.set(p,e);var n=document.createElement("div");n.classList.add("cmp-saas__autosuggest");var a=document.createElement("a");return a.innerText="".concat(t," ").concat(e),a.href=r.toString(),n.appendChild(a),n.addEventListener("click",(function(r){var n;null===(n=r.target)||void 0===n||n.dispatchEvent(m({name:e,data:{autoSuggestText:t}}))})),n};function X(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Z(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?X(Object(r),!0).forEach((function(t){f(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):X(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ee=function(){var e=t(a().mark((function e(r,n,o,c,i,s,u,l){var d,f,h,m,v,g,b,w,_,E,L,x,O,P,T,k,C;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("true"!==n.dataset.loading){e.next=2;break}return e.abrupt("return");case 2:if(f=n,(h=c&&c.length>0)&&(f.dataset.loading="true"),m=n.value,o&&o!=window.location.pathname&&(v=new URL(window.location.href),(g=new URLSearchParams(v.search)).set(p,m),window.location.href="".concat(o,"?").concat(g.toString())),j(m),V(u),G(u),H(u),J(u),!h){e.next=18;break}return e.next=15,Promise.all(c.map(function(){var e=t(a().mark((function e(t,r){var n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,y(t.url,m);case 2:return n=e.sent,e.abrupt("return",Z(Z({},n),{},{tabId:t.tabId||t.title,title:t.title,index:r}));case 4:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}())).finally((function(){f.dataset.loading="false"}));case 15:e.t0=e.sent,e.next=19;break;case 18:e.t0=null;case 19:if(b=e.t0,w=r.parentElement,_=null==b?void 0:b.some((function(e){return e.resultsTotal})),E=null==b||null===(d=b[0])||void 0===d?void 0:d.suggestion,x=(L=h&&!_)&&E,O=L&&w,h&&_&&(null==w||null===(P=w.querySelectorAll(".cmp-saas__not-found"))||void 0===P||P.forEach((function(e){return e.remove()}))),x&&(T=W(E.text,s),null==w||w.append(T)),k=null==w?void 0:w.querySelector(".cmp-saas__not-found"),O&&!k&&((C=document.createElement("div")).classList.add("cmp-saas__not-found"),C.innerText=l,w.appendChild(C)),!L){e.next=33;break}return e.abrupt("return");case 33:b&&b.sort((function(e,t){return e.index<t.index?1:t.index<e.index?-1:0}
1)).forEach((function(e){S(e),$({tabResult:e,searchValue:m,searchForm:r,searchFormParent:w,loadMoreButtonText:i,searchContainer:u})}));case 34:case"end":return e.stop()}}),e)})));return function(t,r,n,a,o,c,i,s){return e.apply(this,arguments)}}(),te=function(e,t,r,n,a,o,c,i){return e.addEventListener("submit",(function(s){var u;return s.preventDefault(),null===(u=s.target)||void 0===u||u.dispatchEvent(m({name:h.searchSubmit,data:{query:t.value}})),ee(e,t,r,n,a,o,c,i)}))},re=function(){var e=document.createElement("form");return e.classList.add("cmp-saas__form"),e},ne=function(e){return e.replace(/\s+/g," ").trim()};var ae=function(e){var t,r=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500;return function(){for(var a=arguments.length,o=new Array(a),c=0;c<a;c++)o[c]=arguments[c];clearTimeout(t),t=setTimeout((function(){e.apply(r,o)}),n)}},oe=function(e,t){var r=new URL("".concat(window.location.origin).concat(e));return r.searchParams.set(p,t),r.toString()},ce=function(){var e=t(a().mark((function e(t,r){var n,o,c;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,n=oe(t,r),e.next=4,fetch(n);case 4:return o=e.sent,e.next=7,o.json();case 7:return c=e.sent,e.abrupt("return",c.filter((function(e){return e.length})));case 11:return e.prev=11,e.t0=e.catch(0),e.abrupt("return",null);case 14:case"end":return e.stop()}}),e,null,[[0,11]])})));return function(t,r){return e.apply(this,arguments)}}(),ie=ce,se="cmp-saas-suggestions",ue="cmp-saas__search-input",le=".cmp-saas__form #".concat(se),de="cmp-saas__suggestion-element",fe="".concat(de,"--active"),pe=function(e,t){e.setAttribute("saasCurrentFocusSuggestion",t.toString())},he=function(e){var t=e.querySelector(le);t&&t.remove()},me=function(e){var t,r=e.results,n=e.regexp,a=e.query,o=e.searchInput,c=e.searchContainer,s=e.suggestionDropdown;if(a){var u=null===(t=c.getElementsByClassName("cmp-saas__button"))||void 0===t?void 0:t[0];r.forEach((function(e){var t=ne(e).replace(n,'<span class="cmp-saas__suggestion-element--matched-query">'.concat(a,"</span>")),l=document.createElement("div");l.innerHTML=t,l.classList.add(de),l.addEventListener("click",(function(t){var n,s,d=o;i(),he(c),d.value=e,null===(n=t.target)||void 0===n||n.dispatchEvent(m({name:h.autoSuggestSelect,data:{query:a,results:r.length,term:l.textContent}})),u?u.click():null==(s={searchContainer:c}.searchContainer.querySelector(".cmp-saas__form"))||s.dispatchEvent(new Event("submit"))})),s.appendChild(l)})),o.after(s)}},ve=function(e){var t=ne(e);return{cleanedQuery:t,regexp:new RegExp(t,"gi")}},ge=function(e){var r=e.id,n=e.searchFieldPlaceholderText,l=e.autocompleteUrl,d=e.autocompleteTriggerThreshold,f=e.autoSuggestionDebounceTime,h=void 0===f?500:f,m=e.searchContainer,v=document.createElement("input");v.classList.add(ue),v.name=p,v.placeholder=n,v.id=r,v.autocomplete="off",pe(v,-1);var g=function(e){return ae(function(){var e=t(a().mark((function e(t,r,n,s,l){var d,f,p,h,m,v;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(pe(s,-1),(null==r||!r.length||r.length<n)&&(he(l),i()),!(r.length>=n)){e.next=14;break}return d=ve(r),f=d.cleanedQuery,p=d.regexp,e.next=6,ie(t,f);case 6:h=e.sent,m=l.querySelector(le),v=null,u({storageKey:c,data:r,stringify:!1}),m?v=m:(v=document.createElement("div")).id=se,i([o]),v.innerHTML="",null!=h&&h.length&&(u({storageKey:o,data:h}),me({results:h,regexp:p,query:r,searchInput:s,searchContainer:l,suggestionDropdown:v}));case 14:case"end":return e.stop()}}),e)})));return function(t,r,n,a,o){return e.apply(this,arguments)}}(),e)}(h);return v.addEventListener("focus",(function(){var e=s({storageKey:c,defaultValue:"",parse:!1}),t=s({storageKey:o,defaultValue:"[]"}),r=ve(e).regexp,n=document.createElement("div");n.id=se,me({results:t,regexp:r,query:e,searchInput:v,searchContainer:m,suggestionDropdown:n})})),v.addEventListener("input",(function(e){var t,r,n=null==e||null===(t=e.target)||void 0===t?void 0:t.value,a=m.querySelector(".cmp-saas__search-clear-button"),o=n.length>=d?"remove":"add";null==a||a.classList[o]("cmp-saas__search-clear-button--hide"),null===(r=g(l,n,d,v,m))||void 0===r||r.catch((function(e){throw e}))})),document.addEventListener("click",(function(e){e.target.classList.contains(ue)||he(m)})),v.addEventListener("keydown",(function(e){var t=m.querySelectorAll("#".concat(se," .").concat(de));if(t.length){var r,n=t.length-1,a=null!==(r=v.getAttribute("saasCurrentFocusSuggestion"))&&void 0!==r?r:"-1",o=parseInt(a,10),c=t[o
1];if("ArrowDown"===e.key&&o<n){var i=o+1,s=t[i];null==c||c.classList.remove(fe),null==s||s.classList.add(fe),pe(v,i)}if("ArrowUp"===e.key&&o>-1){var u=o-1,l=t[u];null==c||c.classList.remove(fe),null==l||l.classList.add(fe),pe(v,u)}"Enter"===e.key&&c&&(pe(v,-1),c.click())}})),v},ye=function(e){if(!e)return null;var t=e.dataset.searchConfig||"{}",r=JSON.parse(t),n=function(e){var t=e.id,r=e.searchFieldPlaceholderText,n=e.searchUrl;return"string"==typeof t&&Boolean(t)&&"string"==typeof r&&Boolean(r)&&(!n||"string"==typeof n)}(r);return n?r:(console.warn("SAAS: Invalid search config",r),null)},be=function(){var e=document.createElement("style");document.head.prepend(e);var t=e.sheet;t&&(t.insertRule("\n #cmp-saas-suggestions {\n position: absolute;\n border: 1px solid #d4d4d4;\n border-bottom: none;\n border-top: none;\n z-index: 99;\n top: 100%;\n left: 0;\n right: 0;\n }\n ",0),t.insertRule("\n .cmp-saas__search-input-wrapper {\n position: relative;\n display: inline-block;\n }\n ",0),t.insertRule("\n .cmp-saas__suggestion-element {\n padding: 10px;\n cursor: pointer;\n background: #fff;\n }\n ",0),t.insertRule("\n .cmp-saas__suggestion-element:last-child {\n border-bottom: 1px solid #d4d4d4;\n }\n ",0),t.insertRule("\n .cmp-saas__suggestion-element:hover {\n background-color: #e9e9e9;\n }\n ",0),t.insertRule("\n .cmp-saas__suggestion-element--active {\n background-color: DodgerBlue !important;\n color: #fff;\n }\n ",0))},we=function(){var e=t(a().mark((function e(t,r){var n,o,c,i,s,u,f,m,v,g,y,b,w,_,E,L,x,O,S,j,P,T,k,C;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=ye(t)){e.next=3;break}return e.abrupt("return");case 3:if(o=n.trackingUrl,c=(r||{}).autoSuggestionDebounceTime,i=void 0===c?500:c,o&&document.addEventListener(h.searchResultItemClick,(function(e){var t=new Headers;t.append("Content-Type","application/x-www-form-urlencoded");var r=e.detail.url;fetch(o,{method:"POST",headers:t,body:"trackedUrl=".concat(r)}).catch((function(e){console.error("Error while tracking search result item with url: ".concat(r,"."),e)}))})),s=n.id,u=n.searchFieldPlaceholderText,f=n.searchButtonText,m=n.searchUrl,v=n.searchTabs,g=n.loadMoreButtonText,y=n.autocompleteUrl,b=n.autocompleteTriggerThreshold,w=n.autoSuggestText,_=n.noResultsText,(E=document.createElement("div")).classList.add("cmp-saas"),L=re(),x=l({searchContainer:E}),(O=document.createElement("div")).classList.add("cmp-saas__search-input-wrapper"),S=ge({id:s,searchFieldPlaceholderText:u,autocompleteUrl:y,autocompleteTriggerThreshold:b,autoSuggestionDebounceTime:i,searchContainer:E}),j=f?d({searchButtonText:f}):null,te(L,S,m,v,g,w,E,_),be(),O.appendChild(S),L.appendChild(O),j&&L.appendChild(j),null==x||x.classList.add("cmp-saas__search-clear-button--hide"),O.appendChild(x),null==(P=t.parentElement)||P.replaceChild(E,t),E.appendChild(L),T=new URL(window.location.href),k=new URLSearchParams(T.search),!(C=k.get(p))){e.next=33;break}return S.value=C,null==x||x.classList.remove("cmp-saas__search-clear-button--hide"),e.next=33,ee(L,S,m,v,g,w,E,_);case 33:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}();var _e=function(){window.addEventListener("load",(function(){var e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"search";return document.querySelectorAll(e)}();i(),e&&(null==e||e.forEach((function(e){we(e)})))}))};_e()}()}();
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.