ably-ui 7.10.0.dev.45e131a → 7.10.0.dev.caff705

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c23a334790ac7b889f531c6f97e45506f9863a6af73a105dc5298d4f4e76bd86
4
- data.tar.gz: a017459c9d2d4ee42b67f6a82bdffa1d1bacd54438b34e22f585d953bfff5765
3
+ metadata.gz: 14e5382f0b47d61abb21d5209f36543ce52bab7f2a1e655df0da4b7cca4cceb7
4
+ data.tar.gz: 1b0d5cd8f6b4a39559e6d00cabd8a5f3aa560f26c9cd1314b20005852ff8af28
5
5
  SHA512:
6
- metadata.gz: 8d744bce1d58d808fac4e94d30a82f550b8f47889ce1297273933a005ae52108b3b95957d3c83c31fdb4d2a516d053568488a025221f8b37581c75cf92546237
7
- data.tar.gz: de586f0c83a3a90f2cacd648910aa7ccc8063edfe992d8c051081c034814136ead3054ee4edd64ef5033faa8dc5e2f390b2e3541fa3d548f9d59a05c8a55d287
6
+ metadata.gz: dee2b733a3d55f62f5ccb93ab199ba464a4e7481c3be736f3866b13b0badd777a4c103d8f7549bf747b2243ac70e7bad2669fd1ede07ffeb9ed46f17e57f4f90
7
+ data.tar.gz: 3449d2d07140309a01d48966f164c00f0a0721b3bf2caabff8edb11c2af26f6cc92a1e4e942d841e7465f29dd628bcd1b0b42b18a6a9f59dac1616b464b86eb7
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ably-ui (7.10.0)
4
+ ably-ui (7.10.0.dev.d8911c4)
5
5
  view_component (>= 2.33, < 2.50)
6
6
 
7
7
  GEM
@@ -1 +1,2 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.AblyUi=t():(e.AblyUi=e.AblyUi||{},e.AblyUi.Core=e.AblyUi.Core||{},e.AblyUi.Core.Meganav=t())}(this,(function(){return(()=>{var e={2498:(e,t,r)=>{"use strict";r.d(t,{default:()=>l});var n=r(9581);function o(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}const l=function(){var e=Array.from((0,n.n)("meganav-control")),t=Array.from((0,n.n)("meganav-panel")),r=getComputedStyle(document.documentElement).getPropertyValue("--bp-md"),l=function(t,n,l){if(window.matchMedia("(hover: hover) and (pointer: fine) and (min-width: ".concat(r,")")).matches&&!e.some((function(e){return e===document.activeElement}))){var a,i=["invisible","visible"];(a=n.classList).replace.apply(a,function(e){if(Array.isArray(e))return o(e)}(c=l?i:i.reverse())||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(c)||function(e,t){if(e){if("string"==typeof e)return o(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)?o(e,t):void 0}}(c)||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.")}()),t.setAttribute("aria-expanded",l)}var c};return e.map((function(r){var n=r.parentNode,o=document.querySelector("#".concat(r.getAttribute("aria-controls"))),a=function(r,n){return function(){e.forEach((function(e){return e!==r&&e.setAttribute("aria-expanded",!1)})),t.forEach((function(e){return e!==n&&e.classList.replace("visible","invisible")})),r.getAttribute("aria-expanded")?(r.setAttribute("aria-expanded",!0),n.classList.replace("invisible","visible")):(r.setAttribute("aria-expanded",!1),n.classList.replace("visible","invisible"))}}(r,o),i=function(e,t){return function(){return l(e,t,!0)}}(r,o),c=function(e,t){return function(){return l(e,t,!1)}}(r,o);return n.addEventListener("mouseenter",i),n.addEventListener("mouseleave",c),r.addEventListener("click",a),[{teardown:function(){n.removeEventListener("mouseenter",i),n.removeEventListener("mouseleave",c),r.removeEventListener("click",a)},clear:function(){r.setAttribute("aria-expanded",!1),o.classList.replace("visible","invisible")}}]})).flat()}},1792:(e,t,r)=>{"use strict";r.d(t,{default:()=>a});var n=r(6265),o=r.n(n),l=r(9581);const a=function(e){var t=e.clearPanels,r=(0,l.A)("meganav-control-mobile-dropdown"),n=(0,l.A)("meganav-mobile-dropdown"),a=(0,l.A)("meganav-control-mobile-dropdown-menu"),i=(0,l.A)("meganav-control-mobile-dropdown-close"),c=(0,l.A)("meganav-mobile-search-input"),u=(0,l.A)("meganav-mobile-search-suggestions"),s=function(){"false"===r.getAttribute("aria-expanded")?(n.classList.replace("invisible","visible"),r.setAttribute("aria-expanded",!0),o().disablePageScroll()):(n.classList.replace("visible","invisible"),r.setAttribute("aria-expanded",!1),o().enablePageScroll(),t()),a.classList.toggle("hidden"),i.classList.toggle("hidden")};return r.addEventListener("click",s),c.addEventListener("focus",(function(){u.classList.add("max-h-96")})),c.addEventListener("blur",(function(e){e.relatedTarget!==u.querySelectorAll("a")[0]&&u.classList.remove("max-h-96")})),{teardown:function(){r.removeEventListener("click",s),o().enablePageScroll()},clear:function(){n.classList.replace("visible","invisible"),r.setAttribute("aria-expanded",!1),a.classList.remove("hidden"),i.classList.add("hidden"),o().enablePageScroll()}}}},7359:(e,t,r)=>{"use strict";r.d(t,{default:()=>o});var n=r(9581);const o=function(){var e=Array.from((0,n.n)("meganav-control-mobile-panel-close")),t=Array.from((0,n.n)("meganav-control-mobile-panel-open"));return e.map((function(e){var r=t.find((function(t){return t.getAttribute("aria-controls")===e.getAttribute("aria-controls")})),n=document.querySelector("#".concat(e.getAttribute("aria-controls"))),o=function(e,t,r){return function(){e.setAttribute("aria-expanded",!1),t.setAttribute("aria-expanded",!1),r.classList.replace("block","hidden"),r.style.height=null}}(e,r,n);return e.addEventListener("click",o),{teardown:function(){return e.removeEventListener("click",o)},clear:function(){return e.setAttribute("aria-expanded",!1)}}}))}},9552:(e,t,r)=>{"use strict";r.d(t,{default:()=>o});var n=r(9581);const o=function(){var e,t=Array.from((0,n.n)("meganav-control-mobile-panel-close")),r=Array.from((0,n.n)("meganav-control-mobile-panel-open")),o=(0,n.A)("meganav-mobile-dropdown"),l=(e=getComputedStyle(document.documentElement).getPropertyValue("--ui-meganav-height"),parseFloat(e)*parseFloat(getComputedStyle(document.documentElement).fontSize));return r.map((function(e){var r=t.find((function(t){return t.getAttribute("aria-controls")===e.getAttribute("aria-controls")})),n=document.querySelector("#".concat(e.getAttribute("aria-controls"))),a=function(e,t,r){return function(){e.setAttribute("aria-expanded",!0),t.setAttribute("aria-expanded",!0),r.classList.replace("hidden","block"),r.style.height="".concat(window.innerHeight-l>r.offsetHeight?r.offsetHeight:window.innerHeight-l,"px")}}(e,r,n);return e.addEventListener("click",a),{teardown:function(){return e.removeEventListener("click",a)},clear:function(){n.classList.replace("block","hidden"),o.classList.remove("ui-meganav-mobile-dropdown-expand"),e.setAttribute("aria-expanded",!1),n.style.height=null}}}))}},9581:(e,t,r)=>{"use strict";r.d(t,{A:()=>n,n:()=>o});var n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return t.querySelector("[data-id=".concat(e,"]"))},o=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return t.querySelectorAll("[data-id=".concat(e,"]"))}},3096:(e,t,r)=>{var n="Expected a function",o=/^\s+|\s+$/g,l=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,i=/^0o[0-7]+$/i,c=parseInt,u="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,s="object"==typeof self&&self&&self.Object===Object&&self,d=u||s||Function("return this")(),f=Object.prototype.toString,p=Math.max,g=Math.min,b=function(){return d.Date.now()};function v(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function m(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==f.call(e)}(e))return NaN;if(v(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=v(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(o,"");var r=a.test(e);return r||i.test(e)?c(e.slice(2),r?2:8):l.test(e)?NaN:+e}e.exports=function(e,t,r){var o=!0,l=!0;if("function"!=typeof e)throw new TypeError(n);return v(r)&&(o="leading"in r?!!r.leading:o,l="trailing"in r?!!r.trailing:l),function(e,t,r){var o,l,a,i,c,u,s=0,d=!1,f=!1,h=!0;if("function"!=typeof e)throw new TypeError(n);function y(t){var r=o,n=l;return o=l=void 0,s=t,i=e.apply(n,r)}function S(e){return s=e,c=setTimeout(A,t),d?y(e):i}function w(e){var r=e-u;return void 0===u||r>=t||r<0||f&&e-s>=a}function A(){var e=b();if(w(e))return k(e);c=setTimeout(A,function(e){var r=t-(e-u);return f?g(r,a-(e-s)):r}(e))}function k(e){return c=void 0,h&&o?y(e):(o=l=void 0,i)}function L(){var e=b(),r=w(e);if(o=arguments,l=this,u=e,r){if(void 0===c)return S(u);if(f)return c=setTimeout(A,t),y(u)}return void 0===c&&(c=setTimeout(A,t)),i}return t=m(t)||0,v(r)&&(d=!!r.leading,a=(f="maxWait"in r)?p(m(r.maxWait)||0,t):a,h="trailing"in r?!!r.trailing:h),L.cancel=function(){void 0!==c&&clearTimeout(c),s=0,o=u=l=c=void 0},L.flush=function(){return void 0===c?i:k(b())},L}(e,t,{leading:o,maxWait:t,trailing:l})}},6265:function(e){var t;t=function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=0)}([function(e,t,r){"use strict";r.r(t);var n=function(e){return Array.isArray(e)?e:[e]},o=function(e){return e instanceof Node},l=function(e,t){if(e&&t){e=function(e){return e instanceof NodeList}(e)?e:[e];for(var r=0;r<e.length&&!0!==t(e[r],r,e.length);r++);}},a=function(e){return console.error("[scroll-lock] ".concat(e))},i=function(e){if(Array.isArray(e))return e.join(", ")},c=function(e){var t=[];return l(e,(function(e){return t.push(e)})),t},u=function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:document;if(r&&-1!==c(n.querySelectorAll(t)).indexOf(e))return e;for(;(e=e.parentElement)&&-1===c(n.querySelectorAll(t)).indexOf(e););return e},s=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document,n=-1!==c(r.querySelectorAll(t)).indexOf(e);return n},d=function(e){if(e)return"hidden"===getComputedStyle(e).overflow},f=function(e){if(e)return!!d(e)||e.scrollTop<=0},p=function(e){if(e){if(d(e))return!0;var t=e.scrollTop,r=e.scrollHeight;return t+e.offsetHeight>=r}},g=function(e){if(e)return!!d(e)||e.scrollLeft<=0},b=function(e){if(e){if(d(e))return!0;var t=e.scrollLeft,r=e.scrollWidth;return t+e.offsetWidth>=r}},v=function(e){return s(e,'textarea, [contenteditable="true"]')},m=function(e){return s(e,'input[type="range"]')};function h(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.d(t,"disablePageScroll",(function(){return w})),r.d(t,"enablePageScroll",(function(){return A})),r.d(t,"getScrollState",(function(){return k})),r.d(t,"clearQueueScrollLocks",(function(){return L})),r.d(t,"getTargetScrollBarWidth",(function(){return x})),r.d(t,"getCurrentTargetScrollBarWidth",(function(){return E})),r.d(t,"getPageScrollBarWidth",(function(){return T})),r.d(t,"getCurrentPageScrollBarWidth",(function(){return j})),r.d(t,"addScrollableTarget",(function(){return O})),r.d(t,"removeScrollableTarget",(function(){return G})),r.d(t,"addScrollableSelector",(function(){return W})),r.d(t,"removeScrollableSelector",(function(){return F})),r.d(t,"addLockableTarget",(function(){return P})),r.d(t,"addLockableSelector",(function(){return Y})),r.d(t,"setFillGapMethod",(function(){return q})),r.d(t,"addFillGapTarget",(function(){return M})),r.d(t,"removeFillGapTarget",(function(){return C})),r.d(t,"addFillGapSelector",(function(){return N})),r.d(t,"removeFillGapSelector",(function(){return U})),r.d(t,"refillGaps",(function(){return B}));var y=["padding","margin","width","max-width","none"],S={scroll:!0,queue:0,scrollableSelectors:["[data-scroll-lock-scrollable]"],lockableSelectors:["body","[data-scroll-lock-lockable]"],fillGapSelectors:["body","[data-scroll-lock-fill-gap]","[data-scroll-lock-lockable]"],fillGapMethod:y[0],startTouchY:0,startTouchX:0},w=function(e){S.queue<=0&&(S.scroll=!1,K(),$()),O(e),S.queue++},A=function(e){S.queue>0&&S.queue--,S.queue<=0&&(S.scroll=!0,R(),D()),G(e)},k=function(){return S.scroll},L=function(){S.queue=0},x=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(o(e)){var r=e.style.overflowY;t?k()||(e.style.overflowY=e.getAttribute("data-scroll-lock-saved-overflow-y-property")):e.style.overflowY="scroll";var n=E(e);return e.style.overflowY=r,n}return 0},E=function(e){if(o(e)){if(e===document.body){var t=document.documentElement.clientWidth;return window.innerWidth-t}var r=e.style.borderLeftWidth,n=e.style.borderRightWidth;e.style.borderLeftWidth="0px",e.style.borderRightWidth="0px";var l=e.offsetWidth-e.clientWidth;return e.style.borderLeftWidth=r,e.style.borderRightWidth=n,l}return 0},T=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return x(document.body,e)},j=function(){return E(document.body)},O=function(e){e&&n(e).map((function(e){l(e,(function(e){o(e)?e.setAttribute("data-scroll-lock-scrollable",""):a('"'.concat(e,'" is not a Element.'))}))}))},G=function(e){e&&n(e).map((function(e){l(e,(function(e){o(e)?e.removeAttribute("data-scroll-lock-scrollable"):a('"'.concat(e,'" is not a Element.'))}))}))},W=function(e){e&&n(e).map((function(e){S.scrollableSelectors.push(e)}))},F=function(e){e&&n(e).map((function(e){S.scrollableSelectors=S.scrollableSelectors.filter((function(t){return t!==e}))}))},P=function(e){e&&(n(e).map((function(e){l(e,(function(e){o(e)?e.setAttribute("data-scroll-lock-lockable",""):a('"'.concat(e,'" is not a Element.'))}))})),k()||K())},Y=function(e){e&&(n(e).map((function(e){S.lockableSelectors.push(e)})),k()||K(),N(e))},q=function(e){if(e)if(-1!==y.indexOf(e))S.fillGapMethod=e,B();else{var t=y.join(", ");a('"'.concat(e,'" method is not available!\nAvailable fill gap methods: ').concat(t,"."))}},M=function(e){e&&n(e).map((function(e){l(e,(function(e){o(e)?(e.setAttribute("data-scroll-lock-fill-gap",""),S.scroll||z(e)):a('"'.concat(e,'" is not a Element.'))}))}))},C=function(e){e&&n(e).map((function(e){l(e,(function(e){o(e)?(e.removeAttribute("data-scroll-lock-fill-gap"),S.scroll||J(e)):a('"'.concat(e,'" is not a Element.'))}))}))},N=function(e){e&&n(e).map((function(e){-1===S.fillGapSelectors.indexOf(e)&&(S.fillGapSelectors.push(e),S.scroll||Q(e))}))},U=function(e){e&&n(e).map((function(e){S.fillGapSelectors=S.fillGapSelectors.filter((function(t){return t!==e})),S.scroll||V(e)}))},B=function(){S.scroll||$()},K=function(){var e=i(S.lockableSelectors);_(e)},R=function(){var e=i(S.lockableSelectors);I(e)},_=function(e){var t=document.querySelectorAll(e);l(t,(function(e){H(e)}))},I=function(e){var t=document.querySelectorAll(e);l(t,(function(e){X(e)}))},H=function(e){if(o(e)&&"true"!==e.getAttribute("data-scroll-lock-locked")){var t=window.getComputedStyle(e);e.setAttribute("data-scroll-lock-saved-overflow-y-property",t.overflowY),e.setAttribute("data-scroll-lock-saved-inline-overflow-property",e.style.overflow),e.setAttribute("data-scroll-lock-saved-inline-overflow-y-property",e.style.overflowY),e.style.overflow="hidden",e.setAttribute("data-scroll-lock-locked","true")}},X=function(e){o(e)&&"true"===e.getAttribute("data-scroll-lock-locked")&&(e.style.overflow=e.getAttribute("data-scroll-lock-saved-inline-overflow-property"),e.style.overflowY=e.getAttribute("data-scroll-lock-saved-inline-overflow-y-property"),e.removeAttribute("data-scroll-lock-saved-overflow-property"),e.removeAttribute("data-scroll-lock-saved-inline-overflow-property"),e.removeAttribute("data-scroll-lock-saved-inline-overflow-y-property"),e.removeAttribute("data-scroll-lock-locked"))},$=function(){S.fillGapSelectors.map((function(e){Q(e)}))},D=function(){S.fillGapSelectors.map((function(e){V(e)}))},Q=function(e){var t=document.querySelectorAll(e),r=-1!==S.lockableSelectors.indexOf(e);l(t,(function(e){z(e,r)}))},z=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(o(e)){var r;if(""===e.getAttribute("data-scroll-lock-lockable")||t)r=x(e,!0);else{var n=u(e,i(S.lockableSelectors));r=x(n,!0)}"true"===e.getAttribute("data-scroll-lock-filled-gap")&&J(e);var l=window.getComputedStyle(e);if(e.setAttribute("data-scroll-lock-filled-gap","true"),e.setAttribute("data-scroll-lock-current-fill-gap-method",S.fillGapMethod),"margin"===S.fillGapMethod){var a=parseFloat(l.marginRight);e.style.marginRight="".concat(a+r,"px")}else if("width"===S.fillGapMethod)e.style.width="calc(100% - ".concat(r,"px)");else if("max-width"===S.fillGapMethod)e.style.maxWidth="calc(100% - ".concat(r,"px)");else if("padding"===S.fillGapMethod){var c=parseFloat(l.paddingRight);e.style.paddingRight="".concat(c+r,"px")}}},V=function(e){var t=document.querySelectorAll(e);l(t,(function(e){J(e)}))},J=function(e){if(o(e)&&"true"===e.getAttribute("data-scroll-lock-filled-gap")){var t=e.getAttribute("data-scroll-lock-current-fill-gap-method");e.removeAttribute("data-scroll-lock-filled-gap"),e.removeAttribute("data-scroll-lock-current-fill-gap-method"),"margin"===t?e.style.marginRight="":"width"===t?e.style.width="":"max-width"===t?e.style.maxWidth="":"padding"===t&&(e.style.paddingRight="")}};"undefined"!=typeof window&&window.addEventListener("resize",(function(e){B()})),"undefined"!=typeof document&&(document.addEventListener("touchstart",(function(e){S.scroll||(S.startTouchY=e.touches[0].clientY,S.startTouchX=e.touches[0].clientX)})),document.addEventListener("touchmove",(function(e){if(!S.scroll){var t=S.startTouchY,r=S.startTouchX,n=e.touches[0].clientY,o=e.touches[0].clientX;if(e.touches.length<2){var l=i(S.scrollableSelectors),a={up:t<n,down:t>n,left:r<o,right:r>o},c={up:t+3<n,down:t-3>n,left:r+3<o,right:r-3>o};!function t(r){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(r){var o=u(r,l,!1);if(m(r))return!1;if(n||v(r)&&u(r,l)||s(r,l)){var i=!1;g(r)&&b(r)?(a.up&&f(r)||a.down&&p(r))&&(i=!0):f(r)&&p(r)?(a.left&&g(r)||a.right&&b(r))&&(i=!0):(c.up&&f(r)||c.down&&p(r)||c.left&&g(r)||c.right&&b(r))&&(i=!0),i&&(o?t(o,!0):e.cancelable&&e.preventDefault())}else t(o)}else e.cancelable&&e.preventDefault()}(e.target)}}}),{passive:!1}),document.addEventListener("touchend",(function(e){S.scroll||(S.startTouchY=0,S.startTouchX=0)})));var Z={hide:function(e){a('"hide" is deprecated! Use "disablePageScroll" instead. \n https://github.com/FL3NKEY/scroll-lock#disablepagescrollscrollabletarget'),w(e)},show:function(e){a('"show" is deprecated! Use "enablePageScroll" instead. \n https://github.com/FL3NKEY/scroll-lock#enablepagescrollscrollabletarget'),A(e)},toggle:function(e){a('"toggle" is deprecated! Do not use it.'),k()?w():A(e)},getState:function(){return a('"getState" is deprecated! Use "getScrollState" instead. \n https://github.com/FL3NKEY/scroll-lock#getscrollstate'),k()},getWidth:function(){return a('"getWidth" is deprecated! Use "getPageScrollBarWidth" instead. \n https://github.com/FL3NKEY/scroll-lock#getpagescrollbarwidth'),T()},getCurrentWidth:function(){return a('"getCurrentWidth" is deprecated! Use "getCurrentPageScrollBarWidth" instead. \n https://github.com/FL3NKEY/scroll-lock#getcurrentpagescrollbarwidth'),j()},setScrollableTargets:function(e){a('"setScrollableTargets" is deprecated! Use "addScrollableTarget" instead. \n https://github.com/FL3NKEY/scroll-lock#addscrollabletargetscrollabletarget'),O(e)},setFillGapSelectors:function(e){a('"setFillGapSelectors" is deprecated! Use "addFillGapSelector" instead. \n https://github.com/FL3NKEY/scroll-lock#addfillgapselectorfillgapselector'),N(e)},setFillGapTargets:function(e){a('"setFillGapTargets" is deprecated! Use "addFillGapTarget" instead. \n https://github.com/FL3NKEY/scroll-lock#addfillgaptargetfillgaptarget'),M(e)},clearQueue:function(){a('"clearQueue" is deprecated! Use "clearQueueScrollLocks" instead. \n https://github.com/FL3NKEY/scroll-lock#clearqueuescrolllocks'),L()}},ee=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){h(e,t,r[t])}))}return e}({disablePageScroll:w,enablePageScroll:A,getScrollState:k,clearQueueScrollLocks:L,getTargetScrollBarWidth:x,getCurrentTargetScrollBarWidth:E,getPageScrollBarWidth:T,getCurrentPageScrollBarWidth:j,addScrollableSelector:W,removeScrollableSelector:F,addScrollableTarget:O,removeScrollableTarget:G,addLockableSelector:Y,addLockableTarget:P,addFillGapSelector:N,removeFillGapSelector:U,addFillGapTarget:M,removeFillGapTarget:C,setFillGapMethod:q,refillGaps:B,_state:S},Z);t.default=ee}]).default},e.exports=t()}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var l=t[n]={exports:{}};return e[n].call(l.exports,l,l.exports,r),l.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(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.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var n={};return(()=>{"use strict";r.d(n,{default:()=>g});var e=r(3096),t=r.n(e),o=r(9581),l=r(2498),a=r(1792),i=r(9552),c=r(7359);function u(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return s(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)?s(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(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}var d=function(e){return window.onblur=function(){return e()},{teardown:function(){return window.onblur=null}}},f=function(e){var t=(0,o.A)("meganav"),r=function(r){t.contains(r.target)||e()};return document.addEventListener("click",r),{teardown:function(){return document.removeEventListener("click",r)}}},p=function(e){if("transparentToWhite"!==e)return{teardown:function(){}};var r=(0,o.A)("meganav"),n=(0,o.n)("meganav-link"),l=(0,o.A)("meganav-control-mobile-dropdown-menu"),a=(0,o.A)("meganav-control-mobile-dropdown-close"),i=(0,o.n)("meganav-control"),c=(0,o.A)("meganav-sign-up-btn"),s=[].concat(u(Array.from(i)),u(Array.from(n)),[(0,o.A)("meganav-logo")]),d=function(e){var t,r,n,o,i=["ui-icon-white","ui-icon-cool-black"],c=[].concat(i).reverse();e?(null==l||(t=l.classList).replace.apply(t,i),null==a||(r=a.classList).replace.apply(r,i)):(null==l||(n=l.classList).replace.apply(n,u(c)),null==a||(o=a.classList).replace.apply(o,u(c)))},f=function(e){e?(null==c||c.classList.replace("bg-white","bg-cool-black"),null==c||c.classList.replace("text-cool-black","text-white")):(null==c||c.classList.replace("bg-cool-black","bg-white"),null==c||c.classList.replace("text-white","text-cool-black"))},p=t()((function(){window.scrollY>5?(r.classList.replace("bg-transparent","bg-white"),f(!0),d(!0),s.forEach((function(e){return e.classList.replace("text-white","text-cool-black")}))):(r.classList.replace("bg-white","bg-transparent"),f(!1),d(!1),s.forEach((function(e){return e.classList.replace("text-cool-black","text-white")})))}),150);return document.addEventListener("scroll",p),{teardown:function(){return document.removeEventListener("scroll",p)}}};function g(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{themeName:null},t=e.themeName,r=(0,l.default)(),n=(0,i.default)(),o=(0,c.default)(),s=(0,a.default)({clearPanels:function(){return[].concat(u(n),u(o)).forEach((function(e){return e.clear()}))}}),g=function(){return[s].concat(u(n),u(o),u(r)).forEach((function(e){return e.clear()}))},b=[p(t),f(g),d(g),s].concat(u(r),u(n),u(o)).map((function(e){return e.teardown}));return function(){return b.forEach((function(e){return e()}))}}})(),n.default})()}));
1
+ /*! For license information please see component.js.LICENSE.txt */
2
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.AblyUi=e():(t.AblyUi=t.AblyUi||{},t.AblyUi.Core=t.AblyUi.Core||{},t.AblyUi.Core.Meganav=e())}(this,(function(){return(()=>{var t={727:(t,e,n)=>{"use strict";t.exports=n(5647)},493:(t,e,n)=>{"use strict";n(2702).polyfill(),n(4301);var r=function(t,e,n,i,o,s,a){var c=function(t,e){return t||!1===t?"&"+e+"="+t:""};if("search"===n||"suggest"===n||"autocomplete"===n){var l="",u="",f=null;if("search"===n){f=n,l=i.keyword,l=i.enableLogicalOperators?l.replace(/ and /g," AND ").replace(/ or /g," OR ").replace(/ not /g," NOT "):l.replace(/ AND /g," and ").replace(/ OR /g," or ").replace(/ NOT /g," not "),l=encodeURIComponent(l);var d=i.fuzzy;if("retry"===d&&(d=!0===s),"search"===n){if(u=c(i.lang,"lang")+c(d,"fuzzy")+c(i.collectAnalytics,"collectAnalytics")+c(i.postfixWildcard,"postfixWildcard")+c(i.categories,"categories")+c(i.priceFromCents,"priceFromCents")+c(i.priceToCents,"priceToCents")+c(i.dateFrom,"dateFrom")+c(i.dateTo,"dateTo")+c(i.paging.page,"page")+c(i.paging.pageSize,"limit")+c(i.paging.sortBy,"sort")+c(i.paging.sortOrder,"order")+c(i.shuffleAndLimitTo,"shuffleAndLimitTo")+c(i.jwt,"jwt")+c(i.resultType,"resultType")+c(i.userToken,"userToken")+c(i.numFacets,"numFacets")+c(i.cacheResponseTime,"cacheResponseWithTtlSeconds")+c(i.searchOperator,"defaultOperator")+c(i.analyticsTag,"analyticsTag")+c(i.hierarchicalFacetSetting,"hierarchicalFacets"),i.customFieldFilters)for(var h=0;h<i.customFieldFilters.length;h++)u=u+"&customField="+i.customFieldFilters[h];if(i.facetFields)for(h=0;h<i.facetFields.length;h++)u=u+"&facet="+i.facetFields[h];if(i.rangeFacets&&(u=u+"&rangeFacets="+JSON.stringify(i.rangeFacets)),i.statsFields)for(h=0;h<i.statsFields.length;h++)u=u+"&fieldStat="+i.statsFields[h];if(i.personalizationEvents&&Array.isArray(i.personalizationEvents))for(h=0;h<i.personalizationEvents.length;h++){var p=i.personalizationEvents[h],g=Object.keys(p);u=u+"&personalizationEvent="+encodeURIComponent(g+"="+p[g])}a?u=u+"&filter="+encodeURIComponent(JSON.stringify(a)):i.filterObject&&(u=u+"&filter="+encodeURIComponent(JSON.stringify(i.filterObject)))}}else"suggest"===n?(f=n,u=c(i.suggestionsSize,"size")+c(i.lang,"lang"),l=i.suggestionsPrefix):"autocomplete"===n&&(f="autocomplete/document-field",u=c(i.autocomplete.field,"source")+c(i.autocomplete.size,"size"),l=i.autocomplete.prefix);fetch("https://"+t+"/v1/"+f+"/"+e+"?term="+l+u).then((function(t){return t.json()})).then((function(a){if("search"===n&&"retry"===i.fuzzy&&0===a.total_hits&&!0!==s)r(t,e,n,i,o,!0);else{if(!0===s){var c=i.paging.pageSize;a.total_hits>=c&&(a.total_hits=c)}o(a)}})).catch((function(t){console.log(t),o({error:{response:500,message:"invalid server response"}})}))}else o({error:{response:400,message:"invalid query type"}})};t.exports=r},5647:(t,e,n)=>{"use strict";var r=n(493),i=n(9610),o=n(3716),s=n(7585),a=n(5159),c=n(4508);t.exports=function(t,e){this.sitekey=t,this.privatekey=e,this.apiHostname="api.addsearch.com",this.settings=new s,this.sessionId=("a-"+1e8*Math.random()).substring(0,10),this.search=function(t,e){var n=null,i=null;if(t&&a.isFunction(e))n=t,i=e;else if(!e&&a.isFunction(t))n=this.settings.getSettings().keyword,i=t;else{if(!this.settings.getSettings().callback)throw"Illegal search parameters. Should be (keyword, callbackFunction) or (callbackFunction)";n=this.settings.getSettings().keyword,i=this.settings.getSettings().callback}this.settings.setCallback(i),this.settings.setKeyword(n),this.throttledSearchFetch||(this.throttledSearchFetch=c(this.settings.getSettings().throttleTimeMs,r)),this.throttledSearchFetch(this.apiHostname,this.sitekey,"search",this.settings.getSettings(),i)},this.suggestions=function(t,e){if(!t||!e||!a.isFunction(e))throw"Illegal suggestions parameters. Should be (prefix, callbackFunction)";this.settings.setSuggestionsPrefix(t),this.throttledSuggestionsFetch||(this.throttledSuggestionsFetch=c(this.settings.getSettings().throttleTimeMs,r)),this.throttledSuggestionsFetch(this.apiHostname,this.sitekey,"suggest",this.settings.getSettings(),e)},this.autocomplete=function(t,e,n){if(!(t&&e&&n&&a.isFunction(n)))throw"Illegal autocomplete parameters. Should be (field, prefix, callbackFunction)";this.settings.setAutocompleteParams(t,e),this.throttledAutocompleteFetch||(this.throttledAutocompleteFetch=c(this.settings.getSettings().throttleTimeMs,r)),this.throttledAutocompleteFetch(this.apiHostname,this.sitekey,"autocomplete",this.settings.getSettings(),n)},this.fetchCustomApi=function(t,e,n){var i=Object.assign({},this.settings.getSettings());i.facetFields=i.facetFields.filter((e=>t===e)),r(this.apiHostname,this.sitekey,"search",i,n,null,e)},this.fetchRangeFacets=function(t,e,n){var i=Object.assign({},this.settings.getSettings());i.rangeFacets||(i.rangeFacets=[]),i.rangeFacets.push({field:t.field,ranges:t.ranges}),r(this.apiHostname,this.sitekey,"search",i,n,null,e)},this.getDocument=function(t){return i.getDocument(this.apiHostname,this.sitekey,this.privatekey,t)},this.saveDocument=function(t){return i.saveDocument(this.apiHostname,this.sitekey,this.privatekey,t)},this.saveDocumentsBatch=function(t){if(!t||!t.documents||!Array.isArray(t.documents))throw"Please provide an array of documents: {documents: []}";return i.saveDocumentsBatch(this.apiHostname,this.sitekey,this.privatekey,t)},this.deleteDocument=function(t){return i.deleteDocument(this.apiHostname,this.sitekey,this.privatekey,t)},this.deleteDocumentsBatch=function(t){if(!t||!t.documents||!Array.isArray(t.documents))throw"Please provide an array of document ids: {documents: []}";return i.deleteDocumentsBatch(this.apiHostname,this.sitekey,this.privatekey,t)},this.setApiHostname=function(t){this.apiHostname=t},this.getSettings=function(){return this.settings.getSettings()},this.setLanguage=function(t){this.settings.setLanguage(t)},this.setCategoryFilters=function(t){this.settings.setCategoryFilters(t)},this.addCustomFieldFilter=function(t,e){this.settings.addCustomFieldFilter(t,e)},this.removeCustomFieldFilter=function(t,e){this.settings.removeCustomFieldFilter(t,e)},this.setPriceRangeFilter=function(t,e){this.settings.setPriceRangeFilter(t,e)},this.setDateFilter=function(t,e){this.settings.setDateFilter(t,e)},this.setJWT=function(t){this.settings.setJWT(t)},this.setUserToken=function(t){this.settings.setUserToken(t)},this.setPaging=function(t,e,n,r){this.settings.setPaging(t,e,n,r)},this.nextPage=function(){this.settings.nextPage()},this.previousPage=function(){this.settings.previousPage()},this.setSuggestionsSize=function(t){this.settings.setSuggestionsSize(t)},this.setAutocompleteSize=function(t){this.settings.setAutocompleteSize(t)},this.addFacetField=function(t){this.settings.addFacetField(t)},this.addHierarchicalFacetSetting=function(t){this.settings.addHierarchicalFacetSetting(t)},this.addRangeFacet=function(t,e){this.settings.addRangeFacet(t,e)},this.addStatsField=function(t){this.settings.addStatsField(t)},this.setNumberOfFacets=function(t){this.settings.setNumberOfFacets(t)},this.setResultType=function(t){this.settings.setResultType(t)},this.setPersonalizationEvents=function(t){this.settings.setPersonalizationEvents(t)},this.setFilterObject=function(t){this.settings.setFilterObject(t)},this.setShuffleAndLimitTo=function(t){this.settings.setShuffleAndLimitTo(t)},this.setFuzzyMatch=function(t){this.settings.setFuzzyMatch(t)},this.setPostfixWildcard=function(t){this.settings.setPostfixWildcard(t)},this.setCacheResponseTime=function(t){this.settings.setCacheResponseTime(t)},this.setCollectAnalytics=function(t){this.settings.setCollectAnalytics(t)},this.setAnalyticsTag=function(t){this.settings.setAnalyticsTag(t)},this.setThrottleTime=function(t){this.settings.setThrottleTime(t)},this.setStatsSessionId=function(t){this.sessionId=t},this.getStatsSessionId=function(){return this.sessionId},this.enableLogicalOperators=function(t){this.settings.enableLogicalOperators(t)},this.setSearchOperator=function(t){this.settings.setSearchOperator(t)},this.sendStatsEvent=function(t,e,n){if("search"===t)n={action:"search",session:this.sessionId,keyword:e,numberOfResults:n.numberOfResults,analyticsTag:this.getSettings().analyticsTag},o(this.apiHostname,this.sitekey,n);else{if("click"!==t)throw"Illegal sendStatsEvent type parameters. Should be search or click)";n={action:"click",session:this.sessionId,keyword:e,docid:n.documentId,position:n.position,analyticsTag:this.getSettings().analyticsTag},o(this.apiHostname,this.sitekey,n)}},this.searchResultClicked=function(t,e){this.sendStatsEvent("click",this.settings.getSettings().keyword,{documentId:t,position:e})}}},9610:(t,e,n)=>{"use strict";n(4301);const r=n(5159),i=n(2702).Promise,o=function(t,e){return{Authorization:"Basic "+r.base64(t+":"+e),"Content-Type":"application/json"}};t.exports={getDocument:function(t,e,n,r){return new i(((i,s)=>{fetch("https://"+t+"/v2/indices/"+e+"/documents/"+r,{method:"GET",headers:o(e,n)}).then((t=>{200==t.status?i(t.json()):s({status:t.status,text:t.statusText})})).catch((t=>{s({status:400,text:t})}))}))},saveDocument:function(t,e,n,r){const s=r.id||r.url;return new i(((i,a)=>{fetch("https://"+t+"/v2/indices/"+e+"/documents/",{method:s?"PUT":"POST",headers:o(e,n),body:JSON.stringify(r)}).then((t=>{202==t.status?i({status:t.status,text:t.statusText}):a({status:t.status,text:t.statusText})})).catch((t=>{a({status:400,text:t})}))}))},saveDocumentsBatch:function(t,e,n,r){return new i(((i,s)=>{fetch("https://"+t+"/v2/indices/"+e+"/documents:batch",{method:"PUT",headers:o(e,n),body:JSON.stringify(r)}).then((t=>{202==t.status?i({status:t.status,text:t.statusText}):s({status:t.status,text:t.statusText})})).catch((t=>{s({status:400,text:t})}))}))},deleteDocument:function(t,e,n,r){return new i(((i,s)=>{fetch("https://"+t+"/v2/indices/"+e+"/documents/"+r,{method:"DELETE",headers:o(e,n)}).then((t=>{202==t.status?i({status:t.status,text:t.statusText}):s({status:t.status,text:t.statusText})})).catch((t=>{s({status:400,text:t})}))}))},deleteDocumentsBatch:function(t,e,n,r){return new i(((i,s)=>{fetch("https://"+t+"/v2/indices/"+e+"/documents:batch",{method:"DELETE",headers:o(e,n),body:JSON.stringify(r)}).then((t=>{202==t.status?i({status:t.status,text:t.statusText}):s({status:t.status,text:t.statusText})})).catch((t=>{s({status:400,text:t})}))}))}}},7585:t=>{"use strict";t.exports=function(){this.settings={keyword:"*",callback:null,throttleTimeMs:200,fuzzy:"auto",paging:{page:1,pageSize:10,sortBy:"relevance",sortOrder:"desc"},customFieldFilters:[],userToken:null,suggestionsSize:10,facetFields:[],autocomplete:{size:10},searchOperator:null,enableLogicalOperators:!1,cacheResponseTime:null},this.getSettings=function(){return this.settings},this.setKeyword=function(t){this.settings.keyword=t||"*"},this.setCallback=function(t){this.settings.callback=t},this.setThrottleTime=function(t){this.settings.throttleTimeMs=t},this.setSuggestionsPrefix=function(t){this.settings.suggestionsPrefix=t},this.setSuggestionsSize=function(t){this.settings.suggestionsSize=t},this.setAutocompleteSize=function(t){this.settings.autocomplete.size=t},this.setAutocompleteParams=function(t,e){this.settings.autocomplete.field=t,this.settings.autocomplete.prefix=e},this.setLanguage=function(t){if(t&&2!==t.length)throw'use 2-char language code (e.g. "en")';this.settings.lang=t},this.setFuzzyMatch=function(t){if(!0!==t&&!1!==t&&"auto"!==t&&"retry"!==t)throw"fuzzy matching can be true, false, 'auto', or 'retry'";this.settings.fuzzy=t},this.enableLogicalOperators=function(t){this.settings.enableLogicalOperators=t},this.setCacheResponseTime=function(t){this.settings.cacheResponseTime=t},this.setPostfixWildcard=function(t){this.settings.postfixWildcard=t},this.setCollectAnalytics=function(t){this.settings.collectAnalytics=t},this.setAnalyticsTag=function(t){this.settings.analyticsTag=t},this.setCategoryFilters=function(t){this.settings.categories=t},this.setFilterObject=function(t){this.settings.filterObject=t},this.setPriceRangeFilter=function(t,e){this.settings.priceFromCents=t,this.settings.priceToCents=e},this.addCustomFieldFilter=function(t,e){var n=encodeURIComponent(t+"="+e);-1===this.settings.customFieldFilters.indexOf(n)&&this.settings.customFieldFilters.push(n)},this.removeCustomFieldFilter=function(t,e){var n=!1,r=encodeURIComponent(t+"="+e);e||(n=!0,r=encodeURIComponent(t+"="));for(var i=this.settings.customFieldFilters.length;i>0;i--){var o=this.settings.customFieldFilters[i-1];(n&&0===o.indexOf(r)||o===r)&&this.settings.customFieldFilters.splice(i-1,1)}},this.setDateFilter=function(t,e){this.settings.dateFrom=t,this.settings.dateTo=e},this.setKeyword=function(t){this.settings.keyword=t||"*"},this.setJWT=function(t){this.settings.jwt=t},this.setUserToken=function(t){this.settings.userToken=t},this.setPersonalizationEvents=function(t){this.settings.personalizationEvents=t},this.setResultType=function(t){this.settings.resultType=t},this.addFacetField=function(t){-1===this.settings.facetFields.indexOf(t)&&this.settings.facetFields.push(t)},this.addHierarchicalFacetSetting=function(t){this.settings.hierarchicalFacetSetting=JSON.stringify(t)},this.addRangeFacet=function(t,e){this.settings.rangeFacets||(this.settings.rangeFacets=[]),this.settings.rangeFacets.push({field:t,ranges:e})},this.addStatsField=function(t){this.settings.statsFields||(this.settings.statsFields=[]),-1===this.settings.statsFields.indexOf(t)&&this.settings.statsFields.push(t)},this.setNumberOfFacets=function(t){this.settings.numFacets=t},this.setPaging=function(t,e,n,r){if(t<1)throw"page must be 1 or bigger";if(e<1||e>300)throw"pageSize must be 1-300";if("asc"!==r&&"desc"!==r)throw"sortOrder must be asc or desc";this.settings.paging.page=t,this.settings.paging.pageSize=e,this.settings.paging.sortBy=n,this.settings.paging.sortOrder=r},this.setShuffleAndLimitTo=function(t){this.settings.shuffleAndLimitTo=t},this.nextPage=function(){this.settings.paging.page=this.settings.paging.page+1},this.previousPage=function(){this.settings.paging.page>0&&(this.settings.paging.page=this.settings.paging.page-1)},this.setSearchOperator=function(t){if("and"!==t&&"or"!==t)throw"operator must be 'and' || 'or'";this.settings.searchOperator=t}}},3716:(t,e,n)=>{"use strict";n(2702).polyfill(),n(4301),t.exports=function(t,e,n){"undefined"!=typeof window&&window.navigator&&window.navigator.sendBeacon?navigator.sendBeacon("https://"+t+"/v1/stats/"+e+"/",JSON.stringify(n)):fetch("https://"+t+"/v1/stats/"+e+"/",{method:"POST",headers:{"Content-Type":"text/plain"},body:JSON.stringify(n)})}},4508:t=>{t.exports=function(t,e){var n,r=0;function i(){n&&clearTimeout(n)}return function(){var o=this,s=Date.now()-r,a=arguments;function c(){r=Date.now(),e.apply(o,a)}i(),s>t?c():n=setTimeout(c,t-s)}}},5159:(t,e,n)=>{t.exports={isFunction:function(t){return t&&"[object Function]"==={}.toString.call(t)},base64:function(t){return n.g.window={},window&&window.btoa?window.btoa(t):Buffer?Buffer.from(t).toString("base64"):void 0}}},2498:(t,e,n)=>{"use strict";n.d(e,{default:()=>o});var r=n(9581);function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}const o=function(){var t=Array.from((0,r.n)("meganav-control")),e=Array.from((0,r.n)("meganav-panel")),n=getComputedStyle(document.documentElement).getPropertyValue("--bp-md"),o=function(t){return"search"===t.dataset.control},s=function(e,r,o){if(window.matchMedia("(hover: hover) and (pointer: fine) and (min-width: ".concat(n,")")).matches&&!t.some((function(t){return t===document.activeElement}))&&!function(){var t=document.querySelector('[data-id="meganav-panel"]#panel-search');if(t)return!t.classList.contains("invisible")}()){var s,a=["invisible","visible"];(s=r.classList).replace.apply(s,function(t){if(Array.isArray(t))return i(t)}(c=o?a:a.reverse())||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(c)||function(t,e){if(t){if("string"==typeof t)return i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(t,e):void 0}}(c)||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.")}()),e.setAttribute("aria-expanded",o)}var c};return t.map((function(n){var i,a,c=n.parentNode,l=document.querySelector("#".concat(n.getAttribute("aria-controls"))),u=function(n,i){return function(){if(t.forEach((function(t){return t!==n&&t.setAttribute("aria-expanded",!1)})),e.forEach((function(t){return t!==i&&t.classList.replace("visible","invisible")})),"true"===n.getAttribute("aria-expanded")?(n.setAttribute("aria-expanded",!1),i.classList.replace("visible","invisible")):(n.setAttribute("aria-expanded",!0),i.classList.replace("invisible","visible")),o(n)){var s=(0,r.A)("meganav-search-input",i);if(!s)return;s.focus()}else n.focus()}}(n,l);return n.addEventListener("click",u),o(n)||(i=function(t,e){return function(){return s(t,e,!0)}}(n,l),a=function(t,e){return function(){return s(t,e,!1)}}(n,l),c.addEventListener("mouseenter",i),c.addEventListener("mouseleave",a)),[{teardown:function(){i&&a&&(c.removeEventListener("mouseenter",i),c.removeEventListener("mouseleave",a)),n.removeEventListener("click",u)},clear:function(){n.setAttribute("aria-expanded",!1),l.classList.replace("visible","invisible")}}]})).flat()}},1792:(t,e,n)=>{"use strict";n.d(e,{default:()=>s});var r=n(6265),i=n.n(r),o=n(9581);const s=function(t){var e=t.clearPanels,n=(0,o.A)("meganav-control-mobile-dropdown"),r=(0,o.A)("meganav-mobile-dropdown"),s=(0,o.A)("meganav-control-mobile-dropdown-menu"),a=(0,o.A)("meganav-control-mobile-dropdown-close"),c=function(){"false"===n.getAttribute("aria-expanded")?(r.classList.replace("invisible","visible"),n.setAttribute("aria-expanded",!0),i().disablePageScroll()):(r.classList.replace("visible","invisible"),n.setAttribute("aria-expanded",!1),i().enablePageScroll(),e()),s.classList.toggle("hidden"),a.classList.toggle("hidden")};return n.addEventListener("click",c),{teardown:function(){n.removeEventListener("click",c),i().enablePageScroll()},clear:function(){r.classList.replace("visible","invisible"),n.setAttribute("aria-expanded",!1),s.classList.remove("hidden"),a.classList.add("hidden"),i().enablePageScroll()}}}},7359:(t,e,n)=>{"use strict";n.d(e,{default:()=>i});var r=n(9581);const i=function(){var t=Array.from((0,r.n)("meganav-control-mobile-panel-close")),e=Array.from((0,r.n)("meganav-control-mobile-panel-open"));return t.map((function(t){var n=e.find((function(e){return e.getAttribute("aria-controls")===t.getAttribute("aria-controls")})),r=document.querySelector("#".concat(t.getAttribute("aria-controls"))),i=function(t,e,n){return function(){t.setAttribute("aria-expanded",!1),e.setAttribute("aria-expanded",!1),n.classList.replace("block","hidden"),n.style.height=null}}(t,n,r);return t.addEventListener("click",i),{teardown:function(){return t.removeEventListener("click",i)},clear:function(){return t.setAttribute("aria-expanded",!1)}}}))}},9552:(t,e,n)=>{"use strict";n.d(e,{default:()=>i});var r=n(9581);const i=function(){var t,e=Array.from((0,r.n)("meganav-control-mobile-panel-close")),n=Array.from((0,r.n)("meganav-control-mobile-panel-open")),i=(0,r.A)("meganav-mobile-dropdown"),o=(t=getComputedStyle(document.documentElement).getPropertyValue("--ui-meganav-height"),parseFloat(t)*parseFloat(getComputedStyle(document.documentElement).fontSize));return n.map((function(t){var n=e.find((function(e){return e.getAttribute("aria-controls")===t.getAttribute("aria-controls")})),r=document.querySelector("#".concat(t.getAttribute("aria-controls"))),s=function(t,e,n){return function(){t.setAttribute("aria-expanded",!0),e.setAttribute("aria-expanded",!0),n.classList.replace("hidden","block"),n.style.height="".concat(window.innerHeight-o>n.offsetHeight?n.offsetHeight:window.innerHeight-o,"px")}}(t,n,r);return t.addEventListener("click",s),{teardown:function(){return t.removeEventListener("click",s)},clear:function(){r.classList.replace("block","hidden"),i.classList.remove("ui-meganav-mobile-dropdown-expand"),t.setAttribute("aria-expanded",!1),r.style.height=null}}}))}},6364:(t,e,n)=>{"use strict";n.d(e,{default:()=>s});var r=n(9581),i=n(727),o=n.n(i);const s=function(){var t=document.body.dataset.addSearchApiKey;if(!t)return console.log("No AddSearch API key provided, skipping search suggestions."),[];var e=new(o())(t);return[(0,r.A)("meganav-search-input"),(0,r.A)("meganav-mobile-search-input")].filter((function(t){return t})).map((function(t){var n=t.parentNode,i=(0,r.A)("meganav-search-autocomplete-container",n),o=(0,r.A)("meganav-search-autocomplete-list",n),s=(0,r.A)("meganav-search-input-clear",n);return function(t){var e=t.input,n=t.container,r=t.listContainer,i=t.clear,o=t.client;o.setAnalyticsTag("Meganav autocomplete"),o.setThrottleTime(400);var s,a=function(){n.classList.add("hidden"),r.innerHTML=""},c=function(t){(t||"").length>0&&i?i.classList.remove("invisible"):i&&i.classList.add("invisible")},l=function(t,e){return t.replace(e.toLowerCase(),'<span class="font-light">'.concat(e,"</span>"))},u=function(t){return window.location="/search?q=".concat(t)},f=function(t){var e=r.querySelector('[data-suggestion-index="'.concat(t+1,'"]'));e&&e.focus()},d=function(t){var e=t-1,n=r.querySelector('[data-suggestion-index="'.concat(e,'"]'));n&&n.focus()},h=function(t){var i=t.target.value;"ArrowDown"!==t.key?i?o.suggestions(i,function(t){return function(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{suggestions:[]};if(c(t),0!==i.suggestions.length){var o=i.suggestions.map((function(n,r){var i=document.createElement("li"),o=document.createElement("button");return o.type="button",o.classList.add("ui-text-menu2","font-medium","p-8","w-full","text-left","rounded","hover:text-gui-hover","focus:outline-gui-focus","hover:bg-light-grey"),o.innerHTML=l(n.value,t),o.dataset.suggestionIndex=r,o.addEventListener("click",(function(){u(n.value)})),o.addEventListener("keydown",(function(t){var i=t.key;"ArrowDown"===i?f(r):"ArrowUp"===i&&r-1<0?e.focus():"ArrowUp"===i&&r-1>=0?d(r):"Enter"!==i&&"Space"!==i||u(n.value)})),i.appendChild(o),i}));r.innerHTML="",o.forEach((function(t){return r.appendChild(t)})),n.classList.remove("hidden")}else a()}}(i)):a():f(0)};return i&&(s=function(){e.value="",i.classList.add("invisible"),a()},i.addEventListener("click",s)),e.addEventListener("keyup",h),{teardown:function(){e.removeEventListener("keyup",h),i&&i.removeEventListener("click",s)},clear:function(){e.value="",a()}}}({input:t,container:i,listContainer:o,client:e,clear:s})}))}},3169:(t,e,n)=>{"use strict";n.d(e,{default:()=>u});var r=n(9581),i=function(t){return new DOMMatrix(window.getComputedStyle(t).transform).e},o=function(t,e){return t.style.transform="translateX(".concat(e,"px)")},s=function(t,e){return t>=e},a=function(t,e,n,r){return Math.abs(t-n+r)>e},c=function(t,e){var n;return(null===(n=t.changedTouches[0])||void 0===n?void 0:n.clientX)-e},l=function(t){return Math.abs(t)<5};const u=function(){var t,e=(0,r.A)("meganav-mobile-search-input"),n=(0,r.A)("meganav-mobile-search-suggestions"),u=n.querySelector("ul"),f=u.querySelectorAll("li"),d=Array.from(f).map((function(t){return t.getBoundingClientRect().width})).reduce((function(t,e){return t+e}),0),h=function(e){var n;t=null===(n=e.touches[0])||void 0===n?void 0:n.clientX},p=function(e){var n=c(e,t);l(n)||(n>0?function(t,e){var n=i(u),r=Math.round(n+t);s(r,24)||o(u,r)}(n):function(t,e){var n=u.getBoundingClientRect().width,r=i(u),s=Math.round(r+t);a(s,d,n,96)||o(u,s)}(n))},g=function(e){var n=c(e,t);l(n)||(n>0?function(t,e){var n=i(u),r=Math.round(n+t);s(r,24)&&(r=0),o(u,r)}(n):function(t,e){var n=u.getBoundingClientRect().width,r=i(u),s=Math.round(r+t);a(s,d,n,48)&&(s=-(d-n+48)),o(u,s)}(n))},m=function(){n.classList.add("max-h-96")},v=function(t){t.relatedTarget!==n.querySelectorAll("a")[0]&&n.classList.remove("max-h-96")};return e.addEventListener("focus",m),e.addEventListener("blur",v),n.addEventListener("touchstart",h),n.addEventListener("touchmove",p),n.addEventListener("touchend",g),{teardown:function(){e.removeEventListener("focus",m),e.removeEventListener("blur",v),n.removeEventListener("touchstart",h),n.removeEventListener("touchmove",p),n.removeEventListener("touchend",g)},clear:function(){n.classList.remove("max-h-96"),u.style.transform="translateX(0px)"}}}},9581:(t,e,n)=>{"use strict";n.d(e,{A:()=>r,n:()=>i});var r=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return e.querySelector("[data-id=".concat(t,"]"))},i=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return e.querySelectorAll("[data-id=".concat(t,"]"))}},2702:function(t,e,n){t.exports=function(){"use strict";function t(t){return"function"==typeof t}var e=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},r=0,i=void 0,o=void 0,s=function(t,e){h[r]=t,h[r+1]=e,2===(r+=2)&&(o?o(p):b())};var a="undefined"!=typeof window?window:void 0,c=a||{},l=c.MutationObserver||c.WebKitMutationObserver,u="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),f="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function d(){var t=setTimeout;return function(){return t(p,1)}}var h=new Array(1e3);function p(){for(var t=0;t<r;t+=2)(0,h[t])(h[t+1]),h[t]=void 0,h[t+1]=void 0;r=0}var g,m,v,y,b=void 0;function w(t,e){var n=this,r=new this.constructor(T);void 0===r[A]&&B(r);var i=n._state;if(i){var o=arguments[i-1];s((function(){return j(i,r,o,n._result)}))}else _(n,r,t,e);return r}function S(t){if(t&&"object"==typeof t&&t.constructor===this)return t;var e=new this(T);return k(e,t),e}b=u?function(){return process.nextTick(p)}:l?(m=0,v=new l(p),y=document.createTextNode(""),v.observe(y,{characterData:!0}),function(){y.data=m=++m%2}):f?((g=new MessageChannel).port1.onmessage=p,function(){return g.port2.postMessage(0)}):void 0===a?function(){try{var t=Function("return this")().require("vertx");return void 0!==(i=t.runOnLoop||t.runOnContext)?function(){i(p)}:d()}catch(t){return d()}}():d();var A=Math.random().toString(36).substring(2);function T(){}var F=void 0;function x(e,n,r){n.constructor===e.constructor&&r===w&&n.constructor.resolve===S?function(t,e){1===e._state?L(t,e._result):2===e._state?O(t,e._result):_(e,void 0,(function(e){return k(t,e)}),(function(e){return O(t,e)}))}(e,n):void 0===r?L(e,n):t(r)?function(t,e,n){s((function(t){var r=!1,i=function(t,e,n,r){try{t.call(e,n,r)}catch(t){return t}}(n,e,(function(n){r||(r=!0,e!==n?k(t,n):L(t,n))}),(function(e){r||(r=!0,O(t,e))}),t._label);!r&&i&&(r=!0,O(t,i))}),t)}(e,n,r):L(e,n)}function k(t,e){if(t===e)O(t,new TypeError("You cannot resolve a promise with itself"));else if(i=typeof(r=e),null===r||"object"!==i&&"function"!==i)L(t,e);else{var n=void 0;try{n=e.then}catch(e){return void O(t,e)}x(t,e,n)}var r,i}function E(t){t._onerror&&t._onerror(t._result),P(t)}function L(t,e){t._state===F&&(t._result=e,t._state=1,0!==t._subscribers.length&&s(P,t))}function O(t,e){t._state===F&&(t._state=2,t._result=e,s(E,t))}function _(t,e,n,r){var i=t._subscribers,o=i.length;t._onerror=null,i[o]=e,i[o+1]=n,i[o+2]=r,0===o&&t._state&&s(P,t)}function P(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r=void 0,i=void 0,o=t._result,s=0;s<e.length;s+=3)r=e[s],i=e[s+n],r?j(n,r,i,o):i(o);t._subscribers.length=0}}function j(e,n,r,i){var o=t(r),s=void 0,a=void 0,c=!0;if(o){try{s=r(i)}catch(t){c=!1,a=t}if(n===s)return void O(n,new TypeError("A promises callback cannot return that same promise."))}else s=i;n._state!==F||(o&&c?k(n,s):!1===c?O(n,a):1===e?L(n,s):2===e&&O(n,s))}var C=0;function B(t){t[A]=C++,t._state=void 0,t._result=void 0,t._subscribers=[]}var R=function(){function t(t,n){this._instanceConstructor=t,this.promise=new t(T),this.promise[A]||B(this.promise),e(n)?(this.length=n.length,this._remaining=n.length,this._result=new Array(this.length),0===this.length?L(this.promise,this._result):(this.length=this.length||0,this._enumerate(n),0===this._remaining&&L(this.promise,this._result))):O(this.promise,new Error("Array Methods must be provided an Array"))}return t.prototype._enumerate=function(t){for(var e=0;this._state===F&&e<t.length;e++)this._eachEntry(t[e],e)},t.prototype._eachEntry=function(t,e){var n=this._instanceConstructor,r=n.resolve;if(r===S){var i=void 0,o=void 0,s=!1;try{i=t.then}catch(t){s=!0,o=t}if(i===w&&t._state!==F)this._settledAt(t._state,e,t._result);else if("function"!=typeof i)this._remaining--,this._result[e]=t;else if(n===U){var a=new n(T);s?O(a,o):x(a,t,i),this._willSettleAt(a,e)}else this._willSettleAt(new n((function(e){return e(t)})),e)}else this._willSettleAt(r(t),e)},t.prototype._settledAt=function(t,e,n){var r=this.promise;r._state===F&&(this._remaining--,2===t?O(r,n):this._result[e]=n),0===this._remaining&&L(r,this._result)},t.prototype._willSettleAt=function(t,e){var n=this;_(t,void 0,(function(t){return n._settledAt(1,e,t)}),(function(t){return n._settledAt(2,e,t)}))},t}();var U=function(){function e(t){this[A]=C++,this._result=this._state=void 0,this._subscribers=[],T!==t&&("function"!=typeof t&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof e?function(t,e){try{e((function(e){k(t,e)}),(function(e){O(t,e)}))}catch(e){O(t,e)}}(this,t):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return e.prototype.catch=function(t){return this.then(null,t)},e.prototype.finally=function(e){var n=this,r=n.constructor;return t(e)?n.then((function(t){return r.resolve(e()).then((function(){return t}))}),(function(t){return r.resolve(e()).then((function(){throw t}))})):n.then(e,e)},e}();return U.prototype.then=w,U.all=function(t){return new R(this,t).promise},U.race=function(t){var n=this;return e(t)?new n((function(e,r){for(var i=t.length,o=0;o<i;o++)n.resolve(t[o]).then(e,r)})):new n((function(t,e){return e(new TypeError("You must pass an array to race."))}))},U.resolve=S,U.reject=function(t){var e=new this(T);return O(e,t),e},U._setScheduler=function(t){o=t},U._setAsap=function(t){s=t},U._asap=s,U.polyfill=function(){var t=void 0;if(void 0!==n.g)t=n.g;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var e=t.Promise;if(e){var r=null;try{r=Object.prototype.toString.call(e.resolve())}catch(t){}if("[object Promise]"===r&&!e.cast)return}t.Promise=U},U.Promise=U,U}()},4301:(t,e,n)=>{n(7147),t.exports=self.fetch.bind(self)},3096:(t,e,n)=>{var r="Expected a function",i=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,a=/^0o[0-7]+$/i,c=parseInt,l="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,u="object"==typeof self&&self&&self.Object===Object&&self,f=l||u||Function("return this")(),d=Object.prototype.toString,h=Math.max,p=Math.min,g=function(){return f.Date.now()};function m(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function v(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&"[object Symbol]"==d.call(t)}(t))return NaN;if(m(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=m(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(i,"");var n=s.test(t);return n||a.test(t)?c(t.slice(2),n?2:8):o.test(t)?NaN:+t}t.exports=function(t,e,n){var i=!0,o=!0;if("function"!=typeof t)throw new TypeError(r);return m(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),function(t,e,n){var i,o,s,a,c,l,u=0,f=!1,d=!1,y=!0;if("function"!=typeof t)throw new TypeError(r);function b(e){var n=i,r=o;return i=o=void 0,u=e,a=t.apply(r,n)}function w(t){return u=t,c=setTimeout(A,e),f?b(t):a}function S(t){var n=t-l;return void 0===l||n>=e||n<0||d&&t-u>=s}function A(){var t=g();if(S(t))return T(t);c=setTimeout(A,function(t){var n=e-(t-l);return d?p(n,s-(t-u)):n}(t))}function T(t){return c=void 0,y&&i?b(t):(i=o=void 0,a)}function F(){var t=g(),n=S(t);if(i=arguments,o=this,l=t,n){if(void 0===c)return w(l);if(d)return c=setTimeout(A,e),b(l)}return void 0===c&&(c=setTimeout(A,e)),a}return e=v(e)||0,m(n)&&(f=!!n.leading,s=(d="maxWait"in n)?h(v(n.maxWait)||0,e):s,y="trailing"in n?!!n.trailing:y),F.cancel=function(){void 0!==c&&clearTimeout(c),u=0,i=l=o=c=void 0},F.flush=function(){return void 0===c?a:T(g())},F}(t,e,{leading:i,maxWait:e,trailing:o})}},6265:function(t){var e;e=function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){"use strict";n.r(e);var r=function(t){return Array.isArray(t)?t:[t]},i=function(t){return t instanceof Node},o=function(t,e){if(t&&e){t=function(t){return t instanceof NodeList}(t)?t:[t];for(var n=0;n<t.length&&!0!==e(t[n],n,t.length);n++);}},s=function(t){return console.error("[scroll-lock] ".concat(t))},a=function(t){if(Array.isArray(t))return t.join(", ")},c=function(t){var e=[];return o(t,(function(t){return e.push(t)})),e},l=function(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:document;if(n&&-1!==c(r.querySelectorAll(e)).indexOf(t))return t;for(;(t=t.parentElement)&&-1===c(r.querySelectorAll(e)).indexOf(t););return t},u=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document,r=-1!==c(n.querySelectorAll(e)).indexOf(t);return r},f=function(t){if(t)return"hidden"===getComputedStyle(t).overflow},d=function(t){if(t)return!!f(t)||t.scrollTop<=0},h=function(t){if(t){if(f(t))return!0;var e=t.scrollTop,n=t.scrollHeight;return e+t.offsetHeight>=n}},p=function(t){if(t)return!!f(t)||t.scrollLeft<=0},g=function(t){if(t){if(f(t))return!0;var e=t.scrollLeft,n=t.scrollWidth;return e+t.offsetWidth>=n}},m=function(t){return u(t,'textarea, [contenteditable="true"]')},v=function(t){return u(t,'input[type="range"]')};function y(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,"disablePageScroll",(function(){return S})),n.d(e,"enablePageScroll",(function(){return A})),n.d(e,"getScrollState",(function(){return T})),n.d(e,"clearQueueScrollLocks",(function(){return F})),n.d(e,"getTargetScrollBarWidth",(function(){return x})),n.d(e,"getCurrentTargetScrollBarWidth",(function(){return k})),n.d(e,"getPageScrollBarWidth",(function(){return E})),n.d(e,"getCurrentPageScrollBarWidth",(function(){return L})),n.d(e,"addScrollableTarget",(function(){return O})),n.d(e,"removeScrollableTarget",(function(){return _})),n.d(e,"addScrollableSelector",(function(){return P})),n.d(e,"removeScrollableSelector",(function(){return j})),n.d(e,"addLockableTarget",(function(){return C})),n.d(e,"addLockableSelector",(function(){return B})),n.d(e,"setFillGapMethod",(function(){return R})),n.d(e,"addFillGapTarget",(function(){return U})),n.d(e,"removeFillGapTarget",(function(){return M})),n.d(e,"addFillGapSelector",(function(){return D})),n.d(e,"removeFillGapSelector",(function(){return z})),n.d(e,"refillGaps",(function(){return I}));var b=["padding","margin","width","max-width","none"],w={scroll:!0,queue:0,scrollableSelectors:["[data-scroll-lock-scrollable]"],lockableSelectors:["body","[data-scroll-lock-lockable]"],fillGapSelectors:["body","[data-scroll-lock-fill-gap]","[data-scroll-lock-lockable]"],fillGapMethod:b[0],startTouchY:0,startTouchX:0},S=function(t){w.queue<=0&&(w.scroll=!1,N(),K()),O(t),w.queue++},A=function(t){w.queue>0&&w.queue--,w.queue<=0&&(w.scroll=!0,W(),J()),_(t)},T=function(){return w.scroll},F=function(){w.queue=0},x=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(i(t)){var n=t.style.overflowY;e?T()||(t.style.overflowY=t.getAttribute("data-scroll-lock-saved-overflow-y-property")):t.style.overflowY="scroll";var r=k(t);return t.style.overflowY=n,r}return 0},k=function(t){if(i(t)){if(t===document.body){var e=document.documentElement.clientWidth;return window.innerWidth-e}var n=t.style.borderLeftWidth,r=t.style.borderRightWidth;t.style.borderLeftWidth="0px",t.style.borderRightWidth="0px";var o=t.offsetWidth-t.clientWidth;return t.style.borderLeftWidth=n,t.style.borderRightWidth=r,o}return 0},E=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return x(document.body,t)},L=function(){return k(document.body)},O=function(t){t&&r(t).map((function(t){o(t,(function(t){i(t)?t.setAttribute("data-scroll-lock-scrollable",""):s('"'.concat(t,'" is not a Element.'))}))}))},_=function(t){t&&r(t).map((function(t){o(t,(function(t){i(t)?t.removeAttribute("data-scroll-lock-scrollable"):s('"'.concat(t,'" is not a Element.'))}))}))},P=function(t){t&&r(t).map((function(t){w.scrollableSelectors.push(t)}))},j=function(t){t&&r(t).map((function(t){w.scrollableSelectors=w.scrollableSelectors.filter((function(e){return e!==t}))}))},C=function(t){t&&(r(t).map((function(t){o(t,(function(t){i(t)?t.setAttribute("data-scroll-lock-lockable",""):s('"'.concat(t,'" is not a Element.'))}))})),T()||N())},B=function(t){t&&(r(t).map((function(t){w.lockableSelectors.push(t)})),T()||N(),D(t))},R=function(t){if(t)if(-1!==b.indexOf(t))w.fillGapMethod=t,I();else{var e=b.join(", ");s('"'.concat(t,'" method is not available!\nAvailable fill gap methods: ').concat(e,"."))}},U=function(t){t&&r(t).map((function(t){o(t,(function(t){i(t)?(t.setAttribute("data-scroll-lock-fill-gap",""),w.scroll||$(t)):s('"'.concat(t,'" is not a Element.'))}))}))},M=function(t){t&&r(t).map((function(t){o(t,(function(t){i(t)?(t.removeAttribute("data-scroll-lock-fill-gap"),w.scroll||V(t)):s('"'.concat(t,'" is not a Element.'))}))}))},D=function(t){t&&r(t).map((function(t){-1===w.fillGapSelectors.indexOf(t)&&(w.fillGapSelectors.push(t),w.scroll||X(t))}))},z=function(t){t&&r(t).map((function(t){w.fillGapSelectors=w.fillGapSelectors.filter((function(e){return e!==t})),w.scroll||Q(t)}))},I=function(){w.scroll||K()},N=function(){var t=a(w.lockableSelectors);q(t)},W=function(){var t=a(w.lockableSelectors);G(t)},q=function(t){var e=document.querySelectorAll(t);o(e,(function(t){H(t)}))},G=function(t){var e=document.querySelectorAll(t);o(e,(function(t){Y(t)}))},H=function(t){if(i(t)&&"true"!==t.getAttribute("data-scroll-lock-locked")){var e=window.getComputedStyle(t);t.setAttribute("data-scroll-lock-saved-overflow-y-property",e.overflowY),t.setAttribute("data-scroll-lock-saved-inline-overflow-property",t.style.overflow),t.setAttribute("data-scroll-lock-saved-inline-overflow-y-property",t.style.overflowY),t.style.overflow="hidden",t.setAttribute("data-scroll-lock-locked","true")}},Y=function(t){i(t)&&"true"===t.getAttribute("data-scroll-lock-locked")&&(t.style.overflow=t.getAttribute("data-scroll-lock-saved-inline-overflow-property"),t.style.overflowY=t.getAttribute("data-scroll-lock-saved-inline-overflow-y-property"),t.removeAttribute("data-scroll-lock-saved-overflow-property"),t.removeAttribute("data-scroll-lock-saved-inline-overflow-property"),t.removeAttribute("data-scroll-lock-saved-inline-overflow-y-property"),t.removeAttribute("data-scroll-lock-locked"))},K=function(){w.fillGapSelectors.map((function(t){X(t)}))},J=function(){w.fillGapSelectors.map((function(t){Q(t)}))},X=function(t){var e=document.querySelectorAll(t),n=-1!==w.lockableSelectors.indexOf(t);o(e,(function(t){$(t,n)}))},$=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(i(t)){var n;if(""===t.getAttribute("data-scroll-lock-lockable")||e)n=x(t,!0);else{var r=l(t,a(w.lockableSelectors));n=x(r,!0)}"true"===t.getAttribute("data-scroll-lock-filled-gap")&&V(t);var o=window.getComputedStyle(t);if(t.setAttribute("data-scroll-lock-filled-gap","true"),t.setAttribute("data-scroll-lock-current-fill-gap-method",w.fillGapMethod),"margin"===w.fillGapMethod){var s=parseFloat(o.marginRight);t.style.marginRight="".concat(s+n,"px")}else if("width"===w.fillGapMethod)t.style.width="calc(100% - ".concat(n,"px)");else if("max-width"===w.fillGapMethod)t.style.maxWidth="calc(100% - ".concat(n,"px)");else if("padding"===w.fillGapMethod){var c=parseFloat(o.paddingRight);t.style.paddingRight="".concat(c+n,"px")}}},Q=function(t){var e=document.querySelectorAll(t);o(e,(function(t){V(t)}))},V=function(t){if(i(t)&&"true"===t.getAttribute("data-scroll-lock-filled-gap")){var e=t.getAttribute("data-scroll-lock-current-fill-gap-method");t.removeAttribute("data-scroll-lock-filled-gap"),t.removeAttribute("data-scroll-lock-current-fill-gap-method"),"margin"===e?t.style.marginRight="":"width"===e?t.style.width="":"max-width"===e?t.style.maxWidth="":"padding"===e&&(t.style.paddingRight="")}};"undefined"!=typeof window&&window.addEventListener("resize",(function(t){I()})),"undefined"!=typeof document&&(document.addEventListener("touchstart",(function(t){w.scroll||(w.startTouchY=t.touches[0].clientY,w.startTouchX=t.touches[0].clientX)})),document.addEventListener("touchmove",(function(t){if(!w.scroll){var e=w.startTouchY,n=w.startTouchX,r=t.touches[0].clientY,i=t.touches[0].clientX;if(t.touches.length<2){var o=a(w.scrollableSelectors),s={up:e<r,down:e>r,left:n<i,right:n>i},c={up:e+3<r,down:e-3>r,left:n+3<i,right:n-3>i};!function e(n){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(n){var i=l(n,o,!1);if(v(n))return!1;if(r||m(n)&&l(n,o)||u(n,o)){var a=!1;p(n)&&g(n)?(s.up&&d(n)||s.down&&h(n))&&(a=!0):d(n)&&h(n)?(s.left&&p(n)||s.right&&g(n))&&(a=!0):(c.up&&d(n)||c.down&&h(n)||c.left&&p(n)||c.right&&g(n))&&(a=!0),a&&(i?e(i,!0):t.cancelable&&t.preventDefault())}else e(i)}else t.cancelable&&t.preventDefault()}(t.target)}}}),{passive:!1}),document.addEventListener("touchend",(function(t){w.scroll||(w.startTouchY=0,w.startTouchX=0)})));var Z={hide:function(t){s('"hide" is deprecated! Use "disablePageScroll" instead. \n https://github.com/FL3NKEY/scroll-lock#disablepagescrollscrollabletarget'),S(t)},show:function(t){s('"show" is deprecated! Use "enablePageScroll" instead. \n https://github.com/FL3NKEY/scroll-lock#enablepagescrollscrollabletarget'),A(t)},toggle:function(t){s('"toggle" is deprecated! Do not use it.'),T()?S():A(t)},getState:function(){return s('"getState" is deprecated! Use "getScrollState" instead. \n https://github.com/FL3NKEY/scroll-lock#getscrollstate'),T()},getWidth:function(){return s('"getWidth" is deprecated! Use "getPageScrollBarWidth" instead. \n https://github.com/FL3NKEY/scroll-lock#getpagescrollbarwidth'),E()},getCurrentWidth:function(){return s('"getCurrentWidth" is deprecated! Use "getCurrentPageScrollBarWidth" instead. \n https://github.com/FL3NKEY/scroll-lock#getcurrentpagescrollbarwidth'),L()},setScrollableTargets:function(t){s('"setScrollableTargets" is deprecated! Use "addScrollableTarget" instead. \n https://github.com/FL3NKEY/scroll-lock#addscrollabletargetscrollabletarget'),O(t)},setFillGapSelectors:function(t){s('"setFillGapSelectors" is deprecated! Use "addFillGapSelector" instead. \n https://github.com/FL3NKEY/scroll-lock#addfillgapselectorfillgapselector'),D(t)},setFillGapTargets:function(t){s('"setFillGapTargets" is deprecated! Use "addFillGapTarget" instead. \n https://github.com/FL3NKEY/scroll-lock#addfillgaptargetfillgaptarget'),U(t)},clearQueue:function(){s('"clearQueue" is deprecated! Use "clearQueueScrollLocks" instead. \n https://github.com/FL3NKEY/scroll-lock#clearqueuescrolllocks'),F()}},tt=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){y(t,e,n[e])}))}return t}({disablePageScroll:S,enablePageScroll:A,getScrollState:T,clearQueueScrollLocks:F,getTargetScrollBarWidth:x,getCurrentTargetScrollBarWidth:k,getPageScrollBarWidth:E,getCurrentPageScrollBarWidth:L,addScrollableSelector:P,removeScrollableSelector:j,addScrollableTarget:O,removeScrollableTarget:_,addLockableSelector:B,addLockableTarget:C,addFillGapSelector:D,removeFillGapSelector:z,addFillGapTarget:U,removeFillGapTarget:M,setFillGapMethod:R,refillGaps:I,_state:w},Z);e.default=tt}]).default},t.exports=e()},7147:(t,e,n)=>{"use strict";n.r(e),n.d(e,{Headers:()=>p,Request:()=>S,Response:()=>T,DOMException:()=>x,fetch:()=>k});var r="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==r&&r,i="URLSearchParams"in r,o="Symbol"in r&&"iterator"in Symbol,s="FileReader"in r&&"Blob"in r&&function(){try{return new Blob,!0}catch(t){return!1}}(),a="FormData"in r,c="ArrayBuffer"in r;if(c)var l=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],u=ArrayBuffer.isView||function(t){return t&&l.indexOf(Object.prototype.toString.call(t))>-1};function f(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(t)||""===t)throw new TypeError('Invalid character in header field name: "'+t+'"');return t.toLowerCase()}function d(t){return"string"!=typeof t&&(t=String(t)),t}function h(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return o&&(e[Symbol.iterator]=function(){return e}),e}function p(t){this.map={},t instanceof p?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function g(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function m(t){return new Promise((function(e,n){t.onload=function(){e(t.result)},t.onerror=function(){n(t.error)}}))}function v(t){var e=new FileReader,n=m(e);return e.readAsArrayBuffer(t),n}function y(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function b(){return this.bodyUsed=!1,this._initBody=function(t){var e;this.bodyUsed=this.bodyUsed,this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:s&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:a&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:i&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():c&&s&&(e=t)&&DataView.prototype.isPrototypeOf(e)?(this._bodyArrayBuffer=y(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):c&&(ArrayBuffer.prototype.isPrototypeOf(t)||u(t))?this._bodyArrayBuffer=y(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):i&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},s&&(this.blob=function(){var t=g(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?g(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer)):this.blob().then(v)}),this.text=function(){var t,e,n,r=g(this);if(r)return r;if(this._bodyBlob)return t=this._bodyBlob,n=m(e=new FileReader),e.readAsText(t),n;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),n=new Array(e.length),r=0;r<e.length;r++)n[r]=String.fromCharCode(e[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},a&&(this.formData=function(){return this.text().then(A)}),this.json=function(){return this.text().then(JSON.parse)},this}p.prototype.append=function(t,e){t=f(t),e=d(e);var n=this.map[t];this.map[t]=n?n+", "+e:e},p.prototype.delete=function(t){delete this.map[f(t)]},p.prototype.get=function(t){return t=f(t),this.has(t)?this.map[t]:null},p.prototype.has=function(t){return this.map.hasOwnProperty(f(t))},p.prototype.set=function(t,e){this.map[f(t)]=d(e)},p.prototype.forEach=function(t,e){for(var n in this.map)this.map.hasOwnProperty(n)&&t.call(e,this.map[n],n,this)},p.prototype.keys=function(){var t=[];return this.forEach((function(e,n){t.push(n)})),h(t)},p.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),h(t)},p.prototype.entries=function(){var t=[];return this.forEach((function(e,n){t.push([n,e])})),h(t)},o&&(p.prototype[Symbol.iterator]=p.prototype.entries);var w=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function S(t,e){if(!(this instanceof S))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var n,r,i=(e=e||{}).body;if(t instanceof S){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new p(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,i||null==t._bodyInit||(i=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new p(e.headers)),this.method=(r=(n=e.method||this.method||"GET").toUpperCase(),w.indexOf(r)>-1?r:n),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(i),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==e.cache&&"no-cache"!==e.cache)){var o=/([?&])_=[^&]*/;o.test(this.url)?this.url=this.url.replace(o,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}function A(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var n=t.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(r),decodeURIComponent(i))}})),e}function T(t,e){if(!(this instanceof T))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===e.statusText?"":""+e.statusText,this.headers=new p(e.headers),this.url=e.url||"",this._initBody(t)}S.prototype.clone=function(){return new S(this,{body:this._bodyInit})},b.call(S.prototype),b.call(T.prototype),T.prototype.clone=function(){return new T(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},T.error=function(){var t=new T(null,{status:0,statusText:""});return t.type="error",t};var F=[301,302,303,307,308];T.redirect=function(t,e){if(-1===F.indexOf(e))throw new RangeError("Invalid status code");return new T(null,{status:e,headers:{location:t}})};var x=r.DOMException;try{new x}catch(t){(x=function(t,e){this.message=t,this.name=e;var n=Error(t);this.stack=n.stack}).prototype=Object.create(Error.prototype),x.prototype.constructor=x}function k(t,e){return new Promise((function(n,i){var o=new S(t,e);if(o.signal&&o.signal.aborted)return i(new x("Aborted","AbortError"));var a=new XMLHttpRequest;function l(){a.abort()}a.onload=function(){var t,e,r={status:a.status,statusText:a.statusText,headers:(t=a.getAllResponseHeaders()||"",e=new p,t.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(t){return 0===t.indexOf("\n")?t.substr(1,t.length):t})).forEach((function(t){var n=t.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();e.append(r,i)}})),e)};r.url="responseURL"in a?a.responseURL:r.headers.get("X-Request-URL");var i="response"in a?a.response:a.responseText;setTimeout((function(){n(new T(i,r))}),0)},a.onerror=function(){setTimeout((function(){i(new TypeError("Network request failed"))}),0)},a.ontimeout=function(){setTimeout((function(){i(new TypeError("Network request failed"))}),0)},a.onabort=function(){setTimeout((function(){i(new x("Aborted","AbortError"))}),0)},a.open(o.method,function(t){try{return""===t&&r.location.href?r.location.href:t}catch(e){return t}}(o.url),!0),"include"===o.credentials?a.withCredentials=!0:"omit"===o.credentials&&(a.withCredentials=!1),"responseType"in a&&(s?a.responseType="blob":c&&o.headers.get("Content-Type")&&-1!==o.headers.get("Content-Type").indexOf("application/octet-stream")&&(a.responseType="arraybuffer")),!e||"object"!=typeof e.headers||e.headers instanceof p?o.headers.forEach((function(t,e){a.setRequestHeader(e,t)})):Object.getOwnPropertyNames(e.headers).forEach((function(t){a.setRequestHeader(t,d(e.headers[t]))})),o.signal&&(o.signal.addEventListener("abort",l),a.onreadystatechange=function(){4===a.readyState&&o.signal.removeEventListener("abort",l)}),a.send(void 0===o._bodyInit?null:o._bodyInit)}))}k.polyfill=!0,r.fetch||(r.fetch=k,r.Headers=p,r.Request=S,r.Response=T)}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={exports:{}};return t[r].call(o.exports,o,o.exports,n),o.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.d(r,{default:()=>m});var t=n(3096),e=n.n(t),i=n(9581),o=n(2498),s=n(1792),a=n(9552),c=n(7359),l=n(6364),u=n(3169);function f(t){return function(t){if(Array.isArray(t))return d(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return d(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var h=function(t){return window.onblur=function(){return t()},{teardown:function(){return window.onblur=null}}},p=function(t){var e=(0,i.A)("meganav"),n=function(n){e.contains(n.target)||t()};return document.addEventListener("click",n),{teardown:function(){return document.removeEventListener("click",n)}}},g=function(t){if("transparentToWhite"!==t)return{teardown:function(){}};var n=(0,i.A)("meganav"),r=(0,i.n)("meganav-link"),o=(0,i.A)("meganav-control-mobile-dropdown-menu"),s=(0,i.A)("meganav-control-mobile-dropdown-close"),a=(0,i.n)("meganav-control"),c=(0,i.A)("meganav-sign-up-btn"),l=[].concat(f(Array.from(a)),f(Array.from(r)),[(0,i.A)("meganav-logo")]),u=function(t){var e,n,r,i,a=["ui-icon-white","ui-icon-cool-black"],c=[].concat(a).reverse();t?(null==o||(e=o.classList).replace.apply(e,a),null==s||(n=s.classList).replace.apply(n,a)):(null==o||(r=o.classList).replace.apply(r,f(c)),null==s||(i=s.classList).replace.apply(i,f(c)))},d=function(t){t?(null==c||c.classList.replace("bg-white","bg-cool-black"),null==c||c.classList.replace("text-cool-black","text-white")):(null==c||c.classList.replace("bg-cool-black","bg-white"),null==c||c.classList.replace("text-white","text-cool-black"))},h=e()((function(){window.scrollY>5?(n.classList.replace("bg-transparent","bg-white"),d(!0),u(!0),l.forEach((function(t){return t.classList.replace("text-white","text-cool-black")}))):(n.classList.replace("bg-white","bg-transparent"),d(!1),u(!1),l.forEach((function(t){return t.classList.replace("text-cool-black","text-white")})))}),150);return document.addEventListener("scroll",h),{teardown:function(){return document.removeEventListener("scroll",h)}}};function m(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{themeName:null},e=t.themeName,n=(0,o.default)(),r=(0,a.default)(),i=(0,c.default)(),d=(0,l.default)(),m=(0,u.default)(),v=(0,s.default)({clearPanels:function(){return[].concat(f(r),f(i)).forEach((function(t){return t.clear()}))}}),y=function(){return[v,m].concat(f(r),f(i),f(n),f(d)).forEach((function(t){return t.clear()}))},b=[g(e),p(y),h(y),v,m].concat(f(n),f(r),f(i),f(d)).map((function(t){return t.teardown}));return function(){return b.forEach((function(t){return t()}))}}})(),r.default})()}));
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.AblyUi=t():(e.AblyUi=e.AblyUi||{},e.AblyUi.Core=e.AblyUi.Core||{},e.AblyUi.Core.MeganavControl=t())}(this,(function(){return(()=>{"use strict";var e={9581:(e,t,r)=>{r.d(t,{n:()=>n});var n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return t.querySelectorAll("[data-id=".concat(e,"]"))}}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,r),o.exports}r.d=(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=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var n={};return(()=>{r.d(n,{default:()=>i});var e=r(9581);function t(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}const i=function(){var r=Array.from((0,e.n)("meganav-control")),n=Array.from((0,e.n)("meganav-panel")),i=getComputedStyle(document.documentElement).getPropertyValue("--bp-md"),o=function(e,n,o){if(window.matchMedia("(hover: hover) and (pointer: fine) and (min-width: ".concat(i,")")).matches&&!r.some((function(e){return e===document.activeElement}))){var a,u=["invisible","visible"];(a=n.classList).replace.apply(a,function(e){if(Array.isArray(e))return t(e)}(c=o?u:u.reverse())||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(c)||function(e,r){if(e){if("string"==typeof e)return t(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?t(e,r):void 0}}(c)||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.")}()),e.setAttribute("aria-expanded",o)}var c};return r.map((function(e){var t=e.parentNode,i=document.querySelector("#".concat(e.getAttribute("aria-controls"))),a=function(e,t){return function(){r.forEach((function(t){return t!==e&&t.setAttribute("aria-expanded",!1)})),n.forEach((function(e){return e!==t&&e.classList.replace("visible","invisible")})),e.getAttribute("aria-expanded")?(e.setAttribute("aria-expanded",!0),t.classList.replace("invisible","visible")):(e.setAttribute("aria-expanded",!1),t.classList.replace("visible","invisible"))}}(e,i),u=function(e,t){return function(){return o(e,t,!0)}}(e,i),c=function(e,t){return function(){return o(e,t,!1)}}(e,i);return t.addEventListener("mouseenter",u),t.addEventListener("mouseleave",c),e.addEventListener("click",a),[{teardown:function(){t.removeEventListener("mouseenter",u),t.removeEventListener("mouseleave",c),e.removeEventListener("click",a)},clear:function(){e.setAttribute("aria-expanded",!1),i.classList.replace("visible","invisible")}}]})).flat()}})(),n.default})()}));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.AblyUi=t():(e.AblyUi=e.AblyUi||{},e.AblyUi.Core=e.AblyUi.Core||{},e.AblyUi.Core.MeganavControl=t())}(this,(function(){return(()=>{"use strict";var e={9581:(e,t,r)=>{r.d(t,{A:()=>n,n:()=>i});var n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return t.querySelector("[data-id=".concat(e,"]"))},i=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return t.querySelectorAll("[data-id=".concat(e,"]"))}}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,r),o.exports}r.d=(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=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var n={};return(()=>{r.d(n,{default:()=>i});var e=r(9581);function t(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}const i=function(){var r=Array.from((0,e.n)("meganav-control")),n=Array.from((0,e.n)("meganav-panel")),i=getComputedStyle(document.documentElement).getPropertyValue("--bp-md"),o=function(e){return"search"===e.dataset.control},a=function(e,n,o){if(window.matchMedia("(hover: hover) and (pointer: fine) and (min-width: ".concat(i,")")).matches&&!r.some((function(e){return e===document.activeElement}))&&!function(){var e=document.querySelector('[data-id="meganav-panel"]#panel-search');if(e)return!e.classList.contains("invisible")}()){var a,c=["invisible","visible"];(a=n.classList).replace.apply(a,function(e){if(Array.isArray(e))return t(e)}(u=o?c:c.reverse())||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(u)||function(e,r){if(e){if("string"==typeof e)return t(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?t(e,r):void 0}}(u)||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.")}()),e.setAttribute("aria-expanded",o)}var u};return r.map((function(t){var i,c,u=t.parentNode,l=document.querySelector("#".concat(t.getAttribute("aria-controls"))),s=function(t,i){return function(){if(r.forEach((function(e){return e!==t&&e.setAttribute("aria-expanded",!1)})),n.forEach((function(e){return e!==i&&e.classList.replace("visible","invisible")})),"true"===t.getAttribute("aria-expanded")?(t.setAttribute("aria-expanded",!1),i.classList.replace("visible","invisible")):(t.setAttribute("aria-expanded",!0),i.classList.replace("invisible","visible")),o(t)){var a=(0,e.A)("meganav-search-input",i);if(!a)return;a.focus()}else t.focus()}}(t,l);return t.addEventListener("click",s),o(t)||(i=function(e,t){return function(){return a(e,t,!0)}}(t,l),c=function(e,t){return function(){return a(e,t,!1)}}(t,l),u.addEventListener("mouseenter",i),u.addEventListener("mouseleave",c)),[{teardown:function(){i&&c&&(u.removeEventListener("mouseenter",i),u.removeEventListener("mouseleave",c)),t.removeEventListener("click",s)},clear:function(){t.setAttribute("aria-expanded",!1),l.classList.replace("visible","invisible")}}]})).flat()}})(),n.default})()}));
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.AblyUi=t():(e.AblyUi=e.AblyUi||{},e.AblyUi.Core=e.AblyUi.Core||{},e.AblyUi.Core.MeganavControlMobileDropdown=t())}(this,(function(){return(()=>{var e={9581:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var l=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return t.querySelector("[data-id=".concat(e,"]"))}},6265:function(e){var t;t=function(){return function(e){var t={};function r(l){if(t[l])return t[l].exports;var o=t[l]={i:l,l:!1,exports:{}};return e[l].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,l){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:l})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var l=Object.create(null);if(r.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(l,o,function(t){return e[t]}.bind(null,o));return l},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=0)}([function(e,t,r){"use strict";r.r(t);var l=function(e){return Array.isArray(e)?e:[e]},o=function(e){return e instanceof Node},n=function(e,t){if(e&&t){e=function(e){return e instanceof NodeList}(e)?e:[e];for(var r=0;r<e.length&&!0!==t(e[r],r,e.length);r++);}},c=function(e){return console.error("[scroll-lock] ".concat(e))},a=function(e){if(Array.isArray(e))return e.join(", ")},i=function(e){var t=[];return n(e,(function(e){return t.push(e)})),t},u=function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:document;if(r&&-1!==i(l.querySelectorAll(t)).indexOf(e))return e;for(;(e=e.parentElement)&&-1===i(l.querySelectorAll(t)).indexOf(e););return e},d=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document,l=-1!==i(r.querySelectorAll(t)).indexOf(e);return l},s=function(e){if(e)return"hidden"===getComputedStyle(e).overflow},f=function(e){if(e)return!!s(e)||e.scrollTop<=0},p=function(e){if(e){if(s(e))return!0;var t=e.scrollTop,r=e.scrollHeight;return t+e.offsetHeight>=r}},g=function(e){if(e)return!!s(e)||e.scrollLeft<=0},b=function(e){if(e){if(s(e))return!0;var t=e.scrollLeft,r=e.scrollWidth;return t+e.offsetWidth>=r}},v=function(e){return d(e,'textarea, [contenteditable="true"]')},h=function(e){return d(e,'input[type="range"]')};function m(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.d(t,"disablePageScroll",(function(){return k})),r.d(t,"enablePageScroll",(function(){return w})),r.d(t,"getScrollState",(function(){return A})),r.d(t,"clearQueueScrollLocks",(function(){return x})),r.d(t,"getTargetScrollBarWidth",(function(){return L})),r.d(t,"getCurrentTargetScrollBarWidth",(function(){return T})),r.d(t,"getPageScrollBarWidth",(function(){return G})),r.d(t,"getCurrentPageScrollBarWidth",(function(){return P})),r.d(t,"addScrollableTarget",(function(){return W})),r.d(t,"removeScrollableTarget",(function(){return F})),r.d(t,"addScrollableSelector",(function(){return E})),r.d(t,"removeScrollableSelector",(function(){return O})),r.d(t,"addLockableTarget",(function(){return Y})),r.d(t,"addLockableSelector",(function(){return j})),r.d(t,"setFillGapMethod",(function(){return q})),r.d(t,"addFillGapTarget",(function(){return M})),r.d(t,"removeFillGapTarget",(function(){return U})),r.d(t,"addFillGapSelector",(function(){return C})),r.d(t,"removeFillGapSelector",(function(){return N})),r.d(t,"refillGaps",(function(){return B}));var y=["padding","margin","width","max-width","none"],S={scroll:!0,queue:0,scrollableSelectors:["[data-scroll-lock-scrollable]"],lockableSelectors:["body","[data-scroll-lock-lockable]"],fillGapSelectors:["body","[data-scroll-lock-fill-gap]","[data-scroll-lock-lockable]"],fillGapMethod:y[0],startTouchY:0,startTouchX:0},k=function(e){S.queue<=0&&(S.scroll=!1,K(),H()),W(e),S.queue++},w=function(e){S.queue>0&&S.queue--,S.queue<=0&&(S.scroll=!0,R(),z()),F(e)},A=function(){return S.scroll},x=function(){S.queue=0},L=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(o(e)){var r=e.style.overflowY;t?A()||(e.style.overflowY=e.getAttribute("data-scroll-lock-saved-overflow-y-property")):e.style.overflowY="scroll";var l=T(e);return e.style.overflowY=r,l}return 0},T=function(e){if(o(e)){if(e===document.body){var t=document.documentElement.clientWidth;return window.innerWidth-t}var r=e.style.borderLeftWidth,l=e.style.borderRightWidth;e.style.borderLeftWidth="0px",e.style.borderRightWidth="0px";var n=e.offsetWidth-e.clientWidth;return e.style.borderLeftWidth=r,e.style.borderRightWidth=l,n}return 0},G=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return L(document.body,e)},P=function(){return T(document.body)},W=function(e){e&&l(e).map((function(e){n(e,(function(e){o(e)?e.setAttribute("data-scroll-lock-scrollable",""):c('"'.concat(e,'" is not a Element.'))}))}))},F=function(e){e&&l(e).map((function(e){n(e,(function(e){o(e)?e.removeAttribute("data-scroll-lock-scrollable"):c('"'.concat(e,'" is not a Element.'))}))}))},E=function(e){e&&l(e).map((function(e){S.scrollableSelectors.push(e)}))},O=function(e){e&&l(e).map((function(e){S.scrollableSelectors=S.scrollableSelectors.filter((function(t){return t!==e}))}))},Y=function(e){e&&(l(e).map((function(e){n(e,(function(e){o(e)?e.setAttribute("data-scroll-lock-lockable",""):c('"'.concat(e,'" is not a Element.'))}))})),A()||K())},j=function(e){e&&(l(e).map((function(e){S.lockableSelectors.push(e)})),A()||K(),C(e))},q=function(e){if(e)if(-1!==y.indexOf(e))S.fillGapMethod=e,B();else{var t=y.join(", ");c('"'.concat(e,'" method is not available!\nAvailable fill gap methods: ').concat(t,"."))}},M=function(e){e&&l(e).map((function(e){n(e,(function(e){o(e)?(e.setAttribute("data-scroll-lock-fill-gap",""),S.scroll||J(e)):c('"'.concat(e,'" is not a Element.'))}))}))},U=function(e){e&&l(e).map((function(e){n(e,(function(e){o(e)?(e.removeAttribute("data-scroll-lock-fill-gap"),S.scroll||Z(e)):c('"'.concat(e,'" is not a Element.'))}))}))},C=function(e){e&&l(e).map((function(e){-1===S.fillGapSelectors.indexOf(e)&&(S.fillGapSelectors.push(e),S.scroll||I(e))}))},N=function(e){e&&l(e).map((function(e){S.fillGapSelectors=S.fillGapSelectors.filter((function(t){return t!==e})),S.scroll||V(e)}))},B=function(){S.scroll||H()},K=function(){var e=a(S.lockableSelectors);_(e)},R=function(){var e=a(S.lockableSelectors);X(e)},_=function(e){var t=document.querySelectorAll(e);n(t,(function(e){D(e)}))},X=function(e){var t=document.querySelectorAll(e);n(t,(function(e){Q(e)}))},D=function(e){if(o(e)&&"true"!==e.getAttribute("data-scroll-lock-locked")){var t=window.getComputedStyle(e);e.setAttribute("data-scroll-lock-saved-overflow-y-property",t.overflowY),e.setAttribute("data-scroll-lock-saved-inline-overflow-property",e.style.overflow),e.setAttribute("data-scroll-lock-saved-inline-overflow-y-property",e.style.overflowY),e.style.overflow="hidden",e.setAttribute("data-scroll-lock-locked","true")}},Q=function(e){o(e)&&"true"===e.getAttribute("data-scroll-lock-locked")&&(e.style.overflow=e.getAttribute("data-scroll-lock-saved-inline-overflow-property"),e.style.overflowY=e.getAttribute("data-scroll-lock-saved-inline-overflow-y-property"),e.removeAttribute("data-scroll-lock-saved-overflow-property"),e.removeAttribute("data-scroll-lock-saved-inline-overflow-property"),e.removeAttribute("data-scroll-lock-saved-inline-overflow-y-property"),e.removeAttribute("data-scroll-lock-locked"))},H=function(){S.fillGapSelectors.map((function(e){I(e)}))},z=function(){S.fillGapSelectors.map((function(e){V(e)}))},I=function(e){var t=document.querySelectorAll(e),r=-1!==S.lockableSelectors.indexOf(e);n(t,(function(e){J(e,r)}))},J=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(o(e)){var r;if(""===e.getAttribute("data-scroll-lock-lockable")||t)r=L(e,!0);else{var l=u(e,a(S.lockableSelectors));r=L(l,!0)}"true"===e.getAttribute("data-scroll-lock-filled-gap")&&Z(e);var n=window.getComputedStyle(e);if(e.setAttribute("data-scroll-lock-filled-gap","true"),e.setAttribute("data-scroll-lock-current-fill-gap-method",S.fillGapMethod),"margin"===S.fillGapMethod){var c=parseFloat(n.marginRight);e.style.marginRight="".concat(c+r,"px")}else if("width"===S.fillGapMethod)e.style.width="calc(100% - ".concat(r,"px)");else if("max-width"===S.fillGapMethod)e.style.maxWidth="calc(100% - ".concat(r,"px)");else if("padding"===S.fillGapMethod){var i=parseFloat(n.paddingRight);e.style.paddingRight="".concat(i+r,"px")}}},V=function(e){var t=document.querySelectorAll(e);n(t,(function(e){Z(e)}))},Z=function(e){if(o(e)&&"true"===e.getAttribute("data-scroll-lock-filled-gap")){var t=e.getAttribute("data-scroll-lock-current-fill-gap-method");e.removeAttribute("data-scroll-lock-filled-gap"),e.removeAttribute("data-scroll-lock-current-fill-gap-method"),"margin"===t?e.style.marginRight="":"width"===t?e.style.width="":"max-width"===t?e.style.maxWidth="":"padding"===t&&(e.style.paddingRight="")}};"undefined"!=typeof window&&window.addEventListener("resize",(function(e){B()})),"undefined"!=typeof document&&(document.addEventListener("touchstart",(function(e){S.scroll||(S.startTouchY=e.touches[0].clientY,S.startTouchX=e.touches[0].clientX)})),document.addEventListener("touchmove",(function(e){if(!S.scroll){var t=S.startTouchY,r=S.startTouchX,l=e.touches[0].clientY,o=e.touches[0].clientX;if(e.touches.length<2){var n=a(S.scrollableSelectors),c={up:t<l,down:t>l,left:r<o,right:r>o},i={up:t+3<l,down:t-3>l,left:r+3<o,right:r-3>o};!function t(r){var l=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(r){var o=u(r,n,!1);if(h(r))return!1;if(l||v(r)&&u(r,n)||d(r,n)){var a=!1;g(r)&&b(r)?(c.up&&f(r)||c.down&&p(r))&&(a=!0):f(r)&&p(r)?(c.left&&g(r)||c.right&&b(r))&&(a=!0):(i.up&&f(r)||i.down&&p(r)||i.left&&g(r)||i.right&&b(r))&&(a=!0),a&&(o?t(o,!0):e.cancelable&&e.preventDefault())}else t(o)}else e.cancelable&&e.preventDefault()}(e.target)}}}),{passive:!1}),document.addEventListener("touchend",(function(e){S.scroll||(S.startTouchY=0,S.startTouchX=0)})));var $={hide:function(e){c('"hide" is deprecated! Use "disablePageScroll" instead. \n https://github.com/FL3NKEY/scroll-lock#disablepagescrollscrollabletarget'),k(e)},show:function(e){c('"show" is deprecated! Use "enablePageScroll" instead. \n https://github.com/FL3NKEY/scroll-lock#enablepagescrollscrollabletarget'),w(e)},toggle:function(e){c('"toggle" is deprecated! Do not use it.'),A()?k():w(e)},getState:function(){return c('"getState" is deprecated! Use "getScrollState" instead. \n https://github.com/FL3NKEY/scroll-lock#getscrollstate'),A()},getWidth:function(){return c('"getWidth" is deprecated! Use "getPageScrollBarWidth" instead. \n https://github.com/FL3NKEY/scroll-lock#getpagescrollbarwidth'),G()},getCurrentWidth:function(){return c('"getCurrentWidth" is deprecated! Use "getCurrentPageScrollBarWidth" instead. \n https://github.com/FL3NKEY/scroll-lock#getcurrentpagescrollbarwidth'),P()},setScrollableTargets:function(e){c('"setScrollableTargets" is deprecated! Use "addScrollableTarget" instead. \n https://github.com/FL3NKEY/scroll-lock#addscrollabletargetscrollabletarget'),W(e)},setFillGapSelectors:function(e){c('"setFillGapSelectors" is deprecated! Use "addFillGapSelector" instead. \n https://github.com/FL3NKEY/scroll-lock#addfillgapselectorfillgapselector'),C(e)},setFillGapTargets:function(e){c('"setFillGapTargets" is deprecated! Use "addFillGapTarget" instead. \n https://github.com/FL3NKEY/scroll-lock#addfillgaptargetfillgaptarget'),M(e)},clearQueue:function(){c('"clearQueue" is deprecated! Use "clearQueueScrollLocks" instead. \n https://github.com/FL3NKEY/scroll-lock#clearqueuescrolllocks'),x()}},ee=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},l=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(l=l.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),l.forEach((function(t){m(e,t,r[t])}))}return e}({disablePageScroll:k,enablePageScroll:w,getScrollState:A,clearQueueScrollLocks:x,getTargetScrollBarWidth:L,getCurrentTargetScrollBarWidth:T,getPageScrollBarWidth:G,getCurrentPageScrollBarWidth:P,addScrollableSelector:E,removeScrollableSelector:O,addScrollableTarget:W,removeScrollableTarget:F,addLockableSelector:j,addLockableTarget:Y,addFillGapSelector:C,removeFillGapSelector:N,addFillGapTarget:M,removeFillGapTarget:U,setFillGapMethod:q,refillGaps:B,_state:S},$);t.default=ee}]).default},e.exports=t()}},t={};function r(l){var o=t[l];if(void 0!==o)return o.exports;var n=t[l]={exports:{}};return e[l].call(n.exports,n,n.exports,r),n.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var l in t)r.o(t,l)&&!r.o(e,l)&&Object.defineProperty(e,l,{enumerable:!0,get:t[l]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var l={};return(()=>{"use strict";r.d(l,{default:()=>n});var e=r(6265),t=r.n(e),o=r(9581);const n=function(e){var r=e.clearPanels,l=(0,o.A)("meganav-control-mobile-dropdown"),n=(0,o.A)("meganav-mobile-dropdown"),c=(0,o.A)("meganav-control-mobile-dropdown-menu"),a=(0,o.A)("meganav-control-mobile-dropdown-close"),i=(0,o.A)("meganav-mobile-search-input"),u=(0,o.A)("meganav-mobile-search-suggestions"),d=function(){"false"===l.getAttribute("aria-expanded")?(n.classList.replace("invisible","visible"),l.setAttribute("aria-expanded",!0),t().disablePageScroll()):(n.classList.replace("visible","invisible"),l.setAttribute("aria-expanded",!1),t().enablePageScroll(),r()),c.classList.toggle("hidden"),a.classList.toggle("hidden")};return l.addEventListener("click",d),i.addEventListener("focus",(function(){u.classList.add("max-h-96")})),i.addEventListener("blur",(function(e){e.relatedTarget!==u.querySelectorAll("a")[0]&&u.classList.remove("max-h-96")})),{teardown:function(){l.removeEventListener("click",d),t().enablePageScroll()},clear:function(){n.classList.replace("visible","invisible"),l.setAttribute("aria-expanded",!1),c.classList.remove("hidden"),a.classList.add("hidden"),t().enablePageScroll()}}}})(),l.default})()}));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.AblyUi=t():(e.AblyUi=e.AblyUi||{},e.AblyUi.Core=e.AblyUi.Core||{},e.AblyUi.Core.MeganavControlMobileDropdown=t())}(this,(function(){return(()=>{var e={9581:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var l=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return t.querySelector("[data-id=".concat(e,"]"))}},6265:function(e){var t;t=function(){return function(e){var t={};function r(l){if(t[l])return t[l].exports;var o=t[l]={i:l,l:!1,exports:{}};return e[l].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,l){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:l})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var l=Object.create(null);if(r.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(l,o,function(t){return e[t]}.bind(null,o));return l},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=0)}([function(e,t,r){"use strict";r.r(t);var l=function(e){return Array.isArray(e)?e:[e]},o=function(e){return e instanceof Node},n=function(e,t){if(e&&t){e=function(e){return e instanceof NodeList}(e)?e:[e];for(var r=0;r<e.length&&!0!==t(e[r],r,e.length);r++);}},c=function(e){return console.error("[scroll-lock] ".concat(e))},a=function(e){if(Array.isArray(e))return e.join(", ")},i=function(e){var t=[];return n(e,(function(e){return t.push(e)})),t},u=function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:document;if(r&&-1!==i(l.querySelectorAll(t)).indexOf(e))return e;for(;(e=e.parentElement)&&-1===i(l.querySelectorAll(t)).indexOf(e););return e},d=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document,l=-1!==i(r.querySelectorAll(t)).indexOf(e);return l},s=function(e){if(e)return"hidden"===getComputedStyle(e).overflow},f=function(e){if(e)return!!s(e)||e.scrollTop<=0},p=function(e){if(e){if(s(e))return!0;var t=e.scrollTop,r=e.scrollHeight;return t+e.offsetHeight>=r}},g=function(e){if(e)return!!s(e)||e.scrollLeft<=0},b=function(e){if(e){if(s(e))return!0;var t=e.scrollLeft,r=e.scrollWidth;return t+e.offsetWidth>=r}},v=function(e){return d(e,'textarea, [contenteditable="true"]')},h=function(e){return d(e,'input[type="range"]')};function m(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.d(t,"disablePageScroll",(function(){return k})),r.d(t,"enablePageScroll",(function(){return w})),r.d(t,"getScrollState",(function(){return A})),r.d(t,"clearQueueScrollLocks",(function(){return x})),r.d(t,"getTargetScrollBarWidth",(function(){return L})),r.d(t,"getCurrentTargetScrollBarWidth",(function(){return G})),r.d(t,"getPageScrollBarWidth",(function(){return T})),r.d(t,"getCurrentPageScrollBarWidth",(function(){return P})),r.d(t,"addScrollableTarget",(function(){return W})),r.d(t,"removeScrollableTarget",(function(){return F})),r.d(t,"addScrollableSelector",(function(){return O})),r.d(t,"removeScrollableSelector",(function(){return E})),r.d(t,"addLockableTarget",(function(){return Y})),r.d(t,"addLockableSelector",(function(){return j})),r.d(t,"setFillGapMethod",(function(){return q})),r.d(t,"addFillGapTarget",(function(){return M})),r.d(t,"removeFillGapTarget",(function(){return U})),r.d(t,"addFillGapSelector",(function(){return C})),r.d(t,"removeFillGapSelector",(function(){return N})),r.d(t,"refillGaps",(function(){return B}));var y=["padding","margin","width","max-width","none"],S={scroll:!0,queue:0,scrollableSelectors:["[data-scroll-lock-scrollable]"],lockableSelectors:["body","[data-scroll-lock-lockable]"],fillGapSelectors:["body","[data-scroll-lock-fill-gap]","[data-scroll-lock-lockable]"],fillGapMethod:y[0],startTouchY:0,startTouchX:0},k=function(e){S.queue<=0&&(S.scroll=!1,K(),H()),W(e),S.queue++},w=function(e){S.queue>0&&S.queue--,S.queue<=0&&(S.scroll=!0,R(),z()),F(e)},A=function(){return S.scroll},x=function(){S.queue=0},L=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(o(e)){var r=e.style.overflowY;t?A()||(e.style.overflowY=e.getAttribute("data-scroll-lock-saved-overflow-y-property")):e.style.overflowY="scroll";var l=G(e);return e.style.overflowY=r,l}return 0},G=function(e){if(o(e)){if(e===document.body){var t=document.documentElement.clientWidth;return window.innerWidth-t}var r=e.style.borderLeftWidth,l=e.style.borderRightWidth;e.style.borderLeftWidth="0px",e.style.borderRightWidth="0px";var n=e.offsetWidth-e.clientWidth;return e.style.borderLeftWidth=r,e.style.borderRightWidth=l,n}return 0},T=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return L(document.body,e)},P=function(){return G(document.body)},W=function(e){e&&l(e).map((function(e){n(e,(function(e){o(e)?e.setAttribute("data-scroll-lock-scrollable",""):c('"'.concat(e,'" is not a Element.'))}))}))},F=function(e){e&&l(e).map((function(e){n(e,(function(e){o(e)?e.removeAttribute("data-scroll-lock-scrollable"):c('"'.concat(e,'" is not a Element.'))}))}))},O=function(e){e&&l(e).map((function(e){S.scrollableSelectors.push(e)}))},E=function(e){e&&l(e).map((function(e){S.scrollableSelectors=S.scrollableSelectors.filter((function(t){return t!==e}))}))},Y=function(e){e&&(l(e).map((function(e){n(e,(function(e){o(e)?e.setAttribute("data-scroll-lock-lockable",""):c('"'.concat(e,'" is not a Element.'))}))})),A()||K())},j=function(e){e&&(l(e).map((function(e){S.lockableSelectors.push(e)})),A()||K(),C(e))},q=function(e){if(e)if(-1!==y.indexOf(e))S.fillGapMethod=e,B();else{var t=y.join(", ");c('"'.concat(e,'" method is not available!\nAvailable fill gap methods: ').concat(t,"."))}},M=function(e){e&&l(e).map((function(e){n(e,(function(e){o(e)?(e.setAttribute("data-scroll-lock-fill-gap",""),S.scroll||J(e)):c('"'.concat(e,'" is not a Element.'))}))}))},U=function(e){e&&l(e).map((function(e){n(e,(function(e){o(e)?(e.removeAttribute("data-scroll-lock-fill-gap"),S.scroll||Z(e)):c('"'.concat(e,'" is not a Element.'))}))}))},C=function(e){e&&l(e).map((function(e){-1===S.fillGapSelectors.indexOf(e)&&(S.fillGapSelectors.push(e),S.scroll||I(e))}))},N=function(e){e&&l(e).map((function(e){S.fillGapSelectors=S.fillGapSelectors.filter((function(t){return t!==e})),S.scroll||V(e)}))},B=function(){S.scroll||H()},K=function(){var e=a(S.lockableSelectors);_(e)},R=function(){var e=a(S.lockableSelectors);X(e)},_=function(e){var t=document.querySelectorAll(e);n(t,(function(e){D(e)}))},X=function(e){var t=document.querySelectorAll(e);n(t,(function(e){Q(e)}))},D=function(e){if(o(e)&&"true"!==e.getAttribute("data-scroll-lock-locked")){var t=window.getComputedStyle(e);e.setAttribute("data-scroll-lock-saved-overflow-y-property",t.overflowY),e.setAttribute("data-scroll-lock-saved-inline-overflow-property",e.style.overflow),e.setAttribute("data-scroll-lock-saved-inline-overflow-y-property",e.style.overflowY),e.style.overflow="hidden",e.setAttribute("data-scroll-lock-locked","true")}},Q=function(e){o(e)&&"true"===e.getAttribute("data-scroll-lock-locked")&&(e.style.overflow=e.getAttribute("data-scroll-lock-saved-inline-overflow-property"),e.style.overflowY=e.getAttribute("data-scroll-lock-saved-inline-overflow-y-property"),e.removeAttribute("data-scroll-lock-saved-overflow-property"),e.removeAttribute("data-scroll-lock-saved-inline-overflow-property"),e.removeAttribute("data-scroll-lock-saved-inline-overflow-y-property"),e.removeAttribute("data-scroll-lock-locked"))},H=function(){S.fillGapSelectors.map((function(e){I(e)}))},z=function(){S.fillGapSelectors.map((function(e){V(e)}))},I=function(e){var t=document.querySelectorAll(e),r=-1!==S.lockableSelectors.indexOf(e);n(t,(function(e){J(e,r)}))},J=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(o(e)){var r;if(""===e.getAttribute("data-scroll-lock-lockable")||t)r=L(e,!0);else{var l=u(e,a(S.lockableSelectors));r=L(l,!0)}"true"===e.getAttribute("data-scroll-lock-filled-gap")&&Z(e);var n=window.getComputedStyle(e);if(e.setAttribute("data-scroll-lock-filled-gap","true"),e.setAttribute("data-scroll-lock-current-fill-gap-method",S.fillGapMethod),"margin"===S.fillGapMethod){var c=parseFloat(n.marginRight);e.style.marginRight="".concat(c+r,"px")}else if("width"===S.fillGapMethod)e.style.width="calc(100% - ".concat(r,"px)");else if("max-width"===S.fillGapMethod)e.style.maxWidth="calc(100% - ".concat(r,"px)");else if("padding"===S.fillGapMethod){var i=parseFloat(n.paddingRight);e.style.paddingRight="".concat(i+r,"px")}}},V=function(e){var t=document.querySelectorAll(e);n(t,(function(e){Z(e)}))},Z=function(e){if(o(e)&&"true"===e.getAttribute("data-scroll-lock-filled-gap")){var t=e.getAttribute("data-scroll-lock-current-fill-gap-method");e.removeAttribute("data-scroll-lock-filled-gap"),e.removeAttribute("data-scroll-lock-current-fill-gap-method"),"margin"===t?e.style.marginRight="":"width"===t?e.style.width="":"max-width"===t?e.style.maxWidth="":"padding"===t&&(e.style.paddingRight="")}};"undefined"!=typeof window&&window.addEventListener("resize",(function(e){B()})),"undefined"!=typeof document&&(document.addEventListener("touchstart",(function(e){S.scroll||(S.startTouchY=e.touches[0].clientY,S.startTouchX=e.touches[0].clientX)})),document.addEventListener("touchmove",(function(e){if(!S.scroll){var t=S.startTouchY,r=S.startTouchX,l=e.touches[0].clientY,o=e.touches[0].clientX;if(e.touches.length<2){var n=a(S.scrollableSelectors),c={up:t<l,down:t>l,left:r<o,right:r>o},i={up:t+3<l,down:t-3>l,left:r+3<o,right:r-3>o};!function t(r){var l=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(r){var o=u(r,n,!1);if(h(r))return!1;if(l||v(r)&&u(r,n)||d(r,n)){var a=!1;g(r)&&b(r)?(c.up&&f(r)||c.down&&p(r))&&(a=!0):f(r)&&p(r)?(c.left&&g(r)||c.right&&b(r))&&(a=!0):(i.up&&f(r)||i.down&&p(r)||i.left&&g(r)||i.right&&b(r))&&(a=!0),a&&(o?t(o,!0):e.cancelable&&e.preventDefault())}else t(o)}else e.cancelable&&e.preventDefault()}(e.target)}}}),{passive:!1}),document.addEventListener("touchend",(function(e){S.scroll||(S.startTouchY=0,S.startTouchX=0)})));var $={hide:function(e){c('"hide" is deprecated! Use "disablePageScroll" instead. \n https://github.com/FL3NKEY/scroll-lock#disablepagescrollscrollabletarget'),k(e)},show:function(e){c('"show" is deprecated! Use "enablePageScroll" instead. \n https://github.com/FL3NKEY/scroll-lock#enablepagescrollscrollabletarget'),w(e)},toggle:function(e){c('"toggle" is deprecated! Do not use it.'),A()?k():w(e)},getState:function(){return c('"getState" is deprecated! Use "getScrollState" instead. \n https://github.com/FL3NKEY/scroll-lock#getscrollstate'),A()},getWidth:function(){return c('"getWidth" is deprecated! Use "getPageScrollBarWidth" instead. \n https://github.com/FL3NKEY/scroll-lock#getpagescrollbarwidth'),T()},getCurrentWidth:function(){return c('"getCurrentWidth" is deprecated! Use "getCurrentPageScrollBarWidth" instead. \n https://github.com/FL3NKEY/scroll-lock#getcurrentpagescrollbarwidth'),P()},setScrollableTargets:function(e){c('"setScrollableTargets" is deprecated! Use "addScrollableTarget" instead. \n https://github.com/FL3NKEY/scroll-lock#addscrollabletargetscrollabletarget'),W(e)},setFillGapSelectors:function(e){c('"setFillGapSelectors" is deprecated! Use "addFillGapSelector" instead. \n https://github.com/FL3NKEY/scroll-lock#addfillgapselectorfillgapselector'),C(e)},setFillGapTargets:function(e){c('"setFillGapTargets" is deprecated! Use "addFillGapTarget" instead. \n https://github.com/FL3NKEY/scroll-lock#addfillgaptargetfillgaptarget'),M(e)},clearQueue:function(){c('"clearQueue" is deprecated! Use "clearQueueScrollLocks" instead. \n https://github.com/FL3NKEY/scroll-lock#clearqueuescrolllocks'),x()}},ee=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},l=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(l=l.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),l.forEach((function(t){m(e,t,r[t])}))}return e}({disablePageScroll:k,enablePageScroll:w,getScrollState:A,clearQueueScrollLocks:x,getTargetScrollBarWidth:L,getCurrentTargetScrollBarWidth:G,getPageScrollBarWidth:T,getCurrentPageScrollBarWidth:P,addScrollableSelector:O,removeScrollableSelector:E,addScrollableTarget:W,removeScrollableTarget:F,addLockableSelector:j,addLockableTarget:Y,addFillGapSelector:C,removeFillGapSelector:N,addFillGapTarget:M,removeFillGapTarget:U,setFillGapMethod:q,refillGaps:B,_state:S},$);t.default=ee}]).default},e.exports=t()}},t={};function r(l){var o=t[l];if(void 0!==o)return o.exports;var n=t[l]={exports:{}};return e[l].call(n.exports,n,n.exports,r),n.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var l in t)r.o(t,l)&&!r.o(e,l)&&Object.defineProperty(e,l,{enumerable:!0,get:t[l]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var l={};return(()=>{"use strict";r.d(l,{default:()=>n});var e=r(6265),t=r.n(e),o=r(9581);const n=function(e){var r=e.clearPanels,l=(0,o.A)("meganav-control-mobile-dropdown"),n=(0,o.A)("meganav-mobile-dropdown"),c=(0,o.A)("meganav-control-mobile-dropdown-menu"),a=(0,o.A)("meganav-control-mobile-dropdown-close"),i=function(){"false"===l.getAttribute("aria-expanded")?(n.classList.replace("invisible","visible"),l.setAttribute("aria-expanded",!0),t().disablePageScroll()):(n.classList.replace("visible","invisible"),l.setAttribute("aria-expanded",!1),t().enablePageScroll(),r()),c.classList.toggle("hidden"),a.classList.toggle("hidden")};return l.addEventListener("click",i),{teardown:function(){l.removeEventListener("click",i),t().enablePageScroll()},clear:function(){n.classList.replace("visible","invisible"),l.setAttribute("aria-expanded",!1),c.classList.remove("hidden"),a.classList.add("hidden"),t().enablePageScroll()}}}})(),l.default})()}));
@@ -14,8 +14,25 @@
14
14
  <div class="pt-24 pb-16 ui-grid-px bg-white">
15
15
  <%= tag.form class: "mb-16", action: abs_url("/search"), method: "get" do %>
16
16
  <div class="relative w-full">
17
- <%= render(AblyUi::Core::Icon.new(name: "icon-gui-search", size: "1.5rem", color: "text-cool-black", additional_css: "absolute top-12 left-16")) %>
18
- <input type="search" name="q" class="ui-input pl-48 h-48" placeholder="Search" data-id="meganav-mobile-search-input" />
17
+ <%= render(AblyUi::Core::Icon.new(name: "icon-gui-search", size: "1.5rem", color: "text-cool-black", additional_css: "absolute top-12 left-16 hover:text-gui-hover")) %>
18
+ <button
19
+ type="button"
20
+ class="absolute top-12 right-16 p-0 focus:outline-gui-focus m-0 md:hidden invisible"
21
+ data-id="meganav-search-input-clear"
22
+ >
23
+ <%= render(AblyUi::Core::Icon.new(name: "icon-gui-cross-circled-fill", size: "1.5rem", color: "text-dark-grey")) %>
24
+ </button>
25
+ <input
26
+ type="search"
27
+ name="q"
28
+ class="ui-input px-48 h-48"
29
+ style={{ maxWidth: "none" }}
30
+ placeholder="Search"
31
+ autocomplete="off"
32
+ data-id="meganav-mobile-search-input"
33
+ />
34
+
35
+ <%= render(AblyUi::Core::MeganavSearchAutocomplete.new) %>
19
36
  </div>
20
37
  <% end %>
21
38
 
@@ -23,7 +40,7 @@
23
40
  <%= render(AblyUi::Core::MeganavSearchSuggestions.new(url_base: url_base, display_support_link: false)) %>
24
41
  </div>
25
42
 
26
- <ul class="mb-16">
43
+ <ul class="mb-16" data-id="meganav-mobile-panel-controls">
27
44
  <% panels.each do |panel| %>
28
45
  <li class="ui-meganav-mobile-item">
29
46
  <%= render(AblyUi::Core::MeganavControlMobilePanelOpen.new(aria_controls: "#{panel[:id]}-mobile")) do %>
@@ -1,12 +1,13 @@
1
1
  <button
2
2
  type="button"
3
3
  data-id="meganav-control"
4
- class="h-64 w-24 px-24 pr-48 py-20"
4
+ data-control="search"
5
+ class="h-64 w-24 px-24 pr-48 py-20 group focus:outline-none"
5
6
  aria-expanded="false"
6
7
  aria-controls="panel-search"
7
8
  aria-label="Show Search Panel"
8
9
  >
9
- <%= render(AblyUi::Core::Icon.new(name: "icon-gui-search", size: "1.5rem", color: "text-cool-black")) %>
10
+ <%= render(AblyUi::Core::Icon.new(name: "icon-gui-search", size: "1.5rem", color: "text-cool-black", additional_css: "group-hover:text-gui-hover group-focus:text-gui-focus")) %>
10
11
  </button>
11
12
 
12
13
  <div class="ui-meganav-panel invisible" id="panel-search" data-id="meganav-panel">
@@ -0,0 +1,2 @@
1
+ /*! For license information please see component.js.LICENSE.txt */
2
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.AblyUi=e():(t.AblyUi=t.AblyUi||{},t.AblyUi.Core=t.AblyUi.Core||{},t.AblyUi.Core.MeganavSearchAutocomplete=e())}(this,(function(){return(()=>{var t={727:(t,e,s)=>{"use strict";t.exports=s(5647)},493:(t,e,s)=>{"use strict";s(2702).polyfill(),s(4301);var i=function(t,e,s,n,r,o,a){var c=function(t,e){return t||!1===t?"&"+e+"="+t:""};if("search"===s||"suggest"===s||"autocomplete"===s){var u="",h="",l=null;if("search"===s){l=s,u=n.keyword,u=n.enableLogicalOperators?u.replace(/ and /g," AND ").replace(/ or /g," OR ").replace(/ not /g," NOT "):u.replace(/ AND /g," and ").replace(/ OR /g," or ").replace(/ NOT /g," not "),u=encodeURIComponent(u);var f=n.fuzzy;if("retry"===f&&(f=!0===o),"search"===s){if(h=c(n.lang,"lang")+c(f,"fuzzy")+c(n.collectAnalytics,"collectAnalytics")+c(n.postfixWildcard,"postfixWildcard")+c(n.categories,"categories")+c(n.priceFromCents,"priceFromCents")+c(n.priceToCents,"priceToCents")+c(n.dateFrom,"dateFrom")+c(n.dateTo,"dateTo")+c(n.paging.page,"page")+c(n.paging.pageSize,"limit")+c(n.paging.sortBy,"sort")+c(n.paging.sortOrder,"order")+c(n.shuffleAndLimitTo,"shuffleAndLimitTo")+c(n.jwt,"jwt")+c(n.resultType,"resultType")+c(n.userToken,"userToken")+c(n.numFacets,"numFacets")+c(n.cacheResponseTime,"cacheResponseWithTtlSeconds")+c(n.searchOperator,"defaultOperator")+c(n.analyticsTag,"analyticsTag")+c(n.hierarchicalFacetSetting,"hierarchicalFacets"),n.customFieldFilters)for(var d=0;d<n.customFieldFilters.length;d++)h=h+"&customField="+n.customFieldFilters[d];if(n.facetFields)for(d=0;d<n.facetFields.length;d++)h=h+"&facet="+n.facetFields[d];if(n.rangeFacets&&(h=h+"&rangeFacets="+JSON.stringify(n.rangeFacets)),n.statsFields)for(d=0;d<n.statsFields.length;d++)h=h+"&fieldStat="+n.statsFields[d];if(n.personalizationEvents&&Array.isArray(n.personalizationEvents))for(d=0;d<n.personalizationEvents.length;d++){var g=n.personalizationEvents[d],p=Object.keys(g);h=h+"&personalizationEvent="+encodeURIComponent(p+"="+g[p])}a?h=h+"&filter="+encodeURIComponent(JSON.stringify(a)):n.filterObject&&(h=h+"&filter="+encodeURIComponent(JSON.stringify(n.filterObject)))}}else"suggest"===s?(l=s,h=c(n.suggestionsSize,"size")+c(n.lang,"lang"),u=n.suggestionsPrefix):"autocomplete"===s&&(l="autocomplete/document-field",h=c(n.autocomplete.field,"source")+c(n.autocomplete.size,"size"),u=n.autocomplete.prefix);fetch("https://"+t+"/v1/"+l+"/"+e+"?term="+u+h).then((function(t){return t.json()})).then((function(a){if("search"===s&&"retry"===n.fuzzy&&0===a.total_hits&&!0!==o)i(t,e,s,n,r,!0);else{if(!0===o){var c=n.paging.pageSize;a.total_hits>=c&&(a.total_hits=c)}r(a)}})).catch((function(t){console.log(t),r({error:{response:500,message:"invalid server response"}})}))}else r({error:{response:400,message:"invalid query type"}})};t.exports=i},5647:(t,e,s)=>{"use strict";var i=s(493),n=s(9610),r=s(3716),o=s(7585),a=s(5159),c=s(4508);t.exports=function(t,e){this.sitekey=t,this.privatekey=e,this.apiHostname="api.addsearch.com",this.settings=new o,this.sessionId=("a-"+1e8*Math.random()).substring(0,10),this.search=function(t,e){var s=null,n=null;if(t&&a.isFunction(e))s=t,n=e;else if(!e&&a.isFunction(t))s=this.settings.getSettings().keyword,n=t;else{if(!this.settings.getSettings().callback)throw"Illegal search parameters. Should be (keyword, callbackFunction) or (callbackFunction)";s=this.settings.getSettings().keyword,n=this.settings.getSettings().callback}this.settings.setCallback(n),this.settings.setKeyword(s),this.throttledSearchFetch||(this.throttledSearchFetch=c(this.settings.getSettings().throttleTimeMs,i)),this.throttledSearchFetch(this.apiHostname,this.sitekey,"search",this.settings.getSettings(),n)},this.suggestions=function(t,e){if(!t||!e||!a.isFunction(e))throw"Illegal suggestions parameters. Should be (prefix, callbackFunction)";this.settings.setSuggestionsPrefix(t),this.throttledSuggestionsFetch||(this.throttledSuggestionsFetch=c(this.settings.getSettings().throttleTimeMs,i)),this.throttledSuggestionsFetch(this.apiHostname,this.sitekey,"suggest",this.settings.getSettings(),e)},this.autocomplete=function(t,e,s){if(!(t&&e&&s&&a.isFunction(s)))throw"Illegal autocomplete parameters. Should be (field, prefix, callbackFunction)";this.settings.setAutocompleteParams(t,e),this.throttledAutocompleteFetch||(this.throttledAutocompleteFetch=c(this.settings.getSettings().throttleTimeMs,i)),this.throttledAutocompleteFetch(this.apiHostname,this.sitekey,"autocomplete",this.settings.getSettings(),s)},this.fetchCustomApi=function(t,e,s){var n=Object.assign({},this.settings.getSettings());n.facetFields=n.facetFields.filter((e=>t===e)),i(this.apiHostname,this.sitekey,"search",n,s,null,e)},this.fetchRangeFacets=function(t,e,s){var n=Object.assign({},this.settings.getSettings());n.rangeFacets||(n.rangeFacets=[]),n.rangeFacets.push({field:t.field,ranges:t.ranges}),i(this.apiHostname,this.sitekey,"search",n,s,null,e)},this.getDocument=function(t){return n.getDocument(this.apiHostname,this.sitekey,this.privatekey,t)},this.saveDocument=function(t){return n.saveDocument(this.apiHostname,this.sitekey,this.privatekey,t)},this.saveDocumentsBatch=function(t){if(!t||!t.documents||!Array.isArray(t.documents))throw"Please provide an array of documents: {documents: []}";return n.saveDocumentsBatch(this.apiHostname,this.sitekey,this.privatekey,t)},this.deleteDocument=function(t){return n.deleteDocument(this.apiHostname,this.sitekey,this.privatekey,t)},this.deleteDocumentsBatch=function(t){if(!t||!t.documents||!Array.isArray(t.documents))throw"Please provide an array of document ids: {documents: []}";return n.deleteDocumentsBatch(this.apiHostname,this.sitekey,this.privatekey,t)},this.setApiHostname=function(t){this.apiHostname=t},this.getSettings=function(){return this.settings.getSettings()},this.setLanguage=function(t){this.settings.setLanguage(t)},this.setCategoryFilters=function(t){this.settings.setCategoryFilters(t)},this.addCustomFieldFilter=function(t,e){this.settings.addCustomFieldFilter(t,e)},this.removeCustomFieldFilter=function(t,e){this.settings.removeCustomFieldFilter(t,e)},this.setPriceRangeFilter=function(t,e){this.settings.setPriceRangeFilter(t,e)},this.setDateFilter=function(t,e){this.settings.setDateFilter(t,e)},this.setJWT=function(t){this.settings.setJWT(t)},this.setUserToken=function(t){this.settings.setUserToken(t)},this.setPaging=function(t,e,s,i){this.settings.setPaging(t,e,s,i)},this.nextPage=function(){this.settings.nextPage()},this.previousPage=function(){this.settings.previousPage()},this.setSuggestionsSize=function(t){this.settings.setSuggestionsSize(t)},this.setAutocompleteSize=function(t){this.settings.setAutocompleteSize(t)},this.addFacetField=function(t){this.settings.addFacetField(t)},this.addHierarchicalFacetSetting=function(t){this.settings.addHierarchicalFacetSetting(t)},this.addRangeFacet=function(t,e){this.settings.addRangeFacet(t,e)},this.addStatsField=function(t){this.settings.addStatsField(t)},this.setNumberOfFacets=function(t){this.settings.setNumberOfFacets(t)},this.setResultType=function(t){this.settings.setResultType(t)},this.setPersonalizationEvents=function(t){this.settings.setPersonalizationEvents(t)},this.setFilterObject=function(t){this.settings.setFilterObject(t)},this.setShuffleAndLimitTo=function(t){this.settings.setShuffleAndLimitTo(t)},this.setFuzzyMatch=function(t){this.settings.setFuzzyMatch(t)},this.setPostfixWildcard=function(t){this.settings.setPostfixWildcard(t)},this.setCacheResponseTime=function(t){this.settings.setCacheResponseTime(t)},this.setCollectAnalytics=function(t){this.settings.setCollectAnalytics(t)},this.setAnalyticsTag=function(t){this.settings.setAnalyticsTag(t)},this.setThrottleTime=function(t){this.settings.setThrottleTime(t)},this.setStatsSessionId=function(t){this.sessionId=t},this.getStatsSessionId=function(){return this.sessionId},this.enableLogicalOperators=function(t){this.settings.enableLogicalOperators(t)},this.setSearchOperator=function(t){this.settings.setSearchOperator(t)},this.sendStatsEvent=function(t,e,s){if("search"===t)s={action:"search",session:this.sessionId,keyword:e,numberOfResults:s.numberOfResults,analyticsTag:this.getSettings().analyticsTag},r(this.apiHostname,this.sitekey,s);else{if("click"!==t)throw"Illegal sendStatsEvent type parameters. Should be search or click)";s={action:"click",session:this.sessionId,keyword:e,docid:s.documentId,position:s.position,analyticsTag:this.getSettings().analyticsTag},r(this.apiHostname,this.sitekey,s)}},this.searchResultClicked=function(t,e){this.sendStatsEvent("click",this.settings.getSettings().keyword,{documentId:t,position:e})}}},9610:(t,e,s)=>{"use strict";s(4301);const i=s(5159),n=s(2702).Promise,r=function(t,e){return{Authorization:"Basic "+i.base64(t+":"+e),"Content-Type":"application/json"}};t.exports={getDocument:function(t,e,s,i){return new n(((n,o)=>{fetch("https://"+t+"/v2/indices/"+e+"/documents/"+i,{method:"GET",headers:r(e,s)}).then((t=>{200==t.status?n(t.json()):o({status:t.status,text:t.statusText})})).catch((t=>{o({status:400,text:t})}))}))},saveDocument:function(t,e,s,i){const o=i.id||i.url;return new n(((n,a)=>{fetch("https://"+t+"/v2/indices/"+e+"/documents/",{method:o?"PUT":"POST",headers:r(e,s),body:JSON.stringify(i)}).then((t=>{202==t.status?n({status:t.status,text:t.statusText}):a({status:t.status,text:t.statusText})})).catch((t=>{a({status:400,text:t})}))}))},saveDocumentsBatch:function(t,e,s,i){return new n(((n,o)=>{fetch("https://"+t+"/v2/indices/"+e+"/documents:batch",{method:"PUT",headers:r(e,s),body:JSON.stringify(i)}).then((t=>{202==t.status?n({status:t.status,text:t.statusText}):o({status:t.status,text:t.statusText})})).catch((t=>{o({status:400,text:t})}))}))},deleteDocument:function(t,e,s,i){return new n(((n,o)=>{fetch("https://"+t+"/v2/indices/"+e+"/documents/"+i,{method:"DELETE",headers:r(e,s)}).then((t=>{202==t.status?n({status:t.status,text:t.statusText}):o({status:t.status,text:t.statusText})})).catch((t=>{o({status:400,text:t})}))}))},deleteDocumentsBatch:function(t,e,s,i){return new n(((n,o)=>{fetch("https://"+t+"/v2/indices/"+e+"/documents:batch",{method:"DELETE",headers:r(e,s),body:JSON.stringify(i)}).then((t=>{202==t.status?n({status:t.status,text:t.statusText}):o({status:t.status,text:t.statusText})})).catch((t=>{o({status:400,text:t})}))}))}}},7585:t=>{"use strict";t.exports=function(){this.settings={keyword:"*",callback:null,throttleTimeMs:200,fuzzy:"auto",paging:{page:1,pageSize:10,sortBy:"relevance",sortOrder:"desc"},customFieldFilters:[],userToken:null,suggestionsSize:10,facetFields:[],autocomplete:{size:10},searchOperator:null,enableLogicalOperators:!1,cacheResponseTime:null},this.getSettings=function(){return this.settings},this.setKeyword=function(t){this.settings.keyword=t||"*"},this.setCallback=function(t){this.settings.callback=t},this.setThrottleTime=function(t){this.settings.throttleTimeMs=t},this.setSuggestionsPrefix=function(t){this.settings.suggestionsPrefix=t},this.setSuggestionsSize=function(t){this.settings.suggestionsSize=t},this.setAutocompleteSize=function(t){this.settings.autocomplete.size=t},this.setAutocompleteParams=function(t,e){this.settings.autocomplete.field=t,this.settings.autocomplete.prefix=e},this.setLanguage=function(t){if(t&&2!==t.length)throw'use 2-char language code (e.g. "en")';this.settings.lang=t},this.setFuzzyMatch=function(t){if(!0!==t&&!1!==t&&"auto"!==t&&"retry"!==t)throw"fuzzy matching can be true, false, 'auto', or 'retry'";this.settings.fuzzy=t},this.enableLogicalOperators=function(t){this.settings.enableLogicalOperators=t},this.setCacheResponseTime=function(t){this.settings.cacheResponseTime=t},this.setPostfixWildcard=function(t){this.settings.postfixWildcard=t},this.setCollectAnalytics=function(t){this.settings.collectAnalytics=t},this.setAnalyticsTag=function(t){this.settings.analyticsTag=t},this.setCategoryFilters=function(t){this.settings.categories=t},this.setFilterObject=function(t){this.settings.filterObject=t},this.setPriceRangeFilter=function(t,e){this.settings.priceFromCents=t,this.settings.priceToCents=e},this.addCustomFieldFilter=function(t,e){var s=encodeURIComponent(t+"="+e);-1===this.settings.customFieldFilters.indexOf(s)&&this.settings.customFieldFilters.push(s)},this.removeCustomFieldFilter=function(t,e){var s=!1,i=encodeURIComponent(t+"="+e);e||(s=!0,i=encodeURIComponent(t+"="));for(var n=this.settings.customFieldFilters.length;n>0;n--){var r=this.settings.customFieldFilters[n-1];(s&&0===r.indexOf(i)||r===i)&&this.settings.customFieldFilters.splice(n-1,1)}},this.setDateFilter=function(t,e){this.settings.dateFrom=t,this.settings.dateTo=e},this.setKeyword=function(t){this.settings.keyword=t||"*"},this.setJWT=function(t){this.settings.jwt=t},this.setUserToken=function(t){this.settings.userToken=t},this.setPersonalizationEvents=function(t){this.settings.personalizationEvents=t},this.setResultType=function(t){this.settings.resultType=t},this.addFacetField=function(t){-1===this.settings.facetFields.indexOf(t)&&this.settings.facetFields.push(t)},this.addHierarchicalFacetSetting=function(t){this.settings.hierarchicalFacetSetting=JSON.stringify(t)},this.addRangeFacet=function(t,e){this.settings.rangeFacets||(this.settings.rangeFacets=[]),this.settings.rangeFacets.push({field:t,ranges:e})},this.addStatsField=function(t){this.settings.statsFields||(this.settings.statsFields=[]),-1===this.settings.statsFields.indexOf(t)&&this.settings.statsFields.push(t)},this.setNumberOfFacets=function(t){this.settings.numFacets=t},this.setPaging=function(t,e,s,i){if(t<1)throw"page must be 1 or bigger";if(e<1||e>300)throw"pageSize must be 1-300";if("asc"!==i&&"desc"!==i)throw"sortOrder must be asc or desc";this.settings.paging.page=t,this.settings.paging.pageSize=e,this.settings.paging.sortBy=s,this.settings.paging.sortOrder=i},this.setShuffleAndLimitTo=function(t){this.settings.shuffleAndLimitTo=t},this.nextPage=function(){this.settings.paging.page=this.settings.paging.page+1},this.previousPage=function(){this.settings.paging.page>0&&(this.settings.paging.page=this.settings.paging.page-1)},this.setSearchOperator=function(t){if("and"!==t&&"or"!==t)throw"operator must be 'and' || 'or'";this.settings.searchOperator=t}}},3716:(t,e,s)=>{"use strict";s(2702).polyfill(),s(4301),t.exports=function(t,e,s){"undefined"!=typeof window&&window.navigator&&window.navigator.sendBeacon?navigator.sendBeacon("https://"+t+"/v1/stats/"+e+"/",JSON.stringify(s)):fetch("https://"+t+"/v1/stats/"+e+"/",{method:"POST",headers:{"Content-Type":"text/plain"},body:JSON.stringify(s)})}},4508:t=>{t.exports=function(t,e){var s,i=0;function n(){s&&clearTimeout(s)}return function(){var r=this,o=Date.now()-i,a=arguments;function c(){i=Date.now(),e.apply(r,a)}n(),o>t?c():s=setTimeout(c,t-o)}}},5159:(t,e,s)=>{t.exports={isFunction:function(t){return t&&"[object Function]"==={}.toString.call(t)},base64:function(t){return s.g.window={},window&&window.btoa?window.btoa(t):Buffer?Buffer.from(t).toString("base64"):void 0}}},9581:(t,e,s)=>{"use strict";s.d(e,{A:()=>i});var i=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return e.querySelector("[data-id=".concat(t,"]"))}},2702:function(t,e,s){t.exports=function(){"use strict";function t(t){return"function"==typeof t}var e=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},i=0,n=void 0,r=void 0,o=function(t,e){d[i]=t,d[i+1]=e,2===(i+=2)&&(r?r(g):b())};var a="undefined"!=typeof window?window:void 0,c=a||{},u=c.MutationObserver||c.WebKitMutationObserver,h="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),l="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function f(){var t=setTimeout;return function(){return t(g,1)}}var d=new Array(1e3);function g(){for(var t=0;t<i;t+=2)(0,d[t])(d[t+1]),d[t]=void 0,d[t+1]=void 0;i=0}var p,y,m,v,b=void 0;function w(t,e){var s=this,i=new this.constructor(S);void 0===i[F]&&R(i);var n=s._state;if(n){var r=arguments[n-1];o((function(){return j(n,i,r,s._result)}))}else P(s,i,t,e);return i}function T(t){if(t&&"object"==typeof t&&t.constructor===this)return t;var e=new this(S);return x(e,t),e}b=h?function(){return process.nextTick(g)}:u?(y=0,m=new u(g),v=document.createTextNode(""),m.observe(v,{characterData:!0}),function(){v.data=y=++y%2}):l?((p=new MessageChannel).port1.onmessage=g,function(){return p.port2.postMessage(0)}):void 0===a?function(){try{var t=Function("return this")().require("vertx");return void 0!==(n=t.runOnLoop||t.runOnContext)?function(){n(g)}:f()}catch(t){return f()}}():f();var F=Math.random().toString(36).substring(2);function S(){}var A=void 0;function _(e,s,i){s.constructor===e.constructor&&i===w&&s.constructor.resolve===T?function(t,e){1===e._state?E(t,e._result):2===e._state?k(t,e._result):P(e,void 0,(function(e){return x(t,e)}),(function(e){return k(t,e)}))}(e,s):void 0===i?E(e,s):t(i)?function(t,e,s){o((function(t){var i=!1,n=function(t,e,s,i){try{t.call(e,s,i)}catch(t){return t}}(s,e,(function(s){i||(i=!0,e!==s?x(t,s):E(t,s))}),(function(e){i||(i=!0,k(t,e))}),t._label);!i&&n&&(i=!0,k(t,n))}),t)}(e,s,i):E(e,s)}function x(t,e){if(t===e)k(t,new TypeError("You cannot resolve a promise with itself"));else if(n=typeof(i=e),null===i||"object"!==n&&"function"!==n)E(t,e);else{var s=void 0;try{s=e.then}catch(e){return void k(t,e)}_(t,e,s)}var i,n}function O(t){t._onerror&&t._onerror(t._result),C(t)}function E(t,e){t._state===A&&(t._result=e,t._state=1,0!==t._subscribers.length&&o(C,t))}function k(t,e){t._state===A&&(t._state=2,t._result=e,o(O,t))}function P(t,e,s,i){var n=t._subscribers,r=n.length;t._onerror=null,n[r]=e,n[r+1]=s,n[r+2]=i,0===r&&t._state&&o(C,t)}function C(t){var e=t._subscribers,s=t._state;if(0!==e.length){for(var i=void 0,n=void 0,r=t._result,o=0;o<e.length;o+=3)i=e[o],n=e[o+s],i?j(s,i,n,r):n(r);t._subscribers.length=0}}function j(e,s,i,n){var r=t(i),o=void 0,a=void 0,c=!0;if(r){try{o=i(n)}catch(t){c=!1,a=t}if(s===o)return void k(s,new TypeError("A promises callback cannot return that same promise."))}else o=n;s._state!==A||(r&&c?x(s,o):!1===c?k(s,a):1===e?E(s,o):2===e&&k(s,o))}var B=0;function R(t){t[F]=B++,t._state=void 0,t._result=void 0,t._subscribers=[]}var z=function(){function t(t,s){this._instanceConstructor=t,this.promise=new t(S),this.promise[F]||R(this.promise),e(s)?(this.length=s.length,this._remaining=s.length,this._result=new Array(this.length),0===this.length?E(this.promise,this._result):(this.length=this.length||0,this._enumerate(s),0===this._remaining&&E(this.promise,this._result))):k(this.promise,new Error("Array Methods must be provided an Array"))}return t.prototype._enumerate=function(t){for(var e=0;this._state===A&&e<t.length;e++)this._eachEntry(t[e],e)},t.prototype._eachEntry=function(t,e){var s=this._instanceConstructor,i=s.resolve;if(i===T){var n=void 0,r=void 0,o=!1;try{n=t.then}catch(t){o=!0,r=t}if(n===w&&t._state!==A)this._settledAt(t._state,e,t._result);else if("function"!=typeof n)this._remaining--,this._result[e]=t;else if(s===D){var a=new s(S);o?k(a,r):_(a,t,n),this._willSettleAt(a,e)}else this._willSettleAt(new s((function(e){return e(t)})),e)}else this._willSettleAt(i(t),e)},t.prototype._settledAt=function(t,e,s){var i=this.promise;i._state===A&&(this._remaining--,2===t?k(i,s):this._result[e]=s),0===this._remaining&&E(i,this._result)},t.prototype._willSettleAt=function(t,e){var s=this;P(t,void 0,(function(t){return s._settledAt(1,e,t)}),(function(t){return s._settledAt(2,e,t)}))},t}();var D=function(){function e(t){this[F]=B++,this._result=this._state=void 0,this._subscribers=[],S!==t&&("function"!=typeof t&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof e?function(t,e){try{e((function(e){x(t,e)}),(function(e){k(t,e)}))}catch(e){k(t,e)}}(this,t):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return e.prototype.catch=function(t){return this.then(null,t)},e.prototype.finally=function(e){var s=this,i=s.constructor;return t(e)?s.then((function(t){return i.resolve(e()).then((function(){return t}))}),(function(t){return i.resolve(e()).then((function(){throw t}))})):s.then(e,e)},e}();return D.prototype.then=w,D.all=function(t){return new z(this,t).promise},D.race=function(t){var s=this;return e(t)?new s((function(e,i){for(var n=t.length,r=0;r<n;r++)s.resolve(t[r]).then(e,i)})):new s((function(t,e){return e(new TypeError("You must pass an array to race."))}))},D.resolve=T,D.reject=function(t){var e=new this(S);return k(e,t),e},D._setScheduler=function(t){r=t},D._setAsap=function(t){o=t},D._asap=o,D.polyfill=function(){var t=void 0;if(void 0!==s.g)t=s.g;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var e=t.Promise;if(e){var i=null;try{i=Object.prototype.toString.call(e.resolve())}catch(t){}if("[object Promise]"===i&&!e.cast)return}t.Promise=D},D.Promise=D,D}()},4301:(t,e,s)=>{s(7147),t.exports=self.fetch.bind(self)},7147:(t,e,s)=>{"use strict";s.r(e),s.d(e,{Headers:()=>g,Request:()=>T,Response:()=>S,DOMException:()=>_,fetch:()=>x});var i="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==i&&i,n="URLSearchParams"in i,r="Symbol"in i&&"iterator"in Symbol,o="FileReader"in i&&"Blob"in i&&function(){try{return new Blob,!0}catch(t){return!1}}(),a="FormData"in i,c="ArrayBuffer"in i;if(c)var u=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],h=ArrayBuffer.isView||function(t){return t&&u.indexOf(Object.prototype.toString.call(t))>-1};function l(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(t)||""===t)throw new TypeError('Invalid character in header field name: "'+t+'"');return t.toLowerCase()}function f(t){return"string"!=typeof t&&(t=String(t)),t}function d(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return r&&(e[Symbol.iterator]=function(){return e}),e}function g(t){this.map={},t instanceof g?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function p(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function y(t){return new Promise((function(e,s){t.onload=function(){e(t.result)},t.onerror=function(){s(t.error)}}))}function m(t){var e=new FileReader,s=y(e);return e.readAsArrayBuffer(t),s}function v(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function b(){return this.bodyUsed=!1,this._initBody=function(t){var e;this.bodyUsed=this.bodyUsed,this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:o&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:a&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:n&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():c&&o&&(e=t)&&DataView.prototype.isPrototypeOf(e)?(this._bodyArrayBuffer=v(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):c&&(ArrayBuffer.prototype.isPrototypeOf(t)||h(t))?this._bodyArrayBuffer=v(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o&&(this.blob=function(){var t=p(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?p(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer)):this.blob().then(m)}),this.text=function(){var t,e,s,i=p(this);if(i)return i;if(this._bodyBlob)return t=this._bodyBlob,s=y(e=new FileReader),e.readAsText(t),s;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),s=new Array(e.length),i=0;i<e.length;i++)s[i]=String.fromCharCode(e[i]);return s.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},a&&(this.formData=function(){return this.text().then(F)}),this.json=function(){return this.text().then(JSON.parse)},this}g.prototype.append=function(t,e){t=l(t),e=f(e);var s=this.map[t];this.map[t]=s?s+", "+e:e},g.prototype.delete=function(t){delete this.map[l(t)]},g.prototype.get=function(t){return t=l(t),this.has(t)?this.map[t]:null},g.prototype.has=function(t){return this.map.hasOwnProperty(l(t))},g.prototype.set=function(t,e){this.map[l(t)]=f(e)},g.prototype.forEach=function(t,e){for(var s in this.map)this.map.hasOwnProperty(s)&&t.call(e,this.map[s],s,this)},g.prototype.keys=function(){var t=[];return this.forEach((function(e,s){t.push(s)})),d(t)},g.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),d(t)},g.prototype.entries=function(){var t=[];return this.forEach((function(e,s){t.push([s,e])})),d(t)},r&&(g.prototype[Symbol.iterator]=g.prototype.entries);var w=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function T(t,e){if(!(this instanceof T))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var s,i,n=(e=e||{}).body;if(t instanceof T){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new g(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,n||null==t._bodyInit||(n=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new g(e.headers)),this.method=(i=(s=e.method||this.method||"GET").toUpperCase(),w.indexOf(i)>-1?i:s),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(n),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==e.cache&&"no-cache"!==e.cache)){var r=/([?&])_=[^&]*/;r.test(this.url)?this.url=this.url.replace(r,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}function F(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var s=t.split("="),i=s.shift().replace(/\+/g," "),n=s.join("=").replace(/\+/g," ");e.append(decodeURIComponent(i),decodeURIComponent(n))}})),e}function S(t,e){if(!(this instanceof S))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===e.statusText?"":""+e.statusText,this.headers=new g(e.headers),this.url=e.url||"",this._initBody(t)}T.prototype.clone=function(){return new T(this,{body:this._bodyInit})},b.call(T.prototype),b.call(S.prototype),S.prototype.clone=function(){return new S(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new g(this.headers),url:this.url})},S.error=function(){var t=new S(null,{status:0,statusText:""});return t.type="error",t};var A=[301,302,303,307,308];S.redirect=function(t,e){if(-1===A.indexOf(e))throw new RangeError("Invalid status code");return new S(null,{status:e,headers:{location:t}})};var _=i.DOMException;try{new _}catch(t){(_=function(t,e){this.message=t,this.name=e;var s=Error(t);this.stack=s.stack}).prototype=Object.create(Error.prototype),_.prototype.constructor=_}function x(t,e){return new Promise((function(s,n){var r=new T(t,e);if(r.signal&&r.signal.aborted)return n(new _("Aborted","AbortError"));var a=new XMLHttpRequest;function u(){a.abort()}a.onload=function(){var t,e,i={status:a.status,statusText:a.statusText,headers:(t=a.getAllResponseHeaders()||"",e=new g,t.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(t){return 0===t.indexOf("\n")?t.substr(1,t.length):t})).forEach((function(t){var s=t.split(":"),i=s.shift().trim();if(i){var n=s.join(":").trim();e.append(i,n)}})),e)};i.url="responseURL"in a?a.responseURL:i.headers.get("X-Request-URL");var n="response"in a?a.response:a.responseText;setTimeout((function(){s(new S(n,i))}),0)},a.onerror=function(){setTimeout((function(){n(new TypeError("Network request failed"))}),0)},a.ontimeout=function(){setTimeout((function(){n(new TypeError("Network request failed"))}),0)},a.onabort=function(){setTimeout((function(){n(new _("Aborted","AbortError"))}),0)},a.open(r.method,function(t){try{return""===t&&i.location.href?i.location.href:t}catch(e){return t}}(r.url),!0),"include"===r.credentials?a.withCredentials=!0:"omit"===r.credentials&&(a.withCredentials=!1),"responseType"in a&&(o?a.responseType="blob":c&&r.headers.get("Content-Type")&&-1!==r.headers.get("Content-Type").indexOf("application/octet-stream")&&(a.responseType="arraybuffer")),!e||"object"!=typeof e.headers||e.headers instanceof g?r.headers.forEach((function(t,e){a.setRequestHeader(e,t)})):Object.getOwnPropertyNames(e.headers).forEach((function(t){a.setRequestHeader(t,f(e.headers[t]))})),r.signal&&(r.signal.addEventListener("abort",u),a.onreadystatechange=function(){4===a.readyState&&r.signal.removeEventListener("abort",u)}),a.send(void 0===r._bodyInit?null:r._bodyInit)}))}x.polyfill=!0,i.fetch||(i.fetch=x,i.Headers=g,i.Request=T,i.Response=S)}},e={};function s(i){var n=e[i];if(void 0!==n)return n.exports;var r=e[i]={exports:{}};return t[i].call(r.exports,r,r.exports,s),r.exports}s.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return s.d(e,{a:e}),e},s.d=(t,e)=>{for(var i in e)s.o(e,i)&&!s.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),s.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),s.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};return(()=>{"use strict";s.d(i,{default:()=>r});var t=s(9581),e=s(727),n=s.n(e);const r=function(){var e=document.body.dataset.addSearchApiKey;if(!e)return console.log("No AddSearch API key provided, skipping search suggestions."),[];var s=new(n())(e);return[(0,t.A)("meganav-search-input"),(0,t.A)("meganav-mobile-search-input")].filter((function(t){return t})).map((function(e){var i=e.parentNode,n=(0,t.A)("meganav-search-autocomplete-container",i),r=(0,t.A)("meganav-search-autocomplete-list",i),o=(0,t.A)("meganav-search-input-clear",i);return function(t){var e=t.input,s=t.container,i=t.listContainer,n=t.clear,r=t.client;r.setAnalyticsTag("Meganav autocomplete"),r.setThrottleTime(400);var o,a=function(){s.classList.add("hidden"),i.innerHTML=""},c=function(t){(t||"").length>0&&n?n.classList.remove("invisible"):n&&n.classList.add("invisible")},u=function(t,e){return t.replace(e.toLowerCase(),'<span class="font-light">'.concat(e,"</span>"))},h=function(t){return window.location="/search?q=".concat(t)},l=function(t){var e=i.querySelector('[data-suggestion-index="'.concat(t+1,'"]'));e&&e.focus()},f=function(t){var e=t-1,s=i.querySelector('[data-suggestion-index="'.concat(e,'"]'));s&&s.focus()},d=function(t){var n=t.target.value;"ArrowDown"!==t.key?n?r.suggestions(n,function(t){return function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{suggestions:[]};if(c(t),0!==n.suggestions.length){var r=n.suggestions.map((function(s,i){var n=document.createElement("li"),r=document.createElement("button");return r.type="button",r.classList.add("ui-text-menu2","font-medium","p-8","w-full","text-left","rounded","hover:text-gui-hover","focus:outline-gui-focus","hover:bg-light-grey"),r.innerHTML=u(s.value,t),r.dataset.suggestionIndex=i,r.addEventListener("click",(function(){h(s.value)})),r.addEventListener("keydown",(function(t){var n=t.key;"ArrowDown"===n?l(i):"ArrowUp"===n&&i-1<0?e.focus():"ArrowUp"===n&&i-1>=0?f(i):"Enter"!==n&&"Space"!==n||h(s.value)})),n.appendChild(r),n}));i.innerHTML="",r.forEach((function(t){return i.appendChild(t)})),s.classList.remove("hidden")}else a()}}(n)):a():l(0)};return n&&(o=function(){e.value="",n.classList.add("invisible"),a()},n.addEventListener("click",o)),e.addEventListener("keyup",d),{teardown:function(){e.removeEventListener("keyup",d),n&&n.removeEventListener("click",o)},clear:function(){e.value="",a()}}}({input:e,container:n,listContainer:r,client:s,clear:o})}))}})(),i.default})()}));
@@ -0,0 +1,6 @@
1
+ <div
2
+ class="absolute w-full mt-8 z-10 hidden shadow-container rounded-lg bg-white border border-mid-grey"
3
+ data-id="meganav-search-autocomplete-container"
4
+ >
5
+ <ol class="m-16" data-id="meganav-search-autocomplete-list"></ol>
6
+ </div>
@@ -0,0 +1,6 @@
1
+ module AblyUi
2
+ module Core
3
+ class MeganavSearchAutocomplete < ViewComponent::Base
4
+ end
5
+ end
6
+ end
@@ -4,7 +4,9 @@
4
4
  <form class="flex items-start" action={absUrl("/search")} method="get">
5
5
  <div class="relative w-full">
6
6
  <%= render(AblyUi::Core::Icon.new(name: "icon-gui-search", size: "1.5rem", color: "text-cool-black", additional_css:"absolute top-12 left-16")) %>
7
- <input type="search" name="q" class="ui-input pl-48 h-48" placeholder="Search" />
7
+ <input type="search" name="q" class="ui-input pl-48 h-48" placeholder="Search" autocomplete="off" data-id="meganav-search-input" />
8
+
9
+ <%= render(AblyUi::Core::MeganavSearchAutocomplete.new) %>
8
10
  </div>
9
11
 
10
12
  <button type="submit" class="ui-btn-secondary ml-8 sm:ml-16 md:ml-24 xl:ml-32">
@@ -1 +1 @@
1
- !function(e,o){"object"==typeof exports&&"object"==typeof module?module.exports=o():"function"==typeof define&&define.amd?define([],o):"object"==typeof exports?exports.AblyUi=o():(e.AblyUi=e.AblyUi||{},e.AblyUi.Core=e.AblyUi.Core||{},e.AblyUi.Core.MeganavSearchSuggestions=o())}(this,(function(){return{}.default}));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.AblyUi=t():(e.AblyUi=e.AblyUi||{},e.AblyUi.Core=e.AblyUi.Core||{},e.AblyUi.Core.MeganavSearchSuggestions=t())}(this,(function(){return(()=>{"use strict";var e={9581:(e,t,n)=>{n.d(t,{A:()=>r});var r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return t.querySelector("[data-id=".concat(e,"]"))}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var r={};return(()=>{n.d(r,{default:()=>s});var e=n(9581),t=function(e){return new DOMMatrix(window.getComputedStyle(e).transform).e},o=function(e,t){return e.style.transform="translateX(".concat(t,"px)")},i=function(e,t){return e>=t},u=function(e,t,n,r){return Math.abs(e-n+r)>t},a=function(e,t){var n;return(null===(n=e.changedTouches[0])||void 0===n?void 0:n.clientX)-t},c=function(e){return Math.abs(e)<5};const s=function(){var n,r=(0,e.A)("meganav-mobile-search-input"),s=(0,e.A)("meganav-mobile-search-suggestions"),d=s.querySelector("ul"),l=d.querySelectorAll("li"),v=Array.from(l).map((function(e){return e.getBoundingClientRect().width})).reduce((function(e,t){return e+t}),0),f=function(e){var t;n=null===(t=e.touches[0])||void 0===t?void 0:t.clientX},h=function(e){var r=a(e,n);c(r)||(r>0?function(e,n){var r=t(d),u=Math.round(r+e);i(u,24)||o(d,u)}(r):function(e,n){var r=d.getBoundingClientRect().width,i=t(d),a=Math.round(i+e);u(a,v,r,96)||o(d,a)}(r))},m=function(e){var r=a(e,n);c(r)||(r>0?function(e,n){var r=t(d),u=Math.round(r+e);i(u,24)&&(u=0),o(d,u)}(r):function(e,n){var r=d.getBoundingClientRect().width,i=t(d),a=Math.round(i+e);u(a,v,r,48)&&(a=-(v-r+48)),o(d,a)}(r))},p=function(){s.classList.add("max-h-96")},y=function(e){e.relatedTarget!==s.querySelectorAll("a")[0]&&s.classList.remove("max-h-96")};return r.addEventListener("focus",p),r.addEventListener("blur",y),s.addEventListener("touchstart",f),s.addEventListener("touchmove",h),s.addEventListener("touchend",m),{teardown:function(){r.removeEventListener("focus",p),r.removeEventListener("blur",y),s.removeEventListener("touchstart",f),s.removeEventListener("touchmove",h),s.removeEventListener("touchend",m)},clear:function(){s.classList.remove("max-h-96"),d.style.transform="translateX(0px)"}}}})(),r.default})()}));
@@ -1,18 +1,18 @@
1
1
  <p class="ui-text-overline2 text-cool-black py-12">Popular pages</p>
2
2
 
3
- <div class="flex justify-between items-center overflow-x-scroll">
3
+ <div class="flex justify-between items-center overflow-x-scroll md:overflow-auto">
4
4
  <ul class="flex">
5
5
  <li class="py-12 pr-8 flex-shrink-0">
6
- <%= link_to 'How does Ably work?', abs_url("/docs/how-ably-works"), class: "ui-text-p2 ui-link" %>
6
+ <%= link_to 'How does Ably work?', abs_url("/docs/how-ably-works"), class: "ui-text-p2 hover:text-gui-hover active:text-gui-active focus:text-gui-focus" %>
7
7
  </li>
8
8
  <li class="py-12 px-8 flex-shrink-0">
9
- <%= link_to 'Quickstart guide', abs_url("/docs/quick-start-guide"), class: "ui-text-p2 ui-link" %>
9
+ <%= link_to 'Quickstart guide', abs_url("/docs/quick-start-guide"), class: "ui-text-p2 hover:text-gui-hover active:text-gui-active focus:text-gui-focus" %>
10
10
  </li>
11
11
  <li class="py-12 px-8 flex-shrink-0">
12
- <%= link_to 'Publish/Subscribe Messaging', abs_url("/docs/core-features/pubsub"), class: "ui-text-p2 ui-link" %>
12
+ <%= link_to 'Publish/Subscribe Messaging', abs_url("/docs/core-features/pubsub"), class: "ui-text-p2 hover:text-gui-hover active:text-gui-active focus:text-gui-focus" %>
13
13
  </li>
14
14
  <li class="py-12 pl-8 flex-shrink-0">
15
- <%= link_to 'Platform', abs_url("/docs/how-ably-works"), class: "ui-text-p2 ui-link" %>
15
+ <%= link_to 'Platform', abs_url("/docs/how-ably-works"), class: "ui-text-p2 hover:text-gui-hover active:text-gui-active focus:text-gui-focus" %>
16
16
  </li>
17
17
  </ul>
18
18
 
@@ -1 +1 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define([,],e):"object"==typeof exports?exports.AblyUi=e(require("react"),require("react-dom")):(t.AblyUi=t.AblyUi||{},t.AblyUi.Core=e(t[void 0],t[void 0]))}(this,(function(t,e){return(()=>{var r={757:(t,e,r)=>{t.exports=r(666)},666:t=>{var e=function(t){"use strict";var e,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof v?e:v,i=Object.create(o.prototype),a=new A(n||[]);return i._invoke=function(t,e,r){var n=l;return function(o,i){if(n===h)throw new Error("Generator is already running");if(n===d){if("throw"===o)throw i;return k()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=P(a,r);if(c){if(c===y)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===l)throw n=d,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=h;var u=s(t,e,r);if("normal"===u.type){if(n=r.done?d:p,u.arg===y)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=d,r.method="throw",r.arg=u.arg)}}}(t,r,a),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var l="suspendedStart",p="suspendedYield",h="executing",d="completed",y={};function v(){}function b(){}function g(){}var w={};w[i]=function(){return this};var m=Object.getPrototypeOf,O=m&&m(m(N([])));O&&O!==r&&n.call(O,i)&&(w=O);var x=g.prototype=v.prototype=Object.create(w);function E(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function r(o,i,a,c){var u=s(t[o],t,i);if("throw"!==u.type){var f=u.arg,l=f.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(l).then((function(t){f.value=t,a(f)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var o;this._invoke=function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}}function P(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,P(t,r),"throw"===r.method))return y;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var o=s(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,y;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function N(t){if(t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}return{next:k}}function k(){return{value:e,done:!0}}return b.prototype=x.constructor=g,g.constructor=b,b.displayName=u(g,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,u(t,c,"GeneratorFunction")),t.prototype=Object.create(x),t},t.awrap=function(t){return{__await:t}},E(j.prototype),j.prototype[a]=function(){return this},t.AsyncIterator=j,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new j(f(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},E(x),u(x,c,"Generator"),x[i]=function(){return this},x.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=N,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return c.type="throw",c.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),f=n.call(a,"finallyLoc");if(u&&f){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!f)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:N(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}},281:e=>{"use strict";e.exports=t},645:t=>{"use strict";t.exports=e}},n={};function o(t){var e=n[t];if(void 0!==e)return e.exports;var i=n[t]={exports:{}};return r[t](i,i.exports,o),i.exports}o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var r in e)o.o(e,r)&&!o.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};return(()=>{"use strict";o.r(i),o.d(i,{attachStoreToWindow:()=>O,connectState:()=>E,createRemoteDataStore:()=>j,fetchBlogPosts:()=>T,fetchSessionData:()=>M,getRemoteDataStore:()=>x,loadSprites:()=>u,queryId:()=>f,queryIdAll:()=>s,reactRenderer:()=>c,reducerBlogPosts:()=>D,reducerSessionData:()=>F,renderComponent:()=>a,selectRecentBlogPosts:()=>I,selectSessionData:()=>W,toggleChatWidget:()=>d}),Array.prototype.flat||Object.defineProperty(Array.prototype,"flat",{configurable:!0,value:function t(){var e=isNaN(arguments[0])?1:Number(arguments[0]);return e?Array.prototype.reduce.call(this,(function(r,n){return Array.isArray(n)?r.push.apply(r,t.call(n,e-1)):r.push(n),r}),[]):Array.prototype.slice.call(this)},writable:!0}),Array.prototype.flatMap||Object.defineProperty(Array.prototype,"flatMap",{configurable:!0,value:function(t){return Array.prototype.map.apply(this,arguments).flat()},writable:!0});var t=o(281),e=o.n(t),r=o(645),n=o.n(r),a=function(t,r,o){return n().render(e().createElement(t,r),o)};function c(t){var r=document.querySelectorAll("[data-react]");Array.from(r).forEach((function(r){var o=r.getAttribute("data-react"),i=t[o];if(i){var a=r.getAttribute("data-react-props"),c=a&&JSON.parse(a||{});n().render(e().createElement(i,c),r),r.removeAttribute("data-react"),r.removeAttribute("data-react-props")}}))}const u=function(t){fetch(t).then((function(t){return t.text()})).then((function(t){var e=document.createElement("div");e.style.display="none",e.innerHTML=t,document.body.appendChild(e)})).catch((function(t){return console.error(t)}))};var f=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return e.querySelector("[data-id=".concat(t,"]"))},s=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return e.querySelectorAll("[data-id=".concat(t,"]"))};function l(t,e){t.disabled=!1,t.innerText=e}function p(t,e){t.disabled=!0,t.innerText=e}var h=30;function d(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.dataId,r=f(e),n=f("open-chat-widget",r),o=n.dataset.enabledLabel,i=n.dataset.disabledLabel;if(e&&r){var a,c=f("open-chat-widget",r),u=function t(e){var r,n,i=null===(r=window)||void 0===r||null===(n=r.HubSpotConversations)||void 0===n?void 0:n.widget,u=document.querySelector("#hubspot-messages-iframe-container");a=function(t){t.preventDefault(),i.open()},i&&u?(c.addEventListener("click",a),l(c,o)):--h&&setTimeout((function(){return t(100)}),e)};return p(c,i),u(0),function(){p(c,i),c.removeEventListener("click",a)}}}function y(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var v="function"==typeof Symbol&&Symbol.observable||"@@observable",b=function(){return Math.random().toString(36).substring(7).split("").join(".")},g={INIT:"@@redux/INIT"+b(),REPLACE:"@@redux/REPLACE"+b(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+b()}};function w(t){if("object"!=typeof t||null===t)return!1;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function m(t,e,r){var n;if("function"==typeof e&&"function"==typeof r||"function"==typeof r&&"function"==typeof arguments[3])throw new Error(y(0));if("function"==typeof e&&void 0===r&&(r=e,e=void 0),void 0!==r){if("function"!=typeof r)throw new Error(y(1));return r(m)(t,e)}if("function"!=typeof t)throw new Error(y(2));var o=t,i=e,a=[],c=a,u=!1;function f(){c===a&&(c=a.slice())}function s(){if(u)throw new Error(y(3));return i}function l(t){if("function"!=typeof t)throw new Error(y(4));if(u)throw new Error(y(5));var e=!0;return f(),c.push(t),function(){if(e){if(u)throw new Error(y(6));e=!1,f();var r=c.indexOf(t);c.splice(r,1),a=null}}}function p(t){if(!w(t))throw new Error(y(7));if(void 0===t.type)throw new Error(y(8));if(u)throw new Error(y(9));try{u=!0,i=o(i,t)}finally{u=!1}for(var e=a=c,r=0;r<e.length;r++)(0,e[r])();return t}function h(t){if("function"!=typeof t)throw new Error(y(10));o=t,p({type:g.REPLACE})}function d(){var t,e=l;return(t={subscribe:function(t){if("object"!=typeof t||null===t)throw new Error(y(11));function r(){t.next&&t.next(s())}return r(),{unsubscribe:e(r)}}})[v]=function(){return this},t}return p({type:g.INIT}),(n={dispatch:p,subscribe:l,getState:s,replaceReducer:h})[v]=d,n}var O=function(t){window.AblyUi=window.AblyUi||{},window.AblyUi.RemoteDataStore=t},x=function(){if(!window.AblyUi.RemoteDataStore)throw new Error("Remote store was called before one was created");return window.AblyUi.RemoteDataStore},E=function(t,e){var r=x(),n=t(r);r.subscribe((function(){var o=t(r);o!==n&&(n=o,e(o))}))},j=function(t){return m(function(t){for(var e=Object.keys(t),r={},n=0;n<e.length;n++){var o=e[n];"function"==typeof t[o]&&(r[o]=t[o])}var i,a=Object.keys(r);try{!function(t){Object.keys(t).forEach((function(e){var r=t[e];if(void 0===r(void 0,{type:g.INIT}))throw new Error(y(12));if(void 0===r(void 0,{type:g.PROBE_UNKNOWN_ACTION()}))throw new Error(y(13))}))}(r)}catch(t){i=t}return function(t,e){if(void 0===t&&(t={}),i)throw i;for(var n=!1,o={},c=0;c<a.length;c++){var u=a[c],f=r[u],s=t[u],l=f(s,e);if(void 0===l)throw e&&e.type,new Error(y(14));o[u]=l,n=n||l!==s}return(n=n||a.length!==Object.keys(t).length)?o:t}}(t))},P=o(757),S=o.n(P),L=function(t){return t&&t.includes("application/json")};function A(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function N(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?A(Object(r),!0).forEach((function(e){k(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):A(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function k(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function _(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}var T=function(){var t,e=(t=S().mark((function t(e,r){var n,o;return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,r){t.next=4;break}return console.warn('Skipping fetching blog posts, invalid blogUrl: "'.concat(r,'"')),t.abrupt("return");case 4:return t.next=6,fetch(r);case 6:if(n=t.sent,!L(n.headers.get("content-type"))){t.next=14;break}return t.next=10,n.json();case 10:o=t.sent,e.dispatch({type:"blog/loaded",payload:o}),t.next=15;break;case 14:throw new Error("Blog posts url is not serving json");case 15:t.next=20;break;case 17:t.prev=17,t.t0=t.catch(0),console.warn("Could not fetch blog posts due to error:",t.t0);case 20:case"end":return t.stop()}}),t,null,[[0,17]])})),function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){_(i,n,o,a,c,"next",t)}function c(t){_(i,n,o,a,c,"throw",t)}a(void 0)}))});return function(t,r){return e.apply(this,arguments)}}(),R={recent:null},D=k({},"blogPosts",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:R,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"blog/loaded":return N(N({},t),{},{recent:e.payload});default:return t}})),I=function(t){var e;return null===(e=t.getState().blogPosts)||void 0===e?void 0:e.recent};function U(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function C(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?U(Object(r),!0).forEach((function(e){q(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):U(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function q(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function G(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}var M=function(){var t,e=(t=S().mark((function t(e,r){var n,o,i;return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.dispatch({type:"session/loaded",payload:t})},t.prev=1,r){t.next=6;break}return console.warn('Skipping fetching session, invalid sessionUrl: "'.concat(r,'"')),n(),t.abrupt("return");case 6:return t.next=8,fetch(r,{cache:"no-cache"});case 8:if(o=t.sent,L(o.headers.get("content-type"))){t.next=12;break}throw new Error("Session endpoint is not serving json");case 12:return t.next=14,o.json();case 14:"not-found"===(i=t.sent).error?n():n(i),t.next=22;break;case 18:t.prev=18,t.t0=t.catch(1),n(),console.warn("Could not fetch session data due to error:",t.t0);case 22:case"end":return t.stop()}}),t,null,[[1,18]])})),function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){G(i,n,o,a,c,"next",t)}function c(t){G(i,n,o,a,c,"throw",t)}a(void 0)}))});return function(t,r){return e.apply(this,arguments)}}(),B={data:null},F=q({},"session",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:B,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"session/loaded":return C(C({},t),{},{data:e.payload});default:return t}})),W=function(t){var e;return null===(e=t.getState().session)||void 0===e?void 0:e.data}})(),i})()}));
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define([,],e):"object"==typeof exports?exports.AblyUi=e(require("react"),require("react-dom")):(t.AblyUi=t.AblyUi||{},t.AblyUi.Core=e(t[void 0],t[void 0]))}(this,(function(t,e){return(()=>{var r={757:(t,e,r)=>{t.exports=r(666)},666:t=>{var e=function(t){"use strict";var e,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof v?e:v,i=Object.create(o.prototype),a=new A(n||[]);return i._invoke=function(t,e,r){var n=l;return function(o,i){if(n===h)throw new Error("Generator is already running");if(n===d){if("throw"===o)throw i;return k()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=P(a,r);if(c){if(c===y)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===l)throw n=d,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=h;var u=s(t,e,r);if("normal"===u.type){if(n=r.done?d:p,u.arg===y)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=d,r.method="throw",r.arg=u.arg)}}}(t,r,a),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var l="suspendedStart",p="suspendedYield",h="executing",d="completed",y={};function v(){}function b(){}function g(){}var w={};w[i]=function(){return this};var m=Object.getPrototypeOf,O=m&&m(m(N([])));O&&O!==r&&n.call(O,i)&&(w=O);var x=g.prototype=v.prototype=Object.create(w);function E(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function r(o,i,a,c){var u=s(t[o],t,i);if("throw"!==u.type){var f=u.arg,l=f.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(l).then((function(t){f.value=t,a(f)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var o;this._invoke=function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}}function P(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,P(t,r),"throw"===r.method))return y;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var o=s(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,y;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function N(t){if(t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}return{next:k}}function k(){return{value:e,done:!0}}return b.prototype=x.constructor=g,g.constructor=b,b.displayName=u(g,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,u(t,c,"GeneratorFunction")),t.prototype=Object.create(x),t},t.awrap=function(t){return{__await:t}},E(j.prototype),j.prototype[a]=function(){return this},t.AsyncIterator=j,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new j(f(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},E(x),u(x,c,"Generator"),x[i]=function(){return this},x.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=N,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return c.type="throw",c.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),f=n.call(a,"finallyLoc");if(u&&f){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!f)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:N(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}},281:e=>{"use strict";e.exports=t},645:t=>{"use strict";t.exports=e}},n={};function o(t){var e=n[t];if(void 0!==e)return e.exports;var i=n[t]={exports:{}};return r[t](i,i.exports,o),i.exports}o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var r in e)o.o(e,r)&&!o.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};return(()=>{"use strict";o.r(i),o.d(i,{attachStoreToWindow:()=>O,connectState:()=>E,createRemoteDataStore:()=>j,fetchBlogPosts:()=>T,fetchSessionData:()=>M,getRemoteDataStore:()=>x,loadSprites:()=>u,queryId:()=>f,queryIdAll:()=>s,reactRenderer:()=>c,reducerBlogPosts:()=>D,reducerSessionData:()=>F,renderComponent:()=>a,selectRecentBlogPosts:()=>I,selectSessionData:()=>W,toggleChatWidget:()=>d}),Array.prototype.flat||Object.defineProperty(Array.prototype,"flat",{configurable:!0,value:function t(){var e=isNaN(arguments[0])?1:Number(arguments[0]);return e?Array.prototype.reduce.call(this,(function(r,n){return Array.isArray(n)?r.push.apply(r,t.call(n,e-1)):r.push(n),r}),[]):Array.prototype.slice.call(this)},writable:!0}),Array.prototype.flatMap||Object.defineProperty(Array.prototype,"flatMap",{configurable:!0,value:function(t){return Array.prototype.map.apply(this,arguments).flat()},writable:!0});var t=o(281),e=o.n(t),r=o(645),n=o.n(r),a=function(t,r,o){return n().render(e().createElement(t,r),o)};function c(t){var r=document.querySelectorAll("[data-react]");Array.from(r).forEach((function(r){var o=r.getAttribute("data-react"),i=t[o];if(i){var a=r.getAttribute("data-react-props"),c=a&&JSON.parse(a||{});n().render(e().createElement(i,c),r),r.removeAttribute("data-react"),r.removeAttribute("data-react-props")}}))}const u=function(t){fetch(t).then((function(t){return t.text()})).then((function(t){var e=document.createElement("div");e.style.display="none",e.innerHTML=t,document.body.appendChild(e)})).catch((function(t){return console.error(t)}))};var f=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return e.querySelector("[data-id=".concat(t,"]"))},s=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return e.querySelectorAll("[data-id=".concat(t,"]"))};function l(t,e){t.disabled=!1,t.innerText=e}function p(t,e){t.disabled=!0,t.innerText=e}var h=30;function d(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.dataId,r=f(e),n=f("open-chat-widget",r),o=n.dataset.enabledLabel,i=n.dataset.disabledLabel;if(e&&r){var a,c=f("open-chat-widget",r),u=function t(e){var r,n,i=null===(r=window)||void 0===r||null===(n=r.HubSpotConversations)||void 0===n?void 0:n.widget,u=document.querySelector("#hubspot-messages-iframe-container");a=function(t){t.preventDefault(),i.open()},i&&u?(c.addEventListener("click",a),l(c,o)):--h&&setTimeout((function(){return t(100)}),e)};return p(c,i),u(0),function(){p(c,i),c.removeEventListener("click",a)}}}function y(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var v="function"==typeof Symbol&&Symbol.observable||"@@observable",b=function(){return Math.random().toString(36).substring(7).split("").join(".")},g={INIT:"@@redux/INIT"+b(),REPLACE:"@@redux/REPLACE"+b(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+b()}};function w(t){if("object"!=typeof t||null===t)return!1;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function m(t,e,r){var n;if("function"==typeof e&&"function"==typeof r||"function"==typeof r&&"function"==typeof arguments[3])throw new Error(y(0));if("function"==typeof e&&void 0===r&&(r=e,e=void 0),void 0!==r){if("function"!=typeof r)throw new Error(y(1));return r(m)(t,e)}if("function"!=typeof t)throw new Error(y(2));var o=t,i=e,a=[],c=a,u=!1;function f(){c===a&&(c=a.slice())}function s(){if(u)throw new Error(y(3));return i}function l(t){if("function"!=typeof t)throw new Error(y(4));if(u)throw new Error(y(5));var e=!0;return f(),c.push(t),function(){if(e){if(u)throw new Error(y(6));e=!1,f();var r=c.indexOf(t);c.splice(r,1),a=null}}}function p(t){if(!w(t))throw new Error(y(7));if(void 0===t.type)throw new Error(y(8));if(u)throw new Error(y(9));try{u=!0,i=o(i,t)}finally{u=!1}for(var e=a=c,r=0;r<e.length;r++)(0,e[r])();return t}function h(t){if("function"!=typeof t)throw new Error(y(10));o=t,p({type:g.REPLACE})}function d(){var t,e=l;return(t={subscribe:function(t){if("object"!=typeof t||null===t)throw new Error(y(11));function r(){t.next&&t.next(s())}return r(),{unsubscribe:e(r)}}})[v]=function(){return this},t}return p({type:g.INIT}),(n={dispatch:p,subscribe:l,getState:s,replaceReducer:h})[v]=d,n}var O=function(t){window.AblyUi=window.AblyUi||{},window.AblyUi.RemoteDataStore=t},x=function(){if(!window.AblyUi.RemoteDataStore)throw new Error("Remote store was called before one was created");return window.AblyUi.RemoteDataStore},E=function(t,e){var r=x(),n=t(r);r.subscribe((function(){var o=t(r);o!==n&&(n=o,e(o))}))},j=function(t){return m(function(t){for(var e=Object.keys(t),r={},n=0;n<e.length;n++){var o=e[n];"function"==typeof t[o]&&(r[o]=t[o])}var i,a=Object.keys(r);try{!function(t){Object.keys(t).forEach((function(e){var r=t[e];if(void 0===r(void 0,{type:g.INIT}))throw new Error(y(12));if(void 0===r(void 0,{type:g.PROBE_UNKNOWN_ACTION()}))throw new Error(y(13))}))}(r)}catch(t){i=t}return function(t,e){if(void 0===t&&(t={}),i)throw i;for(var n=!1,o={},c=0;c<a.length;c++){var u=a[c],f=r[u],s=t[u],l=f(s,e);if(void 0===l)throw e&&e.type,new Error(y(14));o[u]=l,n=n||l!==s}return(n=n||a.length!==Object.keys(t).length)?o:t}}(t))},P=o(757),S=o.n(P),L=function(t){return t&&t.includes("application/json")};function A(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function N(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?A(Object(r),!0).forEach((function(e){k(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):A(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function k(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function _(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}var T=function(){var t,e=(t=S().mark((function t(e,r){var n,o;return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,r){t.next=4;break}return console.log('Skipping fetching blog posts, invalid blogUrl: "'.concat(r,'"')),t.abrupt("return");case 4:return t.next=6,fetch(r);case 6:if(n=t.sent,!L(n.headers.get("content-type"))){t.next=14;break}return t.next=10,n.json();case 10:o=t.sent,e.dispatch({type:"blog/loaded",payload:o}),t.next=15;break;case 14:throw new Error("Blog posts url is not serving json");case 15:t.next=20;break;case 17:t.prev=17,t.t0=t.catch(0),console.warn("Could not fetch blog posts due to error:",t.t0);case 20:case"end":return t.stop()}}),t,null,[[0,17]])})),function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){_(i,n,o,a,c,"next",t)}function c(t){_(i,n,o,a,c,"throw",t)}a(void 0)}))});return function(t,r){return e.apply(this,arguments)}}(),R={recent:null},D=k({},"blogPosts",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:R,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"blog/loaded":return N(N({},t),{},{recent:e.payload});default:return t}})),I=function(t){var e;return null===(e=t.getState().blogPosts)||void 0===e?void 0:e.recent};function U(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function C(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?U(Object(r),!0).forEach((function(e){q(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):U(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function q(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function G(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}var M=function(){var t,e=(t=S().mark((function t(e,r){var n,o,i;return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.dispatch({type:"session/loaded",payload:t})},t.prev=1,r){t.next=6;break}return console.log('Skipping fetching session, invalid sessionUrl: "'.concat(r,'"')),n(),t.abrupt("return");case 6:return t.next=8,fetch(r,{cache:"no-cache"});case 8:if(o=t.sent,L(o.headers.get("content-type"))){t.next=12;break}throw new Error("Session endpoint is not serving json");case 12:return t.next=14,o.json();case 14:"not-found"===(i=t.sent).error?n():n(i),t.next=22;break;case 18:t.prev=18,t.t0=t.catch(1),n(),console.warn("Could not fetch session data due to error:",t.t0);case 22:case"end":return t.stop()}}),t,null,[[1,18]])})),function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){G(i,n,o,a,c,"next",t)}function c(t){G(i,n,o,a,c,"throw",t)}a(void 0)}))});return function(t,r){return e.apply(this,arguments)}}(),B={data:null},F=q({},"session",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:B,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"session/loaded":return C(C({},t),{},{data:e.payload});default:return t}})),W=function(t){var e;return null===(e=t.getState().session)||void 0===e?void 0:e.data}})(),i})()}));
@@ -1,3 +1,3 @@
1
1
  module AblyUi
2
- VERSION = '7.10.0.dev.45e131a'
2
+ VERSION = '7.10.0.dev.caff705'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ably-ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.10.0.dev.45e131a
4
+ version: 7.10.0.dev.caff705
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dominik Piatek
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2022-07-28 00:00:00.000000000 Z
13
+ date: 2022-08-04 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: view_component
@@ -182,6 +182,9 @@ files:
182
182
  - lib/ably_ui/core/meganav_search/component.js
183
183
  - lib/ably_ui/core/meganav_search/meganav_search.html.erb
184
184
  - lib/ably_ui/core/meganav_search/meganav_search.rb
185
+ - lib/ably_ui/core/meganav_search_autocomplete/component.js
186
+ - lib/ably_ui/core/meganav_search_autocomplete/meganav_search_autocomplete.html.erb
187
+ - lib/ably_ui/core/meganav_search_autocomplete/meganav_search_autocomplete.rb
185
188
  - lib/ably_ui/core/meganav_search_panel/component.js
186
189
  - lib/ably_ui/core/meganav_search_panel/meganav_search_panel.html.erb
187
190
  - lib/ably_ui/core/meganav_search_panel/meganav_search_panel.rb