// source --> https://ruouthuduc.vn/wp-content/plugins/fibofilters-pro/build/front-pro/front.js?ver=1.11.0 
var fiboFilters;(()=>{var e={112:(e,t,r)=>{"use strict";r.d(t,{vP:()=>_,R0:()=>F});var n=r(181),o=r(817),i=Symbol.for("preact-signals");function s(){if(d>1)d--;else{for(var e,t=!1;void 0!==u;){var r=u;for(u=void 0,f++;void 0!==r;){var n=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&v(r))try{r.c()}catch(r){t||(e=r,t=!0)}r=n}}if(f=0,d--,t)throw e}}var l=void 0;function a(e){var t=l;l=void 0;try{return e()}finally{l=t}}var c,u=void 0,d=0,f=0,p=0;function h(e){if(void 0!==l){var t=e.n;if(void 0===t||t.t!==l)return t={i:0,S:e,p:l.s,n:void 0,t:l,e:void 0,x:void 0,r:t},void 0!==l.s&&(l.s.n=t),l.s=t,e.n=t,32&l.f&&e.S(t),t;if(-1===t.i)return t.i=0,void 0!==t.n&&(t.n.p=t.p,void 0!==t.p&&(t.p.n=t.n),t.p=l.s,t.n=void 0,l.s.n=t,l.s=t),t}}function m(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.W=null==t?void 0:t.watched,this.Z=null==t?void 0:t.unwatched,this.name=null==t?void 0:t.name}function _(e,t){return new m(e,t)}function v(e){for(var t=e.s;void 0!==t;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function g(e){for(var t=e.s;void 0!==t;t=t.n){var r=t.S.n;if(void 0!==r&&(t.r=r),t.S.n=t,t.i=-1,void 0===t.n){e.s=t;break}}}function b(e){for(var t=e.s,r=void 0;void 0!==t;){var n=t.p;-1===t.i?(t.S.U(t),void 0!==n&&(n.n=t.n),void 0!==t.n&&(t.n.p=n)):r=t,t.S.n=t.r,void 0!==t.r&&(t.r=void 0),t=n}e.s=r}function y(e,t){m.call(this,void 0),this.x=e,this.s=void 0,this.g=p-1,this.f=4,this.W=null==t?void 0:t.watched,this.Z=null==t?void 0:t.unwatched,this.name=null==t?void 0:t.name}function w(e){var t=e.u;if(e.u=void 0,"function"==typeof t){d++;var r=l;l=void 0;try{t()}catch(t){throw e.f&=-2,e.f|=8,E(e),t}finally{l=r,s()}}}function E(e){for(var t=e.s;void 0!==t;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,w(e)}function x(e){if(l!==this)throw new Error("Out-of-order effect");b(this),l=e,this.f&=-2,8&this.f&&E(this),s()}function S(e,t){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32,this.name=null==t?void 0:t.name}function k(e,t){var r=new S(e,t);try{r.c()}catch(e){throw r.d(),e}var n=r.d.bind(r);return n[Symbol.dispose]=n,n}function I(e,t){n.fF[e]=t.bind(null,n.fF[e]||function(){})}function A(e){c&&c(),c=e&&e.S()}function C(e){var t=this,r=e.data,i=function(e){return(0,o.Kr)(function(){return _(e)},[])}(r);i.value=r;var s=(0,o.Kr)(function(){for(var e=t.__v;e=e.__;)if(e.__c){e.__c.__$f|=4;break}return t.__$u.c=function(){var e;(0,n.zO)(s.peek())||3!==(null==(e=t.base)?void 0:e.nodeType)?(t.__$f|=1,t.setState({})):t.base.data=s.peek()},new y(function(){var e=i.value.value;return 0===e?0:!0===e?"":e||""},void 0)},[]);return s.value}function P(e,t,r,n){var o=t in e&&void 0===e.ownerSVGElement,i=_(r);return{o:function(e,t){i.value=e,n=t},d:k(function(){var r=i.value.value;n[t]!==r&&(n[t]=r,o?e[t]=r:r?e.setAttribute(t,r):e.removeAttribute(t))})}}function F(e){var t=(0,o.li)(e);t.current=e,(0,o.vJ)(function(){return k(function(){return t.current()})},[])}m.prototype.brand=i,m.prototype.h=function(){return!0},m.prototype.S=function(e){var t=this,r=this.t;r!==e&&void 0===e.e&&(e.x=r,this.t=e,void 0!==r?r.e=e:a(function(){var e;null==(e=t.W)||e.call(t)}))},m.prototype.U=function(e){var t=this;if(void 0!==this.t){var r=e.e,n=e.x;void 0!==r&&(r.x=n,e.e=void 0),void 0!==n&&(n.e=r,e.x=void 0),e===this.t&&(this.t=n,void 0===n&&a(function(){var e;null==(e=t.Z)||e.call(t)}))}},m.prototype.subscribe=function(e){var t=this;return k(function(){var r=t.value,n=l;l=void 0;try{e(r)}finally{l=n}},{name:"sub"})},m.prototype.valueOf=function(){return this.value},m.prototype.toString=function(){return this.value+""},m.prototype.toJSON=function(){return this.value},m.prototype.peek=function(){var e=l;l=void 0;try{return this.value}finally{l=e}},Object.defineProperty(m.prototype,"value",{get:function(){var e=h(this);return void 0!==e&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(f>100)throw new Error("Cycle detected");this.v=e,this.i++,p++,d++;try{for(var t=this.t;void 0!==t;t=t.x)t.t.N()}finally{s()}}}}),y.prototype=new m,y.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if(32==(36&this.f))return!0;if(this.f&=-5,this.g===p)return!0;if(this.g=p,this.f|=1,this.i>0&&!v(this))return this.f&=-2,!0;var e=l;try{g(this),l=this;var t=this.x();(16&this.f||this.v!==t||0===this.i)&&(this.v=t,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return l=e,b(this),this.f&=-2,!0},y.prototype.S=function(e){if(void 0===this.t){this.f|=36;for(var t=this.s;void 0!==t;t=t.n)t.S.S(t)}m.prototype.S.call(this,e)},y.prototype.U=function(e){if(void 0!==this.t&&(m.prototype.U.call(this,e),void 0===this.t)){this.f&=-33;for(var t=this.s;void 0!==t;t=t.n)t.S.U(t)}},y.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;void 0!==e;e=e.x)e.t.N()}},Object.defineProperty(y.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=h(this);if(this.h(),void 0!==e&&(e.i=this.i),16&this.f)throw this.v;return this.v}}),S.prototype.c=function(){var e=this.S();try{if(8&this.f)return;if(void 0===this.x)return;var t=this.x();"function"==typeof t&&(this.u=t)}finally{e()}},S.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,w(this),g(this),d++;var e=l;return l=this,x.bind(this,e)},S.prototype.N=function(){2&this.f||(this.f|=2,this.o=u,u=this)},S.prototype.d=function(){this.f|=8,1&this.f||E(this)},S.prototype.dispose=function(){this.d()},C.displayName="_st",Object.defineProperties(m.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:C},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),I("__b",function(e,t){if("string"==typeof t.type){var r,n=t.props;for(var o in n)if("children"!==o){var i=n[o];i instanceof m&&(r||(t.__np=r={}),r[o]=i,n[o]=i.peek())}}e(t)}),I("__r",function(e,t){A();var r,n=t.__c;n&&(n.__$f&=-2,void 0===(r=n.__$u)&&(n.__$u=r=function(){var e;return k(function(){e=this}),e.c=function(){n.__$f|=1,n.setState({})},e}())),A(r),e(t)}),I("__e",function(e,t,r,n){A(),e(t,r,n)}),I("diffed",function(e,t){var r;if(A(),"string"==typeof t.type&&(r=t.__e)){var n=t.__np,o=t.props;if(n){var i=r.U;if(i)for(var s in i){var l=i[s];void 0===l||s in n||(l.d(),i[s]=void 0)}else r.U=i={};for(var a in n){var c=i[a],u=n[a];void 0===c?(c=P(r,a,u,o),i[a]=c):c.o(u,o)}}}e(t)}),I("unmount",function(e,t){if("string"==typeof t.type){var r=t.__e;if(r){var n=r.U;if(n)for(var o in r.U=void 0,n){var i=n[o];i&&i.d()}}}else{var s=t.__c;if(s){var l=s.__$u;l&&(s.__$u=void 0,l.d())}}e(t)}),I("__h",function(e,t,r,n){(n<3||9===n)&&(t.__$f|=2),e(t,r,n)}),n.uA.prototype.shouldComponentUpdate=function(e,t){var r=this.__$u;if(!(r&&void 0!==r.s||4&this.__$f))return!0;if(3&this.__$f)return!0;for(var n in t)return!0;for(var o in e)if("__source"!==o&&e[o]!==this.props[o])return!0;for(var i in this.props)if(!(i in e))return!0;return!1}},181:(e,t,r)=>{"use strict";r.d(t,{FK:()=>k,Ob:()=>X,Qv:()=>K,XX:()=>W,_3:()=>S,fF:()=>o,h:()=>E,n:()=>E,q6:()=>Y,uA:()=>I,v2:()=>R,zO:()=>s});var n,o,i,s,l,a,c,u,d,f,p,h,m,_={},v=[],g=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,b=Array.isArray;function y(e,t){for(var r in t)e[r]=t[r];return e}function w(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function E(e,t,r){var o,i,s,l={};for(s in t)"key"==s?o=t[s]:"ref"==s?i=t[s]:l[s]=t[s];if(arguments.length>2&&(l.children=arguments.length>3?n.call(arguments,2):r),"function"==typeof e&&null!=e.defaultProps)for(s in e.defaultProps)void 0===l[s]&&(l[s]=e.defaultProps[s]);return x(e,l,o,i,null)}function x(e,t,r,n,s){var l={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==s?++i:s,__i:-1,__u:0};return null==s&&null!=o.vnode&&o.vnode(l),l}function S(){return{current:null}}function k(e){return e.children}function I(e,t){this.props=e,this.context=t}function A(e,t){if(null==t)return e.__?A(e.__,e.__i+1):null;for(var r;t<e.__k.length;t++)if(null!=(r=e.__k[t])&&null!=r.__e)return r.__e;return"function"==typeof e.type?A(e):null}function C(e){var t,r;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(r=e.__k[t])&&null!=r.__e){e.__e=e.__c.base=r.__e;break}return C(e)}}function P(e){(!e.__d&&(e.__d=!0)&&l.push(e)&&!F.__r++||a!=o.debounceRendering)&&((a=o.debounceRendering)||c)(F)}function F(){for(var e,t,r,n,i,s,a,c=1;l.length;)l.length>c&&l.sort(u),e=l.shift(),c=l.length,e.__d&&(r=void 0,n=void 0,i=(n=(t=e).__v).__e,s=[],a=[],t.__P&&((r=y({},n)).__v=n.__v+1,o.vnode&&o.vnode(r),M(t.__P,r,n,t.__n,t.__P.namespaceURI,32&n.__u?[i]:null,s,null==i?A(n):i,!!(32&n.__u),a),r.__v=n.__v,r.__.__k[r.__i]=r,B(s,r,a),n.__e=n.__=null,r.__e!=i&&C(r)));F.__r=0}function $(e,t,r,n,o,i,s,l,a,c,u){var d,f,p,h,m,g,b,y=n&&n.__k||v,w=t.length;for(a=O(r,t,y,a,w),d=0;d<w;d++)null!=(p=r.__k[d])&&(f=-1==p.__i?_:y[p.__i]||_,p.__i=d,g=M(e,p,f,o,i,s,l,a,c,u),h=p.__e,p.ref&&f.ref!=p.ref&&(f.ref&&z(f.ref,null,p),u.push(p.ref,p.__c||h,p)),null==m&&null!=h&&(m=h),(b=!!(4&p.__u))||f.__k===p.__k?a=N(p,a,e,b):"function"==typeof p.type&&void 0!==g?a=g:h&&(a=h.nextSibling),p.__u&=-7);return r.__e=m,a}function O(e,t,r,n,o){var i,s,l,a,c,u=r.length,d=u,f=0;for(e.__k=new Array(o),i=0;i<o;i++)null!=(s=t[i])&&"boolean"!=typeof s&&"function"!=typeof s?(a=i+f,(s=e.__k[i]="string"==typeof s||"number"==typeof s||"bigint"==typeof s||s.constructor==String?x(null,s,null,null,null):b(s)?x(k,{children:s},null,null,null):null==s.constructor&&s.__b>0?x(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):s).__=e,s.__b=e.__b+1,l=null,-1!=(c=s.__i=L(s,r,a,d))&&(d--,(l=r[c])&&(l.__u|=2)),null==l||null==l.__v?(-1==c&&(o>u?f--:o<u&&f++),"function"!=typeof s.type&&(s.__u|=4)):c!=a&&(c==a-1?f--:c==a+1?f++:(c>a?f--:f++,s.__u|=4))):e.__k[i]=null;if(d)for(i=0;i<u;i++)null!=(l=r[i])&&!(2&l.__u)&&(l.__e==n&&(n=A(l)),J(l,l));return n}function N(e,t,r,n){var o,i;if("function"==typeof e.type){for(o=e.__k,i=0;o&&i<o.length;i++)o[i]&&(o[i].__=e,t=N(o[i],t,r,n));return t}e.__e!=t&&(n&&(t&&e.type&&!t.parentNode&&(t=A(e)),r.insertBefore(e.__e,t||null)),t=e.__e);do{t=t&&t.nextSibling}while(null!=t&&8==t.nodeType);return t}function R(e,t){return t=t||[],null==e||"boolean"==typeof e||(b(e)?e.some(function(e){R(e,t)}):t.push(e)),t}function L(e,t,r,n){var o,i,s,l=e.key,a=e.type,c=t[r],u=null!=c&&!(2&c.__u);if(null===c&&null==e.key||u&&l==c.key&&a==c.type)return r;if(n>(u?1:0))for(o=r-1,i=r+1;o>=0||i<t.length;)if(null!=(c=t[s=o>=0?o--:i++])&&!(2&c.__u)&&l==c.key&&a==c.type)return s;return-1}function D(e,t,r){"-"==t[0]?e.setProperty(t,null==r?"":r):e[t]=null==r?"":"number"!=typeof r||g.test(t)?r:r+"px"}function j(e,t,r,n,o){var i,s;e:if("style"==t)if("string"==typeof r)e.style.cssText=r;else{if("string"==typeof n&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||D(e.style,t,"");if(r)for(t in r)n&&r[t]==n[t]||D(e.style,t,r[t])}else if("o"==t[0]&&"n"==t[1])i=t!=(t=t.replace(d,"$1")),s=t.toLowerCase(),t=s in e||"onFocusOut"==t||"onFocusIn"==t?s.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=r,r?n?r.u=n.u:(r.u=f,e.addEventListener(t,i?h:p,i)):e.removeEventListener(t,i?h:p,i);else{if("http://www.w3.org/2000/svg"==o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=null==r?"":r;break e}catch(e){}"function"==typeof r||(null==r||!1===r&&"-"!=t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==r?"":r))}}function T(e){return function(t){if(this.l){var r=this.l[t.type+e];if(null==t.t)t.t=f++;else if(t.t<r.u)return;return r(o.event?o.event(t):t)}}}function M(e,t,r,n,i,s,l,a,c,u){var d,f,p,h,m,_,v,g,E,x,S,A,C,P,F,O,N,R=t.type;if(null!=t.constructor)return null;128&r.__u&&(c=!!(32&r.__u),s=[a=t.__e=r.__e]),(d=o.__b)&&d(t);e:if("function"==typeof R)try{if(g=t.props,E="prototype"in R&&R.prototype.render,x=(d=R.contextType)&&n[d.__c],S=d?x?x.props.value:d.__:n,r.__c?v=(f=t.__c=r.__c).__=f.__E:(E?t.__c=f=new R(g,S):(t.__c=f=new I(g,S),f.constructor=R,f.render=q),x&&x.sub(f),f.props=g,f.state||(f.state={}),f.context=S,f.__n=n,p=f.__d=!0,f.__h=[],f._sb=[]),E&&null==f.__s&&(f.__s=f.state),E&&null!=R.getDerivedStateFromProps&&(f.__s==f.state&&(f.__s=y({},f.__s)),y(f.__s,R.getDerivedStateFromProps(g,f.__s))),h=f.props,m=f.state,f.__v=t,p)E&&null==R.getDerivedStateFromProps&&null!=f.componentWillMount&&f.componentWillMount(),E&&null!=f.componentDidMount&&f.__h.push(f.componentDidMount);else{if(E&&null==R.getDerivedStateFromProps&&g!==h&&null!=f.componentWillReceiveProps&&f.componentWillReceiveProps(g,S),!f.__e&&null!=f.shouldComponentUpdate&&!1===f.shouldComponentUpdate(g,f.__s,S)||t.__v==r.__v){for(t.__v!=r.__v&&(f.props=g,f.state=f.__s,f.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.some(function(e){e&&(e.__=t)}),A=0;A<f._sb.length;A++)f.__h.push(f._sb[A]);f._sb=[],f.__h.length&&l.push(f);break e}null!=f.componentWillUpdate&&f.componentWillUpdate(g,f.__s,S),E&&null!=f.componentDidUpdate&&f.__h.push(function(){f.componentDidUpdate(h,m,_)})}if(f.context=S,f.props=g,f.__P=e,f.__e=!1,C=o.__r,P=0,E){for(f.state=f.__s,f.__d=!1,C&&C(t),d=f.render(f.props,f.state,f.context),F=0;F<f._sb.length;F++)f.__h.push(f._sb[F]);f._sb=[]}else do{f.__d=!1,C&&C(t),d=f.render(f.props,f.state,f.context),f.state=f.__s}while(f.__d&&++P<25);f.state=f.__s,null!=f.getChildContext&&(n=y(y({},n),f.getChildContext())),E&&!p&&null!=f.getSnapshotBeforeUpdate&&(_=f.getSnapshotBeforeUpdate(h,m)),O=d,null!=d&&d.type===k&&null==d.key&&(O=U(d.props.children)),a=$(e,b(O)?O:[O],t,r,n,i,s,l,a,c,u),f.base=t.__e,t.__u&=-161,f.__h.length&&l.push(f),v&&(f.__E=f.__=null)}catch(e){if(t.__v=null,c||null!=s)if(e.then){for(t.__u|=c?160:128;a&&8==a.nodeType&&a.nextSibling;)a=a.nextSibling;s[s.indexOf(a)]=null,t.__e=a}else{for(N=s.length;N--;)w(s[N]);V(t)}else t.__e=r.__e,t.__k=r.__k,e.then||V(t);o.__e(e,t,r)}else null==s&&t.__v==r.__v?(t.__k=r.__k,t.__e=r.__e):a=t.__e=H(r.__e,t,r,n,i,s,l,c,u);return(d=o.diffed)&&d(t),128&t.__u?void 0:a}function V(e){e&&e.__c&&(e.__c.__e=!0),e&&e.__k&&e.__k.forEach(V)}function B(e,t,r){for(var n=0;n<r.length;n++)z(r[n],r[++n],r[++n]);o.__c&&o.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){o.__e(e,t.__v)}})}function U(e){return"object"!=typeof e||null==e||e.__b&&e.__b>0?e:b(e)?e.map(U):y({},e)}function H(e,t,r,i,s,l,a,c,u){var d,f,p,h,m,v,g,y=r.props,E=t.props,x=t.type;if("svg"==x?s="http://www.w3.org/2000/svg":"math"==x?s="http://www.w3.org/1998/Math/MathML":s||(s="http://www.w3.org/1999/xhtml"),null!=l)for(d=0;d<l.length;d++)if((m=l[d])&&"setAttribute"in m==!!x&&(x?m.localName==x:3==m.nodeType)){e=m,l[d]=null;break}if(null==e){if(null==x)return document.createTextNode(E);e=document.createElementNS(s,x,E.is&&E),c&&(o.__m&&o.__m(t,l),c=!1),l=null}if(null==x)y===E||c&&e.data==E||(e.data=E);else{if(l=l&&n.call(e.childNodes),y=r.props||_,!c&&null!=l)for(y={},d=0;d<e.attributes.length;d++)y[(m=e.attributes[d]).name]=m.value;for(d in y)if(m=y[d],"children"==d);else if("dangerouslySetInnerHTML"==d)p=m;else if(!(d in E)){if("value"==d&&"defaultValue"in E||"checked"==d&&"defaultChecked"in E)continue;j(e,d,null,m,s)}for(d in E)m=E[d],"children"==d?h=m:"dangerouslySetInnerHTML"==d?f=m:"value"==d?v=m:"checked"==d?g=m:c&&"function"!=typeof m||y[d]===m||j(e,d,m,y[d],s);if(f)c||p&&(f.__html==p.__html||f.__html==e.innerHTML)||(e.innerHTML=f.__html),t.__k=[];else if(p&&(e.innerHTML=""),$("template"==t.type?e.content:e,b(h)?h:[h],t,r,i,"foreignObject"==x?"http://www.w3.org/1999/xhtml":s,l,a,l?l[0]:r.__k&&A(r,0),c,u),null!=l)for(d=l.length;d--;)w(l[d]);c||(d="value","progress"==x&&null==v?e.removeAttribute("value"):null!=v&&(v!==e[d]||"progress"==x&&!v||"option"==x&&v!=y[d])&&j(e,d,v,y[d],s),d="checked",null!=g&&g!=e[d]&&j(e,d,g,y[d],s))}return e}function z(e,t,r){try{if("function"==typeof e){var n="function"==typeof e.__u;n&&e.__u(),n&&null==t||(e.__u=e(t))}else e.current=t}catch(e){o.__e(e,r)}}function J(e,t,r){var n,i;if(o.unmount&&o.unmount(e),(n=e.ref)&&(n.current&&n.current!=e.__e||z(n,null,t)),null!=(n=e.__c)){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(e){o.__e(e,t)}n.base=n.__P=null}if(n=e.__k)for(i=0;i<n.length;i++)n[i]&&J(n[i],t,r||"function"!=typeof e.type);r||w(e.__e),e.__c=e.__=e.__e=void 0}function q(e,t,r){return this.constructor(e,r)}function W(e,t,r){var i,s,l,a;t==document&&(t=document.documentElement),o.__&&o.__(e,t),s=(i="function"==typeof r)?null:r&&r.__k||t.__k,l=[],a=[],M(t,e=(!i&&r||t).__k=E(k,null,[e]),s||_,_,t.namespaceURI,!i&&r?[r]:s?null:t.firstChild?n.call(t.childNodes):null,l,!i&&r?r:s?s.__e:t.firstChild,i,a),B(l,e,a)}function K(e,t){W(e,t,K)}function X(e,t,r){var o,i,s,l,a=y({},e.props);for(s in e.type&&e.type.defaultProps&&(l=e.type.defaultProps),t)"key"==s?o=t[s]:"ref"==s?i=t[s]:a[s]=void 0===t[s]&&null!=l?l[s]:t[s];return arguments.length>2&&(a.children=arguments.length>3?n.call(arguments,2):r),x(e.type,a,o||e.key,i||e.ref,null)}function Y(e){function t(e){var r,n;return this.getChildContext||(r=new Set,(n={})[t.__c]=this,this.getChildContext=function(){return n},this.componentWillUnmount=function(){r=null},this.shouldComponentUpdate=function(e){this.props.value!=e.value&&r.forEach(function(e){e.__e=!0,P(e)})},this.sub=function(e){r.add(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){r&&r.delete(e),t&&t.call(e)}}),e.children}return t.__c="__cC"+m++,t.__=e,t.Provider=t.__l=(t.Consumer=function(e,t){return e.children(t)}).contextType=t,t}n=v.slice,o={__e:function(e,t,r,n){for(var o,i,s;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&null!=i.getDerivedStateFromError&&(o.setState(i.getDerivedStateFromError(e)),s=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,n||{}),s=o.__d),s)return o.__E=o}catch(t){e=t}throw e}},i=0,s=function(e){return null!=e&&null==e.constructor},I.prototype.setState=function(e,t){var r;r=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=y({},this.state),"function"==typeof e&&(e=e(y({},r),this.props)),e&&y(r,e),null!=e&&this.__v&&(t&&this._sb.push(t),P(this))},I.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),P(this))},I.prototype.render=k,l=[],c="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,u=function(e,t){return e.__v.__b-t.__v.__b},F.__r=0,d=/(PointerCapture)$|Capture$/i,f=0,p=T(!1),h=T(!0),m=0},229:e=>{var t={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ả:"A",Ạ:"A",Ẩ:"A",Ẫ:"A",Ậ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ẻ:"E",Ẽ:"E",Ẹ:"E",Ể:"E",Ễ:"E",Ệ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ỉ:"I",Ị:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ỏ:"O",Ọ:"O",Ổ:"O",Ỗ:"O",Ộ:"O",Ờ:"O",Ở:"O",Ỡ:"O",Ớ:"O",Ợ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ủ:"U",Ụ:"U",Ử:"U",Ữ:"U",Ự:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",ấ:"a",ắ:"a",ẳ:"a",ẵ:"a",ặ:"a",æ:"ae",ầ:"a",ằ:"a",ȃ:"a",ả:"a",ạ:"a",ẩ:"a",ẫ:"a",ậ:"a",ç:"c",ḉ:"c",è:"e",é:"e",ê:"e",ë:"e",ế:"e",ḗ:"e",ề:"e",ḕ:"e",ḝ:"e",ȇ:"e",ẻ:"e",ẽ:"e",ẹ:"e",ể:"e",ễ:"e",ệ:"e",ì:"i",í:"i",î:"i",ï:"i",ḯ:"i",ȋ:"i",ỉ:"i",ị:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ố:"o",ṍ:"o",ṓ:"o",ȏ:"o",ỏ:"o",ọ:"o",ổ:"o",ỗ:"o",ộ:"o",ờ:"o",ở:"o",ỡ:"o",ớ:"o",ợ:"o",ù:"u",ú:"u",û:"u",ü:"u",ủ:"u",ụ:"u",ử:"u",ữ:"u",ự:"u",ý:"y",ÿ:"y",Ā:"A",ā:"a",Ă:"A",ă:"a",Ą:"A",ą:"a",Ć:"C",ć:"c",Ĉ:"C",ĉ:"c",Ċ:"C",ċ:"c",Č:"C",č:"c",C̆:"C",c̆:"c",Ď:"D",ď:"d",Đ:"D",đ:"d",Ē:"E",ē:"e",Ĕ:"E",ĕ:"e",Ė:"E",ė:"e",Ę:"E",ę:"e",Ě:"E",ě:"e",Ĝ:"G",Ǵ:"G",ĝ:"g",ǵ:"g",Ğ:"G",ğ:"g",Ġ:"G",ġ:"g",Ģ:"G",ģ:"g",Ĥ:"H",ĥ:"h",Ħ:"H",ħ:"h",Ḫ:"H",ḫ:"h",Ĩ:"I",ĩ:"i",Ī:"I",ī:"i",Ĭ:"I",ĭ:"i",Į:"I",į:"i",İ:"I",ı:"i",Ĳ:"IJ",ĳ:"ij",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",Ḱ:"K",ḱ:"k",K̆:"K",k̆:"k",Ĺ:"L",ĺ:"l",Ļ:"L",ļ:"l",Ľ:"L",ľ:"l",Ŀ:"L",ŀ:"l",Ł:"l",ł:"l",Ḿ:"M",ḿ:"m",M̆:"M",m̆:"m",Ń:"N",ń:"n",Ņ:"N",ņ:"n",Ň:"N",ň:"n",ŉ:"n",N̆:"N",n̆:"n",Ō:"O",ō:"o",Ŏ:"O",ŏ:"o",Ő:"O",ő:"o",Œ:"OE",œ:"oe",P̆:"P",p̆:"p",Ŕ:"R",ŕ:"r",Ŗ:"R",ŗ:"r",Ř:"R",ř:"r",R̆:"R",r̆:"r",Ȓ:"R",ȓ:"r",Ś:"S",ś:"s",Ŝ:"S",ŝ:"s",Ş:"S",Ș:"S",ș:"s",ş:"s",Š:"S",š:"s",Ţ:"T",ţ:"t",ț:"t",Ț:"T",Ť:"T",ť:"t",Ŧ:"T",ŧ:"t",T̆:"T",t̆:"t",Ũ:"U",ũ:"u",Ū:"U",ū:"u",Ŭ:"U",ŭ:"u",Ů:"U",ů:"u",Ű:"U",ű:"u",Ų:"U",ų:"u",Ȗ:"U",ȗ:"u",V̆:"V",v̆:"v",Ŵ:"W",ŵ:"w",Ẃ:"W",ẃ:"w",X̆:"X",x̆:"x",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Y̆:"Y",y̆:"y",Ź:"Z",ź:"z",Ż:"Z",ż:"z",Ž:"Z",ž:"z",ſ:"s",ƒ:"f",Ơ:"O",ơ:"o",Ư:"U",ư:"u",Ǎ:"A",ǎ:"a",Ǐ:"I",ǐ:"i",Ǒ:"O",ǒ:"o",Ǔ:"U",ǔ:"u",Ǖ:"U",ǖ:"u",Ǘ:"U",ǘ:"u",Ǚ:"U",ǚ:"u",Ǜ:"U",ǜ:"u",Ứ:"U",ứ:"u",Ṹ:"U",ṹ:"u",Ǻ:"A",ǻ:"a",Ǽ:"AE",ǽ:"ae",Ǿ:"O",ǿ:"o",Þ:"TH",þ:"th",Ṕ:"P",ṕ:"p",Ṥ:"S",ṥ:"s",X́:"X",x́:"x",Ѓ:"Г",ѓ:"г",Ќ:"К",ќ:"к",A̋:"A",a̋:"a",E̋:"E",e̋:"e",I̋:"I",i̋:"i",Ǹ:"N",ǹ:"n",Ồ:"O",ồ:"o",Ṑ:"O",ṑ:"o",Ừ:"U",ừ:"u",Ẁ:"W",ẁ:"w",Ỳ:"Y",ỳ:"y",Ȁ:"A",ȁ:"a",Ȅ:"E",ȅ:"e",Ȉ:"I",ȉ:"i",Ȍ:"O",ȍ:"o",Ȑ:"R",ȑ:"r",Ȕ:"U",ȕ:"u",B̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",Ṧ:"S",ṧ:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z",й:"и",Й:"И",ё:"е",Ё:"Е"},r=Object.keys(t).join("|"),n=new RegExp(r,"g"),o=new RegExp(r,"");function i(e){return t[e]}var s=function(e){return e.replace(n,i)};e.exports=s,e.exports.has=function(e){return!!e.match(o)},e.exports.remove=s},287:e=>{e.exports=function(e,t){var r,n,o=0;function i(){var i,s,l=r,a=arguments.length;e:for(;l;){if(l.args.length===arguments.length){for(s=0;s<a;s++)if(l.args[s]!==arguments[s]){l=l.next;continue e}return l!==r&&(l===n&&(n=l.prev),l.prev.next=l.next,l.next&&(l.next.prev=l.prev),l.next=r,l.prev=null,r.prev=l,r=l),l.val}l=l.next}for(i=new Array(a),s=0;s<a;s++)i[s]=arguments[s];return l={args:i,val:e.apply(null,i)},r?(r.prev=l,l.next=r):n=l,o===t.maxSize?(n=n.prev).next=null:o++,r=l,l.val}return t=t||{},i.clear=function(){r=null,n=null,o=0},i}},343:(e,t,r)=>{"use strict";r.d(t,{$U:()=>a,q8:()=>l});var n=r(525),o=r(181),i=r(817);const s=(0,o.q6)(!1);function l({value:e,children:t}){return(0,n.createElement)(s.Provider,{value:e},t)}const a=()=>(0,i.NT)(s)},367:(e,t,r)=>{"use strict";r.d(t,{BV:()=>o,UV:()=>a,lD:()=>u,p$:()=>i,r3:()=>c,sB:()=>s,vx:()=>l});const n=(0,r(112).vP)(),o=()=>({appState:n}),i=()=>{var e;return null!==(e=n.peek().currentPage)&&void 0!==e?e:1},s=()=>{var e;return null!==(e=n.peek().firstVisiblePage)&&void 0!==e?e:1},l=()=>{var e;return null!==(e=n.peek().totalPages)&&void 0!==e?e:0},a=()=>{var e;return null!==(e=n.peek().orderby)&&void 0!==e?e:""},c=()=>{var e;return null!==(e=n.peek().criticalErrors)&&void 0!==e?e:[]},u=()=>{var e;return null!==(e=n.peek().searchInProgress)&&void 0!==e&&e}},383:(e,t,r)=>{"use strict";r.d(t,{f:()=>o});const n=(0,r(112).vP)({}),o=()=>({filtersState:n})},420:(e,t,r)=>{"use strict";r.d(t,{J:()=>n});const n=(0,r(868).FF)()},435:(e,t)=>{"use strict";function r(e){return"object"!=typeof e||"toString"in e?e:Object.prototype.toString.call(e).slice(8,-1)}Object.defineProperty(t,"__esModule",{value:!0});var n="object"==typeof process&&!0;function o(e,t){if(!e){if(n)throw new Error("Invariant failed");throw new Error(t())}}t.invariant=o;var i=Object.prototype.hasOwnProperty,s=Array.prototype.splice,l=Object.prototype.toString;function a(e){return l.call(e).slice(8,-1)}var c=Object.assign||function(e,t){return u(t).forEach(function(r){i.call(t,r)&&(e[r]=t[r])}),e},u="function"==typeof Object.getOwnPropertySymbols?function(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.keys(e)};function d(e){return Array.isArray(e)?c(e.constructor(e.length),e):"Map"===a(e)?new Map(e):"Set"===a(e)?new Set(e):e&&"object"==typeof e?c(Object.create(Object.getPrototypeOf(e)),e):e}var f=function(){function e(){this.commands=c({},p),this.update=this.update.bind(this),this.update.extend=this.extend=this.extend.bind(this),this.update.isEquals=function(e,t){return e===t},this.update.newContext=function(){return(new e).update}}return Object.defineProperty(e.prototype,"isEquals",{get:function(){return this.update.isEquals},set:function(e){this.update.isEquals=e},enumerable:!0,configurable:!0}),e.prototype.extend=function(e,t){this.commands[e]=t},e.prototype.update=function(e,t){var r=this,n="function"==typeof t?{$apply:t}:t;Array.isArray(e)&&Array.isArray(n)||o(!Array.isArray(n),function(){return"update(): You provided an invalid spec to update(). The spec may not contain an array except as the value of $set, $push, $unshift, $splice or any custom command allowing an array value."}),o("object"==typeof n&&null!==n,function(){return"update(): You provided an invalid spec to update(). The spec and every included key path must be plain objects containing one of the following commands: "+Object.keys(r.commands).join(", ")+"."});var s=e;return u(n).forEach(function(t){if(i.call(r.commands,t)){var o=e===s;s=r.commands[t](n[t],s,n,e),o&&r.isEquals(s,e)&&(s=e)}else{var l="Map"===a(e)?r.update(e.get(t),n[t]):r.update(e[t],n[t]),c="Map"===a(s)?s.get(t):s[t];r.isEquals(l,c)&&(void 0!==l||i.call(e,t))||(s===e&&(s=d(e)),"Map"===a(s)?s.set(t,l):s[t]=l)}}),s},e}();t.Context=f;var p={$push:function(e,t,r){return m(t,r,"$push"),e.length?t.concat(e):t},$unshift:function(e,t,r){return m(t,r,"$unshift"),e.length?e.concat(t):t},$splice:function(e,t,n,i){return function(e,t){o(Array.isArray(e),function(){return"Expected $splice target to be an array; got "+r(e)}),v(t.$splice)}(t,n),e.forEach(function(e){v(e),t===i&&e.length&&(t=d(i)),s.apply(t,e)}),t},$set:function(e,t,r){return function(e){o(1===Object.keys(e).length,function(){return"Cannot have more than one key in an object with $set"})}(r),e},$toggle:function(e,t){_(e,"$toggle");var r=e.length?d(t):t;return e.forEach(function(e){r[e]=!t[e]}),r},$unset:function(e,t,r,n){return _(e,"$unset"),e.forEach(function(e){Object.hasOwnProperty.call(t,e)&&(t===n&&(t=d(n)),delete t[e])}),t},$add:function(e,t,r,n){return g(t,"$add"),_(e,"$add"),"Map"===a(t)?e.forEach(function(e){var r=e[0],o=e[1];t===n&&t.get(r)!==o&&(t=d(n)),t.set(r,o)}):e.forEach(function(e){t!==n||t.has(e)||(t=d(n)),t.add(e)}),t},$remove:function(e,t,r,n){return g(t,"$remove"),_(e,"$remove"),e.forEach(function(e){t===n&&t.has(e)&&(t=d(n)),t.delete(e)}),t},$merge:function(e,t,n,i){var s,l;return s=t,o((l=e)&&"object"==typeof l,function(){return"update(): $merge expects a spec of type 'object'; got "+r(l)}),o(s&&"object"==typeof s,function(){return"update(): $merge expects a target of type 'object'; got "+r(s)}),u(e).forEach(function(r){e[r]!==t[r]&&(t===i&&(t=d(i)),t[r]=e[r])}),t},$apply:function(e,t){var n;return o("function"==typeof(n=e),function(){return"update(): expected spec of $apply to be a function; got "+r(n)+"."}),e(t)}},h=new f;function m(e,t,n){o(Array.isArray(e),function(){return"update(): expected target of "+r(n)+" to be an array; got "+r(e)+"."}),_(t[n],n)}function _(e,t){o(Array.isArray(e),function(){return"update(): expected spec of "+r(t)+" to be an array; got "+r(e)+". Did you forget to wrap your parameter in an array?"})}function v(e){o(Array.isArray(e),function(){return"update(): expected spec of $splice to be an array of arrays; got "+r(e)+". Did you forget to wrap your parameters in an array?"})}function g(e,t){var n=a(e);o("Map"===n||"Set"===n,function(){return"update(): "+r(t)+" expects a target of type Set or Map; got "+r(n)})}t.isEquals=h.update.isEquals,t.extend=h.extend,t.default=h.update,t.default.default=e.exports=c(t.default,t)},471:(e,t,r)=>{var n;!function(){"use strict";var o={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function i(e){return function(e,t){var r,n,s,l,a,c,u,d,f,p=1,h=e.length,m="";for(n=0;n<h;n++)if("string"==typeof e[n])m+=e[n];else if("object"==typeof e[n]){if((l=e[n]).keys)for(r=t[p],s=0;s<l.keys.length;s++){if(null==r)throw new Error(i('[sprintf] Cannot access property "%s" of undefined value "%s"',l.keys[s],l.keys[s-1]));r=r[l.keys[s]]}else r=l.param_no?t[l.param_no]:t[p++];if(o.not_type.test(l.type)&&o.not_primitive.test(l.type)&&r instanceof Function&&(r=r()),o.numeric_arg.test(l.type)&&"number"!=typeof r&&isNaN(r))throw new TypeError(i("[sprintf] expecting number but found %T",r));switch(o.number.test(l.type)&&(d=r>=0),l.type){case"b":r=parseInt(r,10).toString(2);break;case"c":r=String.fromCharCode(parseInt(r,10));break;case"d":case"i":r=parseInt(r,10);break;case"j":r=JSON.stringify(r,null,l.width?parseInt(l.width):0);break;case"e":r=l.precision?parseFloat(r).toExponential(l.precision):parseFloat(r).toExponential();break;case"f":r=l.precision?parseFloat(r).toFixed(l.precision):parseFloat(r);break;case"g":r=l.precision?String(Number(r.toPrecision(l.precision))):parseFloat(r);break;case"o":r=(parseInt(r,10)>>>0).toString(8);break;case"s":r=String(r),r=l.precision?r.substring(0,l.precision):r;break;case"t":r=String(!!r),r=l.precision?r.substring(0,l.precision):r;break;case"T":r=Object.prototype.toString.call(r).slice(8,-1).toLowerCase(),r=l.precision?r.substring(0,l.precision):r;break;case"u":r=parseInt(r,10)>>>0;break;case"v":r=r.valueOf(),r=l.precision?r.substring(0,l.precision):r;break;case"x":r=(parseInt(r,10)>>>0).toString(16);break;case"X":r=(parseInt(r,10)>>>0).toString(16).toUpperCase()}o.json.test(l.type)?m+=r:(!o.number.test(l.type)||d&&!l.sign?f="":(f=d?"+":"-",r=r.toString().replace(o.sign,"")),c=l.pad_char?"0"===l.pad_char?"0":l.pad_char.charAt(1):" ",u=l.width-(f+r).length,a=l.width&&u>0?c.repeat(u):"",m+=l.align?f+r+a:"0"===c?f+a+r:a+f+r)}return m}(function(e){if(l[e])return l[e];for(var t,r=e,n=[],i=0;r;){if(null!==(t=o.text.exec(r)))n.push(t[0]);else if(null!==(t=o.modulo.exec(r)))n.push("%");else{if(null===(t=o.placeholder.exec(r)))throw new SyntaxError("[sprintf] unexpected placeholder");if(t[2]){i|=1;var s=[],a=t[2],c=[];if(null===(c=o.key.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(s.push(c[1]);""!==(a=a.substring(c[0].length));)if(null!==(c=o.key_access.exec(a)))s.push(c[1]);else{if(null===(c=o.index_access.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");s.push(c[1])}t[2]=s}else i|=2;if(3===i)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n.push({placeholder:t[0],param_no:t[1],keys:t[2],sign:t[3],pad_char:t[4],align:t[5],width:t[6],precision:t[7],type:t[8]})}r=r.substring(t[0].length)}return l[e]=n}(e),arguments)}function s(e,t){return i.apply(null,[e].concat(t||[]))}var l=Object.create(null);t.sprintf=i,t.vsprintf=s,"undefined"!=typeof window&&(window.sprintf=i,window.vsprintf=s,void 0===(n=function(){return{sprintf:i,vsprintf:s}}.call(t,r,t,e))||(e.exports=n))}()},525:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Children:()=>b,Component:()=>n.uA,Fragment:()=>n.FK,PureComponent:()=>p,StrictMode:()=>ie,Suspense:()=>S,SuspenseList:()=>A,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:()=>X,cloneElement:()=>_n,createContext:()=>n.q6,createElement:()=>n.n,createFactory:()=>Z,createPortal:()=>$,createRef:()=>n._3,default:()=>le,findDOMNode:()=>re,flushSync:()=>oe,forwardRef:()=>v,hydrate:()=>M,isElement:()=>se,isFragment:()=>G,isMemo:()=>ee,isValidElement:()=>Q,lazy:()=>I,memo:()=>h,render:()=>T,startTransition:()=>c,unmountComponentAtNode:()=>te,unstable_batchedUpdates:()=>ne,useCallback:()=>o.hb,useContext:()=>o.NT,useDebugValue:()=>o.MN,useDeferredValue:()=>u,useEffect:()=>o.vJ,useErrorBoundary:()=>o.Md,useId:()=>o.Bi,useImperativeHandle:()=>o.Yn,useInsertionEffect:()=>f,useLayoutEffect:()=>o.Nf,useMemo:()=>o.Kr,useReducer:()=>o.WO,useRef:()=>o.li,useState:()=>o.J0,useSyncExternalStore:()=>l,useTransition:()=>d,version:()=>Y});var n=r(181),o=r(817);function i(e,t){for(var r in t)e[r]=t[r];return e}function s(e,t){for(var r in e)if("__source"!==r&&!(r in t))return!0;for(var n in t)if("__source"!==n&&e[n]!==t[n])return!0;return!1}function l(e,t){var r=t(),n=(0,o.J0)({t:{__:r,u:t}}),i=n[0].t,s=n[1];return(0,o.Nf)(function(){i.__=r,i.u=t,a(i)&&s({t:i})},[e,r,t]),(0,o.vJ)(function(){return a(i)&&s({t:i}),e(function(){a(i)&&s({t:i})})},[e]),r}function a(e){var t,r,n=e.u,o=e.__;try{var i=n();return!((t=o)===(r=i)&&(0!==t||1/t==1/r)||t!=t&&r!=r)}catch(e){return!0}}function c(e){e()}function u(e){return e}function d(){return[!1,c]}var f=o.Nf;function p(e,t){this.props=e,this.context=t}function h(e,t){function r(e){var r=this.props.ref,n=r==e.ref;return!n&&r&&(r.call?r(null):r.current=null),t?!t(this.props,e)||!n:s(this.props,e)}function o(t){return this.shouldComponentUpdate=r,(0,n.n)(e,t)}return o.displayName="Memo("+(e.displayName||e.name)+")",o.prototype.isReactComponent=!0,o.__f=!0,o.type=e,o}(p.prototype=new n.uA).isPureReactComponent=!0,p.prototype.shouldComponentUpdate=function(e,t){return s(this.props,e)||s(this.state,t)};var m=n.fF.__b;n.fF.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),m&&m(e)};var _="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function v(e){function t(t){var r=i({},t);return delete r.ref,e(r,t.ref||null)}return t.$$typeof=_,t.render=e,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var g=function(e,t){return null==e?null:(0,n.v2)((0,n.v2)(e).map(t))},b={map:g,forEach:g,count:function(e){return e?(0,n.v2)(e).length:0},only:function(e){var t=(0,n.v2)(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:n.v2},y=n.fF.__e;n.fF.__e=function(e,t,r,n){if(e.then)for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return null==t.__e&&(t.__e=r.__e,t.__k=r.__k),o.__c(e,t);y(e,t,r,n)};var w=n.fF.unmount;function E(e,t,r){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(e){"function"==typeof e.__c&&e.__c()}),e.__c.__H=null),null!=(e=i({},e)).__c&&(e.__c.__P===r&&(e.__c.__P=t),e.__c.__e=!0,e.__c=null),e.__k=e.__k&&e.__k.map(function(e){return E(e,t,r)})),e}function x(e,t,r){return e&&r&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(e){return x(e,t,r)}),e.__c&&e.__c.__P===t&&(e.__e&&r.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=r)),e}function S(){this.__u=0,this.o=null,this.__b=null}function k(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function I(e){var t,r,o;function i(i){if(t||(t=e()).then(function(e){r=e.default||e},function(e){o=e}),o)throw o;if(!r)throw t;return(0,n.n)(r,i)}return i.displayName="Lazy",i.__f=!0,i}function A(){this.i=null,this.l=null}n.fF.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),w&&w(e)},(S.prototype=new n.uA).__c=function(e,t){var r=t.__c,n=this;null==n.o&&(n.o=[]),n.o.push(r);var o=k(n.__v),i=!1,s=function(){i||(i=!0,r.__R=null,o?o(l):l())};r.__R=s;var l=function(){if(! --n.__u){if(n.state.__a){var e=n.state.__a;n.__v.__k[0]=x(e,e.__c.__P,e.__c.__O)}var t;for(n.setState({__a:n.__b=null});t=n.o.pop();)t.forceUpdate()}};n.__u++||32&t.__u||n.setState({__a:n.__b=n.__v.__k[0]}),e.then(s,s)},S.prototype.componentWillUnmount=function(){this.o=[]},S.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=E(this.__b,r,o.__O=o.__P)}this.__b=null}var i=t.__a&&(0,n.n)(n.FK,null,e.fallback);return i&&(i.__u&=-33),[(0,n.n)(n.FK,null,t.__a?null:e.children),i]};var C=function(e,t,r){if(++r[1]===r[0]&&e.l.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.l.size))for(r=e.i;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;e.i=r=r[2]}};function P(e){return this.getChildContext=function(){return e.context},e.children}function F(e){var t=this,r=e.h;if(t.componentWillUnmount=function(){(0,n.XX)(null,t.v),t.v=null,t.h=null},t.h&&t.h!==r&&t.componentWillUnmount(),!t.v){for(var o=t.__v;null!==o&&!o.__m&&null!==o.__;)o=o.__;t.h=r,t.v={nodeType:1,parentNode:r,childNodes:[],__k:{__m:o.__m},contains:function(){return!0},insertBefore:function(e,r){this.childNodes.push(e),t.h.insertBefore(e,r)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.h.removeChild(e)}}}(0,n.XX)((0,n.n)(P,{context:t.context},e.__v),t.v)}function $(e,t){var r=(0,n.n)(F,{__v:e,h:t});return r.containerInfo=t,r}(A.prototype=new n.uA).__a=function(e){var t=this,r=k(t.__v),n=t.l.get(e);return n[0]++,function(o){var i=function(){t.props.revealOrder?(n.push(o),C(t,e,n)):o()};r?r(i):i()}},A.prototype.render=function(e){this.i=null,this.l=new Map;var t=(0,n.v2)(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var r=t.length;r--;)this.l.set(t[r],this.i=[1,0,this.i]);return e.children},A.prototype.componentDidUpdate=A.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,r){C(e,r,t)})};var O="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,N=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,R=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,L=/[A-Z0-9]/g,D="undefined"!=typeof document,j=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};function T(e,t,r){return null==t.__k&&(t.textContent=""),(0,n.XX)(e,t),"function"==typeof r&&r(),e?e.__c:null}function M(e,t,r){return(0,n.Qv)(e,t),"function"==typeof r&&r(),e?e.__c:null}n.uA.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(n.uA.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var V=n.fF.event;function B(){}function U(){return this.cancelBubble}function H(){return this.defaultPrevented}n.fF.event=function(e){return V&&(e=V(e)),e.persist=B,e.isPropagationStopped=U,e.isDefaultPrevented=H,e.nativeEvent=e};var z,J={enumerable:!1,configurable:!0,get:function(){return this.class}},q=n.fF.vnode;n.fF.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,r=e.type,o={},i=-1===r.indexOf("-");for(var s in t){var l=t[s];if(!("value"===s&&"defaultValue"in t&&null==l||D&&"children"===s&&"noscript"===r||"class"===s||"className"===s)){var a=s.toLowerCase();"defaultValue"===s&&"value"in t&&null==t.value?s="value":"download"===s&&!0===l?l="":"translate"===a&&"no"===l?l=!1:"o"===a[0]&&"n"===a[1]?"ondoubleclick"===a?s="ondblclick":"onchange"!==a||"input"!==r&&"textarea"!==r||j(t.type)?"onfocus"===a?s="onfocusin":"onblur"===a?s="onfocusout":R.test(s)&&(s=a):a=s="oninput":i&&N.test(s)?s=s.replace(L,"-$&").toLowerCase():null===l&&(l=void 0),"oninput"===a&&o[s=a]&&(s="oninputCapture"),o[s]=l}}"select"==r&&o.multiple&&Array.isArray(o.value)&&(o.value=(0,n.v2)(t.children).forEach(function(e){e.props.selected=-1!=o.value.indexOf(e.props.value)})),"select"==r&&null!=o.defaultValue&&(o.value=(0,n.v2)(t.children).forEach(function(e){e.props.selected=o.multiple?-1!=o.defaultValue.indexOf(e.props.value):o.defaultValue==e.props.value})),t.class&&!t.className?(o.class=t.class,Object.defineProperty(o,"className",J)):(t.className&&!t.class||t.class&&t.className)&&(o.class=o.className=t.className),e.props=o}(e),e.$$typeof=O,q&&q(e)};var W=n.fF.__r;n.fF.__r=function(e){W&&W(e),z=e.__c};var K=n.fF.diffed;n.fF.diffed=function(e){K&&K(e);var t=e.props,r=e.__e;null!=r&&"textarea"===e.type&&"value"in t&&t.value!==r.value&&(r.value=null==t.value?"":t.value),z=null};var X={ReactCurrentDispatcher:{current:{readContext:function(e){return z.__n[e.__c].props.value},useCallback:o.hb,useContext:o.NT,useDebugValue:o.MN,useDeferredValue:u,useEffect:o.vJ,useId:o.Bi,useImperativeHandle:o.Yn,useInsertionEffect:f,useLayoutEffect:o.Nf,useMemo:o.Kr,useReducer:o.WO,useRef:o.li,useState:o.J0,useSyncExternalStore:l,useTransition:d}}},Y="18.3.1";function Z(e){return n.n.bind(null,e)}function Q(e){return!!e&&e.$$typeof===O}function G(e){return Q(e)&&e.type===n.FK}function ee(e){return!!e&&!!e.displayName&&("string"==typeof e.displayName||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")}function _n(e){return Q(e)?n.Ob.apply(null,arguments):e}function te(e){return!!e.__k&&((0,n.XX)(null,e),!0)}function re(e){return e&&(e.base||1===e.nodeType&&e)||null}var ne=function(e,t){return e(t)},oe=function(e,t){return e(t)},ie=n.FK,se=Q,le={useState:o.J0,useId:o.Bi,useReducer:o.WO,useEffect:o.vJ,useLayoutEffect:o.Nf,useInsertionEffect:f,useTransition:d,useDeferredValue:u,useSyncExternalStore:l,startTransition:c,useRef:o.li,useImperativeHandle:o.Yn,useMemo:o.Kr,useCallback:o.hb,useContext:o.NT,useDebugValue:o.MN,version:"18.3.1",Children:b,render:T,hydrate:M,unmountComponentAtNode:te,createPortal:$,createElement:n.n,createContext:n.q6,createFactory:Z,cloneElement:_n,createRef:n._3,Fragment:n.FK,isValidElement:Q,isElement:se,isFragment:G,isMemo:ee,findDOMNode:re,Component:n.uA,PureComponent:p,memo:h,forwardRef:v,flushSync:oe,unstable_batchedUpdates:ne,StrictMode:ie,Suspense:S,SuspenseList:A,lazy:I,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:X}},571:e=>{var t=function(e,r){return this instanceof t?e instanceof t?e:((e="string"==typeof e?this.select(e,r):e)&&e.nodeName&&(e=[e]),void(this.nodes=this.slice(e))):new t(e,r)};t.prototype={get length(){return this.nodes.length}},t.prototype.nodes=[],t.prototype.addClass=function(){return this.eacharg(arguments,function(e,t){e.classList.add(t)})},t.prototype.adjacent=function(e,r,n){return"number"==typeof r&&(r=0===r?[]:new Array(r).join().split(",").map(Number.call,Number)),this.each(function(o,i){var s=document.createDocumentFragment();t(r||{}).map(function(r,n){return"string"==typeof(n="function"==typeof e?e.call(this,r,n,o,i):e)?this.generate(n):t(n)}).each(function(e){this.isInPage(e)?s.appendChild(t(e).clone().first()):s.appendChild(e)}),n.call(this,o,s)})},t.prototype.after=function(e,t){return this.adjacent(e,t,function(e,t){e.parentNode.insertBefore(t,e.nextSibling)})},t.prototype.append=function(e,t){return this.adjacent(e,t,function(e,t){e.appendChild(t)})},t.prototype.args=function(e,t,r){return(e="string"!=typeof(e="function"==typeof e?e(t,r):e)?this.slice(e).map(this.str(t,r)):e).toString().split(/[\s,]+/).filter(function(e){return e.length})},t.prototype.array=function(e){var r=this;return this.nodes.reduce(function(n,o,i){var s;return e?(s="string"==typeof(s=(s=e.call(r,o,i))||!1)?t(s):s)instanceof t&&(s=s.nodes):s=o.innerHTML,n.concat(!1!==s?s:[])},[])},t.prototype.attr=function(e,t,r){return r=r?"data-":"",this.pairs(e,t,function(e,t){return e.getAttribute(r+t)},function(e,t,n){n?e.setAttribute(r+t,n):e.removeAttribute(r+t)})},t.prototype.before=function(e,t){return this.adjacent(e,t,function(e,t){e.parentNode.insertBefore(t,e)})},t.prototype.children=function(e){return this.map(function(e){return this.slice(e.children)}).filter(e)},t.prototype.clone=function(){return this.map(function(e,t){var r=e.cloneNode(!0),n=this.getAll(r);return this.getAll(e).each(function(e,t){for(var r in this.mirror)this.mirror[r]&&this.mirror[r](e,n.nodes[t])}),r})},t.prototype.getAll=function(e){return t([e].concat(t("*",e).nodes))},t.prototype.mirror={},t.prototype.mirror.events=function(e,r){if(e._e)for(var n in e._e)e._e[n].forEach(function(e){t(r).on(n,e.callback)})},t.prototype.mirror.select=function(e,r){t(e).is("select")&&(r.value=e.value)},t.prototype.mirror.textarea=function(e,r){t(e).is("textarea")&&(r.value=e.value)},t.prototype.closest=function(e){return this.map(function(r){do{if(t(r).is(e))return r}while((r=r.parentNode)&&r!==document)})},t.prototype.data=function(e,t){return this.attr(e,t,!0)},t.prototype.each=function(e){return this.nodes.forEach(e.bind(this)),this},t.prototype.eacharg=function(e,t){return this.each(function(r,n){this.args(e,r,n).forEach(function(e){t.call(this,r,e)},this)})},t.prototype.empty=function(){return this.each(function(e){for(;e.firstChild;)e.removeChild(e.firstChild)})},t.prototype.filter=function(e){var r=e instanceof t?function(t){return-1!==e.nodes.indexOf(t)}:"function"==typeof e?e:function(t){return t.matches=t.matches||t.msMatchesSelector||t.webkitMatchesSelector,t.matches(e||"*")};return t(this.nodes.filter(r))},t.prototype.find=function(e){return this.map(function(r){return t(e||"*",r)})},t.prototype.first=function(){return this.nodes[0]||!1},t.prototype.generate=function(e){return/^\s*<tr[> ]/.test(e)?t(document.createElement("table")).html(e).children().children().nodes:/^\s*<t(h|d)[> ]/.test(e)?t(document.createElement("table")).html(e).children().children().children().nodes:/^\s*</.test(e)?t(document.createElement("div")).html(e).children().nodes:document.createTextNode(e)},t.prototype.handle=function(){var e=this.slice(arguments).map(function(e){return"function"==typeof e?function(t){t.preventDefault(),e.apply(this,arguments)}:e},this);return this.on.apply(this,e)},t.prototype.hasClass=function(){return this.is("."+this.args(arguments).join("."))},t.prototype.html=function(e){return void 0===e?this.first().innerHTML||"":this.each(function(t){t.innerHTML=e})},t.prototype.is=function(e){return 0<this.filter(e).length},t.prototype.isInPage=function(e){return e!==document.body&&document.body.contains(e)},t.prototype.last=function(){return this.nodes[this.length-1]||!1},t.prototype.map=function(e){return e?t(this.array(e)).unique():this},t.prototype.not=function(e){return this.filter(function(r){return!t(r).is(e||!0)})},t.prototype.off=function(e,r,n){var o=null==r&&null==n,i=null,s=r;return"string"==typeof r&&(i=r,s=n),this.eacharg(e,function(e,r){t(e._e?e._e[r]:[]).each(function(t){(o||t.orig_callback===s&&t.selector===i)&&e.removeEventListener(r,t.callback)})})},t.prototype.on=function(e,r,n){function o(e,t){try{Object.defineProperty(e,"currentTarget",{value:t,configurable:!0})}catch(e){}}var i=null,s=r;function l(e){return r.apply(this,[e].concat(e.detail||[]))}return"string"==typeof r&&(i=r,s=n,r=function(e){var r=arguments;t(e.currentTarget).find(i).each(function(t){var i;t.contains(e.target)&&(i=e.currentTarget,o(e,t),n.apply(t,r),o(e,i))})}),this.eacharg(e,function(e,t){e.addEventListener(t,l),e._e=e._e||{},e._e[t]=e._e[t]||[],e._e[t].push({callback:l,orig_callback:s,selector:i})})},t.prototype.pairs=function(e,t,r,n){var o;return void 0!==t&&(o=e,(e={})[o]=t),"object"==typeof e?this.each(function(t,r){for(var o in e)"function"==typeof e[o]?n(t,o,e[o](t,r)):n(t,o,e[o])}):this.length?r(this.first(),e):""},t.prototype.param=function(e){return Object.keys(e).map(function(t){return this.uri(t)+"="+this.uri(e[t])}.bind(this)).join("&")},t.prototype.parent=function(e){return this.map(function(e){return e.parentNode}).filter(e)},t.prototype.prepend=function(e,t){return this.adjacent(e,t,function(e,t){e.insertBefore(t,e.firstChild)})},t.prototype.remove=function(){return this.each(function(e){e.parentNode&&e.parentNode.removeChild(e)})},t.prototype.removeClass=function(){return this.eacharg(arguments,function(e,t){e.classList.remove(t)})},t.prototype.replace=function(e,r){var n=[];return this.adjacent(e,r,function(e,t){n=n.concat(this.slice(t.children)),e.parentNode.replaceChild(t,e)}),t(n)},t.prototype.scroll=function(){var e=this.first();return e&&e.scrollIntoView({behavior:"smooth"}),this},t.prototype.select=function(e,r){return e=e.replace(/^\s*/,"").replace(/\s*$/,""),/^</.test(e)?t().generate(e):(r||document).querySelectorAll(e)},t.prototype.serialize=function(){var e=this;return this.slice(this.first().elements).reduce(function(r,n){return!n.name||n.disabled||"file"===n.type||/(checkbox|radio)/.test(n.type)&&!n.checked?r:"select-multiple"===n.type?(t(n.options).each(function(t){t.selected&&(r+="&"+e.uri(n.name)+"="+e.uri(t.value))}),r):r+"&"+e.uri(n.name)+"="+e.uri(n.value)},"").slice(1)},t.prototype.siblings=function(e){return this.parent().children(e).not(this)},t.prototype.size=function(){var e=this.first();return e?e.getBoundingClientRect():null},t.prototype.slice=function(e){return e&&0!==e.length&&"string"!=typeof e&&"[object Function]"!==e.toString()?e.length?[].slice.call(e.nodes||e):[e]:[]},t.prototype.str=function(e,t){return function(r){return"function"==typeof r?r.call(this,e,t):r.toString()}},t.prototype.text=function(e){return void 0===e?this.first().textContent||"":this.each(function(t){t.textContent=e})},t.prototype.toggleClass=function(e,t){return!!t===t?this[t?"addClass":"removeClass"](e):this.eacharg(e,function(e,t){e.classList.toggle(t)})},t.prototype.trigger=function(e){var t=this.slice(arguments).slice(1);return this.eacharg(e,function(e,r){var n,o={bubbles:!0,cancelable:!0,detail:t};try{n=new window.CustomEvent(r,o)}catch(e){(n=document.createEvent("CustomEvent")).initCustomEvent(r,!0,!0,t)}e.dispatchEvent(n)})},t.prototype.unique=function(){return t(this.nodes.reduce(function(e,t){return null!=t&&!1!==t&&-1===e.indexOf(t)?e.concat(t):e},[]))},t.prototype.uri=function(e){return encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A").replace(/%20/g,"+")},t.prototype.wrap=function(e){return this.map(function(r){return t(e).each(function(e){(function(e){for(;e.firstElementChild;)e=e.firstElementChild;return t(e)})(e).append(r.cloneNode(!0)),r.parentNode.replaceChild(e,r)})})},e.exports&&(e.exports=t,e.exports.u=t)},659:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=new class{store_product_descriptors={};store_product_descriptors_array=[];base_product_descriptors=[];base_product_variable_ids=[];base_product_ids=[];root_base_products_ids=[];base_products_variations=null;filtered_product_ids=[];filtered_product_indexes=[];output_product_ids=[];getDataToCache(){return{filtered_product_ids:this.filtered_product_ids,filtered_product_indexes:this.filtered_product_indexes,output_product_ids:this.output_product_ids}}setDataFromCache({filtered_product_ids:e,filtered_product_indexes:t,output_product_ids:r}){this.filtered_product_ids=e,this.filtered_product_indexes=t,this.output_product_ids=r}clear(){this.filtered_product_ids=[],this.filtered_product_indexes=[],this.output_product_ids=[]}clearBase(){this.base_product_ids=[],this.base_product_descriptors=[],this.base_product_variable_ids=[],this.base_products_variations=null}setStoreProductDescriptors(e){this.store_product_descriptors=e,Object.keys(this.store_product_descriptors).forEach(e=>{Object.keys(this.store_product_descriptors[e]).forEach(t=>{this.store_product_descriptors_array.push([parseInt(t),parseInt(e),this.store_product_descriptors[e][t]])})})}setBaseProductsData(e){e.forEach(e=>{this.store_product_descriptors.hasOwnProperty(e)&&Object.keys(this.store_product_descriptors[e]).forEach(t=>{t=parseInt(t),e!==t&&(null===this.base_products_variations&&(this.base_products_variations={}),this.base_products_variations[t]=e,this.base_product_variable_ids.includes(e)||this.base_product_variable_ids.push(e)),this.base_product_descriptors.push([t,e,this.store_product_descriptors[e][t]]),this.base_product_ids.push({productId:t,...void 0!==this.store_product_descriptors[e][t]?.type&&{type:this.store_product_descriptors[e][t]?.type}})})})}setRootBaseProductsIds(e){this.root_base_products_ids=e}getRootBaseProductsIds(){return this.root_base_products_ids}setBaseProductDescriptors(e){this.base_product_descriptors=e}setFilteredProducts(e){e.forEach(e=>{this.filtered_product_ids.push({productId:e.doc_id,...void 0!==e.type&&{type:e?.type}}),this.filtered_product_indexes.push(e.index)})}setFilteredAsBaseProducts(){this.filtered_product_ids=this.base_product_ids}setOutputProductIds(){if(0!==this.filtered_product_ids.length)if(null===this.base_products_variations)this.output_product_ids=this.filtered_product_ids.map(({productId:e})=>e);else{const e=[];this.filtered_product_ids.forEach(({productId:t,type:r})=>{!this.base_products_variations.hasOwnProperty(t)||void 0!==r&&"variable"!==r?this.output_product_ids.push(t):e.includes(this.base_products_variations[t])||(this.output_product_ids.push(this.base_products_variations[t]),e.push(this.base_products_variations[t]))})}}getStoreProductDescriptors(){return this.store_product_descriptors}hasStoreProductDescriptorsArray(){return this.store_product_descriptors_array.length>0}getStoreProductDescriptorsArray(){return this.store_product_descriptors_array}getBaseProductIds(){return this.base_product_ids}getFilteredProductIds(){return this.filtered_product_ids}getFilteredProductIndexes(){return this.filtered_product_indexes}getOutputProductIds(){return this.output_product_ids}getBaseProductDescriptors(){return this.base_product_descriptors}hasBaseDescriptors(){return this.base_product_descriptors.length>0}areFilteredTheSameAsBased(){return this.base_product_ids.length===this.filtered_product_ids.length}getDescriptorsOfFilteredProducts(){return this.areFilteredTheSameAsBased()?this.getBaseProductDescriptors():this.getDescriptors(this.getFilteredProductIndexes())}getDescriptorByIndex(e){return this.base_product_descriptors[e]}getStoreDescriptorByIndex(e){return this.store_product_descriptors_array[e]}getDescriptors(e){const t=[];return e.forEach(e=>{t.push(this.getDescriptorByIndex(e))}),t}getStoreDescriptors(e,t=!1){const r=[];return e.forEach(e=>{const n=this.getStoreDescriptorByIndex(e);t&&!this.root_base_products_ids.includes(n[1])||r.push(n)}),r}setFilteredProductIds(e){this.filtered_product_ids=e}countMainProductsInDescriptors(e){let t=0;const r=[];return e.forEach(e=>{const n=e[1];e[0]!==n?r.includes(n)||(r.push(n),t++):t++}),t}hasFilteredProducts(){return this.filtered_product_ids.length>0}getBaseProductVariableIds(){return this.base_product_variable_ids}}},698:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(571),o=r.n(n);o().prototype.show=function(e="block"){return this.each(function(t){t.style.display=e})},o().prototype.hide=function(){return this.each(function(e){e.style.display="none"})};const i=o()},742:e=>{"use strict";e.exports=function(e,t,r,n){e=(e+"").replace(/[^0-9+\-Ee.]/g,"");var o=isFinite(+e)?+e:0,i=isFinite(+t)?Math.abs(t):0,s=void 0===n?",":n,l=void 0===r?".":r,a="";return a=(i?function(e,t){if(-1===(""+e).indexOf("e"))return+(Math.round(e+"e+"+t)+"e-"+t);var r=(""+e).split("e"),n="";return+r[1]+t>0&&(n="+"),(+(Math.round(+r[0]+"e"+n+(+r[1]+t))+"e-"+t)).toFixed(t)}(o,i).toString():""+Math.round(o)).split("."),a[0].length>3&&(a[0]=a[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,s)),(a[1]||"").length<i&&(a[1]=a[1]||"",a[1]+=new Array(i-a[1].length+1).join("0")),a.join(l)}},817:(e,t,r)=>{"use strict";r.d(t,{Bi:()=>P,J0:()=>g,Kr:()=>S,MN:()=>A,Md:()=>C,NT:()=>I,Nf:()=>w,WO:()=>b,Yn:()=>x,hb:()=>k,li:()=>E,vJ:()=>y});var n,o,i,s,l=r(181),a=0,c=[],u=l.fF,d=u.__b,f=u.__r,p=u.diffed,h=u.__c,m=u.unmount,_=u.__;function v(e,t){u.__h&&u.__h(o,e,a||t),a=0;var r=o.__H||(o.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function g(e){return a=1,b(D,e)}function b(e,t,r){var i=v(n++,2);if(i.t=e,!i.__c&&(i.__=[r?r(t):D(void 0,t),function(e){var t=i.__N?i.__N[0]:i.__[0],r=i.t(t,e);t!==r&&(i.__N=[r,i.__[1]],i.__c.setState({}))}],i.__c=o,!o.__f)){var s=function(e,t,r){if(!i.__c.__H)return!0;var n=i.__c.__H.__.filter(function(e){return!!e.__c});if(n.every(function(e){return!e.__N}))return!l||l.call(this,e,t,r);var o=i.__c.props!==e;return n.forEach(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(o=!0)}}),l&&l.call(this,e,t,r)||o};o.__f=!0;var l=o.shouldComponentUpdate,a=o.componentWillUpdate;o.componentWillUpdate=function(e,t,r){if(this.__e){var n=l;l=void 0,s(e,t,r),l=n}a&&a.call(this,e,t,r)},o.shouldComponentUpdate=s}return i.__N||i.__}function y(e,t){var r=v(n++,3);!u.__s&&L(r.__H,t)&&(r.__=e,r.u=t,o.__H.__h.push(r))}function w(e,t){var r=v(n++,4);!u.__s&&L(r.__H,t)&&(r.__=e,r.u=t,o.__h.push(r))}function E(e){return a=5,S(function(){return{current:e}},[])}function x(e,t,r){a=6,w(function(){if("function"==typeof e){var r=e(t());return function(){e(null),r&&"function"==typeof r&&r()}}if(e)return e.current=t(),function(){return e.current=null}},null==r?r:r.concat(e))}function S(e,t){var r=v(n++,7);return L(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function k(e,t){return a=8,S(function(){return e},t)}function I(e){var t=o.context[e.__c],r=v(n++,9);return r.c=e,t?(null==r.__&&(r.__=!0,t.sub(o)),t.props.value):e.__}function A(e,t){u.useDebugValue&&u.useDebugValue(t?t(e):e)}function C(e){var t=v(n++,10),r=g();return t.__=e,o.componentDidCatch||(o.componentDidCatch=function(e,n){t.__&&t.__(e,n),r[1](e)}),[r[0],function(){r[1](void 0)}]}function P(){var e=v(n++,11);if(!e.__){for(var t=o.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var r=t.__m||(t.__m=[0,0]);e.__="P"+r[0]+"-"+r[1]++}return e.__}function F(){for(var e;e=c.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(N),e.__H.__h.forEach(R),e.__H.__h=[]}catch(t){e.__H.__h=[],u.__e(t,e.__v)}}u.__b=function(e){o=null,d&&d(e)},u.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),_&&_(e,t)},u.__r=function(e){f&&f(e),n=0;var t=(o=e.__c).__H;t&&(i===o?(t.__h=[],o.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.forEach(N),t.__h.forEach(R),t.__h=[],n=0)),i=o},u.diffed=function(e){p&&p(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==c.push(t)&&s===u.requestAnimationFrame||((s=u.requestAnimationFrame)||O)(F)),t.__H.__.forEach(function(e){e.u&&(e.__H=e.u),e.u=void 0})),i=o=null},u.__c=function(e,t){t.some(function(e){try{e.__h.forEach(N),e.__h=e.__h.filter(function(e){return!e.__||R(e)})}catch(r){t.some(function(e){e.__h&&(e.__h=[])}),t=[],u.__e(r,e.__v)}}),h&&h(e,t)},u.unmount=function(e){m&&m(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(e){try{N(e)}catch(e){t=e}}),r.__H=void 0,t&&u.__e(t,r.__v))};var $="function"==typeof requestAnimationFrame;function O(e){var t,r=function(){clearTimeout(n),$&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,35);$&&(t=requestAnimationFrame(r))}function N(e){var t=o,r=e.__c;"function"==typeof r&&(e.__c=void 0,r()),o=t}function R(e){var t=o;e.__c=e.__(),o=t}function L(e,t){return!e||e.length!==t.length||t.some(function(t,r){return t!==e[r]})}function D(e,t){return"function"==typeof t?t(e):t}},826:(e,t,r)=>{"use strict";r.d(t,{A:()=>dp});var n=r(525),o=r(112),i=r(817);const s=(0,n.forwardRef)(function({icon:e,size:t=24,...r},o){return(0,n.cloneElement)(e,{width:t,height:t,...r,ref:o})});function l(e){var t,r,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=l(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function a(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=l(e))&&(n&&(n+=" "),n+=t);return n}const c=a,u=e=>(0,n.createElement)("circle",e),d=e=>(0,n.createElement)("path",e),f=(0,n.forwardRef)(({className:e,isPressed:t,...r},o)=>{const i={...r,className:c(e,{"is-pressed":t})||void 0,"aria-hidden":!0,focusable:!1};return(0,n.createElement)("svg",{...i,ref:o})});f.displayName="SVG";const p=(0,n.createElement)(f,{fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.createElement)(d,{d:"M11 1 1 11M1 1l10 10",stroke:"#767676",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}));var h=r(999),m=r(367);const{appState:_}=(0,m.BV)(),v=e=>{_.value=e},g=()=>{v({..._.value,offcanvasIsVisible:!0})},b=({peek:e=!1})=>{e?_.value={..._.peek(),offcanvasIsVisible:!1}:v({..._.value,offcanvasIsVisible:!1})},y=e=>{v({..._.value,appliedFiltersCount:e})},w=e=>{v({..._.value,appliedFiltersValues:e})},E=e=>{window.document.body.style.overflowY=e?"":"hidden"},x=(e,{peek:t=!1})=>{v(t?{..._.peek(),currentMobileFilter:e}:{..._.value,currentMobileFilter:e}),E(!e)},S=(e,{peek:t=!1})=>{v(t?{..._.peek(),mobileOverlayAllIsVisible:e}:{..._.value,mobileOverlayAllIsVisible:e}),E(!e)},k=e=>{v({..._.peek(),showMoreButtonIsVisible:e})},I=e=>{v({..._.peek(),showPreviousButtonIsVisible:e})},A=e=>{v({..._.peek(),currentPage:e})},C=e=>{v({..._.peek(),firstVisiblePage:e})},P=e=>{v({..._.peek(),orderby:e})},F=e=>{v({..._.peek(),searchInProgress:e})};let $;function O(e){if("string"!=typeof e||-1===e.indexOf("&"))return e;void 0===$&&($=document.implementation&&document.implementation.createHTMLDocument?document.implementation.createHTMLDocument("").createElement("textarea"):document.createElement("textarea")),$.innerHTML=e;const t=$.textContent;return $.innerHTML="",t}var N=r(287),R=r.n(N),L=r(471),D=r.n(L);const j=R()(console.error);var T,M,V,B;T={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},M=["(","?"],V={")":["("],":":["?","?:"]},B=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var U={"!":function(e){return!e},"*":function(e,t){return e*t},"/":function(e,t){return e/t},"%":function(e,t){return e%t},"+":function(e,t){return e+t},"-":function(e,t){return e-t},"<":function(e,t){return e<t},"<=":function(e,t){return e<=t},">":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,r){if(e)throw t;return r}};var H={contextDelimiter:"",onMissingKey:null};function z(e,t){var r;for(r in this.data=e,this.pluralForms={},this.options={},H)this.options[r]=void 0!==t&&r in t?t[r]:H[r]}z.prototype.getPluralForm=function(e,t){var r,n,o,i,s=this.pluralForms[e];return s||("function"!=typeof(o=(r=this.data[e][""])["Plural-Forms"]||r["plural-forms"]||r.plural_forms)&&(n=function(e){var t,r,n;for(t=e.split(";"),r=0;r<t.length;r++)if(0===(n=t[r].trim()).indexOf("plural="))return n.substr(7)}(r["Plural-Forms"]||r["plural-forms"]||r.plural_forms),i=function(e){var t=function(e){for(var t,r,n,o,i=[],s=[];t=e.match(B);){for(r=t[0],(n=e.substr(0,t.index).trim())&&i.push(n);o=s.pop();){if(V[r]){if(V[r][0]===o){r=V[r][1]||r;break}}else if(M.indexOf(o)>=0||T[o]<T[r]){s.push(o);break}i.push(o)}V[r]||s.push(r),e=e.substr(t.index+r.length)}return(e=e.trim())&&i.push(e),i.concat(s.reverse())}(e);return function(e){return function(e,t){var r,n,o,i,s,l,a=[];for(r=0;r<e.length;r++){if(s=e[r],i=U[s]){for(n=i.length,o=Array(n);n--;)o[n]=a.pop();try{l=i.apply(null,o)}catch(e){return e}}else l=t.hasOwnProperty(s)?t[s]:+s;a.push(l)}return a[0]}(t,e)}}(n),o=function(e){return+i({n:e})}),s=this.pluralForms[e]=o),s(t)},z.prototype.dcnpgettext=function(e,t,r,n,o){var i,s,l;return i=void 0===o?0:this.getPluralForm(e,o),s=r,t&&(s=t+this.options.contextDelimiter+r),(l=this.data[e][s])&&l[i]?l[i]:(this.options.onMissingKey&&this.options.onMissingKey(r,e),0===i?r:n)};const J={plural_forms:e=>1===e?0:1},q=/^i18n\.(n?gettext|has_translation)(_|$)/,W=function(e){return"string"!=typeof e||""===e?(console.error("The namespace must be a non-empty string."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.\-\/]*$/.test(e)||(console.error("The namespace can only contain numbers, letters, dashes, periods, underscores and slashes."),!1)},K=function(e){return"string"!=typeof e||""===e?(console.error("The hook name must be a non-empty string."),!1):/^__/.test(e)?(console.error("The hook name cannot begin with `__`."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(e)||(console.error("The hook name can only contain numbers, letters, dashes, periods and underscores."),!1)},X=function(e,t){return function(r,n,o,i=10){const s=e[t];if(!K(r))return;if(!W(n))return;if("function"!=typeof o)return void console.error("The hook callback must be a function.");if("number"!=typeof i)return void console.error("If specified, the hook priority must be a number.");const l={callback:o,priority:i,namespace:n};if(s[r]){const e=s[r].handlers;let t;for(t=e.length;t>0&&!(i>=e[t-1].priority);t--);t===e.length?e[t]=l:e.splice(t,0,l),s.__current.forEach(e=>{e.name===r&&e.currentIndex>=t&&e.currentIndex++})}else s[r]={handlers:[l],runs:0};"hookAdded"!==r&&e.doAction("hookAdded",r,n,o,i)}},Y=function(e,t,r=!1){return function(n,o){const i=e[t];if(!K(n))return;if(!r&&!W(o))return;if(!i[n])return 0;let s=0;if(r)s=i[n].handlers.length,i[n]={runs:i[n].runs,handlers:[]};else{const e=i[n].handlers;for(let t=e.length-1;t>=0;t--)e[t].namespace===o&&(e.splice(t,1),s++,i.__current.forEach(e=>{e.name===n&&e.currentIndex>=t&&e.currentIndex--}))}return"hookRemoved"!==n&&e.doAction("hookRemoved",n,o),s}},Z=function(e,t){return function(r,n){const o=e[t];return void 0!==n?r in o&&o[r].handlers.some(e=>e.namespace===n):r in o}},Q=function(e,t,r=!1){return function(n,...o){const i=e[t];i[n]||(i[n]={handlers:[],runs:0}),i[n].runs++;const s=i[n].handlers;if(!s||!s.length)return r?o[0]:void 0;const l={name:n,currentIndex:0};for(i.__current.push(l);l.currentIndex<s.length;){const e=s[l.currentIndex].callback.apply(null,o);r&&(o[0]=e),l.currentIndex++}return i.__current.pop(),r?o[0]:void 0}},G=function(e,t){return function(){var r;const n=e[t];return null!==(r=n.__current[n.__current.length-1]?.name)&&void 0!==r?r:null}},ee=function(e,t){return function(r){const n=e[t];return void 0===r?void 0!==n.__current[0]:!!n.__current[0]&&r===n.__current[0].name}},te=function(e,t){return function(r){const n=e[t];if(K(r))return n[r]&&n[r].runs?n[r].runs:0}};class re{constructor(){this.actions=Object.create(null),this.actions.__current=[],this.filters=Object.create(null),this.filters.__current=[],this.addAction=X(this,"actions"),this.addFilter=X(this,"filters"),this.removeAction=Y(this,"actions"),this.removeFilter=Y(this,"filters"),this.hasAction=Z(this,"actions"),this.hasFilter=Z(this,"filters"),this.removeAllActions=Y(this,"actions",!0),this.removeAllFilters=Y(this,"filters",!0),this.doAction=Q(this,"actions"),this.applyFilters=Q(this,"filters",!0),this.currentAction=G(this,"actions"),this.currentFilter=G(this,"filters"),this.doingAction=ee(this,"actions"),this.doingFilter=ee(this,"filters"),this.didAction=te(this,"actions"),this.didFilter=te(this,"filters")}}const ne=new re,{addAction:oe,addFilter:ie,removeAction:se,removeFilter:le,hasAction:ae,hasFilter:ce,removeAllActions:ue,removeAllFilters:de,doAction:fe,applyFilters:pe,currentAction:he,currentFilter:me,doingAction:_e,doingFilter:ve,didAction:ge,didFilter:be,actions:ye,filters:we}=ne,Ee=((e,t,r)=>{const n=new z({}),o=new Set,i=()=>{o.forEach(e=>e())},s=function(e){var t;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default";n.data[r]={...n.data[r],...e},n.data[r][""]={...J,...null===(t=n.data[r])||void 0===t?void 0:t[""]},delete n.pluralForms[r]},l=(e,t)=>{s(e,t),i()},a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0;return n.data[e]||s(void 0,e),n.dcnpgettext(e,t,r,o,i)},c=function(){return arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default"},_x=(e,t,n)=>{let o=a(n,t,e);return r?(o=r.applyFilters("i18n.gettext_with_context",o,e,t,n),r.applyFilters("i18n.gettext_with_context_"+c(n),o,e,t,n)):o};if(r){const e=e=>{q.test(e)&&i()};r.addAction("hookAdded","core/i18n",e),r.addAction("hookRemoved","core/i18n",e)}return{getLocaleData:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return n.data[e]},setLocaleData:l,addLocaleData:function(e){var t;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default";n.data[r]={...n.data[r],...e,"":{...J,...null===(t=n.data[r])||void 0===t?void 0:t[""],...null==e?void 0:e[""]}},delete n.pluralForms[r],i()},resetLocaleData:(e,t)=>{n.data={},n.pluralForms={},l(e,t)},subscribe:e=>(o.add(e),()=>o.delete(e)),__:(e,t)=>{let n=a(t,void 0,e);return r?(n=r.applyFilters("i18n.gettext",n,e,t),r.applyFilters("i18n.gettext_"+c(t),n,e,t)):n},_x,_n:(e,t,n,o)=>{let i=a(o,void 0,e,t,n);return r?(i=r.applyFilters("i18n.ngettext",i,e,t,n,o),r.applyFilters("i18n.ngettext_"+c(o),i,e,t,n,o)):i},_nx:(e,t,n,o,i)=>{let s=a(i,o,e,t,n);return r?(s=r.applyFilters("i18n.ngettext_with_context",s,e,t,n,o,i),r.applyFilters("i18n.ngettext_with_context_"+c(i),s,e,t,n,o,i)):s},isRTL:()=>"rtl"===_x("ltr","text direction"),hasTranslation:(e,t,o)=>{var i,s;const l=t?t+""+e:e;let a=!(null===(i=n.data)||void 0===i||null===(s=i[null!=o?o:"default"])||void 0===s||!s[l]);return r&&(a=r.applyFilters("i18n.has_translation",a,e,t,o),a=r.applyFilters("i18n.has_translation_"+c(o),a,e,t,o)),a}}})(0,0,ne);Ee.getLocaleData.bind(Ee),Ee.setLocaleData.bind(Ee),Ee.resetLocaleData.bind(Ee),Ee.subscribe.bind(Ee),Ee.__.bind(Ee),Ee._x.bind(Ee),Ee._n.bind(Ee),Ee._nx.bind(Ee),Ee.isRTL.bind(Ee),Ee.hasTranslation.bind(Ee);var xe=r(742),Se=r.n(xe);function ke({precision:e=null,decimalSeparator:t=".",thousandSeparator:r=","},n){if(void 0===n)return"";if("number"!=typeof n&&(n=parseFloat(n)),isNaN(n))return"";let o=null===e?NaN:Number(e);if(isNaN(o)){const[,e]=n.toString().split(".");o=e?e.length:0}return Se()(n,o,t,r)}var Ie=r(868);const Ae=Object.create(null),Ce=function(e){let t;function r(e){if(e.priceFormat)return function(e){const t=document.createElement("DIV");return t.innerHTML=e,t.textContent||t.innerText||""}(e.priceFormat.toString());switch(e.symbolPosition){case"left":return"%1$s%2$s";case"right":return"%2$s%1$s";case"left_space":return"%1$s %2$s";case"right_space":return"%2$s %1$s"}return"%1$s%2$s"}function o(e){const n={code:"USD",symbol:"$",symbolPosition:"left",thousandSeparator:",",decimalSeparator:".",precision:2,...e};let o=n.precision;null===o?(console.warn("Currency precision is null"),o=NaN):"string"==typeof o&&(o=parseInt(o,10)),t={code:n.code.toString(),symbol:n.symbol.toString(),symbolPosition:n.symbolPosition.toString(),decimalSeparator:n.decimalSeparator.toString(),priceFormat:r(n),thousandSeparator:n.thousandSeparator.toString(),precision:o}}function i(e,r=!1){const n=ke(t,e);if(""===n)return n;const{priceFormat:o,symbol:i,code:s}=t;return function(e){try{for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return D().sprintf(e,...r)}catch(t){return t instanceof Error&&j("sprintf error: \n\n"+t.toString()),e}}(o,r?s:i,n)}return o(e),{getCurrencyConfig:()=>({...t}),getDataForCountry:function(e,t={},r={}){const n=t[e];if(!n)return{};const o=r[n.currency_code];return o?{code:n.currency_code,symbol:O(o),symbolPosition:n.currency_pos,thousandSeparator:n.thousand_sep,decimalSeparator:n.decimal_sep,precision:n.num_decimals}:{}},setCurrency:o,formatAmount:i,formatCurrency:function(e){return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{since:r,version:n,alternative:o,plugin:i,link:s,hint:l}=t,a=`${e} is deprecated${r?` since version ${r}`:""}${n?` and will be removed${i?` from ${i}`:""} in version ${n}`:""}.${o?` Please use ${o} instead.`:""}${s?` See: ${s}`:""}${l?` Note: ${l}`:""}`;a in Ae||((0,Ie.Eo)("deprecated",e,t,a),console.warn(a),Ae[a]=!0)}("Currency().formatCurrency",{version:"5.0.0",alternative:"Currency().formatAmount",plugin:"WooCommerce",hint:"`formatAmount` accepts the same arguments as formatCurrency"}),i(e)},getPriceFormat:r,formatDecimal(e){if("number"!=typeof e&&(e=parseFloat(e)),Number.isNaN(e))return 0;const{precision:r}=t;return Math.round(e*Math.pow(10,r))/Math.pow(10,r)},formatDecimalString(e){if("number"!=typeof e&&(e=parseFloat(e)),Number.isNaN(e))return"";const{precision:r}=t;return e.toFixed(r)},render:e=>("number"!=typeof e&&(e=parseFloat(e)),e<0?(0,n.createElement)("span",{className:"is-negative"},i(e)):i(e))}},Pe=function(e){return"string"!=typeof e||""===e?(console.error("The namespace must be a non-empty string."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.\-\/]*$/.test(e)||(console.error("The namespace can only contain numbers, letters, dashes, periods, underscores and slashes."),!1)},Fe=function(e){return"string"!=typeof e||""===e?(console.error("The hook name must be a non-empty string."),!1):/^__/.test(e)?(console.error("The hook name cannot begin with `__`."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(e)||(console.error("The hook name can only contain numbers, letters, dashes, periods and underscores."),!1)},$e=function(e,t){return function(r,n,o){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:10;const s=e[t];if(!Fe(r))return;if(!Pe(n))return;if("function"!=typeof o)return void console.error("The hook callback must be a function.");if("number"!=typeof i)return void console.error("If specified, the hook priority must be a number.");const l={callback:o,priority:i,namespace:n};if(s[r]){const e=s[r].handlers;let t;for(t=e.length;t>0&&!(i>=e[t-1].priority);t--);t===e.length?e[t]=l:e.splice(t,0,l),s.__current.forEach(e=>{e.name===r&&e.currentIndex>=t&&e.currentIndex++})}else s[r]={handlers:[l],runs:0};"hookAdded"!==r&&e.doAction("hookAdded",r,n,o,i)}},Oe=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(n,o){const i=e[t];if(!Fe(n))return;if(!r&&!Pe(o))return;if(!i[n])return 0;let s=0;if(r)s=i[n].handlers.length,i[n]={runs:i[n].runs,handlers:[]};else{const e=i[n].handlers;for(let t=e.length-1;t>=0;t--)e[t].namespace===o&&(e.splice(t,1),s++,i.__current.forEach(e=>{e.name===n&&e.currentIndex>=t&&e.currentIndex--}))}return"hookRemoved"!==n&&e.doAction("hookRemoved",n,o),s}},Ne=function(e,t){return function(r,n){const o=e[t];return void 0!==n?r in o&&o[r].handlers.some(e=>e.namespace===n):r in o}},Re=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(n){const o=e[t];o[n]||(o[n]={handlers:[],runs:0}),o[n].runs++;const i=o[n].handlers;for(var s=arguments.length,l=new Array(s>1?s-1:0),a=1;a<s;a++)l[a-1]=arguments[a];if(!i||!i.length)return r?l[0]:void 0;const c={name:n,currentIndex:0};for(o.__current.push(c);c.currentIndex<i.length;){const e=i[c.currentIndex].callback.apply(null,l);r&&(l[0]=e),c.currentIndex++}return o.__current.pop(),r?l[0]:void 0}},Le=function(e,t){return function(){var r,n;const o=e[t];return null!==(r=null===(n=o.__current[o.__current.length-1])||void 0===n?void 0:n.name)&&void 0!==r?r:null}},De=function(e,t){return function(r){const n=e[t];return void 0===r?void 0!==n.__current[0]:!!n.__current[0]&&r===n.__current[0].name}},je=function(e,t){return function(r){const n=e[t];if(Fe(r))return n[r]&&n[r].runs?n[r].runs:0}};class Te{constructor(){this.actions=Object.create(null),this.actions.__current=[],this.filters=Object.create(null),this.filters.__current=[],this.addAction=$e(this,"actions"),this.addFilter=$e(this,"filters"),this.removeAction=Oe(this,"actions"),this.removeFilter=Oe(this,"filters"),this.hasAction=Ne(this,"actions"),this.hasFilter=Ne(this,"filters"),this.removeAllActions=Oe(this,"actions",!0),this.removeAllFilters=Oe(this,"filters",!0),this.doAction=Re(this,"actions"),this.applyFilters=Re(this,"filters",!0),this.currentAction=Le(this,"actions"),this.currentFilter=Le(this,"filters"),this.doingAction=De(this,"actions"),this.doingFilter=De(this,"filters"),this.didAction=je(this,"actions"),this.didFilter=je(this,"filters")}}const Me=new Te,{addAction:Ve,addFilter:Be,removeAction:Ue,removeFilter:He,hasAction:ze,hasFilter:Je,removeAllActions:qe,removeAllFilters:We,doAction:Ke,applyFilters:Xe,currentAction:Ye,currentFilter:Ze,doingAction:Qe,doingFilter:Ge,didAction:et,didFilter:tt,actions:rt,filters:nt}=Me,ot=Ce(void 0),it=((0,n.createContext)(ot),Ce);var st=r(698),lt=/iPhone/i,at=/iPod/i,ct=/iPad/i,ut=/\biOS-universal(?:.+)Mac\b/i,dt=/\bAndroid(?:.+)Mobile\b/i,ft=/Android/i,pt=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,ht=/Silk/i,mt=/Windows Phone/i,_t=/\bWindows(?:.+)ARM\b/i,vt=/BlackBerry/i,gt=/BB10/i,bt=/Opera Mini/i,yt=/\b(CriOS|Chrome)(?:.+)Mobile/i,wt=/Mobile(?:.+)Firefox\b/i,Et=function(e){return void 0!==e&&"MacIntel"===e.platform&&"number"==typeof e.maxTouchPoints&&e.maxTouchPoints>1&&"undefined"==typeof MSStream};const xt=Array.isArray,St="object"==typeof global&&global&&global.Object===Object&&global;var kt="object"==typeof self&&self&&self.Object===Object&&self;const It=St||kt||Function("return this")(),At=It.Symbol;var Ct=Object.prototype,Pt=Ct.hasOwnProperty,Ft=Ct.toString,$t=At?At.toStringTag:void 0;var Ot=Object.prototype.toString;var Nt=At?At.toStringTag:void 0;const Rt=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Nt&&Nt in Object(e)?function(e){var t=Pt.call(e,$t),r=e[$t];try{e[$t]=void 0;var n=!0}catch(e){}var o=Ft.call(e);return n&&(t?e[$t]=r:delete e[$t]),o}(e):function(e){return Ot.call(e)}(e)},Lt=function(e){return null!=e&&"object"==typeof e},Dt=function(e){return"symbol"==typeof e||Lt(e)&&"[object Symbol]"==Rt(e)};var jt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Tt=/^\w*$/;const Mt=function(e,t){if(xt(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!Dt(e))||Tt.test(e)||!jt.test(e)||null!=t&&e in Object(t)},Vt=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},Bt=function(e){if(!Vt(e))return!1;var t=Rt(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},Ut=It["__core-js_shared__"];var Ht,zt=(Ht=/[^.]+$/.exec(Ut&&Ut.keys&&Ut.keys.IE_PROTO||""))?"Symbol(src)_1."+Ht:"";var Jt=Function.prototype.toString;const qt=function(e){if(null!=e){try{return Jt.call(e)}catch(e){}try{return e+""}catch(e){}}return""};var Wt=/^\[object .+?Constructor\]$/,Kt=Function.prototype,Xt=Object.prototype,Yt=Kt.toString,Zt=Xt.hasOwnProperty,Qt=RegExp("^"+Yt.call(Zt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const Gt=function(e){return!(!Vt(e)||(t=e,zt&&zt in t))&&(Bt(e)?Qt:Wt).test(qt(e));var t},er=function(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return Gt(r)?r:void 0},tr=er(Object,"create");var rr=Object.prototype.hasOwnProperty;var nr=Object.prototype.hasOwnProperty;function or(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}or.prototype.clear=function(){this.__data__=tr?tr(null):{},this.size=0},or.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},or.prototype.get=function(e){var t=this.__data__;if(tr){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return rr.call(t,e)?t[e]:void 0},or.prototype.has=function(e){var t=this.__data__;return tr?void 0!==t[e]:nr.call(t,e)},or.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=tr&&void 0===t?"__lodash_hash_undefined__":t,this};const ir=or,sr=function(e,t){return e===t||e!=e&&t!=t},lr=function(e,t){for(var r=e.length;r--;)if(sr(e[r][0],t))return r;return-1};var ar=Array.prototype.splice;function cr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}cr.prototype.clear=function(){this.__data__=[],this.size=0},cr.prototype.delete=function(e){var t=this.__data__,r=lr(t,e);return!(r<0||(r==t.length-1?t.pop():ar.call(t,r,1),--this.size,0))},cr.prototype.get=function(e){var t=this.__data__,r=lr(t,e);return r<0?void 0:t[r][1]},cr.prototype.has=function(e){return lr(this.__data__,e)>-1},cr.prototype.set=function(e,t){var r=this.__data__,n=lr(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};const ur=cr,dr=er(It,"Map"),fr=function(e,t){var r,n,o=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof t?"string":"hash"]:o.map};function pr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}pr.prototype.clear=function(){this.size=0,this.__data__={hash:new ir,map:new(dr||ur),string:new ir}},pr.prototype.delete=function(e){var t=fr(this,e).delete(e);return this.size-=t?1:0,t},pr.prototype.get=function(e){return fr(this,e).get(e)},pr.prototype.has=function(e){return fr(this,e).has(e)},pr.prototype.set=function(e,t){var r=fr(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this};const hr=pr;function mr(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var s=e.apply(this,n);return r.cache=i.set(o,s)||i,s};return r.cache=new(mr.Cache||hr),r}mr.Cache=hr;var _r=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,vr=/\\(\\)?/g;const gr=(br=mr(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(_r,function(e,r,n,o){t.push(n?o.replace(vr,"$1"):r||e)}),t},function(e){return 500===yr.size&&yr.clear(),e}),yr=br.cache,br);var br,yr;const wr=function(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o};var Er=At?At.prototype:void 0,xr=Er?Er.toString:void 0;const Sr=function e(t){if("string"==typeof t)return t;if(xt(t))return wr(t,e)+"";if(Dt(t))return xr?xr.call(t):"";var r=t+"";return"0"==r&&1/t==-1/0?"-0":r},kr=function(e){return null==e?"":Sr(e)},Ir=function(e,t){return xt(e)?e:Mt(e,t)?[e]:gr(kr(e))},Ar=function(e){if("string"==typeof e||Dt(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t},Cr=function(e,t){for(var r=0,n=(t=Ir(t,e)).length;null!=e&&r<n;)e=e[Ar(t[r++])];return r&&r==n?e:void 0},Pr=function(e,t,r){var n=null==e?void 0:Cr(e,t);return void 0===n?r:n};function Fr(e){var t=this.__data__=new ur(e);this.size=t.size}Fr.prototype.clear=function(){this.__data__=new ur,this.size=0},Fr.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},Fr.prototype.get=function(e){return this.__data__.get(e)},Fr.prototype.has=function(e){return this.__data__.has(e)},Fr.prototype.set=function(e,t){var r=this.__data__;if(r instanceof ur){var n=r.__data__;if(!dr||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new hr(n)}return r.set(e,t),this.size=r.size,this};const $r=Fr,Or=function(){try{var e=er(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),Nr=function(e,t,r){"__proto__"==t&&Or?Or(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r};var Rr=Object.prototype.hasOwnProperty;const Lr=function(e,t,r){var n=e[t];Rr.call(e,t)&&sr(n,r)&&(void 0!==r||t in e)||Nr(e,t,r)},Dr=function(e,t,r,n){var o=!r;r||(r={});for(var i=-1,s=t.length;++i<s;){var l=t[i],a=n?n(r[l],e[l],l,r,e):void 0;void 0===a&&(a=e[l]),o?Nr(r,l,a):Lr(r,l,a)}return r},jr=function(e){return Lt(e)&&"[object Arguments]"==Rt(e)};var Tr=Object.prototype,Mr=Tr.hasOwnProperty,Vr=Tr.propertyIsEnumerable;const Br=jr(function(){return arguments}())?jr:function(e){return Lt(e)&&Mr.call(e,"callee")&&!Vr.call(e,"callee")};var Ur="object"==typeof exports&&exports&&!exports.nodeType&&exports,Hr=Ur&&"object"==typeof module&&module&&!module.nodeType&&module,zr=Hr&&Hr.exports===Ur?It.Buffer:void 0;const Jr=(zr?zr.isBuffer:void 0)||function(){return!1};var qr=/^(?:0|[1-9]\d*)$/;const Wr=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&qr.test(e))&&e>-1&&e%1==0&&e<t},Kr=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991};var Xr={};Xr["[object Float32Array]"]=Xr["[object Float64Array]"]=Xr["[object Int8Array]"]=Xr["[object Int16Array]"]=Xr["[object Int32Array]"]=Xr["[object Uint8Array]"]=Xr["[object Uint8ClampedArray]"]=Xr["[object Uint16Array]"]=Xr["[object Uint32Array]"]=!0,Xr["[object Arguments]"]=Xr["[object Array]"]=Xr["[object ArrayBuffer]"]=Xr["[object Boolean]"]=Xr["[object DataView]"]=Xr["[object Date]"]=Xr["[object Error]"]=Xr["[object Function]"]=Xr["[object Map]"]=Xr["[object Number]"]=Xr["[object Object]"]=Xr["[object RegExp]"]=Xr["[object Set]"]=Xr["[object String]"]=Xr["[object WeakMap]"]=!1;const Yr=function(e){return function(t){return e(t)}};var Zr="object"==typeof exports&&exports&&!exports.nodeType&&exports,Qr=Zr&&"object"==typeof module&&module&&!module.nodeType&&module,Gr=Qr&&Qr.exports===Zr&&St.process;const en=function(){try{return Qr&&Qr.require&&Qr.require("util").types||Gr&&Gr.binding&&Gr.binding("util")}catch(e){}}();var tn=en&&en.isTypedArray;const rn=tn?Yr(tn):function(e){return Lt(e)&&Kr(e.length)&&!!Xr[Rt(e)]};var nn=Object.prototype.hasOwnProperty;const on=function(e,t){var r=xt(e),n=!r&&Br(e),o=!r&&!n&&Jr(e),i=!r&&!n&&!o&&rn(e),s=r||n||o||i,l=s?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],a=l.length;for(var c in e)!t&&!nn.call(e,c)||s&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Wr(c,a))||l.push(c);return l};var sn=Object.prototype;const ln=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||sn)},an=function(e,t){return function(r){return e(t(r))}},cn=an(Object.keys,Object);var un=Object.prototype.hasOwnProperty;const dn=function(e){return null!=e&&Kr(e.length)&&!Bt(e)},fn=function(e){return dn(e)?on(e):function(e){if(!ln(e))return cn(e);var t=[];for(var r in Object(e))un.call(e,r)&&"constructor"!=r&&t.push(r);return t}(e)};var pn=Object.prototype.hasOwnProperty;const hn=function(e){if(!Vt(e))return function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}(e);var t=ln(e),r=[];for(var n in e)("constructor"!=n||!t&&pn.call(e,n))&&r.push(n);return r},mn=function(e){return dn(e)?on(e,!0):hn(e)};var vn="object"==typeof exports&&exports&&!exports.nodeType&&exports,gn=vn&&"object"==typeof module&&module&&!module.nodeType&&module,bn=gn&&gn.exports===vn?It.Buffer:void 0,yn=bn?bn.allocUnsafe:void 0;const wn=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t},En=function(){return[]};var xn=Object.prototype.propertyIsEnumerable,Sn=Object.getOwnPropertySymbols;const kn=Sn?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var r=-1,n=null==e?0:e.length,o=0,i=[];++r<n;){var s=e[r];t(s,r,e)&&(i[o++]=s)}return i}(Sn(e),function(t){return xn.call(e,t)}))}:En,In=function(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e},An=an(Object.getPrototypeOf,Object),Cn=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)In(t,kn(e)),e=An(e);return t}:En,Pn=function(e,t,r){var n=t(e);return xt(e)?n:In(n,r(e))},Fn=function(e){return Pn(e,fn,kn)},$n=function(e){return Pn(e,mn,Cn)},On=er(It,"DataView"),Nn=er(It,"Promise"),Rn=er(It,"Set"),Ln=er(It,"WeakMap");var Dn="[object Map]",jn="[object Promise]",Tn="[object Set]",Mn="[object WeakMap]",Vn="[object DataView]",Bn=qt(On),Un=qt(dr),Hn=qt(Nn),zn=qt(Rn),Jn=qt(Ln),qn=Rt;(On&&qn(new On(new ArrayBuffer(1)))!=Vn||dr&&qn(new dr)!=Dn||Nn&&qn(Nn.resolve())!=jn||Rn&&qn(new Rn)!=Tn||Ln&&qn(new Ln)!=Mn)&&(qn=function(e){var t=Rt(e),r="[object Object]"==t?e.constructor:void 0,n=r?qt(r):"";if(n)switch(n){case Bn:return Vn;case Un:return Dn;case Hn:return jn;case zn:return Tn;case Jn:return Mn}return t});const Wn=qn;var Kn=Object.prototype.hasOwnProperty;const Xn=It.Uint8Array,Yn=function(e){var t=new e.constructor(e.byteLength);return new Xn(t).set(new Xn(e)),t};var Zn=/\w*$/;var Qn=At?At.prototype:void 0,Gn=Qn?Qn.valueOf:void 0;const eo=function(e,t,r){var n,o=e.constructor;switch(t){case"[object ArrayBuffer]":return Yn(e);case"[object Boolean]":case"[object Date]":return new o(+e);case"[object DataView]":return function(e,t){var r=t?Yn(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return function(e,t){var r=t?Yn(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}(e,r);case"[object Map]":case"[object Set]":return new o;case"[object Number]":case"[object String]":return new o(e);case"[object RegExp]":return function(e){var t=new e.constructor(e.source,Zn.exec(e));return t.lastIndex=e.lastIndex,t}(e);case"[object Symbol]":return n=e,Gn?Object(Gn.call(n)):{}}};var to=Object.create;const ro=function(){function e(){}return function(t){if(!Vt(t))return{};if(to)return to(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();var no=en&&en.isMap;const oo=no?Yr(no):function(e){return Lt(e)&&"[object Map]"==Wn(e)};var io=en&&en.isSet;const so=io?Yr(io):function(e){return Lt(e)&&"[object Set]"==Wn(e)};var lo="[object Arguments]",ao="[object Function]",co="[object Object]",uo={};uo[lo]=uo["[object Array]"]=uo["[object ArrayBuffer]"]=uo["[object DataView]"]=uo["[object Boolean]"]=uo["[object Date]"]=uo["[object Float32Array]"]=uo["[object Float64Array]"]=uo["[object Int8Array]"]=uo["[object Int16Array]"]=uo["[object Int32Array]"]=uo["[object Map]"]=uo["[object Number]"]=uo[co]=uo["[object RegExp]"]=uo["[object Set]"]=uo["[object String]"]=uo["[object Symbol]"]=uo["[object Uint8Array]"]=uo["[object Uint8ClampedArray]"]=uo["[object Uint16Array]"]=uo["[object Uint32Array]"]=!0,uo["[object Error]"]=uo[ao]=uo["[object WeakMap]"]=!1;const fo=function e(t,r,n,o,i,s){var l,a=1&r,c=2&r,u=4&r;if(n&&(l=i?n(t,o,i,s):n(t)),void 0!==l)return l;if(!Vt(t))return t;var d=xt(t);if(d){if(l=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&Kn.call(e,"index")&&(r.index=e.index,r.input=e.input),r}(t),!a)return wn(t,l)}else{var f=Wn(t),p=f==ao||"[object GeneratorFunction]"==f;if(Jr(t))return function(e,t){if(t)return e.slice();var r=e.length,n=yn?yn(r):new e.constructor(r);return e.copy(n),n}(t,a);if(f==co||f==lo||p&&!i){if(l=c||p?{}:function(e){return"function"!=typeof e.constructor||ln(e)?{}:ro(An(e))}(t),!a)return c?function(e,t){return Dr(e,Cn(e),t)}(t,function(e,t){return e&&Dr(t,mn(t),e)}(l,t)):function(e,t){return Dr(e,kn(e),t)}(t,function(e,t){return e&&Dr(t,fn(t),e)}(l,t))}else{if(!uo[f])return i?t:{};l=eo(t,f,a)}}s||(s=new $r);var h=s.get(t);if(h)return h;s.set(t,l),so(t)?t.forEach(function(o){l.add(e(o,r,n,o,t,s))}):oo(t)&&t.forEach(function(o,i){l.set(i,e(o,r,n,i,t,s))});var m=d?void 0:(u?c?$n:Fn:c?mn:fn)(t);return function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););}(m||t,function(o,i){m&&(o=t[i=o]),Lr(l,i,e(o,r,n,i,t,s))}),l},po=function(e){return fo(e,4)},ho="fibofilters",mo={item:`${ho}-item`,headline:`${ho}-block__headline`,content:`${ho}-block__content`,counter:`${ho}-block__counter`,filterCollapsible:`${ho}-block--collapsible`,filterCollapsed:`${ho}-block--collapsed`,selected:`${ho}-selected`,disabled:`${ho}-disabled`,alwaysSelected:`${ho}-always-selected`},_o=(e,t="",r=!1)=>0===t.length&&void 0!==window.fiboFiltersData&&void 0!==window.fiboFiltersData[e]?window.fiboFiltersData[e]:t.length>0&&void 0!==window.fiboFiltersData&&void 0!==window.fiboFiltersData[e]&&void 0!==window.fiboFiltersData[e][t]?window.fiboFiltersData[e][t]:r,vo=(e,t=!1,r="")=>{const n=_o("config","overrides");return!1!==n&&void 0!==n[r]&&void 0!==n[r][e]?"number_format"===e?{..._o("config",e,{}),...t,...n[r][e]}:n[r][e]:"number_format"===e?{..._o("config",e,{}),...t}:_o("config",e,t)},go=(e,t=!1)=>_o("html",e,t),bo=(e,t)=>{const r=vo("override_ordering_enabled",!1),n=vo("always_selected_values",{}),o=new URL(document.location).searchParams,i=[];r&&""!==t&&i.push({key:"orderby",valueEncoded:encodeURIComponent(t),valueRaw:t});const s=[];Object.values(e.filters).forEach(e=>{switch(s.push(e.url_slug),e.type){case"color":case"checkboxes":case"buttons":case"radio":case"select":case"toggle":let t=e.values.filter(e=>e.selected&&e.label_url.length>0).map(e=>e.label_url);const r=Pr(n,e.url_slug,[]);r.length>0&&(t=t.filter(e=>!r.map(e=>e.label_url).includes(e))),t.length>0&&i.push({key:e.url_slug,valueEncoded:encodeURIComponent(t.join(",")),valueRaw:t.join(",")});break;case"range":let o=parseFloat(e.range.min),s=parseFloat(e.range.max);if((isNaN(o)||!isNaN(o)&&o<0)&&(o=""),(isNaN(s)||!isNaN(s)&&s<0)&&(s=""),""===o&&""===s)break;i.push({key:e.url_slug,valueEncoded:encodeURIComponent(`${o}-${s}`),valueRaw:`${o}-${s}`});break;case"search":const l=Pr(e,"phrase","");l.length>0&&i.push({key:e.url_slug,valueEncoded:encodeURIComponent(l),valueRaw:l})}});const l=po(vo("removable_url_params",[]));return o.forEach((e,t)=>{i.map(e=>e.key).includes(t)||s.includes(t)||l.includes(t)||null!==e&&i.push({key:t,valueEncoded:encodeURIComponent(e),valueRaw:e})}),i},yo=e=>{try{sessionStorage.setItem("fibofilters-pr",e)}catch(e){}},wo=(e,t,r=!1)=>{if(history.pushState){const n=""===e?t:`${t}?${e}`;r?history.replaceState(null,null,n):history.pushState(null,null,n)}},Eo=e=>{let{html:t="",defaultSelector:r="",nestedLevels:n=1}=e||{},o="",i=0,s=0;if(0===t.length)return{selector:r,levelsToSkip:i};let l=(0,st.A)(t);for(;s<n&&l&&l.length;){s>0&&(o+=" "),s++,l=l.last();const{tagName:e,id:t,className:r}=l;let a=r?r.replace(/(^\s)/gm,"").replace(/(\s{2,})/gm," ").split(/\s/):[];const c=vo("ignored_classes_in_css_selectors");c.length>0&&(a=a.filter(e=>{let t=!0;return c.forEach(r=>{e.indexOf(r)>=0&&(t=!1)}),t})),a=a.filter(e=>{try{return document.createDocumentFragment().querySelector(`.${e}`),!0}catch(e){return!1}}),o+=e.toLowerCase(),""!==t&&t.match(/^[A-Za-z]+[\w\-:.]*$/)?o+=`#${t}`:r&&(o+="."+a.join(".")),a.includes("container")&&(n++,i++,l=(0,st.A)(l).children())}return{selector:o,levelsToSkip:i}},xo=e=>{let{html:t="",selector:r="",levelsToSkip:n=0,replace:o=!1,append:i=!1,prepend:s=!1,firstMatchedElement:l=!0,errorType:a="warning"}=e||{},c=(0,st.A)(t);if(!i&&!s){const e=0;for(;e<n&&c&&c.length;)c=(0,st.A)(c.last()),c=c.children(),n--}const u=c.nodes.map(e=>e.outerHTML).join("");return(0,st.A)(r).length>0&&(i?l?(0,st.A)((0,st.A)(r).first()).append(u):(0,st.A)(r).append(u):s?l?(0,st.A)((0,st.A)(r).first()).prepend(u):(0,st.A)(r).prepend(u):o?l?(0,st.A)((0,st.A)(r).first()).replace(u):(0,st.A)(r).replace(u):l?(0,st.A)((0,st.A)(r).first()).html(u):(0,st.A)(r).html(u),!0)},So=e=>{let{html:t="",selector:r="",levelsToSkip:n=0,show:o=!1,hide:i=!1}=e;if(0===t.length)return;let s=(0,st.A)(t);for(;0<n&&s&&s.length;)s=(0,st.A)(s.last()),s=s.children(),n--;return(0,st.A)(r).length>0&&(i&&(0,st.A)(r).hide(),o&&(0,st.A)(r).show(),!0)},ko=(e,t)=>{const r=(0,st.A)(e);r.length>0&&(r.nodes[0].style.scrollMarginTop=t+"px",r.nodes[0].scrollIntoView({behavior:"smooth",block:"start"}))},Io=()=>function(e){var t={userAgent:"",platform:"",maxTouchPoints:0};e||"undefined"==typeof navigator?"string"==typeof e?t.userAgent=e:e&&e.userAgent&&(t={userAgent:e.userAgent,platform:e.platform,maxTouchPoints:e.maxTouchPoints||0}):t={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0};var r=t.userAgent,n=r.split("[FBAN");void 0!==n[1]&&(r=n[0]),void 0!==(n=r.split("Twitter"))[1]&&(r=n[0]);var o=function(e){return function(t){return t.test(e)}}(r),i={apple:{phone:o(lt)&&!o(mt),ipod:o(at),tablet:!o(lt)&&(o(ct)||Et(t))&&!o(mt),universal:o(ut),device:(o(lt)||o(at)||o(ct)||o(ut)||Et(t))&&!o(mt)},amazon:{phone:o(pt),tablet:!o(pt)&&o(ht),device:o(pt)||o(ht)},android:{phone:!o(mt)&&o(pt)||!o(mt)&&o(dt),tablet:!o(mt)&&!o(pt)&&!o(dt)&&(o(ht)||o(ft)),device:!o(mt)&&(o(pt)||o(ht)||o(dt)||o(ft))||o(/\bokhttp\b/i)},windows:{phone:o(mt),tablet:o(_t),device:o(mt)||o(_t)},other:{blackberry:o(vt),blackberry10:o(gt),opera:o(bt),firefox:o(wt),chrome:o(yt),device:o(vt)||o(gt)||o(bt)||o(wt)||o(yt)},any:!1,phone:!1,tablet:!1};return i.any=i.apple.device||i.android.device||i.windows.device||i.other.device,i.phone=i.apple.phone||i.android.phone||i.windows.phone,i.tablet=i.apple.tablet||i.android.tablet||i.windows.tablet,i}(window.navigator),Ao=e=>{const t=document.querySelectorAll(e),r=[];if(t.length>0)for(let e=0;e<t.length;e++)r.push(t[e]);return r},Co=it(vo("currency")),Po=e=>Co.formatAmount(e),Fo=e=>{if(Object.keys(vo("multicurrency",[])).length>0&&/^[A-Z]{3}$/.test(vo("multicurrency",[])?.baseCurrency)&&Co.getCurrencyConfig().code!==vo("multicurrency",[])?.baseCurrency){const t=Object.keys(vo("multicurrency",[])?.priceSources).length>0?vo("multicurrency",[])?.priceSources:{};t.hasOwnProperty(`price_${Co.getCurrencyConfig().code}`)&&(e=t[`price_${Co.getCurrencyConfig().code}`])}return e},$o=(e,t,r=0,n="",o="")=>{const i={};null!==r&&(i.precision=r),null!==n&&(i.prefix=n),null!==o&&(i.suffix=o);const s=po(vo("number_format",i,t));return Pr(s,"prefix","")+ke({precision:-1===Pr(s,"precision",0)?null:Pr(s,"precision",0),decimalSeparator:Pr(s,"decimal_point","."),thousandSeparator:Pr(s,"thousands_sep",",")},e)+Pr(s,"suffix","")},Oo=e=>{const t={},r=[];return e.forEach((r,n)=>{t[r.value]=n,e[n].children=[]}),e.forEach(n=>"0"!==n.parent_value?e[t[n.parent_value]].children.push(n):r.push(n)),r},No=e=>{let t=[];return e.forEach(e=>{t.push(e),e.children.length>0&&(t=[...t,...No(e.children)])}),t},Ro=(e,t)=>void 0===e[t]||"0"===e[t]?0:1+Ro(e,e[t]),Lo=(e,t)=>{let r=[];return e.forEach(n=>{t.includes(n.value)&&"0"!==n.parent_value&&!r.includes(n.parent_value)&&(r.push(n.parent_value),r=[...r,...Lo(e,[n.parent_value])])}),r},Do=e=>{const t=[];return e.forEach(e=>{t.push(e.index),e.children.length>0&&t.push(...Do(e.children))}),t};function jo(e,t,r,n){!e||t>r||(e.classList.forEach(e=>{const t=e.match(/^post-([0-9]+)$/);t&&n.push(parseInt(t[1]))}),t<r&&Array.from(e.children).forEach(e=>{jo(e,t+1,r,n)}))}const To="undefined"!=typeof navigator&&/iP(hone|ad|od)/.test(navigator.userAgent),Mo=({type:e,source:t="",urlSlug:r=""},n=[],o="block")=>{let i=[...n,`${ho}-${o}--${e}`];return t?.length>0&&(i=[...i,`${ho}-${o}--source--${t}`]),r?.length>0&&(i=[...i,`${ho}-${o}--url-slug--${r}`]),i},Vo=function(e,t){var r,n,o=0;function i(){var i,s,l=r,a=arguments.length;e:for(;l;){if(l.args.length===arguments.length){for(s=0;s<a;s++)if(l.args[s]!==arguments[s]){l=l.next;continue e}return l!==r&&(l===n&&(n=l.prev),l.prev.next=l.next,l.next&&(l.next.prev=l.prev),l.next=r,l.prev=null,r.prev=l,r=l),l.val}l=l.next}for(i=new Array(a),s=0;s<a;s++)i[s]=arguments[s];return l={args:i,val:e.apply(null,i)},r?(r.prev=l,l.next=r):n=l,o===t.maxSize?(n=n.prev).next=null:o++,r=l,l.val}return t=t||{},i.clear=function(){r=null,n=null,o=0},i}(console.error),Bo={plural_forms:e=>1===e?0:1},Uo=/^i18n\.(n?gettext|has_translation)(_|$)/,Ho=(e,t,r)=>{const n=new z({}),o=new Set,i=()=>{o.forEach(e=>e())},s=(e,t="default")=>{n.data[t]={...n.data[t],...e},n.data[t][""]={...Bo,...n.data[t]?.[""]},delete n.pluralForms[t]},l=(e,t)=>{s(e,t),i()},a=(e="default",t,r,o,i)=>(n.data[e]||s(void 0,e),n.dcnpgettext(e,t,r,o,i)),c=(e="default")=>e,_x=(e,t,n)=>{let o=a(n,t,e);return r?(o=r.applyFilters("i18n.gettext_with_context",o,e,t,n),r.applyFilters("i18n.gettext_with_context_"+c(n),o,e,t,n)):o};if(e&&l(e,t),r){const e=e=>{Uo.test(e)&&i()};r.addAction("hookAdded","core/i18n",e),r.addAction("hookRemoved","core/i18n",e)}return{getLocaleData:(e="default")=>n.data[e],setLocaleData:l,addLocaleData:(e,t="default")=>{n.data[t]={...n.data[t],...e,"":{...Bo,...n.data[t]?.[""],...e?.[""]}},delete n.pluralForms[t],i()},resetLocaleData:(e,t)=>{n.data={},n.pluralForms={},l(e,t)},subscribe:e=>(o.add(e),()=>o.delete(e)),__:(e,t)=>{let n=a(t,void 0,e);return r?(n=r.applyFilters("i18n.gettext",n,e,t),r.applyFilters("i18n.gettext_"+c(t),n,e,t)):n},_x,_n:(e,t,n,o)=>{let i=a(o,void 0,e,t,n);return r?(i=r.applyFilters("i18n.ngettext",i,e,t,n,o),r.applyFilters("i18n.ngettext_"+c(o),i,e,t,n,o)):i},_nx:(e,t,n,o,i)=>{let s=a(i,o,e,t,n);return r?(s=r.applyFilters("i18n.ngettext_with_context",s,e,t,n,o,i),r.applyFilters("i18n.ngettext_with_context_"+c(i),s,e,t,n,o,i)):s},isRTL:()=>"rtl"===_x("ltr","text direction"),hasTranslation:(e,t,o)=>{const i=t?t+""+e:e;let s=!!n.data?.[null!=o?o:"default"]?.[i];return r&&(s=r.applyFilters("i18n.has_translation",s,e,t,o),s=r.applyFilters("i18n.has_translation_"+c(o),s,e,t,o)),s}}},zo=Ho(void 0,void 0,Ie.se);zo.getLocaleData.bind(zo),zo.setLocaleData.bind(zo),zo.resetLocaleData.bind(zo),zo.subscribe.bind(zo),zo.__.bind(zo),zo._x.bind(zo),zo._n.bind(zo),zo._nx.bind(zo),zo.isRTL.bind(zo),zo.hasTranslation.bind(zo);var Jo=r(420);const qo=Ho(void 0,void 0,Jo.J),Wo=_o("translations");!1!==Wo&&qo.setLocaleData(Wo,"fibofilters"),qo.__,qo._n;const Ko=qo._x,Xo=qo._nx,Yo=function(e,...t){try{return D().sprintf(e,...t)}catch(t){return t instanceof Error&&Vo("sprintf error: \n\n"+t.toString()),e}};let Zo;function Qo(e){if("string"!=typeof e||-1===e.indexOf("&"))return e;void 0===Zo&&(Zo=document.implementation&&document.implementation.createHTMLDocument?document.implementation.createHTMLDocument("").createElement("textarea"):document.createElement("textarea")),Zo.innerHTML=e;const t=Zo.textContent;return Zo.innerHTML="",t}var Go=r(181);const ei=(0,n.forwardRef)((e,t)=>{const{nodeName:r="div",children:n,className:o="",disabled:i,onClick:s,icon:l,...a}=e,c=[`${ho}-button`];i&&c.push(`${ho}-button--disabled`),l&&c.push(`${ho}-button--has-icon`),o.length>0&&c.push(o);const u=e=>{"function"==typeof s&&s(e)},d={className:`${c.join(" ")}`,onClick:e=>u(e),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),u())},tabIndex:i?-1:0,"aria-disabled":i,ref:t,...a};return"button"!==r&&"undefined"===d.role&&(d.role="button"),(0,Go.h)(r,d,n,l)}),ti=ei,ri=({value:e,deletable:t,onClick:r})=>{const[o,l]=(0,i.J0)(!1),a=e=>l(e);return t?(0,n.createElement)("div",{className:`${ho}-applied-filter ${o?ho+"-applied-filter--outlined":""}`},(0,n.createElement)(ti,{onClick:()=>r(e),className:`${ho}-applied-filter-icon`,onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),onFocus:()=>a(!0),onBlur:()=>a(!1)},(0,n.createElement)(s,{icon:p,size:12})),(0,n.createElement)("span",null,e._label_in_applied_filters?`${e._label_in_applied_filters}: `:null,(0,n.createElement)("strong",null,Qo(e.label)))):(0,n.createElement)(ti,{className:`${ho}-applied-filter ${ho}-applied-filter--clear-all`,onClick:()=>r(e)},(0,n.createElement)("span",null,e._label_in_applied_filters?`${e._label_in_applied_filters}: `:null,(0,n.createElement)("strong",null,Qo(e.label))))};var ni=r(435),oi=r.n(ni);const ii=function(e){return fo(e,5)};var si=r(383),li=r(229),ai=r.n(li);const ci={Ά:"Α",ά:"α",Έ:"Ε",έ:"α",Ί:"Ι",ί:"ι",ΐ:"ϊ",Ύ:"Υ",ύ:"υ",ΰ:"ϋ",Ή:"Η",ή:"η",Ό:"Ο",ό:"ο",Ώ:"Ω",ώ:"ω"},ui=Object.keys(ci).join("|"),di=new RegExp(ui,"g");function fi(e){return ci[e]}const pi=e=>e?function(e){return e.replace(di,fi)}(ai()(e)).replace(/[\s/]+/g,"-").replace(/[^.\p{L}\p{N}_-]+/gu,"").toLowerCase().replace(/-+/g,"-"):"";function hi(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new hr;++t<r;)this.add(e[t])}hi.prototype.add=hi.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},hi.prototype.has=function(e){return this.__data__.has(e)};const mi=hi,_i=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1},vi=function(e,t){return e.has(t)},gi=function(e,t,r,n,o,i){var s=1&r,l=e.length,a=t.length;if(l!=a&&!(s&&a>l))return!1;var c=i.get(e),u=i.get(t);if(c&&u)return c==t&&u==e;var d=-1,f=!0,p=2&r?new mi:void 0;for(i.set(e,t),i.set(t,e);++d<l;){var h=e[d],m=t[d];if(n)var _=s?n(m,h,d,t,e,i):n(h,m,d,e,t,i);if(void 0!==_){if(_)continue;f=!1;break}if(p){if(!_i(t,function(e,t){if(!vi(p,t)&&(h===e||o(h,e,r,n,i)))return p.push(t)})){f=!1;break}}else if(h!==m&&!o(h,m,r,n,i)){f=!1;break}}return i.delete(e),i.delete(t),f},bi=function(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r},yi=function(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r};var wi=At?At.prototype:void 0,Ei=wi?wi.valueOf:void 0;var xi=Object.prototype.hasOwnProperty;var Si="[object Arguments]",ki="[object Array]",Ii="[object Object]",Ai=Object.prototype.hasOwnProperty;const Ci=function(e,t,r,n,o,i){var s=xt(e),l=xt(t),a=s?ki:Wn(e),c=l?ki:Wn(t),u=(a=a==Si?Ii:a)==Ii,d=(c=c==Si?Ii:c)==Ii,f=a==c;if(f&&Jr(e)){if(!Jr(t))return!1;s=!0,u=!1}if(f&&!u)return i||(i=new $r),s||rn(e)?gi(e,t,r,n,o,i):function(e,t,r,n,o,i,s){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new Xn(e),new Xn(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return sr(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var l=bi;case"[object Set]":var a=1&n;if(l||(l=yi),e.size!=t.size&&!a)return!1;var c=s.get(e);if(c)return c==t;n|=2,s.set(e,t);var u=gi(l(e),l(t),n,o,i,s);return s.delete(e),u;case"[object Symbol]":if(Ei)return Ei.call(e)==Ei.call(t)}return!1}(e,t,a,r,n,o,i);if(!(1&r)){var p=u&&Ai.call(e,"__wrapped__"),h=d&&Ai.call(t,"__wrapped__");if(p||h){var m=p?e.value():e,_=h?t.value():t;return i||(i=new $r),o(m,_,r,n,i)}}return!!f&&(i||(i=new $r),function(e,t,r,n,o,i){var s=1&r,l=Fn(e),a=l.length;if(a!=Fn(t).length&&!s)return!1;for(var c=a;c--;){var u=l[c];if(!(s?u in t:xi.call(t,u)))return!1}var d=i.get(e),f=i.get(t);if(d&&f)return d==t&&f==e;var p=!0;i.set(e,t),i.set(t,e);for(var h=s;++c<a;){var m=e[u=l[c]],_=t[u];if(n)var v=s?n(_,m,u,t,e,i):n(m,_,u,e,t,i);if(!(void 0===v?m===_||o(m,_,r,n,i):v)){p=!1;break}h||(h="constructor"==u)}if(p&&!h){var g=e.constructor,b=t.constructor;g==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof g&&g instanceof g&&"function"==typeof b&&b instanceof b||(p=!1)}return i.delete(e),i.delete(t),p}(e,t,r,n,o,i))},Pi=function e(t,r,n,o,i){return t===r||(null==t||null==r||!Lt(t)&&!Lt(r)?t!=t&&r!=r:Ci(t,r,n,o,e,i))},Fi=function(e){return e==e&&!Vt(e)},$i=function(e,t){return function(r){return null!=r&&r[e]===t&&(void 0!==t||e in Object(r))}},Oi=function(e){var t=function(e){for(var t=fn(e),r=t.length;r--;){var n=t[r],o=e[n];t[r]=[n,o,Fi(o)]}return t}(e);return 1==t.length&&t[0][2]?$i(t[0][0],t[0][1]):function(r){return r===e||function(e,t,r,n){var o=r.length,i=o,s=!n;if(null==e)return!i;for(e=Object(e);o--;){var l=r[o];if(s&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++o<i;){var a=(l=r[o])[0],c=e[a],u=l[1];if(s&&l[2]){if(void 0===c&&!(a in e))return!1}else{var d=new $r;if(n)var f=n(c,u,a,e,t,d);if(!(void 0===f?Pi(u,c,3,n,d):f))return!1}}return!0}(r,e,t)}},Ni=function(e,t){return null!=e&&t in Object(e)},Ri=function(e,t){return null!=e&&function(e,t,r){for(var n=-1,o=(t=Ir(t,e)).length,i=!1;++n<o;){var s=Ar(t[n]);if(!(i=null!=e&&r(e,s)))break;e=e[s]}return i||++n!=o?i:!!(o=null==e?0:e.length)&&Kr(o)&&Wr(s,o)&&(xt(e)||Br(e))}(e,t,Ni)},Li=function(e){return e},Di=function(e){return Mt(e)?(t=Ar(e),function(e){return null==e?void 0:e[t]}):function(e){return function(t){return Cr(t,e)}}(e);var t},ji=function(e){return"function"==typeof e?e:null==e?Li:"object"==typeof e?xt(e)?(t=e[0],r=e[1],Mt(t)&&Fi(r)?$i(Ar(t),r):function(e){var n=Pr(e,t);return void 0===n&&n===r?Ri(e,t):Pi(r,n,3)}):Oi(e):Di(e);var t,r},Ti=function(e,t,r){for(var n=-1,o=Object(e),i=r(e),s=i.length;s--;){var l=i[Mi?s:++n];if(!1===t(o[l],l,o))break}return e};var Mi;const Vi=function(e,t){return e&&Ti(e,t,fn)},Bi=function(e,t){return function(r,n){if(null==r)return r;if(!dn(r))return e(r,n);for(var o=r.length,i=t?o:-1,s=Object(r);(t?i--:++i<o)&&!1!==n(s[i],i,s););return r}}(Vi),Ui=function(e,t){var r=-1,n=dn(e)?Array(e.length):[];return Bi(e,function(e,o,i){n[++r]=t(e,o,i)}),n},Hi=function(e,t){return(xt(e)?wr:Ui)(e,ji(t))},zi=function(e,t,r,n){for(var o=e.length,i=r+(n?1:-1);n?i--:++i<o;)if(t(e[i],i,e))return i;return-1};var Ji=/\s/;var qi=/^\s+/;const Wi=function(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&Ji.test(e.charAt(t)););return t}(e)+1).replace(qi,""):e};var Ki=/^[-+]0x[0-9a-f]+$/i,Xi=/^0b[01]+$/i,Yi=/^0o[0-7]+$/i,Zi=parseInt;const Qi=function(e){if("number"==typeof e)return e;if(Dt(e))return NaN;if(Vt(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Vt(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Wi(e);var r=Xi.test(e);return r||Yi.test(e)?Zi(e.slice(2),r?2:8):Ki.test(e)?NaN:+e};var Gi=1/0;const es=function(e){return e?(e=Qi(e))===Gi||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0},ts=function(e){var t=es(e),r=t%1;return t==t?r?t-r:t:0};var rs=Math.max;const ns=(os=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=null==r?0:ts(r);return o<0&&(o=rs(n+o,0)),zi(e,ji(t),o)},function(e,t,r){var n=Object(e);if(!dn(e)){var o=ji(t);e=fn(e),t=function(e){return o(n[e],e,n)}}var i=os(e,t,r);return i>-1?n[o?e[i]:i]:void 0});var os;const is=new class{filters;constructor(){this.filters=[]}setFilters(e){this.filters=e}getAllFilters(){return this.filters}getAllFilterIds(){return Hi(this.getAllFilters(),"id")}getAllFilterTypes(){return Hi(this.getAllFilters(),"type")}getAllFilterUrlSlugs(){return Hi(this.getAllFilters(),"url_slug")}getAllFilterSources(){return Hi(this.getAllFilters(),"source")}getAllFilterSourceIds(){return Hi(this.getAllFilters(),"source_id")}getFilterType(e){const t=this.getFilterProps(e);return Pr(t,"type",!1)}getFilterProps(e){const t=ns(this.getAllFilters(),["id",e]);return void 0!==t&&t}getFilterIdBySourceId(e){const t=[];return this.getAllFilters().forEach(r=>{r.source_id===e&&t.push(r.id)}),t.length>0?t[0]:""}getFilterIdByUrlSlug(e){const t=[];return this.getAllFilters().forEach(r=>{r.url_slug===e&&t.push(r.id)}),t.length>0?t[0]:""}getFilterPropByAnother(e,t,r){const n=[];return this.getAllFilters().forEach(o=>{void 0!==o[t]&&o[t]===r&&n.push(o[e])}),n.length>0?n[0]:""}getAllFilterSourceIdsAlwaysToShow(){const e=[];return this.getAllFilters().forEach(t=>{"always"===t.when_to_show&&e.push(t.source_id)}),e}},ss=function(e,t,r,n){for(var o=-1,i=null==e?0:e.length;++o<i;){var s=e[o];t(n,s,r(s),e)}return n},ls=function(e,t,r,n){return Bi(e,function(e,o,i){t(n,e,r(e),i)}),n};var as=Object.prototype.hasOwnProperty;const cs=(us=function(e,t,r){as.call(e,r)?e[r].push(t):Nr(e,r,[t])},function(e,t){var r=xt(e)?ss:ls,n=ds?ds():{};return r(e,us,ji(t),n)});var us,ds;const fs=function(e,t){if(e!==t){var r=void 0!==e,n=null===e,o=e==e,i=Dt(e),s=void 0!==t,l=null===t,a=t==t,c=Dt(t);if(!l&&!c&&!i&&e>t||i&&s&&a&&!l&&!c||n&&s&&a||!r&&a||!o)return 1;if(!n&&!i&&!c&&e<t||c&&r&&o&&!n&&!i||l&&r&&o||!s&&o||!a)return-1}return 0},ps=function(e,t,r){t=t.length?wr(t,function(e){return xt(e)?function(t){return Cr(t,1===e.length?e[0]:e)}:e}):[Li];var n=-1;return t=wr(t,Yr(ji)),function(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}(Ui(e,function(e,r,o){return{criteria:wr(t,function(t){return t(e)}),index:++n,value:e}}),function(e,t){return function(e,t,r){for(var n=-1,o=e.criteria,i=t.criteria,s=o.length,l=r.length;++n<s;){var a=fs(o[n],i[n]);if(a)return n>=l?a:a*("desc"==r[n]?-1:1)}return e.index-t.index}(e,t,r)})},hs=function(e,t,r,n){return null==e?[]:(xt(t)||(t=null==t?[]:[t]),xt(r=n?void 0:r)||(r=null==r?[]:[r]),ps(e,t,r))},ms=it(vo("currency")),_s=class{id;filter_type;user_input;data;context;constructor(){this.filter_type="",this.user_input="",this.id="",this.data={label:"",source:"",source_id:0,type:"",logic:"",desc:"",order:0,values:[],is_collapsible:[],is_initially_collapsed:[],is_hierarchical:!1}}getId(){return this.id}setId(e){this.id=e}getUserInput(){return this.user_input}setUserInput(e){this.user_input=e}getProp(e){let t=null;return void 0!==this.data[e]&&(t=this.data[e]),t}setProp(e,t){"values"===e&&t.length>0?this.setValues(t):this.data[e]=t}setContext(e){this.context=e}beforeSetValues(){}afterSetValues(){}filterValues(e){return e}setValues(e){this.data.values=[],this.beforeSetValues(),e=e.map(e=>{var t,r,n,o;return{value_id:parseInt(e.value_id),value:e.value,parent_value:e.parent_value,label:e.label,label_url:e.label_url,description:"",selected:e.selected,alwaysSelected:!1,indeterminate:!1,disabled:!0,counter:0,group:e.group?e.group:"",default:e.default,order:e.order?parseInt(e.order):0,index:e.index?e.index:0,url:e.url?e.url:"",color:null!==(t=e.color)&&void 0!==t?t:"",img_url:null!==(r=e.img_url)&&void 0!==r?r:"",label_image:null!==(n=e.label_image)&&void 0!==n?n:"",label_image_position:null!==(o=e.label_image_position)&&void 0!==o?o:""}}),"numerically"===this.getProp("orderby")&&(e=e.map(e=>({label_num:Number.isNaN(Number(e.label))?0:Number(e.label),...e}))),this.data.values=[...this.data.values,...e],this.afterSetValues()}setProps(e){Object.keys(e).forEach(t=>{this.setProp(t,e[t])})}getLogic(){return this.getProp("logic")}getType(){return this.filter_type}isSelected(){return""!==this.user_input}hasAlwaysSelectedValues(){return this.getAlwaysSelectedValues().length>0}getAlwaysSelectedValues(){const e=vo("always_selected_values",{});return Pr(e,this.getProp("url_slug"),[])}getElementaryQuery(){let e=this.convertUserInputToValues();if(Array.isArray(e)&&e.length>0&&(e=e.filter(e=>!(void 0===e))),0===e.length)return{};let t=this.getProp("source_id");return"price"===this.getProp("source")&&(t=Fo(t)),{source:this.getProp("source"),source_id:t,values:e,logic:this.getProp("logic")}}convertUserInputToValues(){if("price_range"===this.getProp("user_input_type")){const e=this.getUserInput().split("-");if(2===e.length){let t=Number.isNaN(parseFloat(e[0]))?-1:ms.formatDecimal(e[0]);const r=Number.isNaN(parseFloat(e[1]))?-1:ms.formatDecimal(e[1]);return r>=0&&t>r&&(t=r),[t,r]}return[-1,-1]}if("number_range"===this.getProp("user_input_type")){const e=this.getUserInput().split("-");if(2===e.length){let t=Number.isNaN(parseFloat(e[0]))?-1:parseFloat(e[0]);const r=Number.isNaN(parseFloat(e[1]))?-1:parseFloat(e[1]);return r>=0&&t>r&&(t=r),[t,r]}return[-1,-1]}return"search"===this.getProp("user_input_type")?this.getUserInput():this.getUserInput().split(",").map(e=>{const t=this.getValueId(e);return t>0?t:void 0})}getCounterType(){const e=this.getLogic(),t=this.isSelected();let r="no-counter";return"or"===e&&t&&(r="extended-counter"),("or"===e&&!t||"and"===e&&t||"and"===e&&!t)&&(r="default-counter"),r}getValueId(e){let t=-1;return this.getProp("values").every(r=>r.label_url!==e||(t=parseInt(r.value_id),!1)),t}updateValue(e,t,r){this.getProp("values").every((n,o)=>n.value_id!==e||!n.hasOwnProperty(t)||(this.data.values[o][t]=r,!1))}updateCounters(e){Object.keys(e).forEach(t=>{const r=parseInt(t),n=e[r];this.updateValue(r,"counter",e[r]),0===n?this.updateValue(r,"disabled",!0):this.updateValue(r,"disabled",!1)})}getData(e="all"){const t=this.getDataInternal();return{id:this.getId(),...t}}getDataInternal(){return this.data}getOrder(){return this.getProp("order")}setSelectedValues(){if(this.isSelected()){const e=this.convertUserInputToValues();e.length>0&&this.selectValues(e)}if(this.hasAlwaysSelectedValues()){const e=[];this.getAlwaysSelectedValues().forEach(t=>{e.push(t.value_id)}),e.length>0&&this.selectValues(e,!0)}}selectValues(e,t=!1){if(0===e.length)return;if(0===this.data.values.length)return;const r=[];if(this.data.values.forEach((n,o)=>{e.includes(n.value_id)&&(this.data.values[o].selected=!0,this.data.values[o].disabled=!1,this.data.values[o].alwaysSelected=t,"0"!==this.data.values[o].parent_value&&r.push(this.data.values[o].parent_value))}),r.length>0){const e=[...new Set([...r,...Lo(this.data.values,r)])];e.length>0&&this.data.values.forEach((t,r)=>{e.includes(t.value)&&(this.data.values[r].indeterminate=!0,this.data.values[r].disabled=!1)})}this.getProp("is_hierarchical")&&this.data.values.forEach((e,t)=>{e.selected&&(this.data.values[t].indeterminate=!0,this.data.values[t].disabled=!1)}),this.afterSelectValues()}afterSelectValues(e){}maybeHideZeroValues(){if(!1===this.getProp("show_zero_values")){let e=this.getProp("values"),t=[];if(this.getProp("is_hierarchical")){const r=e.filter(e=>void 0!==e.counter&&e.counter>0).map(e=>e.value);t=Lo(e,r)}e=e.filter(e=>!(void 0!==e.counter&&0===e.counter&&void 0!==e.disabled&&e.disabled&&!t.includes(e.value))),this.data.values=e}}numberValues(){this.data.values.forEach((e,t)=>{this.data.values[t].index=t})}calcValuesLevels(){this.data.values=(e=>{const t={};return e.forEach(e=>{var r;t[e.value]=null!==(r=e.parent_value)&&void 0!==r?r:"0"}),e.forEach((r,n)=>{e[n].level=Ro(t,r.value)}),e})(this.data.values)}sortValues(){this.data.values=this.sortValueList(this.data.values)}sortValueList(e){if("range"===this.getType())return e;let t=this.getProp("orderby");"string"!=typeof t&&(t="label");const r=cs(e,"parent_value");let n=[];for(const e of Object.values(r)){let r=e.filter(e=>e.counter>0),o=e.filter(e=>0===e.counter);switch(t){case"counter":r=hs(r,["counter"],["desc"]),o=o.sort((e,t)=>e.label.localeCompare(t.label));break;case"term_order":r=hs(r,["order"],["asc"]),o=hs(o,["order"],["asc"]);break;case"numerically":r=hs(r,["label_num"],["asc"]),o=hs(o,["label_num"],["asc"]);break;default:r=r.sort((e,t)=>e.label.localeCompare(t.label)),o=o.sort((e,t)=>e.label.localeCompare(t.label))}n=[...n,...r,...o]}return n}},vs=class extends _s{constructor(e){super(),this.filter_type="category",this.setId(e)}getCounterType(){return"category-counter"}setSelectedValues(){Pr(this.context,"conditions.is_product_taxonomy")&&"product_cat"===Pr(this.context,"details.taxonomy")&&this.data.values.forEach((e,t)=>{Pr(this.context,"details.term_id").toString()===e.value&&(this.data.values[t].selected=!0)})}},gs=class extends _s{constructor(e){super(),this.filter_type="category-hierarchical",this.setId(e)}getCounterType(){return"category-counter"}afterSetValues(){super.afterSetValues(),this.data.values.filter(e=>"0"!==e.parent_value).length>0&&this.setProp("is_hierarchical",!0)}setSelectedValues(){Pr(this.context,"conditions.is_product_taxonomy")&&"product_cat"===Pr(this.context,"details.taxonomy")&&this.data.values.forEach((e,t)=>{if(Pr(this.context,"details.term_id").toString()===e.value&&(this.data.values[t].selected=!0,this.getProp("is_hierarchical")&&"0"!==this.data.values[t].parent_value)){const e=[...new Set([this.data.values[t].parent_value,...Lo(this.data.values,[this.data.values[t].parent_value])])];e.length>0&&this.data.values.forEach((t,r)=>{e.includes(t.value)&&(this.data.values[r].indeterminate=!0,this.data.values[r].disabled=!1)})}this.getProp("is_hierarchical")&&e.selected&&(this.data.values[t].indeterminate=!0,this.data.values[t].disabled=!1)})}},bs=class extends _s{constructor(e){super(),this.filter_type="checkboxes",this.setId(e)}afterSetValues(){super.afterSetValues(),this.data.values.filter(e=>"0"!==e.parent_value).length>0&&this.setProp("is_hierarchical",!0)}},ys=class extends _s{constructor(e){super(),this.filter_type="buttons",this.setId(e)}},ws=class extends _s{constructor(e){super(),this.filter_type="color",this.setId(e)}},Es=class extends _s{constructor(e){super(),this.filter_type="radio",this.setId(e)}afterSelectValues(e){super.afterSelectValues(e),this.data.values.forEach((e,t)=>{-1===e.value_id&&(this.data.values[t].selected=!1)})}sortValues(){this.data.values.length>1&&-1===this.data.values[0].value_id?this.data.values=[this.data.values[0],...this.sortValueList(this.data.values.slice(1,this.data.values.length))]:super.sortValues()}},xs=function(e,t,r){for(var n=-1,o=e.length;++n<o;){var i=e[n],s=t(i);if(null!=s&&(void 0===l?s==s&&!Dt(s):r(s,l)))var l=s,a=i}return a},Ss=function(e,t){return e<t},ks=function(e){return e&&e.length?xs(e,Li,Ss):void 0},Is=function(e,t){return e>t},As=function(e){return e&&e.length?xs(e,Li,Is):void 0};var Cs=0;const Ps=function(e){var t=++Cs;return kr(e)+t},Fs=function(e,t){var r={};return t=ji(t),Vi(e,function(e,n,o){Nr(r,n,t(e,n,o))}),r},$s=function(e){return null==e?[]:function(e,t){return wr(t,function(t){return e[t]})}(e,fn(e))},Os=class extends _s{artificial_no_value;constructor(e){super(),this.filter_type="range",this.artificial_no_value=-1,this.setId(e)}getCounterType(){return"range-counter"}setSelectedValues(){}setValues(e){let t=this.getProp("source_id");this.data.values=[],this.beforeSetValues();const r=this.convertUserInputToValues();if(this.data.range={min:r[0],max:r[1]},"price"===this.getProp("source")&&(t=Fo(t)),e.forEach(e=>{e[2].hasOwnProperty(t)&&e[2][t].forEach(r=>{e[2][t].length>1?this.data.values.push({group:`multivalues-${String(e[0])}`,value:r}):this.data.values.push({group:e[0]!==e[1]?String(e[1]):"",value:r})})}),this.sortNumValues(),this.setProp("slider_data",{min:0,max:0,histogramValues:[]}),this.setProp("radio_range",[]),this.getProp("show_slider")&&this.setProp("slider_data",this.getSliderData(this.data.values)),this.getProp("show_radio_ranges")){let e=this.getProp("custom_range_thresholds");Array.isArray(e)&&e.length>0&&(e=e.filter(e=>!isNaN(parseFloat(e))),e.sort((e,t)=>e-t)),Array.isArray(e)&&e.length>0?this.setProp("radio_range",this.getCustomRadioRanges(this.data.values,e)):this.setProp("radio_range",this.getRadioRanges(this.data.values))}this.afterSetValues(),this.data.values=[]}getSliderData(e){if(0===e.length)return{min:0,max:0,histogramValues:[]};const t=[];for(let r=0;r<e.length;r++)t.push(parseFloat(e[r].value));return{min:ks(t),max:As(t),histogramValues:this.quantitativeHistogram(e,vo("range_slider_histogram_ranges_limit"))}}getCustomRadioRanges(e,t){const r=[];let n=0;return 0===e.length||t.length<1||(t=[...t,Number.MAX_SAFE_INTEGER]).forEach((o,i)=>{const{label:s,selected:l}=this.getLabelAndSelected({rangesTotal:t.length,rangeIndex:i,maxValue:o,prevMaxValue:n});let a={};"range-continuous"===this.getLogic()&&(a=this.getMultivalueGroups(e));const c=e.filter(e=>"range-continuous"===this.getLogic()&&Object.hasOwn(a,e.group)?Math.max(...a[e.group])>=n&&Math.min(...a[e.group])<=o:0===i?e.value<=o:i<t.length-1?e.value<=o&&e.value>=n:e.value>=n).map(e=>""===e.group?Ps("group_"):e.group),u=[...new Set(c)];r.push({label:s,title:s,counter:u.length,min:0===n?"":n,max:i===t.length-1?"":o,selected:l,disabled:!1}),n=o}),r}getRadioRanges(e){const t=[];let r=0;if(0===e.length)return t;const n=this.equalizedHistogram(e,5);return n.length<2||n.forEach((e,o)=>{const i=e.rounded_max,{label:s,selected:l}=this.getLabelAndSelected({rangesTotal:n.length,rangeIndex:o,maxValue:i,prevMaxValue:r});t.push({label:s,title:s,counter:e.items,min:0===r?"":r,max:o===n.length-1?"":i,selected:l,disabled:!1}),r=i}),t}getLabelAndSelected({rangesTotal:e,rangeIndex:t,maxValue:r,prevMaxValue:n}){const o=this.getProp("range").min,i=this.getProp("range").max,s=this.getProp("use_global_number_format",!0),l=s||null===this.getProp("number_precision")?null:this.getProp("number_precision"),a=s||null===this.getProp("number_prefix")?null:this.getProp("number_prefix"),c=s||null===this.getProp("number_suffix")?null:this.getProp("number_suffix");let u="",d=!1;return 0===t?(
/* translators: %s: price */
u="price"===this.getProp("source")?Yo(Ko("less than %s","[front] Price e.g. less than $49","fibofilters"),Po(r)):Yo(/* translators: %s: number */
Ko("less than %s","[front] Number e.g less than 49","fibofilters"),$o(r,this.getId(),l,a,c)),d=o===this.artificial_no_value&&r===i):t<e-1?(u="price"===this.getProp("source")?Po(n)+" "+Ko("to","[front] Used in price range e.g. from $20 to $50.","fibofilters")+" "+Po(r):$o(n,this.getId(),l,a,c)+" "+Ko("to","[front] Used in number range e.g. from 20 to 50.","fibofilters")+" "+$o(r,this.getId(),l,a,c),d=n===o&&r===i):t===e-1&&(
/* translators: %s: price */
u="price"===this.getProp("source")?Yo(Ko("more than %s","[front] Price e.g. more than $49","fibofilters"),Po(n)):Yo(/* translators: %s: number */
Ko("more than %s","[front] Number e.g. more than 49","fibofilters"),$o(n,this.getId(),l,a,c)),d=n===o&&i===this.artificial_no_value),{label:u,selected:d}}sortNumValues(){this.data.values.sort((e,t)=>e.value<t.value?-1:e.value>t.value?1:0)}equalizedHistogram(e,t=5){if(0===e.length)return{};const r=this.histogramDataProcessing(e),n=[],o=1/t;for(let e=0;e<t;e++){const t=[];Object.keys(r.histogram).forEach(n=>{const i=r.histogram[n];i.cumulative_frequency>o*e&&i.cumulative_frequency<=o*(e+1)&&t.push(parseFloat(n))}),t.length>0&&n.push({values:[],min:ks(t),max:As(t)})}return n.length>1&&0===n[0].min&&0===n[0].max&&(n[1].values=[...n[0].values,...n[1].values],n[1].min=0,n[1].rounded_min=0,n.shift()),n.forEach((t,r)=>{const o=void 0!==n[r+1]&&void 0!==n[r+1].max&&void 0!==n[r+1].min&&n[r+1].min>0?.5*(n[r+1].max-n[r+1].min)+n[r+1].min:1/0,i=0===r?0:n[r-1].rounded_max;n[r].rounded_min=i;const{rounded:s,step:l}=this.getRounded(i,t.max,o);n[r].rounded_max=s,n[r].step=l;let a={};"range-continuous"===this.getLogic()&&(a=this.getMultivalueGroups(e)),n[r].values=e.filter(e=>"range-continuous"===this.getLogic()&&Object.hasOwn(a,e.group)?Math.max(...a[e.group])>=t.rounded_min&&Math.min(...a[e.group])<=t.rounded_max:e.value>=t.rounded_min&&e.value<=t.rounded_max);const c=n[r].values.map(e=>""===e.group?Ps("group_"):e.group),u=[...new Set(c)];n[r].items=u.length}),n.filter(e=>e.values.length>0)}quantitativeHistogram(e,t=16){if(0===e.length)return[];const r=[];e.forEach(e=>{r.push(parseFloat(e.value))});const n=ks(r),o=As(r);if(o-n===0)return[];const i=r.map(e=>(e-n)/(o-n)*t),s=cs(i,Math.floor),l=Fs(s,e=>e.length);for(let e=0;e<t;e++){var a;l[e]=null!==(a=l[e])&&void 0!==a?a:0}l[t-1]+=l[t],delete l[t];const c=As($s(l)),u=Fs(l,e=>o>0?e/c*100:0);return $s(u)}histogramDataProcessing(e){const t={numbers:[],total_items:0,histogram:[]},r=[];e.forEach(e=>{const n=e.value+e.group;0===e.group.length?t.numbers.push(e.value):e.group.length>0&&!r.includes(n)&&(t.numbers.push(e.value),r.push(n))}),t.total_items=t.numbers.length,t.numbers.forEach(e=>{let r=String(e);r=r.includes(".")?r:r+".00",t.histogram.hasOwnProperty(r)?(t.histogram[r].items++,t.histogram[r].frequency=t.histogram[r].items/t.total_items):t.histogram[r]={items:1,frequency:1/t.total_items}}),delete t.numbers;let n=0;return Object.keys(t.histogram).forEach(e=>{const r=t.histogram[e],o=ks([n+r.frequency,1]);t.histogram[e].cumulative_frequency=o,n=o}),t}getRounded(e,t,r=1/0){let n={rounded:0,step:1};return[[1e-5,5e-6],[1e-4,5e-5],[.001,5e-4],[.002,.001],[.01,.005],[.02,.01],[.1,.05],[.2,.1],[1,1],[5,2],[10,5],[20,10],[40,20],[50,25],[100,50],[500,250],[1e3,500],[1e4,5e3],[1e5,5e4],[1e6,5e5],[1e7,5e6],[1e8,5e7],[1e9,5e8]].forEach(o=>{const i=o[0],s=o[1],l=this.ceilStep(As([e,t]),s);t>i&&l<r&&(n={rounded:l,step:s})}),n}ceilStep(e,t=1){const r=Math.max((e.toString().split(".")[1]||"").length,(t.toString().split(".")[1]||"").length),n=Math.ceil(e/t)*t;return parseFloat(n.toFixed(r))}getMultivalueGroups(e){const t={};return e.forEach(e=>{e.group.startsWith("multivalues-")&&!Object.hasOwn(t,e.group)?t[e.group]=[e.value]:e.group.startsWith("multivalues-")&&Object.hasOwn(t,e.group)&&t[e.group].push(e.value)}),t}},Ns=class extends _s{constructor(e){super(),this.filter_type="search",this.setId(e)}setSelectedValues(){this.data.phrase=this.convertUserInputToValues()}},Rs=class extends _s{constructor(e){super(),this.filter_type="select",this.setId(e)}},Ls=function(){};function Ds(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}Ds.prototype=ro(Ls.prototype),Ds.prototype.constructor=Ds;const js=Ds;var Ts=At?At.isConcatSpreadable:void 0;const Ms=function(e){return xt(e)||Br(e)||!!(Ts&&e&&e[Ts])},Vs=function e(t,r,n,o,i){var s=-1,l=t.length;for(n||(n=Ms),i||(i=[]);++s<l;){var a=t[s];r>0&&n(a)?r>1?e(a,r-1,n,o,i):In(i,a):o||(i[i.length]=a)}return i},Bs=function(e){return null!=e&&e.length?Vs(e,1):[]};var Us=Math.max;const Hs=Or?function(e,t){return Or(e,"toString",{configurable:!0,enumerable:!1,value:(r=t,function(){return r}),writable:!0});var r}:Li;var zs=Date.now;const Js=function(e){var t=0,r=0;return function(){var n=zs(),o=16-(n-r);if(r=n,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(Hs),qs=function(e){return Js(function(e,t,r){return t=Us(void 0===t?e.length-1:t,0),function(){for(var n=arguments,o=-1,i=Us(n.length-t,0),s=Array(i);++o<i;)s[o]=n[t+o];o=-1;for(var l=Array(t+1);++o<t;)l[o]=n[o];return l[t]=r(s),function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}(e,this,l)}}(e,void 0,Bs),e+"")},Ws=Ln&&new Ln,Ks=function(){},Xs=Ws?function(e){return Ws.get(e)}:Ks,Ys={};var Zs=Object.prototype.hasOwnProperty;const Qs=function(e){for(var t=e.name+"",r=Ys[t],n=Zs.call(Ys,t)?r.length:0;n--;){var o=r[n],i=o.func;if(null==i||i==e)return o.name}return t};function Gs(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}Gs.prototype=ro(Ls.prototype),Gs.prototype.constructor=Gs;const el=Gs;var tl=Object.prototype.hasOwnProperty;function rl(e){if(Lt(e)&&!xt(e)&&!(e instanceof el)){if(e instanceof js)return e;if(tl.call(e,"__wrapped__"))return function(e){if(e instanceof el)return e.clone();var t=new js(e.__wrapped__,e.__chain__);return t.__actions__=wn(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}(e)}return new js(e)}rl.prototype=Ls.prototype,rl.prototype.constructor=rl;const nl=rl,ol=function(e){var t=Qs(e),r=nl[t];if("function"!=typeof r||!(t in el.prototype))return!1;if(e===r)return!0;var n=Xs(r);return!!n&&e===n[0]},il=function(e){return qs(function(t){var r=t.length,n=r,o=js.prototype.thru;for(e&&t.reverse();n--;){var i=t[n];if("function"!=typeof i)throw new TypeError("Expected a function");if(o&&!s&&"wrapper"==Qs(i))var s=new js([],!0)}for(n=s?n:r;++n<r;){i=t[n];var l=Qs(i),a="wrapper"==l?Xs(i):void 0;s=a&&ol(a[0])&&424==a[1]&&!a[4].length&&1==a[9]?s[Qs(a[0])].apply(s,a[3]):1==i.length&&ol(i)?s[l]():s.thru(i)}return function(){var e=arguments,n=e[0];if(s&&1==e.length&&xt(n))return s.plant(n).value();for(var o=0,i=r?t[o].apply(this,e):n;++o<r;)i=t[o].call(this,i);return i}})}(),sl=e=>"range"===e.type&&(e.range.min>-1||e.range.max>-1)||("category"===e.type&&!1!==e.current||("category-hierarchical"===e.type&&!1!==e.current||(e.data&&e.data.values?e.data.values:e.values).filter(e=>-1!==e.value_id&&e.selected).length>0)),ll=e=>(e=e.toString().toLowerCase(),["yes","1","true","on"].includes(e)),al=(e,t,r)=>{const n="string"==typeof t?t.split(","):[],o="string"==typeof r?r.split(","):[];return 0===n.length&&0===o.length?e:il([Object.entries,e=>e.filter(([e,t])=>n.length>0?n.includes(e)||n.includes(t.url_slug):!(o.length>0)||!o.includes(e)&&!o.includes(t.url_slug)),Object.fromEntries])(e)},cl=class extends _s{constructor(e){super(),this.filter_type="toggle",this.setId(e)}filterValues(e){if(e.length<=1)return e;const t=this.getProp("source");return t.indexOf("cf_")>=0?e=e.filter(e=>ll(e.value)):t.indexOf("tax_")>=0&&(e=e.filter(e=>ll(e.label))),e}},ul=new class{createFilterInstance(e){if(void 0===e)throw new Error("Empty filter ID.");let t;switch(is.getFilterType(e)){case"category":t=new vs(e);break;case"category-hierarchical":t=new gs(e);break;case"checkboxes":t=new bs(e);break;case"buttons":t=new ys(e);break;case"color":t=new ws(e);break;case"radio":t=new Es(e);break;case"range":t=new Os(e);break;case"search":t=new Ns(e);break;case"select":t=new Rs(e);break;case"toggle":t=new cl(e);break;default:throw new Error("Invalid filter type.")}const r=is.getFilterProps(e);return r&&t.setProps(r),t}};var dl=r(659);const fl=function(e){return e!=e},pl=function(e,t){return!(null==e||!e.length)&&function(e,t,r){return t==t?function(e,t,r){for(var n=r-1,o=e.length;++n<o;)if(e[n]===t)return n;return-1}(e,t,r):zi(e,fl,r)}(e,t,0)>-1},hl=function(e,t,r){for(var n=-1,o=null==e?0:e.length;++n<o;)if(r(t,e[n]))return!0;return!1};const ml=Rn&&1/yi(new Rn([,-0]))[1]==1/0?function(e){return new Rn(e)}:Ks,_l=function(e){return e&&e.length?function(e,t,r){var n=-1,o=pl,i=e.length,s=!0,l=[],a=l;if(r)s=!1,o=hl;else if(i>=200){var c=t?null:ml(e);if(c)return yi(c);s=!1,o=vi,a=new mi}else a=t?[]:l;e:for(;++n<i;){var u=e[n],d=t?t(u):u;if(u=r||0!==u?u:0,s&&d==d){for(var f=a.length;f--;)if(a[f]===d)continue e;t&&a.push(d),l.push(u)}else o(a,d,r)||(a!==l&&a.push(d),l.push(u))}return l}(e):[]},vl=new class{filterLinearly(e,t=!1,r=!1){const n=[];let o=[];return(!r||dl.A.hasStoreProductDescriptorsArray()&&0!==e.length)&&dl.A.hasBaseDescriptors()&&0!==e.length?(o=r?dl.A.getStoreProductDescriptorsArray():dl.A.getBaseProductDescriptors(),o.forEach((r,o)=>{const i=r[2];let s=0;e.every(e=>{let t=!1;return i.hasOwnProperty(e.source_id)?("search"===e.logic&&i[e.source_id].some(t=>t.toLowerCase().includes(e.values.toLowerCase()))&&(s++,t=!0),"search-fibosearch-pro"===e.logic&&(s++,t=!0),["or","and"].includes(e.logic)&&this.doesDescriptorMatch(e.values,i[e.source_id],e.logic)&&(s++,t=!0),"range"!==e.logic&&"range-continuous"!==e.logic||!this.isWithinRange(e.values,i[e.source_id],!1)||(s++,t=!0),"range-discrete"===e.logic&&this.isWithinRange(e.values,i[e.source_id],!0)&&(s++,t=!0),t):(s=0,!1)}),s===e.length&&(t?n.push(o):n.push({index:o,doc_id:r[0],...void 0!==r[2]?.type&&{type:r[2].type}}))}),n):n}doesDescriptorMatch(e,t,r){let n=!1,o=0;return e.every(e=>!t.includes(e)||(o++,"or"!==r)),"or"===r&&o>0&&(n=!0),"and"===r&&o===e.length&&(n=!0),n}isWithinRange(e,t,r=!1){const n=-1===e[0]?Number.MIN_VALUE:e[0],o=-1===e[1]?Number.MAX_VALUE:e[1];return r?t.some(e=>e>=n&&e<=o):Math.max(...t)>=n&&Math.min(...t)<=o}getSourcesToShow(e=[],t=[]){const r=[...new Set([...is.getAllFilterSourceIdsAlwaysToShow(),...e,...t])],n=dl.A.getDescriptorsOfFilteredProducts(),o=dl.A.countMainProductsInDescriptors(n),i=vo("content_aware_filters_ratio",.9),s=vo("content_aware_filters_ratio_per_source",{}),l={},a=is.getAllFilterSourceIds();a.forEach(e=>l[e]=Pr(s,e,i));const c={};a.forEach(e=>c[e]=Math.floor(o-l[e]*o));const u=Math.min(...Object.values(c)),d=[],f={},p=[];let h=-1;if(Object.keys(vo("multicurrency",[])).length>0){const e=Object.keys(vo("multicurrency",[])?.priceSources).length>0?vo("multicurrency",[])?.priceSources:{};Object.keys(e).forEach(t=>{d.push(e[t])})}if(Object.keys(vo("orderby_sources_map",{})).length>0){const e=vo("orderby_sources_map",{});_l(Object.keys(e).map(t=>e[t].source_id)).forEach(e=>{a.includes(e)||d.push(e)})}return n.forEach(e=>{if(p.includes(e[1]))return!0;p.push(e[1]),h++,Object.keys(e[2]).includes("-1")?a.forEach(e=>{void 0===f[e]&&(f[e]=0),f[e]++}):Object.keys(e[2]).every(e=>(e=parseInt(e),r.includes(e)||d.includes(e)||(void 0===f[e]&&(f[e]=0),f[e]++),!0)),(h>u+100&&h%100==0||h+1===o)&&Object.keys(f).forEach(e=>{const t=f[e];h+1-t>c[e]&&(d.push(parseInt(e)),delete f[e])})}),[...r,...Object.keys(f).map(Number)]}},gl="vertical",bl="off-canvas",yl="horizontal-popover",wl="mobile-overlay-all",El="mobile-overlay-single",xl=new class{constructor(){this.instances=[]}getInstances(){return this.instances}clearInstances(){this.instances=[]}getInstanceBySourceId(e){let t;if(this.instances.every(r=>r.getProp("source_id")!==e||(t=r,!1)),void 0===t)throw new Error("There is no such filter instance.");return t}instanceExists(e){let t=!1;return this.instances.forEach(r=>{r.getId()===e&&(t=!0)}),t}setFilterInstancesByHttpGetParams(e){if(0===e.length)return;const t=is.getAllFilterUrlSlugs();Object.keys(e).forEach(r=>{if(t.includes(r))try{const t=ul.createFilterInstance(is.getFilterIdByUrlSlug(r));t.setUserInput(e[r]),this.instances.push(t)}catch(e){}})}setFilterInstancesByContext(e){const t=is.getAllFilterIds();is.getAllFilterSources().forEach((r,n)=>{if(!this.instanceExists(t[n])&&"tax_product_cat"===r)try{const r=ul.createFilterInstance(t[n]);r.setContext(e),this.instances.push(r)}catch(e){}})}setFilterInstancesBySourceIds(e){const t=[],r=is.getAllFilterIds();e.forEach(e=>{const r=is.getFilterIdBySourceId(e);r.length>0&&t.push(r)}),t.forEach(e=>{if(r.includes(e)&&!this.instanceExists(e))try{const t=ul.createFilterInstance(e);this.instances.push(t)}catch(e){}})}createComplexQuery(e=[]){const t=[];return this.instances.forEach(r=>{if(!r.isSelected())return;if(e.includes(r.getId()))return;const n=r.getElementaryQuery();n.constructor===Object&&Object.keys(n).length>0&&t.push(n)}),t}getSourceIdsOfCurrentFilters(){return this.instances.map(e=>e.getProp("source_id"))}groupFiltersByCounterType(){const e={};return this.instances.forEach(t=>{const r=t.getCounterType();void 0===e[r]&&(e[r]=[]),e[r].push(t)}),e}calcDefaultCounters(e){const t=e.map(function(e){return e.getProp("source_id")});return this.calcCountersFromDescriptors(dl.A.getDescriptorsOfFilteredProducts(),t)}calcExtendedCounters(e){const t=e.getProp("source_id"),r=this.createComplexQuery([e.getId()]);return this.calcCountersFromDescriptors(this.getDescriptorsForExclusiveQuery(r),[t])[t]}getCategoryCounters(e){const t=e.getProp("source_id"),r=e.getProp("showing_sibling_categories"),n=this.createComplexQuery([e.getId()]);let o=[];if(r){if(n.length>0)return o=this.getStoreDescriptorsForExclusiveQuery(n),this.calcCountersFromDescriptors(o,[t])[t];const r=e.getProp("values");return this.calcCountersInStoreScope(t,r.map(e=>e.value_id),!0)}return n.length>0?(o=this.getDescriptorsForExclusiveQuery(n),this.calcCountersFromDescriptors(o,[t])[t]):0===n.length?(o=dl.A.getBaseProductDescriptors(),this.calcCountersFromDescriptors(o,[t])[t]):{}}calcCountersInStoreScope(e,t,r=!1){const n={},o=dl.A.getRootBaseProductsIds();return t.forEach(e=>{n[e]=0}),Object.keys(dl.A.getStoreProductDescriptors()).forEach(t=>{const i=dl.A.getStoreProductDescriptors()[t],s=Object.values(i)[0];r&&!o.includes(parseInt(t))||!s.hasOwnProperty(e)||Object.keys(n).forEach(t=>{s[e].includes(parseInt(t))&&n[t]++})}),n}getDescriptorsForRange(e){const t=this.createComplexQuery([e]);return this.getDescriptorsForExclusiveQuery(t)}getDescriptorsForExclusiveQuery(e){return e.length>0?dl.A.getDescriptors(vl.filterLinearly(e,!0)):dl.A.getBaseProductDescriptors()}getStoreDescriptorsForExclusiveQuery(e){return e.length>0?dl.A.getStoreDescriptors(vl.filterLinearly(e,!0,!0),!0):[]}calcCountersFromDescriptors(e,t){const r={},n={},o={};return t.forEach(e=>{r[e]={},o[e]=new Set([])}),e.forEach(e=>{const i=e[1],s=e[0]!==i;t.every(t=>"object"!=typeof e[2]||!e[2].hasOwnProperty(t)||(e[2][t].every(e=>(s&&n.hasOwnProperty(i)&&n[i].includes(e)||(r.hasOwnProperty(t)&&r[t].hasOwnProperty(e)?r[t][e]++:r[t][e]=1,s&&(n.hasOwnProperty(i)||(n[i]=[]),n[i].push(e)),o[t].has(i)||o[t].add(i)),!0)),!0))}),t.forEach(e=>{r[e][-1]=o[e].length}),r}getFiltersData(e="all"){const t={filters:{},total_products_count:dl.A.getOutputProductIds().length};return this.instances.forEach(r=>{r.getData(),t.filters[r.getId()]=r.getData(e)}),t}setSelectedFilterValues(){this.instances.forEach(e=>{(e.isSelected()||"category"===e.getType()||"category-hierarchical"===e.getType()||e.hasAlwaysSelectedValues())&&e.setSelectedValues()})}removeEmptyFilters(e,t=!1){this.instances=this.instances.filter(r=>{if("range"===r.getProp("type")){if(!t&&!r.isSelected())return!1;const e=r.getProp("show_radio_ranges"),n=r.getProp("show_slider"),o=r.getProp("radio_range").length>0,i=r.getProp("slider_data").histogramValues.length>0;if(e&&!o&&n&&!i||e&&!o&&!n||!e&&n&&!i)return!1}return 0===r.getProp("values").length&&"range"===r.getProp("type")||!("category"!==r.getType()&&"category-hierarchical"!==r.getType()||!e.conditions.is_product_taxonomy)||("radio"===r.getType()||"select"===r.getType()?1!==r.getProp("values").length:"search"===r.getType()||r.getProp("values").length>0)})}sortFiltersByOrder(){this.instances.sort((e,t)=>e.getOrder()-t.getOrder())}hideZeroValues(){vo("show_empty_values",!0)||this.instances.forEach(e=>{e.maybeHideZeroValues()})}numberFilterValues(){this.instances.forEach(e=>{e.numberValues()})}calcValuesLevels(){this.instances.forEach(e=>{e.calcValuesLevels()})}sortFilterValues(){this.instances.forEach(e=>{e.sortValues()})}collapseFilters(){const e=vo("collapsing",{}),t=void 0===e?.collapse_after||isNaN(parseInt(e.collapse_after))?-1:parseInt(e.collapse_after),r=void 0===e?.off_canvas_collapse_after||isNaN(parseInt(e.off_canvas_collapse_after))?-1:parseInt(e.off_canvas_collapse_after),n=void 0===e?.mobile_collapse_after||isNaN(parseInt(e.mobile_collapse_after))?-1:parseInt(e.mobile_collapse_after);t<0&&r<0&&n<0?this.instances.forEach(e=>{e.setProp("is_collapsible",[])}):this.instances.forEach((e,o)=>{if(["category","toggle"].includes(e.getType()))return;const i=[],s=[];t>=0&&(i.push(gl),o>=t&&!sl(e)&&s.push(gl)),r>=0&&(i.push(bl),o>=r&&!sl(e)&&s.push(bl)),n>=0&&(i.push(wl),o>=n&&!sl(e)&&s.push(wl)),e.setProp("is_collapsible",i),e.setProp("is_initially_collapsed",s)})}collapseFiltersOverrides(){const e=vo("collapsing_overrides",{});0!==Object.keys(e).length&&this.instances.forEach(t=>{const r=t.getId();if(!e.hasOwnProperty(r))return;const n=e[r];if(!1===n.is_collapsible)return t.setProp("is_collapsible",[]),void t.setProp("is_initially_collapsed",[]);const o=[gl,bl,wl],i=n.is_initially_collapsed?o:[];t.setProp("is_collapsible",o),t.setProp("is_initially_collapsed",i)})}},Sl=new class{sortProducts(e){const t=vo("orderby_sources_map",{}),r=vo("orderby_in_stock_first",!1),n=vo("orderby_in_stock_first_exceptions",[]),o=vo("orderby_featured_first",!1),i=vo("orderby_featured_first_exceptions",[]);if(void 0===t[e]);else if(!1===t[e]);else{let s=dl.A.getDescriptorsOfFilteredProducts().map(s=>{const l={product_id:s[0],sort_value:Pr(s,`[2].${t[e].source_id}.[0]`,0),stock_status:!(!r||n.includes(e))&&Pr(s,`[2].${t.order_by_stock_status.source_id}.[0]`,!1),featured:!(!o||i.includes(e))&&Pr(s,`[2].${t.order_by_featured.source_id}.[0]`,!1)};return Pr(s,"[2].type",!1)&&(l.type=Pr(s,"[2].type",!1)),l});"price"===e&&(s=s.map(e=>(0===e.sort_value&&(e.sort_value=Number.MAX_SAFE_INTEGER),e)));let l=[];["title","title-desc"].includes(e)?l="asc"===t[e].order?[...s].sort((e,t)=>e.sort_value.localeCompare(t.sort_value)):[...s].sort((e,t)=>t.sort_value.localeCompare(e.sort_value)):!1===t[e].orderby_product_id?l="asc"===t[e].order?[...s].sort((e,t)=>e.sort_value-t.sort_value):[...s].sort((e,t)=>t.sort_value-e.sort_value):"asc"===t[e].order?l=[...s].sort((r,n)=>r.sort_value===n.sort_value?"asc"===t[e].orderby_product_id?r.product_id-n.product_id:n.product_id-r.product_id:r.sort_value-n.sort_value):"desc"===t[e].order&&(l=[...s].sort((r,n)=>r.sort_value===n.sort_value?"asc"===t[e].orderby_product_id?r.product_id-n.product_id:n.product_id-r.product_id:n.sort_value-r.sort_value)),l.length>0&&(o&&r?l=[...l].sort((e,t)=>e.stock_status===t.stock_status?t.featured-e.featured:t.stock_status-e.stock_status):o?l=[...l].sort((e,t)=>t.featured-e.featured):r&&(l=[...l].sort((e,t)=>t.stock_status-e.stock_status)),dl.A.setFilteredProductIds(l.map(e=>{const t={productId:e.product_id};return void 0!==e.type&&(t.type=e.type),t})))}}},kl=function(){return It.Date.now()};var Il=Math.max,Al=Math.min;const Cl=function(e,t,r){var n,o,i,s,l,a,c=0,u=!1,d=!1,f=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function p(t){var r=n,i=o;return n=o=void 0,c=t,s=e.apply(i,r)}function h(e){var r=e-a;return void 0===a||r>=t||r<0||d&&e-c>=i}function m(){var e=kl();if(h(e))return _(e);l=setTimeout(m,function(e){var r=t-(e-a);return d?Al(r,i-(e-c)):r}(e))}function _(e){return l=void 0,f&&n?p(e):(n=o=void 0,s)}function v(){var e=kl(),r=h(e);if(n=arguments,o=this,a=e,r){if(void 0===l)return function(e){return c=e,l=setTimeout(m,t),u?p(e):s}(a);if(d)return clearTimeout(l),l=setTimeout(m,t),p(a)}return void 0===l&&(l=setTimeout(m,t)),s}return t=Qi(t)||0,Vt(r)&&(u=!!r.leading,i=(d="maxWait"in r)?Il(Qi(r.maxWait)||0,t):i,f="trailing"in r?!!r.trailing:f),v.cancel=function(){void 0!==l&&clearTimeout(l),c=0,n=a=o=l=void 0},v.flush=function(){return void 0===l?s:_(kl())},v},Pl=(e,t={})=>xo({html:e.elements,...e.loopStartSelector,append:!0,...t}),Fl=({loopStartSelector:e})=>{const t=vo("per_row",3);(0,st.A)((0,st.A)(e.selector).first()).children().nodes.forEach((e,r)=>{(0,st.A)(e).removeClass(["first","last"]),0!==r%t&&1!==t||(0,st.A)(e).addClass("first"),0===(r+1)%t&&(0,st.A)(e).addClass("last")})},$l=({loopStartSelector:e})=>{(0,st.A)((0,st.A)(e.selector).first()).children(vo("clear_product_container_exceptions",":not(style):not(link)")).remove()},Ol=e=>{if(!vo("scroll_top_on_page_change",!0))return;const t=Io().any?vo("scroll_top_offset_mobile",200):vo("scroll_top_offset_desktop",200);ko(e.selector,t)},Nl=new class{cache={};keySuffix="";get(e){return dl.A.getBaseProductVariableIds().includes(parseInt(e))&&this.cache.hasOwnProperty(`${e.toString()}${this.keySuffix}`)?this.cache[`${e.toString()}${this.keySuffix}`]:this.cache.hasOwnProperty(`${e.toString()}`)?this.cache[`${e.toString()}`]:null}set(e,t){dl.A.getBaseProductVariableIds().includes(parseInt(e))?this.cache[`${e.toString()}${this.keySuffix}`]=t:this.cache[`${e.toString()}`]=t}has(e){return dl.A.getBaseProductVariableIds().includes(parseInt(e))?this.cache.hasOwnProperty(`${e.toString()}${this.keySuffix}`):this.cache.hasOwnProperty(`${e.toString()}`)}clear(){this.cache={}}setKeySuffixByQueryItems(e){const t=vo("filters_affecting_variation_images_and_urls");if(0===t.length)return void(this.keySuffix="");let r="";e.forEach(e=>{t.includes(e.key)&&(r+=`_${e.key}_${e.valueRaw}`)}),this.keySuffix=r}isEmpty(){return 0===Object.keys(this.cache).length}},Rl=new class{productsCache;visibleProductIds;paginationStrategy;notRenderedIds;currentLoadedIds;placeholderIds;missingCacheIds;missingVisibleIds;fetchedNowIds;productIntersectionObservers;lastProductIntersectionObserver;pr;lastScrollTop;loopStartSelector;loadNextPageImmediately;hasUserQuery;requestAbortSignal;getVars;scrollTopOnChangeDebounced;constructor(){this.visibleProductIds=[],this.notRenderedIds=[],this.currentLoadedIds=[],this.placeholderIds=[],this.missingCacheIds=[],this.missingVisibleIds=0,this.fetchedNowIds=[],this.paginationStrategy=_o("config","pagination_strategy","show-more-button"),this.productIntersectionObservers={},this.lastProductIntersectionObserver=null,this.visibleProductCategories=[],this.lastScrollTop=window.scrollY||document.documentElement.scrollTop,this.loadNextPageImmediately=!1,Nl.clear(),this.scrollTopOnChangeDebounced=Cl(()=>{(e=>{const t=vo("scroll_top");if("disabled"!==t&&("both"===t||"mobile"===t&&Io().any||"desktop"===t&&!Io().any)){const t=Io().any?vo("scroll_top_offset_mobile",200):vo("scroll_top_offset_desktop",200);ko(e.selector,t)}})(this.loopStartSelector)},vo("scroll_top_wait",450)),this.registerExternalInteractions()}async process(e){const{clearProductsCache:t=!1,firstLoad:r=!0,queryItems:n=[],inputChange:o=!1,hasUserQuery:i=!1,requestAbortSignal:s,getVars:l}=e||{};if(this.hasUserQuery=i,this.requestAbortSignal=s,this.getVars=l,r)try{this.loopStartSelector=(()=>{let e=!1,t=!1;const r=e=>{if(e.length>1)throw new Error("The product loop selector matches more than one element in the DOM.")};if(vo("products_loop_selectors",[]).length>0&&vo("products_loop_selectors",[]).forEach(function(r){e||(t=(0,st.A)(r),t.length>0&&(e={selector:r,levelsToSkip:0}))}),e)return r(t),e;if(e=Eo({html:go("loopStart")}),t=(0,st.A)(e.selector),e.selector.length>0&&t.length>0)return r(t),e;if(e={selector:'ul.products[class*="columns-"]',levelsToSkip:0},t=(0,st.A)(e.selector),r(t),t.length>0)return e;if(e={selector:"ul.products",levelsToSkip:0},t=(0,st.A)(e.selector),r(t),t.length>0)return e;if(0===t.length)throw new Error("Unable to determine the product loop selector.");return e})()}catch(e){const t=go("noProductsFound"),r=Eo({html:t});r.selector.length>0&&0===(0,st.A)(r.selector).length&&(a=e.message,v({..._.peek(),criticalErrors:[..._.peek().criticalErrors,a]}))}else if(void 0===this.loopStartSelector){const e=go("noProductsFound");Eo({html:e}).selector.length>0&&document.location.reload()}var a;if(void 0!==this.loopStartSelector){if(r?(this.visibleProductCategories=(({loopStartSelector:e})=>{const t=[],r=vo("product_categories_selectors",[]);return r.length>0&&r.forEach(function(r){if((0,st.A)((0,st.A)(e.selector).first()).children(r).nodes.forEach(e=>{t.push(e.outerHTML)}),t.length>0)return t}),t})({loopStartSelector:this.loopStartSelector}),"show-more-button"!==this.paginationStrategy&&"infinite-scroll"!==this.paginationStrategy||(this.removePrParamFromSessionStorageOnTop(),this.hasUserQuery&&this.removeDefaultPagination())):(this.visibleProductIds=[],this.notRenderedIds=[],this.placeholderIds=[],this.missingCacheIds=[],this.fetchedNowIds=[],"show-more-button"!==this.paginationStrategy&&"infinite-scroll"!==this.paginationStrategy||(Object.keys(this.productIntersectionObservers).forEach(e=>{this.productIntersectionObservers[e].disconnect()}),this.productIntersectionObservers={},yo(-1)),this.updateFilterInputsInOrderingForm(n)),t&&Nl.clear(),Nl.setKeySuffixByQueryItems(Wl()),"show-more-button"===this.paginationStrategy||"infinite-scroll"===this.paginationStrategy){this.pr=-1;try{const e=sessionStorage.getItem("fibofilters-pr"),t=sessionStorage.getItem("fibofilters-last-page"),r=Pr(window.performance.getEntriesByType("navigation"),"[0].type");isNaN(parseInt(e))||"back_forward"!==r||"product"!==t||(this.pr=parseInt(e)),sessionStorage.removeItem("fibofilters-last-page")}catch(e){}}Jo.J.doAction("fiboFilters.renderer.before_get_visible_products"),r&&this.addProductsToCache((({loopStartSelector:e})=>{const t=vo("early_products_caching",!1),r={};return(0,st.A)(t&&void 0!==window.fibofiltersPageBody?(0,st.A)(e.selector,window.fibofiltersPageBody).first():(0,st.A)(e.selector).first()).children().nodes.forEach(e=>{const t=[];jo(e,0,3,t),t.forEach(t=>{r[t]=e.outerHTML})}),r})({loopStartSelector:this.loopStartSelector})),r&&this.visibleProductCategories.length>0&&Nl.isEmpty()?v({..._.peek(),globalAppVisibility:!1}):s.aborted||($l({loopStartSelector:this.loopStartSelector}),this.insertProductCategories(),s.aborted||(dl.A.getOutputProductIds().length>0&&"show-more-button"===this.paginationStrategy?(this.loadMoreProducts(),this.loadMoreProductsByUrl(),Jo.J.doAction("fiboFilters.renderer.products_loaded",this.currentLoadedIds),this.currentLoadedIds=[],this.observeProducts()):dl.A.getOutputProductIds().length>0&&"infinite-scroll"===this.paginationStrategy?(this.loadMoreProducts(),this.loadMoreProductsByUrl(),Jo.J.doAction("fiboFilters.renderer.products_loaded",this.currentLoadedIds),this.currentLoadedIds=[],this.observeProducts(),this.loadNextPageImmediately&&(this.showMoreProductsClicked(),this.triggerFetchMissingProducts())):"pagination"===this.paginationStrategy?(this.loadMoreProducts({append:!1}),Jo.J.doAction("fiboFilters.renderer.products_loaded",this.currentLoadedIds),this.currentLoadedIds=[],this.observeProducts(),this.observeLastProduct()):((()=>{k(!1),I(!1);const e=go("noProductsFound");xo({html:e,...Eo({html:go("loopStart")})}),So({html:go("paginationDummy"),hide:!0,...Eo({html:go("paginationDummy")})}),So({html:go("orderby"),hide:!0,...Eo({html:go("orderby")})})})(),Jo.J.doAction("fiboFilters.renderer.no_results")),this.refreshResultsCount(),r&&vo("override_ordering_enabled",!1)&&(()=>{if((0,st.A)(".woocommerce-ordering").attr("onsubmit","return false"),"function"==typeof jQuery){const e=jQuery(".woocommerce-ordering");e.on("submit",function(){return!1}),e.find(".orderby").on("change",function(){return!1})}})(),o&&this.scrollTopOnChangeDebounced(),Jo.J.doAction("fiboFilters.renderer.completed")))}}insertProductCategories(){if((!this.hasUserQuery||!0!==vo("hide_categories_when_filters_active",!0))&&!("pagination"===this.paginationStrategy&&(0,m.p$)()>1)&&this.visibleProductCategories.length>0){const e={elements:this.visibleProductCategories.map(e=>(0,st.A)(e).nodes[0]),loopStartSelector:this.loopStartSelector};Pl(e,{errorType:"error"})}}refreshResultsCount(){if(!vo("override_result_count_enabled",!0))return;const e=dl.A.getOutputProductIds().length;let t,r,n="";const o=vo("products_per_page",12);if("show-more-button"===this.paginationStrategy||"infinite-scroll"===this.paginationStrategy?(t=o*(0,m.sB)()-o+1,r=Math.min(e,o*((0,m.p$)()-1))):(t=o*(0,m.p$)()-o+1,r=Math.min(e,o*(0,m.p$)())),0===e)return n=go("resultCountSingleDummy"),void So({html:n,hide:!0,...Eo({html:n})});1===e?n=go("resultCountSingleDummy"):1===t&&e===r?(n=go("resultCountAllDummy"),n=n.replace("99",e)):(n=go("resultCountRangeDummy"),n=n.replace(/(\d+)(?:\s|&nbsp;|\u00A0)*(?:&ndash;|&#8211;|&#x2013;|–|—|-)(?:\s|&nbsp;|\u00A0)*(\d+)/,`${t}&ndash;${r}`),n=n.replace(/(^|[^\d])(\d+)(?!.*\d)/,(t,r)=>`${r}${e}`));const i=Eo({html:n});if(""===i.selector)return;const s={html:n,replace:!0,firstMatchedElement:!1,...i};xo(s)}showMoreProductsClicked(){void 0!==this.loopStartSelector&&(this.loadMoreProducts({append:!0}),Jo.J.doAction("fiboFilters.renderer.products_loaded",this.currentLoadedIds),this.currentLoadedIds=[],this.refreshResultsCount())}showPreviousProductsClicked(){void 0!==this.loopStartSelector&&(this.loadMoreProducts({append:!1,prepend:!0}),Jo.J.doAction("fiboFilters.renderer.products_loaded",this.currentLoadedIds),this.currentLoadedIds=[],this.refreshResultsCount())}paginationClicked(e){const{page:t=1}=e||{};void 0!==this.loopStartSelector&&(A(parseInt(t+"")),Hl(),this.loadMoreProducts({append:!1}),Jo.J.doAction("fiboFilters.renderer.products_loaded",this.currentLoadedIds),this.currentLoadedIds=[],this.refreshResultsCount(),this.observeLastProduct(),Ol(this.loopStartSelector))}paginationPrevPageClicked(){void 0!==this.loopStartSelector&&(A((0,m.p$)()-1),Hl(),this.loadMoreProducts({append:!1}),Jo.J.doAction("fiboFilters.renderer.products_loaded",this.currentLoadedIds),this.currentLoadedIds=[],this.refreshResultsCount(),this.observeLastProduct(),Ol(this.loopStartSelector))}paginationNextPageClicked(){void 0!==this.loopStartSelector&&(A((0,m.p$)()+1),Hl(),this.loadMoreProducts({append:!1}),Jo.J.doAction("fiboFilters.renderer.products_loaded",this.currentLoadedIds),this.currentLoadedIds=[],this.refreshResultsCount(),this.observeLastProduct(),Ol(this.loopStartSelector))}paginationPrecacheNextPage(){(0,m.p$)()<(0,m.vx)()&&(this.paginate({previous:!1,forcedPage:(0,m.p$)()}),this.triggerFetchMissingProducts())}orderbyChanged(e){void 0!==this.loopStartSelector&&Ul(e)}loadMoreProducts(e){const{append:t=!0,prepend:r=!1}=e||{},n=(0,m.p$)(),o=(0,m.sB)();this.paginate({previous:r});const i={elements:this.notRenderedIds.map((e,t)=>{if(Nl.has(e)){this.currentLoadedIds.push(e);const i=Nl.get(e),s=(0,st.A)(i).data("ff-post-id",e);return 0===t&&s.data("ff-page",r?o-1:n),s.nodes[0]}this.placeholderIds.push(e);const i=(0,st.A)(go("productPlaceholder")).data("ff-post-id",e);return 0===t&&i.data("ff-page",r?o-1:n),i.nodes[0]}),loopStartSelector:this.loopStartSelector};this.notRenderedIds=[],r?((e,t={})=>{xo({html:e.elements,...e.loopStartSelector,prepend:!0,...t})})(i,{errorType:"error"}):(t&&!r||($l({loopStartSelector:this.loopStartSelector}),this.insertProductCategories()),Pl(i,{errorType:"error"})),Fl({loopStartSelector:this.loopStartSelector}),this.missingVisibleIds>0&&this.triggerFetchMissingProducts(),this.observeProducts(),v({..._.peek(),pageCounter:_.peek().pageCounter+1})}triggerFetchMissingProducts(){this.fetchMissingProducts({loopStartSelector:this.loopStartSelector})}loadMoreProductsByUrl(){if(-1===this.pr||!dl.A.getOutputProductIds().includes(this.pr))return;let e=0;for(;!this.visibleProductIds.includes(this.pr)&&e<100;)this.loadMoreProducts(),e+=1,this.triggerFetchMissingProducts();const t=document.querySelector(`[data-ff-post-id="${this.pr}"]`);null!==t&&t.scrollIntoView({behavior:"instant",block:"center"})}observeProducts(){"pagination"!==this.paginationStrategy&&(Object.keys(this.productIntersectionObservers).forEach(e=>{this.productIntersectionObservers[e].disconnect()}),(0,st.A)((0,st.A)(this.loopStartSelector.selector).first()).children(".first, [data-ff-page]").nodes.forEach(e=>{const t=(0,st.A)(e).data("ff-post-id"),r=(0,st.A)(e).data("ff-page");this.productIntersectionObservers[t]=new IntersectionObserver(e=>{e[0].intersectionRatio<1||(isNaN(parseInt(r))||zl(r),yo(t))},{root:null,threshold:1}),this.productIntersectionObservers[t].observe(e)}))}observeLastProduct(){if("pagination"!==this.paginationStrategy)return;null!==this.lastProductIntersectionObserver&&this.lastProductIntersectionObserver.disconnect();const e=(0,st.A)((0,st.A)(this.loopStartSelector.selector).first()).children().last();e&&!(0,st.A)(e).hasClass("fibofilters-product-placeholder")&&setTimeout(()=>{this.lastProductIntersectionObserver=new IntersectionObserver(e=>{e[0].intersectionRatio<1||this.paginationPrecacheNextPage()},{root:null,threshold:1}),this.lastProductIntersectionObserver.observe(e)},400)}paginate(e){const{previous:t=!1,forcedPage:r=-1}=e||{},n=vo("products_per_page",12);let o=0,i=[];if(t?(o=((0,m.sB)()-2)*n,i=dl.A.getOutputProductIds().slice(o,o+n)):(o=(r>-1?r:(0,m.p$)()-1)*n,i=dl.A.getOutputProductIds().slice(o,o+n)),"pagination"===this.paginationStrategy){this.visibleProductIds=[...new Set([...i])],-1===r&&(this.notRenderedIds=[...this.notRenderedIds,...i]);const e=i.filter(e=>!Nl.has(e));this.missingCacheIds=[...this.missingCacheIds,...e],this.missingVisibleIds=e.length,s=Math.ceil(dl.A.getOutputProductIds().length/n),v({..._.peek(),totalPages:s})}else if("show-more-button"===this.paginationStrategy||"infinite-scroll"===this.paginationStrategy)if(t){this.visibleProductIds=[...new Set([...i,...this.visibleProductIds])],this.notRenderedIds=[...this.notRenderedIds,...i];const e=i.filter(e=>!Nl.has(e));this.missingCacheIds=[...this.missingCacheIds,...e],this.missingVisibleIds=e.length,C((0,m.sB)()-1),I((0,m.sB)()>1)}else{if(this.visibleProductIds=[...new Set([...this.visibleProductIds,...i])],this.notRenderedIds=[...this.notRenderedIds,...i],1===(0,m.p$)()){const e=i.filter(e=>!Nl.has(e));this.missingCacheIds=[...this.missingCacheIds,...e],this.missingVisibleIds=e.length}else this.missingVisibleIds=0;const e=(0,m.p$)()*n,t=dl.A.getOutputProductIds().slice(e,e+n),r=t.filter(e=>!Nl.has(e));this.missingCacheIds=[...this.missingCacheIds,...r],A((0,m.p$)()+1),k(t.length>0),I((0,m.sB)()>1)}var s}async fetchMissingProducts({loopStartSelector:e}){if(0===this.missingCacheIds.length)return;const t=this.missingCacheIds.filter(e=>!this.fetchedNowIds.includes(e));if(0===t.length)return;const r=vo("use_trailing_slash",!0);let n=window.location.origin+"/shop"+(r?"/":"");const o=vo("single_products_fetch_url",n);""!==o&&(n=o);let i=new URL(n);i=Jo.J.applyFilters("fiboFilters.renderer.single_products_fetch_url",i),this.fetchedNowIds=[...this.fetchedNowIds,...t];const s=vo("products_fetching_strategy","single"),l=Wl();"page"===s?await fetch(i.toString(),{method:"POST",cache:"no-cache",headers:{"Content-Type":"text/html"},body:JSON.stringify({"fibofilters-products":"1",ids:t,queryItems:l}),signal:this.requestAbortSignal}).then(e=>e.text()).then(t=>{const r=(0,st.A)(t).find(e.selector).children(),n={};r.nodes.forEach(e=>{const t=[];jo(e,0,3,t),t.forEach(t=>{n[t]=e.outerHTML})}),this.addProductsToCache(n),this.overwriteProductPlaceholders(n),this.observeProducts();const o=Object.keys(n);this.fetchedNowIds=this.fetchedNowIds.filter(e=>!o.includes(e))}).catch(e=>{this.fetchedNowIds=[]}):await fetch(i.toString(),{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({"fibofilters-products":"1",ids:t,queryItems:l}),signal:this.requestAbortSignal}).then(e=>e.json()).then(e=>{const t=Pr(e,"products",[]);this.addProductsToCache(t),this.overwriteProductPlaceholders(t),this.observeProducts();const r=Object.keys(t);this.fetchedNowIds=this.fetchedNowIds.filter(e=>!r.includes(e))}).catch(e=>{this.fetchedNowIds=[]})}addProductsToCache(e){const t=Object.keys(e);0!==t.length&&(t.forEach(t=>{Nl.set(t,e[t])}),this.missingCacheIds=this.missingCacheIds.filter(e=>!t.includes(e.toString())))}overwriteProductPlaceholders(e){const t=Object.keys(e);if(0===t.length)return;const r=this.placeholderIds.filter(e=>t.includes(e.toString()));if(r.length>0){if(this.replacePlaceholders(r),Fl({loopStartSelector:this.loopStartSelector}),this.pr>0&&r.includes(this.pr)){const e=document.querySelector(`[data-ff-post-id="${this.pr}"]`);null!==e&&e.scrollIntoView({behavior:"instant",block:"center"})}this.observeLastProduct(),Jo.J.doAction("fiboFilters.renderer.product_placeholders_overwritten",r)}}replacePlaceholders(e){e.forEach(e=>{const t=(0,st.A)(`.fibofilters-product-placeholder[data-ff-post-id="${e}"]`).data("ff-page"),r=Nl.get(e),n=(0,st.A)(r).data("ff-post-id",e);var o;isNaN(parseInt(t))||n.data("ff-page",t),o={html:n.nodes[0],selector:`.fibofilters-product-placeholder[data-ff-post-id="${e}"]`,levelsToSkip:0},xo({html:o.html,selector:o.selector,levelsToSkip:o.levelsToSkip,replace:!0})})}updateFilterInputsInOrderingForm(e){if(vo("override_ordering_enabled",!1))return;const t=is.getAllFilterUrlSlugs();is.getAllFilterUrlSlugs().forEach(e=>{(0,st.A)(`.woocommerce-ordering input[name="${e}"]`).remove()});const r=e.filter(e=>t.includes(e.key));if(r.length>0){const e={html:r.map(e=>`<input type="hidden" name="${e.key}" value="${e.valueRaw}">`).join(""),firstMatchedElement:!1,selector:".woocommerce-ordering",levelsToSkip:0,append:!0};xo(e)}}removePrParamFromSessionStorageOnTop(){window.addEventListener("scroll",function(e,t,r){var n=!0,o=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return Vt(r)&&(n="leading"in r?!!r.leading:n,o="trailing"in r?!!r.trailing:o),Cl(e,t,{leading:n,maxWait:t,trailing:o})}(()=>{const e=window.scrollY||document.documentElement.scrollTop;e<this.lastScrollTop&&window.scrollY<100&&window.scrollY<100&&yo(-1),this.lastScrollTop=e<=0?0:e},300))}removeDefaultPagination(){(0,st.A)(".woocommerce-pagination").remove()}registerExternalInteractions(){Jo.J.addAction("fiboFilters.renderer.fix_product_classes","fibofilters",()=>{void 0!==this.loopStartSelector&&Fl({loopStartSelector:this.loopStartSelector})}),Jo.J.addAction("fiboFilters.renderer.open_offcanvas","fibofilters",()=>{g()}),(0,st.A)(document).on("click keydown",'[data-fibofilters="open-offcanvas"]',e=>{("click"===e.type||"keydown"===e.type&&"Enter"===e.key)&&(e.preventDefault(),g())}),Jo.J.addAction("fiboFilters.renderer.open_mobile_overlay","fibofilters",()=>{S(!0,{})}),(0,st.A)(document).on("click keydown",'[data-fibofilters="open-mobile-overlay"]',e=>{("click"===e.type||"keydown"===e.type&&"Enter"===e.key)&&(e.preventDefault(),S(!0,{}))})}},Ll=new class{filtersCache={};context;getVars;user_query;abortController=null;clearBaseDataOnNextHandle=!1;changedFilters=[];async handleRequest(e){const{firstLoad:t=!0,clearProductsCache:r=!1,queryItems:n=[],inputChange:o=!1}=e;this.abortController&&this.abortController.abort();const i=new AbortController;this.abortController=i;const{signal:s}=i;if(s.aborted)return;if(this.getVars={},this.user_query=[],t||(xl.clearInstances(),dl.A.clear()),t){let e=_o("filters","",[]);const t=vo("hidden_filters_by_id",[]);Array.isArray(t)&&t.length>0&&(e=e.filter(e=>!t.includes(e.id)));const r=vo("hidden_filters_by_slug",[]);Array.isArray(r)&&r.length>0&&(e=e.filter(e=>!r.includes(e.url_slug))),is.setFilters(e),this.context=_o("context","",[])}this.sanitizeAndSetGetVars({firstLoad:t});const l=((e,t=0)=>{let r=3735928559^t,n=1103547991^t;for(let t,o=0;o<e.length;o++)t=e.charCodeAt(o),r=Math.imul(r^t,2654435761),n=Math.imul(n^t,1597334677);return r=Math.imul(r^r>>>16,2246822507),r^=Math.imul(n^n>>>13,3266489909),n=Math.imul(n^n>>>16,2246822507),n^=Math.imul(r^r>>>13,3266489909),4294967296*(2097151&n)+(r>>>0)})(JSON.stringify(this.getVars));if(void 0!==this.filtersCache[`${l}-filters`]&&void 0!==this.filtersCache[`${l}-query-data-store`])return jl(ii(this.filtersCache[`${l}-filters`])),dl.A.setDataFromCache(ii(this.filtersCache[`${l}-query-data-store`])),this.changedFilters=[],void Rl.process({firstLoad:t,clearProductsCache:r,queryItems:n,requestAbortSignal:s});if(t){let e=await this.getStoreDescriptors();if(vo("single_variations_support",!1)){const t=_o("base_products_ids","",[]),r={};Object.keys(e).forEach(n=>{if(void 0===e[n][n]){if(t.includes(parseInt(n))){for(const t in e[n])e[n].hasOwnProperty(t)&&(e[n][t].type="variable");r[n]={...e[n]}}Object.keys(e[n]).forEach(o=>{t.includes(parseInt(o))&&(r.hasOwnProperty(o)||(r[o]={}),r[o][o]={...e[n][o],type:"variation"})})}else r[n]={},r[n][n]={...e[n][n],type:"simple"}}),e=r}dl.A.setStoreProductDescriptors(e),Object.keys(e).length>0&&Jo.J.doAction("fiboFilters.core.descriptors_loaded"),dl.A.setBaseProductsData(_o("base_products_ids","",[])),dl.A.setRootBaseProductsIds(_o("root_base_products_ids","",[]))}this.clearBaseDataOnNextHandle&&(dl.A.clearBase(),dl.A.setBaseProductsData(_o("base_products_ids","",[])),dl.A.setRootBaseProductsIds(_o("root_base_products_ids","",[])),F(!1),this.clearBaseDataOnNextHandle=!1);const a=new Date;xl.setFilterInstancesByHttpGetParams(this.getVars);const c=xl.getSourceIdsOfCurrentFilters(),u=xl.getInstances();if(u.length>0){const e=u.find(e=>"search"===e.getType()&&"search-fibosearch-pro"===e.getLogic());if(void 0!==e)if(t)dl.A.clearBase(),dl.A.setBaseProductsData(_o("searched_product_ids","",[])),dl.A.setRootBaseProductsIds(_o("root_base_products_ids","",[]));else if(this.changedFilters.includes(e.getId())){F(!0,e.getUserInput());const t=await(async(e,t)=>{const r=Pr(vo("fibosearch",{}),"search_endpoint","");if(0===r.length)return[];const n=new URL(r),o=e.getUserInput(),i=Pr(vo("fibosearch",{}),"current_language","");n.searchParams.append("s",o),i.length>0&&n.searchParams.append("l",i),n.searchParams.append("dgwt_wcas_product_ids_only","1");try{const e=await fetch(n.toString(),{cache:"no-cache",signal:t});if(!e.ok)return[];const r=await e.json();return Array.isArray(r?.results)?r.results:[]}catch(e){return[]}})(e,s);if(this.abortController===i&&F(!1,e.getUserInput()),Array.isArray(t)){dl.A.clearBase();const e=_o("base_products_ids","",[]),r=t.filter(t=>e.includes(t));dl.A.setBaseProductsData(r),dl.A.setRootBaseProductsIds(_o("root_base_products_ids","",[]))}}}xl.setFilterInstancesByContext(this.context);const d=xl.getSourceIdsOfCurrentFilters().filter(e=>!c.includes(e));if(this.user_query=xl.createComplexQuery(),0===this.user_query.length?dl.A.setFilteredAsBaseProducts():dl.A.setFilteredProducts(vl.filterLinearly(this.user_query)),s.aborted)return;if(vo("override_ordering_enabled",!1)){const e=(0,m.UV)();!t&&e.length>0&&Sl.sortProducts(e)}if(s.aborted)return;dl.A.setOutputProductIds();const f=vl.getSourcesToShow(c,d);if(s.aborted)return;xl.setFilterInstancesBySourceIds(f);const p=xl.groupFiltersByCounterType();if(p.hasOwnProperty("default-counter")){const e=xl.calcDefaultCounters(p["default-counter"]);Object.keys(e).forEach(t=>{xl.getInstanceBySourceId(parseInt(t)).updateCounters(e[t])})}s.aborted||(p.hasOwnProperty("extended-counter")&&p["extended-counter"].forEach(e=>{const t=xl.calcExtendedCounters(e);e.updateCounters(t)}),s.aborted||(p.hasOwnProperty("category-counter")&&p["category-counter"].forEach(e=>{const t=xl.getCategoryCounters(e);e.updateCounters(t)}),s.aborted||(p.hasOwnProperty("range-counter")&&p["range-counter"].forEach(e=>{e.setValues(xl.getDescriptorsForRange(e.getId()))}),s.aborted||(xl.setSelectedFilterValues(),xl.hideZeroValues(),xl.removeEmptyFilters(this.context,dl.A.hasFilteredProducts()),xl.sortFiltersByOrder(),xl.sortFilterValues(),xl.numberFilterValues(),xl.calcValuesLevels(),xl.collapseFilters(),xl.collapseFiltersOverrides(),new Date-a>100?(this.filtersCache[`${l}-filters`]=xl.getFiltersData("front"),this.filtersCache[`${l}-query-data-store`]=dl.A.getDataToCache(),jl(ii(this.filtersCache[`${l}-filters`]))):jl(xl.getFiltersData("front")),this.changedFilters=[],Jo.J.doAction("fiboFilters.core.filters_calculated"),(0,st.A)(".fibofilters-skeleton").remove(),s.aborted||await Rl.process({firstLoad:t,clearProductsCache:r,queryItems:n,inputChange:o,hasUserQuery:this.user_query.length>0,requestAbortSignal:s,getVars:this.getVars})))))}sanitizeAndSetGetVars(e){const{firstLoad:t=!0}=e||{},r=new URL(document.location.href),n=r.searchParams.keys();let o=!1;if("pagination"===vo("pagination_strategy")||"show-more-button"===vo("pagination_strategy")||"infinite-scroll"===vo("pagination_strategy")){const e=vo("pagination_base"),t=r.pathname.match(new RegExp(e+"/(?<page>\\d+)")),n=parseInt(Pr(t,"groups.page",-1));!isNaN(n)&&n>0&&(A(n),C(n),o=!0)}for(const e of n){const t=r.searchParams.get(e),n=is.getFilterPropByAnother("type","url_slug",e);this.getVars[pi(e)]="search"===n?t:t.split(",").map(e=>pi(e)).join(",")}if(vo("override_ordering_enabled",!1)&&this.getVars.hasOwnProperty("orderby")){const e=vo("catalog_orderedby",{});"object"==typeof e&&Object.keys(e).includes(this.getVars.orderby)&&P(this.getVars.orderby)}t||o||"pagination"!==vo("pagination_strategy")||A(1)}async clearDescriptorsCache(e){const t=await e.keys();if(t.length>0)for(let r=0;r<t.length;r++)(t[r].url.includes("filters-descriptors-")||t[r].url.includes("filters/descriptors"))&&await e.delete(t[r])}async getStoreDescriptors(){const e=vo("descriptors_endpoint").toString(),t=vo("descriptors_json_url").toString(),r=vo("updated_descriptors_endpoint").toString(),n=vo("descriptors_data_fake_url").toString();try{void 0!==window.fibofiltersFetchingDescriptors&&window.fibofiltersFetchingDescriptors&&await(o=()=>!window.fibofiltersFetchingDescriptors,new Promise((e,t)=>{let r=!0;const n=async()=>{const t=await o();if(t)return e(t);r&&setTimeout(n,20)};n()}));const i=await caches.open("fibofilters"),s=await i.match(n);let l;void 0!==s?(l=await s.json(),(Pr(l,"indexBuildId","")!==vo("index_build_id")||vo("refetch_descriptors_after_update",!1)&&vo("last_updated_date").length>0&&Pr(l,"lastUpdatedDate","")!==vo("last_updated_date"))&&await this.clearDescriptorsCache(i)):await this.clearDescriptorsCache(i);let a=await i.match(e);if(void 0===a){let r;try{if(0===t.length)throw new TypeError("Undefined JSON URL");const e=new URL(t);if(vo("last_updated_date").length>0&&e.searchParams.append("last-modified",vo("last_updated_date").replace(/[: -]/g,"")),r=await fetch(e.href),!r.ok)throw new TypeError("Invalid server response (JSON)")}catch(t){if(r=await fetch(e),!r.ok)throw new TypeError("Invalid server response (REST API)")}a=r.clone(),await i.put(n,new Response(JSON.stringify({indexBuildId:vo("index_build_id"),lastUpdatedDate:vo("last_updated_date")}))),await i.put(e,r)}else if(vo("last_updated_date").length>0&&Pr(l,"lastUpdatedDate","")!==vo("last_updated_date")){const t=new URL(r);Pr(l,"lastUpdatedDate","").length>0&&t.searchParams.append("date_start",Pr(l,"lastUpdatedDate","")),t.searchParams.append("date_end",vo("last_updated_date"));const o=await fetch(t.href);if(!o.ok)throw new TypeError("Invalid server response");const s=await a.json(),c=await o.json();c.deleted.length>0&&c.deleted.map(e=>delete s[e]),Object.keys(c.descriptors).length>0&&Object.keys(c.descriptors).forEach(e=>{s[e]=c.descriptors[e]}),await i.put(e,new Response(JSON.stringify(s))),a=new Response(JSON.stringify(s)),await i.put(n,new Response(JSON.stringify({indexBuildId:vo("index_build_id"),lastUpdatedDate:vo("last_updated_date")})))}return a.json()}catch(t){if("Invalid server response (REST API)"===t.message)return{};try{const t=await fetch(e);if(!t.ok)throw new TypeError("Invalid server response");return t.json()}catch(e){return{}}}var o}setClearBaseDataOnNextHandle(){this.clearBaseDataOnNextHandle=!0}addChangedFilter(e){this.changedFilters.includes(e)||this.changedFilters.push(e)}},{filtersState:Dl}=(0,si.f)(),jl=e=>{Dl.value=e},Tl=e=>{const{filterID:t,type:r,skipProcess:n=!1,clearBaseData:o=!1}=e;let i={};switch(o&&Ll.setClearBaseDataOnNextHandle(),Ll.addChangedFilter(t),r){case"range":const{value:r}=e;i=oi()(Dl.value,{filters:{[t]:{range:{$set:r}}}});break;case"search":const{phrase:n}=e;i=oi()(Dl.value,{filters:{[t]:{phrase:{$set:n}}}});break;case"checkboxes":case"color":case"buttons":case"radio":case"select":case"toggle":const{index:o,newState:s,unselectOthers:l=!1}=e;i=Ml({filterID:t,index:o,newState:s,unselectOthers:l})}A(1),C(1),Jo.J.hasAction("fiboFilters.core.state_updated")&&Jo.J.doAction("fiboFilters.core.state_updated",e,ii(Dl.value),ii(i)),jl(i),n||Bl(i)},Ml=({filterID:e,index:t,newState:r,unselectOthers:n=!1,initialFiltersState:o=!1})=>{let i=!1;return o=o||Dl.value,n&&(i=oi()(o,{filters:{[e]:{values:{$apply:e=>e.map(e=>(e.selected=!1,e))}}}})),!1!==t&&(i=oi()(i||o,{filters:{[e]:{values:{[t]:{selected:{$set:r}}}}}})),i},Vl=(e,t=!1)=>{let r=Dl.value;e.map(e=>{switch(Ll.addChangedFilter(e._filterID),e._filterType){case"range":r=t?oi()(r,{filters:{[e._filterID]:{range:{$set:{min:"",max:""}}}}}):oi()(r,{filters:{[e._filterID]:{range:{$set:e.value}}}});break;case"search":!0===e?.clearAppliedFilters&&Ll.setClearBaseDataOnNextHandle(),r=oi()(r,{filters:{[e._filterID]:{phrase:{$set:""}}}});break;default:r=void 0!==e._defaultValueIndex?Ml({filterID:e._filterID,index:e._defaultValueIndex,newState:!0,unselectOthers:!0,initialFiltersState:r}):Ml({filterID:e._filterID,index:e._index,newState:!1,unselectOthers:!1,initialFiltersState:r})}return!0}),Jo.J.hasAction("fiboFilters.core.state_updated_after_clearing_applied_filters")&&Jo.J.doAction("fiboFilters.core.state_updated_after_clearing_applied_filters",e,ii(Dl.value),ii(r)),A(1),jl(r),Bl(r)},Bl=e=>{const{queryString:t,pathname:r,queryItems:n}=ql(e);wo(t,r),Ll.handleRequest({firstLoad:!1,queryItems:n,inputChange:!0})},Ul=e=>{A(1),C(1),P(e);const{queryString:t,pathname:r,queryItems:n}=ql();wo(t,r),Ll.handleRequest({firstLoad:!1,queryItems:n,inputChange:!0})},Hl=()=>{const{queryString:e,pathname:t}=ql();wo(e,t)},zl=(e=-1)=>{const{queryString:t,pathname:r}=ql(!1,e);wo(t,r,!0)},Jl=(e=-1)=>{const{queryString:t,pathname:r}=ql(!1,e);return""===t?r:`${r}?${t}`},ql=(e=!1,t=-1)=>{e=e||Dl.value;let r="pagination"===vo("pagination_strategy")?(0,m.p$)():-1;t>0&&(r=t);const n=(0,m.UV)(),o=bo(e,n),i=o.length>0?o.map(e=>`${e.key}=${e.valueEncoded}`).join("&"):"",s=((e=-1)=>{let t=window.location.pathname;const r=vo("pagination_base"),n=vo("use_trailing_slash",!0),o=t.indexOf(`/${r}/`);return o>-1&&(t=t.substring(0,o+1)),e>1&&(t+=`${t.endsWith("/")?"":"/"}${r}/${e}`),t.endsWith("/")&&(t=t.substring(0,t.length-1)),n&&(t+="/"),t})(r);return{queryString:i,pathname:s,queryItems:o}},Wl=()=>bo(Dl.value,"");var Kl=r(343);const Xl=()=>{const{appState:e}=(0,h.N$)(),{filtersState:t}=(0,Kl.$U)(),r=t.value.filters,o=e.value.appliedFiltersCount,s=e.value.appliedFiltersValues;(0,i.vJ)(()=>{const e={};if(0===r.length)return w([]),void y(0);Object.keys(r).map(t=>r[t].values.map((r,n)=>(r.default&&(e[t]=n),r)));const t=Object.keys(r).map(t=>{if("category"===r[t].type||"category-hierarchical"===r[t].type)return[];if("range"===r[t].type&&"price"===r[t].source&&(r[t].range.min>0||r[t].range.max>0)){const e=[];return r[t].range.min>0&&e.push({_filterID:t,_filterType:r[t].type,_label_in_applied_filters:r[t].label,label:Yo(/* translators: %s: range from */
Ko("from %s","[front] Used in price range e.g. from $20 to $50.","fibofilters"),Po(r[t].range.min)),value:{min:"",max:r[t].range.max>0?r[t].range.max:""}}),r[t].range.max>0&&e.push({_filterID:t,_filterType:r[t].type,_label_in_applied_filters:r[t].label,label:Yo(/* translators: %s: range to */
Ko("to %s","[front] Used in price range e.g. from $20 to $50.","fibofilters"),Po(r[t].range.max)),value:{min:r[t].range.min>0?r[t].range.min:"",max:""}}),e}if("range"===r[t].type&&(r[t].range.min>0||r[t].range.max>0)){var n;const e=[],o=null===(n=r[t].use_global_number_format)||void 0===n||n,i=o||null===r[t].number_precision?0:r[t].number_precision,s=o||null===r[t].number_prefix?"":r[t].number_prefix,l=o||null===r[t].number_suffix?"":r[t].number_suffix;return r[t].range.min>0&&e.push({_filterID:t,_filterType:r[t].type,_label_in_applied_filters:r[t].label,label:Yo(/* translators: %s: range from */
Ko("from %s","[front] Used in number range e.g. from 20 to 50.","fibofilters"),$o(r[t].range.min,t,i,s,l)),value:{min:"",max:r[t].range.max>0?r[t].range.max:""}}),r[t].range.max>0&&e.push({_filterID:t,_filterType:r[t].type,_label_in_applied_filters:r[t].label,label:Yo(/* translators: %s: range to */
Ko("to %s","[front] Used in number range e.g. from 20 to 50.","fibofilters"),$o(r[t].range.max,t,i,s,l)),value:{min:r[t].range.min>0?r[t].range.min:"",max:""}}),e}return"search"===r[t].type&&r[t]?.phrase?.length>0?[{_filterID:t,_filterType:r[t].type,_label_in_applied_filters:!!r[t].label_in_applied_filters&&r[t].label,label:r[t].phrase,clearAppliedFilters:"search-fibosearch-pro"===r[t].logic}]:r[t].values.map((n,o)=>(n._filterID=t,n._filterType=r[t].type,n._index=o,n._label_in_applied_filters=!!r[t].label_in_applied_filters&&r[t].label,void 0!==e[t]&&(n._defaultValueIndex=e[t]),n)).filter(e=>!e.alwaysSelected).filter(e=>e.value.length>0&&e.selected)}),n=t.reduce((e,t)=>e.concat(t));w(n),y(n.length)},[r]);const l=[`${ho}-applied-filters`];return 0===s.length?null:(0,n.createElement)("div",{className:l.join(" ")},s.map(e=>(0,n.createElement)(ri,{deletable:!0,key:`${e._filterID}-${e.label}`,onClick:()=>Vl([e]),value:e})),o>1?(0,n.createElement)(ri,{onClick:()=>Vl(s,!0),value:{label:Ko("Clear all","[front]","fibofilters"),_label_in_applied_filters:!1}}):null)},Yl=vo("show_more_less",!1),Zl=(e,t,r,n=!1)=>{if(e.selected)return!0;const o=vo("organize_values_force_search",!1,r);if(!n&&o)return!1;const i=vo("show_more_less_number",7,r);return!(Yl&&t>=i)},Ql=(e,t,r)=>{if(!Yl)return 0;const n=vo("organize_values_force_search",!1,t);if(!r&&n)return 0;const o=vo("show_more_less_number",7,t);if(e.length<=o)return 0;const i=e.slice(o).filter(e=>e.selected&&-1!==e.value_id).length;return e.length-o-i},Gl=({counter:e})=>{const t="brackets"===vo("counter_format");return(0,n.createElement)("div",{className:`${mo.item}__counter`},t&&(0,n.createElement)("span",{className:`${mo.item}__counter_bracket`},"("),e,t&&(0,n.createElement)("span",{className:`${mo.item}__counter_bracket`},")"))},ea=(0,n.createElement)(f,{fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 14 8"},(0,n.createElement)(d,{d:"M13 7 7 1 1 7",stroke:"#767676",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),ta=({children:e,parentChildren:t,isCollapsed:r,setIsCollapsed:o,isHierarchical:i})=>i?(0,n.createElement)("div",{className:`${ho}-collapser-container`},(0,n.createElement)("div",{className:c(`${ho}-collapser`,!r&&`${ho}-collapser--open`)},t.length>0&&(0,n.createElement)(ti,{onClick:()=>o(!r),icon:(0,n.createElement)(s,{icon:ea,width:10,height:8})})),e):(0,n.createElement)(n.Fragment,null,e),ra=({onClick:e,numberOfValues:t,showHiddenValues:r,showAll:o=!1})=>{const i=[mo.item,`${mo.item}--more-less`];return(0,n.createElement)("li",{className:i.join(" ")},(0,n.createElement)(ti,{onClick:e,className:`${ho}-more-less`},r?Ko("show less","[front]","fibofilters"):(0,n.createElement)(n.Fragment,null,Ko(o?"show all":"more","[front]","fibofilters"),t>0&&(0,n.createElement)("span",{className:`${ho}-more-less__counter`}," (",t,")"))))},na=({item:e,filterID:t,queryString:r="",isHierarchical:o=!1,children:s=[],expandedOnInit:l=!1,expandToLevel:a=1})=>{const u=Ql(s,t,o),[d,f]=(0,i.J0)(!1),[p,h]=(0,i.J0)(!e.indeterminate);(0,i.vJ)(()=>{o&&(l||a>=0)&&h(!1)},[l]);const m=[mo.item,`${mo.item}--link`];e.selected&&m.push(mo.selected),e.disabled&&m.push(mo.disabled),o&&m.push(`${mo.item}--is-hierarchical`);const _=ql(!1,1);return(0,n.createElement)("li",{className:m.join(" ")},(0,n.createElement)(ta,{setIsCollapsed:h,isCollapsed:p,parentChildren:s,isHierarchical:o},(0,n.createElement)("a",{className:`${mo.item}__interactive`,href:r.length>0?`${e.url}?${r}`:e.url,title:Qo(e.label),tabIndex:"0"},(0,n.createElement)("div",{className:`${mo.item}__label`},(0,n.createElement)("span",null,Qo(e.label)))),vo("show_count")&&(0,n.createElement)(Gl,{counter:e.counter})),s.length>0&&(0,n.createElement)("ul",{className:c(`${ho}-block__items-list`,p&&`${ho}-block__items-list--hidden`)},s.filter(d?()=>!0:(e,r)=>Zl(e,r,t,o)).map(e=>(0,n.createElement)(na,{key:`${t}-${e.value}`,item:e,filterID:t,queryString:_.queryString,isHierarchical:o,children:Pr(s.filter(t=>t.value===e.value),"[0].children",[]),expandedOnInit:l,expandToLevel:a-1})),u>0?(0,n.createElement)(ra,{numberOfValues:u,showHiddenValues:d,onClick:()=>f(!d)}):null))},oa=na,ia=(0,n.createElement)(f,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(d,{d:"M11,18H13V16H11V18M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,6A4,4 0 0,0 8,10H10A2,2 0 0,1 12,8A2,2 0 0,1 14,10C14,12 11,11.75 11,15H13C13,12.75 16,12.5 16,10A4,4 0 0,0 12,6Z"}));function sa(){return"undefined"!=typeof window}function la(e){return ua(e)?(e.nodeName||"").toLowerCase():"#document"}function aa(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function ca(e){var t;return null==(t=(ua(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function ua(e){return!!sa()&&(e instanceof Node||e instanceof aa(e).Node)}function da(e){return!!sa()&&(e instanceof Element||e instanceof aa(e).Element)}function fa(e){return!!sa()&&(e instanceof HTMLElement||e instanceof aa(e).HTMLElement)}function pa(e){return!(!sa()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof aa(e).ShadowRoot)}const ha=new Set(["inline","contents"]);function ma(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=Aa(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!ha.has(o)}const _a=new Set(["table","td","th"]);function va(e){return _a.has(la(e))}const ga=[":popover-open",":modal"];function ba(e){return ga.some(t=>{try{return e.matches(t)}catch(e){return!1}})}const ya=["transform","translate","scale","rotate","perspective"],wa=["transform","translate","scale","rotate","perspective","filter"],Ea=["paint","layout","strict","content"];function xa(e){const t=Sa(),r=da(e)?Aa(e):e;return ya.some(e=>!!r[e]&&"none"!==r[e])||!!r.containerType&&"normal"!==r.containerType||!t&&!!r.backdropFilter&&"none"!==r.backdropFilter||!t&&!!r.filter&&"none"!==r.filter||wa.some(e=>(r.willChange||"").includes(e))||Ea.some(e=>(r.contain||"").includes(e))}function Sa(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const ka=new Set(["html","body","#document"]);function Ia(e){return ka.has(la(e))}function Aa(e){return aa(e).getComputedStyle(e)}function Ca(e){return da(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Pa(e){if("html"===la(e))return e;const t=e.assignedSlot||e.parentNode||pa(e)&&e.host||ca(e);return pa(t)?t.host:t}function Fa(e){const t=Pa(e);return Ia(t)?e.ownerDocument?e.ownerDocument.body:e.body:fa(t)&&ma(t)?t:Fa(t)}function $a(e,t,r){var n;void 0===t&&(t=[]),void 0===r&&(r=!0);const o=Fa(e),i=o===(null==(n=e.ownerDocument)?void 0:n.body),s=aa(o);if(i){const e=Oa(s);return t.concat(s,s.visualViewport||[],ma(o)?o:[],e&&r?$a(e):[])}return t.concat(o,$a(o,[],r))}function Oa(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Na(e){let t=e.activeElement;for(;null!=(null==(r=t)||null==(r=r.shadowRoot)?void 0:r.activeElement);){var r;t=t.shadowRoot.activeElement}return t}function Ra(e,t){if(!e||!t)return!1;const r=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(r&&pa(r)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function La(){const e=navigator.userAgentData;return null!=e&&e.platform?e.platform:navigator.platform}function Da(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(e=>{let{brand:t,version:r}=e;return t+"/"+r}).join(" "):navigator.userAgent}function ja(e){return!(0!==e.mozInputSource||!e.isTrusted)||(Va()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}function Ta(e){return!Da().includes("jsdom/")&&(!Va()&&0===e.width&&0===e.height||Va()&&1===e.width&&1===e.height&&0===e.pressure&&0===e.detail&&"mouse"===e.pointerType||e.width<1&&e.height<1&&0===e.pressure&&0===e.detail&&"touch"===e.pointerType)}function Ma(){return/apple/i.test(navigator.vendor)}function Va(){const e=/android/i;return e.test(La())||e.test(Da())}function Ba(){return La().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function Ua(e,t){const r=["mouse","pen"];return t||r.push("",void 0),r.includes(e)}function Ha(e){return(null==e?void 0:e.ownerDocument)||document}function za(e,t){if(null==t)return!1;if("composedPath"in e)return e.composedPath().includes(t);const r=e;return null!=r.target&&t.contains(r.target)}function Ja(e){return"composedPath"in e?e.composedPath()[0]:e.target}function qa(e){return fa(e)&&e.matches("input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])")}function Wa(e){e.preventDefault(),e.stopPropagation()}function Ka(e){return!!e&&"combobox"===e.getAttribute("role")&&qa(e)}const Xa=Math.min,Ya=Math.max,Za=Math.round,Qa=Math.floor,Ga=e=>({x:e,y:e}),ec={left:"right",right:"left",bottom:"top",top:"bottom"},tc={start:"end",end:"start"};function rc(e,t,r){return Ya(e,Xa(t,r))}function nc(e,t){return"function"==typeof e?e(t):e}function oc(e){return e.split("-")[0]}function ic(e){return e.split("-")[1]}function sc(e){return"x"===e?"y":"x"}function lc(e){return"y"===e?"height":"width"}const ac=new Set(["top","bottom"]);function cc(e){return ac.has(oc(e))?"y":"x"}function uc(e){return sc(cc(e))}function dc(e){return e.replace(/start|end/g,e=>tc[e])}const fc=["left","right"],pc=["right","left"],hc=["top","bottom"],mc=["bottom","top"];function _c(e){return e.replace(/left|right|bottom|top/g,e=>ec[e])}function vc(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function gc(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}var bc=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"].join(","),yc="undefined"==typeof Element,wc=yc?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ec=!yc&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},xc=function e(t,r){var n;void 0===r&&(r=!0);var o=null==t||null===(n=t.getAttribute)||void 0===n?void 0:n.call(t,"inert");return""===o||"true"===o||r&&t&&e(t.parentNode)},Sc=function e(t,r,n){for(var o=[],i=Array.from(t);i.length;){var s=i.shift();if(!xc(s,!1))if("SLOT"===s.tagName){var l=s.assignedElements(),a=e(l.length?l:s.children,!0,n);n.flatten?o.push.apply(o,a):o.push({scopeParent:s,candidates:a})}else{wc.call(s,bc)&&n.filter(s)&&(r||!t.includes(s))&&o.push(s);var c=s.shadowRoot||"function"==typeof n.getShadowRoot&&n.getShadowRoot(s),u=!xc(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(s));if(c&&u){var d=e(!0===c?s.children:c.children,!0,n);n.flatten?o.push.apply(o,d):o.push({scopeParent:s,candidates:d})}else i.unshift.apply(i,s.children)}}return o},kc=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Ic=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,r=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===r||"true"===r}(e))&&!kc(e)?0:e.tabIndex},Ac=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Cc=function(e){return"INPUT"===e.tagName},Pc=function(e){var t=e.getBoundingClientRect(),r=t.width,n=t.height;return 0===r&&0===n},Fc=function(e,t){return!(t.disabled||xc(t)||function(e){return Cc(e)&&"hidden"===e.type}(t)||function(e,t){var r=t.displayCheck,n=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var o=wc.call(e,"details>summary:first-of-type")?e.parentElement:e;if(wc.call(o,"details:not([open]) *"))return!0;if(r&&"full"!==r&&"legacy-full"!==r){if("non-zero-area"===r)return Pc(e)}else{if("function"==typeof n){for(var i=e;e;){var s=e.parentElement,l=Ec(e);if(s&&!s.shadowRoot&&!0===n(s))return Pc(e);e=e.assignedSlot?e.assignedSlot:s||l===e.ownerDocument?s:l.host}e=i}if(function(e){var t,r,n,o,i=e&&Ec(e),s=null===(t=i)||void 0===t?void 0:t.host,l=!1;if(i&&i!==e)for(l=!!(null!==(r=s)&&void 0!==r&&null!==(n=r.ownerDocument)&&void 0!==n&&n.contains(s)||null!=e&&null!==(o=e.ownerDocument)&&void 0!==o&&o.contains(e));!l&&s;){var a,c,u;l=!(null===(c=s=null===(a=i=Ec(s))||void 0===a?void 0:a.host)||void 0===c||null===(u=c.ownerDocument)||void 0===u||!u.contains(s))}return l}(e))return!e.getClientRects().length;if("legacy-full"!==r)return!0}return!1}(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some(function(e){return"SUMMARY"===e.tagName})}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var r=0;r<t.children.length;r++){var n=t.children.item(r);if("LEGEND"===n.tagName)return!!wc.call(t,"fieldset[disabled] *")||!n.contains(e)}return!0}t=t.parentElement}return!1}(t))},$c=function(e,t){return!(function(e){return function(e){return Cc(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,r=e.form||Ec(e),n=function(e){return r.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=n(window.CSS.escape(e.name));else try{t=n(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var o=function(e,t){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===t)return e[r]}(t,e.form);return!o||o===e}(e)}(t)||Ic(t)<0||!Fc(e,t))},Oc=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},Nc=function e(t){var r=[],n=[];return t.forEach(function(t,o){var i=!!t.scopeParent,s=i?t.scopeParent:t,l=function(e,t){var r=Ic(e);return r<0&&t&&!kc(e)?0:r}(s,i),a=i?e(t.candidates):s;0===l?i?r.push.apply(r,a):r.push(s):n.push({documentOrder:o,tabIndex:l,item:t,isScope:i,content:a})}),n.sort(Ac).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(r)},Rc=function(e,t){var r;return r=(t=t||{}).getShadowRoot?Sc([e],t.includeContainer,{filter:$c.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:Oc}):function(e,t,r){if(xc(e))return[];var n=Array.prototype.slice.apply(e.querySelectorAll(bc));return t&&wc.call(e,bc)&&n.unshift(e),n.filter(r)}(e,t.includeContainer,$c.bind(null,t)),Nc(r)};function Lc(e,t,r){let{reference:n,floating:o}=e;const i=cc(t),s=uc(t),l=lc(s),a=oc(t),c="y"===i,u=n.x+n.width/2-o.width/2,d=n.y+n.height/2-o.height/2,f=n[l]/2-o[l]/2;let p;switch(a){case"top":p={x:u,y:n.y-o.height};break;case"bottom":p={x:u,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:d};break;case"left":p={x:n.x-o.width,y:d};break;default:p={x:n.x,y:n.y}}switch(ic(t)){case"start":p[s]-=f*(r&&c?-1:1);break;case"end":p[s]+=f*(r&&c?-1:1)}return p}async function Dc(e,t){var r;void 0===t&&(t={});const{x:n,y:o,platform:i,rects:s,elements:l,strategy:a}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=nc(t,e),h=vc(p),m=l[f?"floating"===d?"reference":"floating":d],_=gc(await i.getClippingRect({element:null==(r=await(null==i.isElement?void 0:i.isElement(m)))||r?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(l.floating)),boundary:c,rootBoundary:u,strategy:a})),v="floating"===d?{x:n,y:o,width:s.floating.width,height:s.floating.height}:s.reference,g=await(null==i.getOffsetParent?void 0:i.getOffsetParent(l.floating)),b=await(null==i.isElement?void 0:i.isElement(g))&&await(null==i.getScale?void 0:i.getScale(g))||{x:1,y:1},y=gc(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:v,offsetParent:g,strategy:a}):v);return{top:(_.top-y.top+h.top)/b.y,bottom:(y.bottom-_.bottom+h.bottom)/b.y,left:(_.left-y.left+h.left)/b.x,right:(y.right-_.right+h.right)/b.x}}const jc=new Set(["left","top"]);function Tc(e){const t=Aa(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=fa(e),i=o?e.offsetWidth:r,s=o?e.offsetHeight:n,l=Za(r)!==i||Za(n)!==s;return l&&(r=i,n=s),{width:r,height:n,$:l}}function Mc(e){return da(e)?e:e.contextElement}function Vc(e){const t=Mc(e);if(!fa(t))return Ga(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:i}=Tc(t);let s=(i?Za(r.width):r.width)/n,l=(i?Za(r.height):r.height)/o;return s&&Number.isFinite(s)||(s=1),l&&Number.isFinite(l)||(l=1),{x:s,y:l}}const Bc=Ga(0);function Uc(e){const t=aa(e);return Sa()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Bc}function Hc(e,t,r,n){void 0===t&&(t=!1),void 0===r&&(r=!1);const o=e.getBoundingClientRect(),i=Mc(e);let s=Ga(1);t&&(n?da(n)&&(s=Vc(n)):s=Vc(e));const l=function(e,t,r){return void 0===t&&(t=!1),!(!r||t&&r!==aa(e))&&t}(i,r,n)?Uc(i):Ga(0);let a=(o.left+l.x)/s.x,c=(o.top+l.y)/s.y,u=o.width/s.x,d=o.height/s.y;if(i){const e=aa(i),t=n&&da(n)?aa(n):n;let r=e,o=Oa(r);for(;o&&n&&t!==r;){const e=Vc(o),t=o.getBoundingClientRect(),n=Aa(o),i=t.left+(o.clientLeft+parseFloat(n.paddingLeft))*e.x,s=t.top+(o.clientTop+parseFloat(n.paddingTop))*e.y;a*=e.x,c*=e.y,u*=e.x,d*=e.y,a+=i,c+=s,r=aa(o),o=Oa(r)}}return gc({width:u,height:d,x:a,y:c})}function zc(e,t){const r=Ca(e).scrollLeft;return t?t.left+r:Hc(ca(e)).left+r}function Jc(e,t){const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-zc(e,r),y:r.top+t.scrollTop}}const qc=new Set(["absolute","fixed"]);function Wc(e,t,r){let n;if("viewport"===t)n=function(e,t){const r=aa(e),n=ca(e),o=r.visualViewport;let i=n.clientWidth,s=n.clientHeight,l=0,a=0;if(o){i=o.width,s=o.height;const e=Sa();(!e||e&&"fixed"===t)&&(l=o.offsetLeft,a=o.offsetTop)}const c=zc(n);if(c<=0){const e=n.ownerDocument,t=e.body,r=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(r.marginLeft)+parseFloat(r.marginRight)||0,s=Math.abs(n.clientWidth-t.clientWidth-o);s<=25&&(i-=s)}else c<=25&&(i+=c);return{width:i,height:s,x:l,y:a}}(e,r);else if("document"===t)n=function(e){const t=ca(e),r=Ca(e),n=e.ownerDocument.body,o=Ya(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=Ya(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-r.scrollLeft+zc(e);const l=-r.scrollTop;return"rtl"===Aa(n).direction&&(s+=Ya(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:s,y:l}}(ca(e));else if(da(t))n=function(e,t){const r=Hc(e,!0,"fixed"===t),n=r.top+e.clientTop,o=r.left+e.clientLeft,i=fa(e)?Vc(e):Ga(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:n*i.y}}(t,r);else{const r=Uc(e);n={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return gc(n)}function Kc(e,t){const r=Pa(e);return!(r===t||!da(r)||Ia(r))&&("fixed"===Aa(r).position||Kc(r,t))}function Xc(e,t,r){const n=fa(t),o=ca(t),i="fixed"===r,s=Hc(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const a=Ga(0);function c(){a.x=zc(o)}if(n||!n&&!i)if(("body"!==la(t)||ma(o))&&(l=Ca(t)),n){const e=Hc(t,!0,i,t);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else o&&c();i&&!n&&o&&c();const u=!o||n||i?Ga(0):Jc(o,l);return{x:s.left+l.scrollLeft-a.x-u.x,y:s.top+l.scrollTop-a.y-u.y,width:s.width,height:s.height}}function Yc(e){return"static"===Aa(e).position}function Zc(e,t){if(!fa(e)||"fixed"===Aa(e).position)return null;if(t)return t(e);let r=e.offsetParent;return ca(e)===r&&(r=r.ownerDocument.body),r}function Qc(e,t){const r=aa(e);if(ba(e))return r;if(!fa(e)){let t=Pa(e);for(;t&&!Ia(t);){if(da(t)&&!Yc(t))return t;t=Pa(t)}return r}let n=Zc(e,t);for(;n&&va(n)&&Yc(n);)n=Zc(n,t);return n&&Ia(n)&&Yc(n)&&!xa(n)?r:n||function(e){let t=Pa(e);for(;fa(t)&&!Ia(t);){if(xa(t))return t;if(ba(t))return null;t=Pa(t)}return null}(e)||r}const Gc={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const i="fixed"===o,s=ca(n),l=!!t&&ba(t.floating);if(n===s||l&&i)return r;let a={scrollLeft:0,scrollTop:0},c=Ga(1);const u=Ga(0),d=fa(n);if((d||!d&&!i)&&(("body"!==la(n)||ma(s))&&(a=Ca(n)),fa(n))){const e=Hc(n);c=Vc(n),u.x=e.x+n.clientLeft,u.y=e.y+n.clientTop}const f=!s||d||i?Ga(0):Jc(s,a);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-a.scrollLeft*c.x+u.x+f.x,y:r.y*c.y-a.scrollTop*c.y+u.y+f.y}},getDocumentElement:ca,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i=[..."clippingAncestors"===r?ba(t)?[]:function(e,t){const r=t.get(e);if(r)return r;let n=$a(e,[],!1).filter(e=>da(e)&&"body"!==la(e)),o=null;const i="fixed"===Aa(e).position;let s=i?Pa(e):e;for(;da(s)&&!Ia(s);){const t=Aa(s),r=xa(s);r||"fixed"!==t.position||(o=null),(i?!r&&!o:!r&&"static"===t.position&&o&&qc.has(o.position)||ma(s)&&!r&&Kc(e,s))?n=n.filter(e=>e!==s):o=t,s=Pa(s)}return t.set(e,n),n}(t,this._c):[].concat(r),n],s=i[0],l=i.reduce((e,r)=>{const n=Wc(t,r,o);return e.top=Ya(n.top,e.top),e.right=Xa(n.right,e.right),e.bottom=Xa(n.bottom,e.bottom),e.left=Ya(n.left,e.left),e},Wc(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:Qc,getElementRects:async function(e){const t=this.getOffsetParent||Qc,r=this.getDimensions,n=await r(e.floating);return{reference:Xc(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:r}=Tc(e);return{width:t,height:r}},getScale:Vc,isElement:da,isRTL:function(e){return"rtl"===Aa(e).direction}};function eu(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function tu(e,t,r,n){void 0===n&&(n={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:a=!1}=n,c=Mc(e),u=o||i?[...c?$a(c):[],...$a(t)]:[];u.forEach(e=>{o&&e.addEventListener("scroll",r,{passive:!0}),i&&e.addEventListener("resize",r)});const d=c&&l?function(e,t){let r,n=null;const o=ca(e);function i(){var e;clearTimeout(r),null==(e=n)||e.disconnect(),n=null}return function s(l,a){void 0===l&&(l=!1),void 0===a&&(a=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=c;if(l||t(),!f||!p)return;const h={rootMargin:-Qa(d)+"px "+-Qa(o.clientWidth-(u+f))+"px "+-Qa(o.clientHeight-(d+p))+"px "+-Qa(u)+"px",threshold:Ya(0,Xa(1,a))||1};let m=!0;function _(t){const n=t[0].intersectionRatio;if(n!==a){if(!m)return s();n?s(!1,n):r=setTimeout(()=>{s(!1,1e-7)},1e3)}1!==n||eu(c,e.getBoundingClientRect())||s(),m=!1}try{n=new IntersectionObserver(_,{...h,root:o.ownerDocument})}catch(e){n=new IntersectionObserver(_,h)}n.observe(e)}(!0),i}(c,r):null;let f,p=-1,h=null;s&&(h=new ResizeObserver(e=>{let[n]=e;n&&n.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=h)||e.observe(t)})),r()}),c&&!a&&h.observe(c),h.observe(t));let m=a?Hc(e):null;return a&&function t(){const n=Hc(e);m&&!eu(m,n)&&r(),m=n,f=requestAnimationFrame(t)}(),r(),()=>{var e;u.forEach(e=>{o&&e.removeEventListener("scroll",r),i&&e.removeEventListener("resize",r)}),null==d||d(),null==(e=h)||e.disconnect(),h=null,a&&cancelAnimationFrame(f)}}const ru=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:i,placement:s,middlewareData:l}=t,a=await async function(e,t){const{placement:r,platform:n,elements:o}=e,i=await(null==n.isRTL?void 0:n.isRTL(o.floating)),s=oc(r),l=ic(r),a="y"===cc(r),c=jc.has(s)?-1:1,u=i&&a?-1:1,d=nc(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&"number"==typeof h&&(p="end"===l?-1*h:h),a?{x:p*u,y:f*c}:{x:f*c,y:p*u}}(t,e);return s===(null==(r=l.offset)?void 0:r.placement)&&null!=(n=l.arrow)&&n.alignmentOffset?{}:{x:o+a.x,y:i+a.y,data:{...a,placement:s}}}}},nu=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:l={fn:e=>{let{x:t,y:r}=e;return{x:t,y:r}}},...a}=nc(e,t),c={x:r,y:n},u=await Dc(t,a),d=cc(oc(o)),f=sc(d);let p=c[f],h=c[d];if(i){const e="y"===f?"bottom":"right";p=rc(p+u["y"===f?"top":"left"],p,p-u[e])}if(s){const e="y"===d?"bottom":"right";h=rc(h+u["y"===d?"top":"left"],h,h-u[e])}const m=l.fn({...t,[f]:p,[d]:h});return{...m,data:{x:m.x-r,y:m.y-n,enabled:{[f]:i,[d]:s}}}}}},ou=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:i,rects:s,initialPlacement:l,platform:a,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,..._}=nc(e,t);if(null!=(r=i.arrow)&&r.alignmentOffset)return{};const v=oc(o),g=cc(l),b=oc(l)===l,y=await(null==a.isRTL?void 0:a.isRTL(c.floating)),w=f||(b||!m?[_c(l)]:function(e){const t=_c(e);return[dc(e),t,dc(t)]}(l)),E="none"!==h;!f&&E&&w.push(...function(e,t,r,n){const o=ic(e);let i=function(e,t,r){switch(e){case"top":case"bottom":return r?t?pc:fc:t?fc:pc;case"left":case"right":return t?hc:mc;default:return[]}}(oc(e),"start"===r,n);return o&&(i=i.map(e=>e+"-"+o),t&&(i=i.concat(i.map(dc)))),i}(l,m,h,y));const x=[l,...w],S=await Dc(t,_),k=[];let I=(null==(n=i.flip)?void 0:n.overflows)||[];if(u&&k.push(S[v]),d){const e=function(e,t,r){void 0===r&&(r=!1);const n=ic(e),o=uc(e),i=lc(o);let s="x"===o?n===(r?"end":"start")?"right":"left":"start"===n?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=_c(s)),[s,_c(s)]}(o,s,y);k.push(S[e[0]],S[e[1]])}if(I=[...I,{placement:o,overflows:k}],!k.every(e=>e<=0)){var A,C;const e=((null==(A=i.flip)?void 0:A.index)||0)+1,t=x[e];if(t&&("alignment"!==d||g===cc(t)||I.every(e=>cc(e.placement)!==g||e.overflows[0]>0)))return{data:{index:e,overflows:I},reset:{placement:t}};let r=null==(C=I.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:C.placement;if(!r)switch(p){case"bestFit":{var P;const e=null==(P=I.filter(e=>{if(E){const t=cc(e.placement);return t===g||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:P[0];e&&(r=e);break}case"initialPlacement":r=l}if(o!==r)return{reset:{placement:r}}}return{}}}},iu=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:i,platform:s,elements:l}=t,{apply:a=()=>{},...c}=nc(e,t),u=await Dc(t,c),d=oc(o),f=ic(o),p="y"===cc(o),{width:h,height:m}=i.floating;let _,v;"top"===d||"bottom"===d?(_=d,v=f===(await(null==s.isRTL?void 0:s.isRTL(l.floating))?"start":"end")?"left":"right"):(v=d,_="end"===f?"top":"bottom");const g=m-u.top-u.bottom,b=h-u.left-u.right,y=Xa(m-u[_],g),w=Xa(h-u[v],b),E=!t.middlewareData.shift;let x=y,S=w;if(null!=(r=t.middlewareData.shift)&&r.enabled.x&&(S=b),null!=(n=t.middlewareData.shift)&&n.enabled.y&&(x=g),E&&!f){const e=Ya(u.left,0),t=Ya(u.right,0),r=Ya(u.top,0),n=Ya(u.bottom,0);p?S=h-2*(0!==e||0!==t?e+t:Ya(u.left,u.right)):x=m-2*(0!==r||0!==n?r+n:Ya(u.top,u.bottom))}await a({...t,availableWidth:S,availableHeight:x});const k=await s.getDimensions(l.floating);return h!==k.width||m!==k.height?{reset:{rects:!0}}:{}}}},su=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:i,platform:s,elements:l,middlewareData:a}=t,{element:c,padding:u=0}=nc(e,t)||{};if(null==c)return{};const d=vc(u),f={x:r,y:n},p=uc(o),h=lc(p),m=await s.getDimensions(c),_="y"===p,v=_?"top":"left",g=_?"bottom":"right",b=_?"clientHeight":"clientWidth",y=i.reference[h]+i.reference[p]-f[p]-i.floating[h],w=f[p]-i.reference[p],E=await(null==s.getOffsetParent?void 0:s.getOffsetParent(c));let x=E?E[b]:0;x&&await(null==s.isElement?void 0:s.isElement(E))||(x=l.floating[b]||i.floating[h]);const S=y/2-w/2,k=x/2-m[h]/2-1,I=Xa(d[v],k),A=Xa(d[g],k),C=I,P=x-m[h]-A,F=x/2-m[h]/2+S,$=rc(C,F,P),O=!a.arrow&&null!=ic(o)&&F!==$&&i.reference[h]/2-(F<C?I:A)-m[h]/2<0,N=O?F<C?F-C:F-P:0;return{[p]:f[p]+N,data:{[p]:$,centerOffset:F-$-N,...O&&{alignmentOffset:N}},reset:O}}}),lu=(e,t,r)=>{const n=new Map,o={platform:Gc,...r},i={...o.platform,_c:n};return(async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:s}=r,l=i.filter(Boolean),a=await(null==s.isRTL?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=Lc(c,n,a),f=n,p={},h=0;for(let r=0;r<l.length;r++){const{name:i,fn:m}=l[r],{x:_,y:v,data:g,reset:b}=await m({x:u,y:d,initialPlacement:n,placement:f,strategy:o,middlewareData:p,rects:c,platform:s,elements:{reference:e,floating:t}});u=null!=_?_:u,d=null!=v?v:d,p={...p,[i]:{...p[i],...g}},b&&h<=50&&(h++,"object"==typeof b&&(b.placement&&(f=b.placement),b.rects&&(c=!0===b.rects?await s.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:u,y:d}=Lc(c,f,a))),r=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:p}})(e,t,{...o,platform:i})};var au="undefined"!=typeof document?n.useLayoutEffect:function(){};function cu(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;0!==n--;)if(!cu(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;0!==n--;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;0!==n--;){const r=o[n];if(!("_owner"===r&&e.$$typeof||cu(e[r],t[r])))return!1}return!0}return e!=e&&t!=t}function uu(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function du(e,t){const r=uu(e);return Math.round(t*r)/r}function fu(e){const t=n.useRef(e);return au(()=>{t.current=e}),t}const pu=e=>({name:"arrow",options:e,fn(t){const{element:r,padding:n}="function"==typeof e?e(t):e;return r&&(o=r,{}.hasOwnProperty.call(o,"current"))?null!=r.current?su({element:r.current,padding:n}).fn(t):{}:r?su({element:r,padding:n}).fn(t):{};var o}}),hu=(e,t)=>({...ru(e),options:[e,t]}),mu=(e,t)=>({...nu(e),options:[e,t]}),_u=(e,t)=>({...ou(e),options:[e,t]});function vu(e){return n.useMemo(()=>e.every(e=>null==e)?null:t=>{e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})},e)}const gu={...n},bu=gu.useInsertionEffect||(e=>e());function yu(e){const t=n.useRef(()=>{});return bu(()=>{t.current=e}),n.useCallback(function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return null==t.current?void 0:t.current(...r)},[])}const wu="ArrowUp",Eu="ArrowDown",xu="ArrowLeft",Su="ArrowRight";function ku(e,t,r){return Math.floor(e/t)!==r}function Iu(e,t){return t<0||t>=e.current.length}function Au(e,t){return Pu(e,{disabledIndices:t})}function Cu(e,t){return Pu(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Pu(e,t){let{startingIndex:r=-1,decrement:n=!1,disabledIndices:o,amount:i=1}=void 0===t?{}:t;const s=e.current;let l=r;do{l+=n?-i:i}while(l>=0&&l<=s.length-1&&Ou(s,l,o));return l}function Fu(e,t,r,n,o){if(-1===e)return-1;const i=r.indexOf(e),s=t[e];switch(o){case"tl":return i;case"tr":return s?i+s.width-1:i;case"bl":return s?i+(s.height-1)*n:i;case"br":return r.lastIndexOf(e)}}function $u(e,t){return t.flatMap((t,r)=>e.includes(t)?[r]:[])}function Ou(e,t,r){if(r)return r.includes(t);const n=e[t];return null==n||n.hasAttribute("disabled")||"true"===n.getAttribute("aria-disabled")}var Nu="undefined"!=typeof document?n.useLayoutEffect:n.useEffect;function Ru(){return Ru=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ru.apply(this,arguments)}let Lu=!1,Du=0;const ju=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Du++,Tu=gu.useId||function(){const[e,t]=n.useState(()=>Lu?ju():void 0);return Nu(()=>{null==e&&t(ju())},[]),n.useEffect(()=>{Lu=!0},[]),e};const Mu=n.createContext(null),Vu=n.createContext(null),Bu=()=>{var e;return(null==(e=n.useContext(Mu))?void 0:e.id)||null},Uu=()=>n.useContext(Vu);function Hu(e){return"data-floating-ui-"+e}function zu(e){const t=(0,n.useRef)(e);return Nu(()=>{t.current=e}),t}const Ju=Hu("safe-polygon");function qu(e,t,r){return r&&!Ua(r)?0:"number"==typeof e?e:null==e?void 0:e[t]}let Wu=0;function Ku(e,t){void 0===t&&(t={});const{preventScroll:r=!1,cancelPrevious:n=!0,sync:o=!1}=t;n&&cancelAnimationFrame(Wu);const i=()=>null==e?void 0:e.focus({preventScroll:r});o?i():Wu=requestAnimationFrame(i)}function Xu(e,t){let r=e.filter(e=>{var r;return e.parentId===t&&(null==(r=e.context)?void 0:r.open)}),n=r;for(;n.length;)n=e.filter(e=>{var t;return null==(t=n)?void 0:t.some(t=>{var r;return e.parentId===t.id&&(null==(r=e.context)?void 0:r.open)})}),r=r.concat(n);return r}let Yu=new WeakMap,Zu=new WeakSet,Qu={},Gu=0;const ed=e=>e&&(e.host||ed(e.parentNode));function td(e,t,r){void 0===t&&(t=!1),void 0===r&&(r=!1);const n=Ha(e[0]).body;return function(e,t,r,n){const o="data-floating-ui-inert",i=n?"inert":r?"aria-hidden":null,s=(l=t,e.map(e=>{if(l.contains(e))return e;const t=ed(e);return l.contains(t)?t:null}).filter(e=>null!=e));var l;const a=new Set,c=new Set(s),u=[];Qu[o]||(Qu[o]=new WeakMap);const d=Qu[o];return s.forEach(function e(t){t&&!a.has(t)&&(a.add(t),t.parentNode&&e(t.parentNode))}),function e(t){t&&!c.has(t)&&[].forEach.call(t.children,t=>{if("script"!==la(t))if(a.has(t))e(t);else{const e=i?t.getAttribute(i):null,r=null!==e&&"false"!==e,n=(Yu.get(t)||0)+1,s=(d.get(t)||0)+1;Yu.set(t,n),d.set(t,s),u.push(t),1===n&&r&&Zu.add(t),1===s&&t.setAttribute(o,""),!r&&i&&t.setAttribute(i,"true")}})}(t),a.clear(),Gu++,()=>{u.forEach(e=>{const t=(Yu.get(e)||0)-1,r=(d.get(e)||0)-1;Yu.set(e,t),d.set(e,r),t||(!Zu.has(e)&&i&&e.removeAttribute(i),Zu.delete(e)),r||e.removeAttribute(o)}),Gu--,Gu||(Yu=new WeakMap,Yu=new WeakMap,Zu=new WeakSet,Qu={})}}(e.concat(Array.from(n.querySelectorAll("[aria-live]"))),n,t,r)}const rd=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function nd(e,t){const r=Rc(e,rd());"prev"===t&&r.reverse();const n=r.indexOf(Na(Ha(e)));return r.slice(n+1)[0]}function od(){return nd(document.body,"next")}function id(){return nd(document.body,"prev")}function sd(e,t){const r=t||e.currentTarget,n=e.relatedTarget;return!n||!Ra(r,n)}function ld(e){Rc(e,rd()).forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")})}function ad(e){e.querySelectorAll("[data-tabindex]").forEach(e=>{const t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")})}const cd={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};function ud(e){"Tab"===e.key&&(e.target,clearTimeout(void 0))}const dd=n.forwardRef(function(e,t){const[r,o]=n.useState();Nu(()=>(Ma()&&o("button"),document.addEventListener("keydown",ud),()=>{document.removeEventListener("keydown",ud)}),[]);const i={ref:t,tabIndex:0,role:r,"aria-hidden":!r||void 0,[Hu("focus-guard")]:"",style:cd};return n.createElement("span",Ru({},e,i))}),fd=n.createContext(null),pd=Hu("portal");function hd(e){const{children:t,id:r,root:o,preserveTabOrder:i=!0}=e,s=function(e){void 0===e&&(e={});const{id:t,root:r}=e,o=Tu(),i=md(),[s,l]=n.useState(null),a=n.useRef(null);return Nu(()=>()=>{null==s||s.remove(),queueMicrotask(()=>{a.current=null})},[s]),Nu(()=>{if(!o)return;if(a.current)return;const e=t?document.getElementById(t):null;if(!e)return;const r=document.createElement("div");r.id=o,r.setAttribute(pd,""),e.appendChild(r),a.current=r,l(r)},[t,o]),Nu(()=>{if(null===r)return;if(!o)return;if(a.current)return;let e=r||(null==i?void 0:i.portalNode);e&&!da(e)&&(e=e.current),e=e||document.body;let n=null;t&&(n=document.createElement("div"),n.id=t,e.appendChild(n));const s=document.createElement("div");s.id=o,s.setAttribute(pd,""),e=n||e,e.appendChild(s),a.current=s,l(s)},[t,r,o,i]),s}({id:r,root:o}),[l,a]=n.useState(null),c=n.useRef(null),u=n.useRef(null),d=n.useRef(null),f=n.useRef(null),p=null==l?void 0:l.modal,h=null==l?void 0:l.open,m=!!l&&!l.modal&&l.open&&i&&!(!o&&!s);return n.useEffect(()=>{if(s&&i&&!p)return s.addEventListener("focusin",e,!0),s.addEventListener("focusout",e,!0),()=>{s.removeEventListener("focusin",e,!0),s.removeEventListener("focusout",e,!0)};function e(e){s&&sd(e)&&("focusin"===e.type?ad:ld)(s)}},[s,i,p]),n.useEffect(()=>{s&&(h||ad(s))},[h,s]),n.createElement(fd.Provider,{value:n.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:c,afterOutsideRef:u,beforeInsideRef:d,afterInsideRef:f,portalNode:s,setFocusManagerState:a}),[i,s])},m&&s&&n.createElement(dd,{"data-type":"outside",ref:c,onFocus:e=>{if(sd(e,s)){var t;null==(t=d.current)||t.focus()}else{const e=id()||(null==l?void 0:l.refs.domReference.current);null==e||e.focus()}}}),m&&s&&n.createElement("span",{"aria-owns":s.id,style:cd}),s&&n.createPortal(t,s),m&&s&&n.createElement(dd,{"data-type":"outside",ref:u,onFocus:e=>{if(sd(e,s)){var t;null==(t=f.current)||t.focus()}else{const t=od()||(null==l?void 0:l.refs.domReference.current);null==t||t.focus(),(null==l?void 0:l.closeOnFocusOut)&&(null==l||l.onOpenChange(!1,e.nativeEvent,"focus-out"))}}}))}const md=()=>n.useContext(fd),_d="data-floating-ui-focusable";function vd(e){return e?e.hasAttribute(_d)?e:e.querySelector("["+_d+"]")||e:null}let gd=[];function bd(e){gd=gd.filter(e=>e.isConnected);let t=e;if(t&&"body"!==la(t)){if(!function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==wc.call(e,bc)&&$c(t,e)}(t,rd())){const e=Rc(t,rd())[0];e&&(t=e)}gd.push(t),gd.length>20&&(gd=gd.slice(-20))}}function yd(){return gd.slice().reverse().find(e=>e.isConnected)}const wd=n.forwardRef(function(e,t){return n.createElement("button",Ru({},e,{type:"button",ref:t,tabIndex:-1,style:cd}))});function Ed(e){const{context:t,children:r,disabled:o=!1,order:i=["content"],guards:s=!0,initialFocus:l=0,returnFocus:a=!0,restoreFocus:c=!1,modal:u=!0,visuallyHiddenDismiss:d=!1,closeOnFocusOut:f=!0}=e,{open:p,refs:h,nodeId:m,onOpenChange:_,events:v,dataRef:g,floatingId:b,elements:{domReference:y,floating:w}}=t,E="number"==typeof l&&l<0,x=Ka(y)&&E,S="undefined"==typeof HTMLElement||!("inert"in HTMLElement.prototype)||s,k=zu(i),I=zu(l),A=zu(a),C=Uu(),P=md(),F=n.useRef(null),$=n.useRef(null),O=n.useRef(!1),N=n.useRef(!1),R=n.useRef(-1),L=null!=P,D=vd(w),j=yu(function(e){return void 0===e&&(e=D),e?Rc(e,rd()):[]}),T=yu(e=>{const t=j(e);return k.current.map(e=>y&&"reference"===e?y:D&&"floating"===e?D:t).filter(Boolean).flat()});function M(e){return!o&&d&&u?n.createElement(wd,{ref:"start"===e?F:$,onClick:e=>_(!1,e.nativeEvent)},"string"==typeof d?d:"Dismiss"):null}n.useEffect(()=>{if(o)return;if(!u)return;function e(e){if("Tab"===e.key){Ra(D,Na(Ha(D)))&&0===j().length&&!x&&Wa(e);const t=T(),r=Ja(e);"reference"===k.current[0]&&r===y&&(Wa(e),e.shiftKey?Ku(t[t.length-1]):Ku(t[1])),"floating"===k.current[1]&&r===D&&e.shiftKey&&(Wa(e),Ku(t[0]))}}const t=Ha(D);return t.addEventListener("keydown",e),()=>{t.removeEventListener("keydown",e)}},[o,y,D,u,k,x,j,T]),n.useEffect(()=>{if(!o&&w)return w.addEventListener("focusin",e),()=>{w.removeEventListener("focusin",e)};function e(e){const t=Ja(e),r=j().indexOf(t);-1!==r&&(R.current=r)}},[o,w,j]),n.useEffect(()=>{if(!o&&f)return w&&fa(y)?(y.addEventListener("focusout",t),y.addEventListener("pointerdown",e),w.addEventListener("focusout",t),()=>{y.removeEventListener("focusout",t),y.removeEventListener("pointerdown",e),w.removeEventListener("focusout",t)}):void 0;function e(){N.current=!0,setTimeout(()=>{N.current=!1})}function t(e){const t=e.relatedTarget;queueMicrotask(()=>{const r=!(Ra(y,t)||Ra(w,t)||Ra(t,w)||Ra(null==P?void 0:P.portalNode,t)||null!=t&&t.hasAttribute(Hu("focus-guard"))||C&&(Xu(C.nodesRef.current,m).find(e=>{var r,n;return Ra(null==(r=e.context)?void 0:r.elements.floating,t)||Ra(null==(n=e.context)?void 0:n.elements.domReference,t)})||function(e,t){var r;let n=[],o=null==(r=e.find(e=>e.id===t))?void 0:r.parentId;for(;o;){const t=e.find(e=>e.id===o);o=null==t?void 0:t.parentId,t&&(n=n.concat(t))}return n}(C.nodesRef.current,m).find(e=>{var r,n;return(null==(r=e.context)?void 0:r.elements.floating)===t||(null==(n=e.context)?void 0:n.elements.domReference)===t})));if(c&&r&&Na(Ha(D))===Ha(D).body){fa(D)&&D.focus();const e=R.current,t=j(),r=t[e]||t[t.length-1]||D;fa(r)&&r.focus()}!x&&u||!t||!r||N.current||t===yd()||(O.current=!0,_(!1,e,"focus-out"))})}},[o,y,w,D,u,m,C,P,_,f,c,j,x]),n.useEffect(()=>{var e;if(o)return;const t=Array.from((null==P||null==(e=P.portalNode)?void 0:e.querySelectorAll("["+Hu("portal")+"]"))||[]);if(w){const e=[w,...t,F.current,$.current,k.current.includes("reference")||x?y:null].filter(e=>null!=e),r=u||x?td(e,S,!S):td(e);return()=>{r()}}},[o,y,w,u,k,P,x,S]),Nu(()=>{if(o||!fa(D))return;const e=Na(Ha(D));queueMicrotask(()=>{const t=T(D),r=I.current,n=("number"==typeof r?t[r]:r.current)||D,o=Ra(D,e);E||o||!p||Ku(n,{preventScroll:n===D})})},[o,p,D,E,T,I]),Nu(()=>{if(o||!D)return;let e=!1;const t=Ha(D),r=Na(t);let n=g.current.openEvent;function i(t){let{open:r,reason:o,event:i,nested:s}=t;r&&(n=i),"escape-key"===o&&h.domReference.current&&bd(h.domReference.current),"hover"===o&&"mouseleave"===i.type&&(O.current=!0),"outside-press"===o&&(s?(O.current=!1,e=!0):O.current=!(ja(i)||Ta(i)))}bd(r),v.on("openchange",i);const s=t.createElement("span");return s.setAttribute("tabindex","-1"),s.setAttribute("aria-hidden","true"),Object.assign(s.style,cd),L&&y&&y.insertAdjacentElement("afterend",s),()=>{v.off("openchange",i);const r=Na(t),o=Ra(w,r)||C&&Xu(C.nodesRef.current,m).some(e=>{var t;return Ra(null==(t=e.context)?void 0:t.elements.floating,r)});(o||n&&["click","mousedown"].includes(n.type))&&h.domReference.current&&bd(h.domReference.current);const l="boolean"==typeof A.current?yd()||s:A.current.current||s;queueMicrotask(()=>{A.current&&!O.current&&fa(l)&&(l===r||r===t.body||o)&&l.focus({preventScroll:e}),s.remove()})}},[o,w,D,A,g,h,v,C,m,L,y]),n.useEffect(()=>{queueMicrotask(()=>{O.current=!1})},[o]),Nu(()=>{if(!o&&P)return P.setFocusManagerState({modal:u,closeOnFocusOut:f,open:p,onOpenChange:_,refs:h}),()=>{P.setFocusManagerState(null)}},[o,P,u,p,_,h,f]),Nu(()=>{if(o)return;if(!D)return;if("function"!=typeof MutationObserver)return;if(E)return;const e=()=>{const e=D.getAttribute("tabindex"),t=j(),r=Na(Ha(w)),n=t.indexOf(r);-1!==n&&(R.current=n),k.current.includes("floating")||r!==h.domReference.current&&0===t.length?"0"!==e&&D.setAttribute("tabindex","0"):"-1"!==e&&D.setAttribute("tabindex","-1")};e();const t=new MutationObserver(e);return t.observe(D,{childList:!0,subtree:!0,attributes:!0}),()=>{t.disconnect()}},[o,w,D,h,k,j,E]);const V=!o&&S&&(!u||!x)&&(L||u);return n.createElement(n.Fragment,null,V&&n.createElement(dd,{"data-type":"inside",ref:null==P?void 0:P.beforeInsideRef,onFocus:e=>{if(u){const e=T();Ku("reference"===i[0]?e[0]:e[e.length-1])}else if(null!=P&&P.preserveTabOrder&&P.portalNode)if(O.current=!1,sd(e,P.portalNode)){const e=od()||y;null==e||e.focus()}else{var t;null==(t=P.beforeOutsideRef.current)||t.focus()}}}),!x&&M("start"),r,M("end"),V&&n.createElement(dd,{"data-type":"inside",ref:null==P?void 0:P.afterInsideRef,onFocus:e=>{if(u)Ku(T()[0]);else if(null!=P&&P.preserveTabOrder&&P.portalNode)if(f&&(O.current=!0),sd(e,P.portalNode)){const e=id()||y;null==e||e.focus()}else{var t;null==(t=P.afterOutsideRef.current)||t.focus()}}}))}function xd(e){return fa(e.target)&&"BUTTON"===e.target.tagName}function Sd(e){return qa(e)}function kd(e,t){void 0===t&&(t={});const{open:r,onOpenChange:o,dataRef:i,elements:{domReference:s}}=e,{enabled:l=!0,event:a="click",toggle:c=!0,ignoreMouse:u=!1,keyboardHandlers:d=!0,stickIfOpen:f=!0}=t,p=n.useRef(),h=n.useRef(!1),m=n.useMemo(()=>({onPointerDown(e){p.current=e.pointerType},onMouseDown(e){const t=p.current;0===e.button&&"click"!==a&&(Ua(t,!0)&&u||(!r||!c||i.current.openEvent&&f&&"mousedown"!==i.current.openEvent.type?(e.preventDefault(),o(!0,e.nativeEvent,"click")):o(!1,e.nativeEvent,"click")))},onClick(e){const t=p.current;"mousedown"===a&&p.current?p.current=void 0:Ua(t,!0)&&u||(!r||!c||i.current.openEvent&&f&&"click"!==i.current.openEvent.type?o(!0,e.nativeEvent,"click"):o(!1,e.nativeEvent,"click"))},onKeyDown(e){p.current=void 0,e.defaultPrevented||!d||xd(e)||(" "!==e.key||Sd(s)||(e.preventDefault(),h.current=!0),"Enter"===e.key&&o(!r||!c,e.nativeEvent,"click"))},onKeyUp(e){e.defaultPrevented||!d||xd(e)||Sd(s)||" "===e.key&&h.current&&(h.current=!1,o(!r||!c,e.nativeEvent,"click"))}}),[i,s,a,u,d,o,r,f,c]);return n.useMemo(()=>l?{reference:m}:{},[l,m])}const Id={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Ad={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Cd=e=>{var t,r;return{escapeKey:"boolean"==typeof e?e:null!=(t=null==e?void 0:e.escapeKey)&&t,outsidePress:"boolean"==typeof e?e:null==(r=null==e?void 0:e.outsidePress)||r}};function Pd(e,t){void 0===t&&(t={});const{open:r,onOpenChange:o,elements:i,dataRef:s}=e,{enabled:l=!0,escapeKey:a=!0,outsidePress:c=!0,outsidePressEvent:u="pointerdown",referencePress:d=!1,referencePressEvent:f="pointerdown",ancestorScroll:p=!1,bubbles:h,capture:m}=t,_=Uu(),v=yu("function"==typeof c?c:()=>!1),g="function"==typeof c?v:c,b=n.useRef(!1),y=n.useRef(!1),{escapeKey:w,outsidePress:E}=Cd(h),{escapeKey:x,outsidePress:S}=Cd(m),k=n.useRef(!1),I=yu(e=>{var t;if(!r||!l||!a||"Escape"!==e.key)return;if(k.current)return;const n=null==(t=s.current.floatingContext)?void 0:t.nodeId,i=_?Xu(_.nodesRef.current,n):[];if(!w&&(e.stopPropagation(),i.length>0)){let e=!0;if(i.forEach(t=>{var r;null==(r=t.context)||!r.open||t.context.dataRef.current.__escapeKeyBubbles||(e=!1)}),!e)return}o(!1,function(e){return"nativeEvent"in e}(e)?e.nativeEvent:e,"escape-key")}),A=yu(e=>{var t;const r=()=>{var t;I(e),null==(t=Ja(e))||t.removeEventListener("keydown",r)};null==(t=Ja(e))||t.addEventListener("keydown",r)}),C=yu(e=>{var t;const r=b.current;b.current=!1;const n=y.current;if(y.current=!1,"click"===u&&n)return;if(r)return;if("function"==typeof g&&!g(e))return;const l=Ja(e),a="["+Hu("inert")+"]",c=Ha(i.floating).querySelectorAll(a);let d=da(l)?l:null;for(;d&&!Ia(d);){const e=Pa(d);if(Ia(e)||!da(e))break;d=e}if(c.length&&da(l)&&!l.matches("html,body")&&!Ra(l,i.floating)&&Array.from(c).every(e=>!Ra(d,e)))return;if(fa(l)&&$){const t=l.clientWidth>0&&l.scrollWidth>l.clientWidth,r=l.clientHeight>0&&l.scrollHeight>l.clientHeight;let n=r&&e.offsetX>l.clientWidth;if(r&&"rtl"===Aa(l).direction&&(n=e.offsetX<=l.offsetWidth-l.clientWidth),n||t&&e.offsetY>l.clientHeight)return}const f=null==(t=s.current.floatingContext)?void 0:t.nodeId,p=_&&Xu(_.nodesRef.current,f).some(t=>{var r;return za(e,null==(r=t.context)?void 0:r.elements.floating)});if(za(e,i.floating)||za(e,i.domReference)||p)return;const h=_?Xu(_.nodesRef.current,f):[];if(h.length>0){let e=!0;if(h.forEach(t=>{var r;null==(r=t.context)||!r.open||t.context.dataRef.current.__outsidePressBubbles||(e=!1)}),!e)return}o(!1,e,"outside-press")}),P=yu(e=>{var t;const r=()=>{var t;C(e),null==(t=Ja(e))||t.removeEventListener(u,r)};null==(t=Ja(e))||t.addEventListener(u,r)});n.useEffect(()=>{if(!r||!l)return;s.current.__escapeKeyBubbles=w,s.current.__outsidePressBubbles=E;let e=-1;function t(e){o(!1,e,"ancestor-scroll")}function n(){window.clearTimeout(e),k.current=!0}function c(){e=window.setTimeout(()=>{k.current=!1},Sa()?5:0)}const d=Ha(i.floating);a&&(d.addEventListener("keydown",x?A:I,x),d.addEventListener("compositionstart",n),d.addEventListener("compositionend",c)),g&&d.addEventListener(u,S?P:C,S);let f=[];return p&&(da(i.domReference)&&(f=$a(i.domReference)),da(i.floating)&&(f=f.concat($a(i.floating))),!da(i.reference)&&i.reference&&i.reference.contextElement&&(f=f.concat($a(i.reference.contextElement)))),f=f.filter(e=>{var t;return e!==(null==(t=d.defaultView)?void 0:t.visualViewport)}),f.forEach(e=>{e.addEventListener("scroll",t,{passive:!0})}),()=>{a&&(d.removeEventListener("keydown",x?A:I,x),d.removeEventListener("compositionstart",n),d.removeEventListener("compositionend",c)),g&&d.removeEventListener(u,S?P:C,S),f.forEach(e=>{e.removeEventListener("scroll",t)}),window.clearTimeout(e)}},[s,i,a,g,u,r,o,p,l,w,E,I,x,A,C,S,P]),n.useEffect(()=>{b.current=!1},[g,u]);const F=n.useMemo(()=>({onKeyDown:I,[Id[f]]:e=>{d&&o(!1,e.nativeEvent,"reference-press")}}),[I,o,d,f]),$=n.useMemo(()=>({onKeyDown:I,onMouseDown(){y.current=!0},onMouseUp(){y.current=!0},[Ad[u]]:()=>{b.current=!0}}),[I,u]);return n.useMemo(()=>l?{reference:F,floating:$}:{},[l,F,$])}function Fd(e){void 0===e&&(e={});const{nodeId:t}=e,r=function(e){const{open:t=!1,onOpenChange:r,elements:o}=e,i=Tu(),s=n.useRef({}),[l]=n.useState(()=>function(){const e=new Map;return{emit(t,r){var n;null==(n=e.get(t))||n.forEach(e=>e(r))},on(t,r){e.set(t,[...e.get(t)||[],r])},off(t,r){var n;e.set(t,(null==(n=e.get(t))?void 0:n.filter(e=>e!==r))||[])}}}()),a=null!=Bu(),[c,u]=n.useState(o.reference),d=yu((e,t,n)=>{s.current.openEvent=e?t:void 0,l.emit("openchange",{open:e,event:t,reason:n,nested:a}),null==r||r(e,t,n)}),f=n.useMemo(()=>({setPositionReference:u}),[]),p=n.useMemo(()=>({reference:c||o.reference||null,floating:o.floating||null,domReference:o.reference}),[c,o.reference,o.floating]);return n.useMemo(()=>({dataRef:s,open:t,onOpenChange:d,elements:p,events:l,floatingId:i,refs:f}),[t,d,p,l,i,f])}({...e,elements:{reference:null,floating:null,...e.elements}}),o=e.rootContext||r,i=o.elements,[s,l]=n.useState(null),[a,c]=n.useState(null),u=(null==i?void 0:i.domReference)||s,d=n.useRef(null),f=Uu();Nu(()=>{u&&(d.current=u)},[u]);const p=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:o=[],platform:i,elements:{reference:s,floating:l}={},transform:a=!0,whileElementsMounted:c,open:u}=e,[d,f]=n.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=n.useState(o);cu(p,o)||h(o);const[m,_]=n.useState(null),[v,g]=n.useState(null),b=n.useCallback(e=>{e!==x.current&&(x.current=e,_(e))},[]),y=n.useCallback(e=>{e!==S.current&&(S.current=e,g(e))},[]),w=s||m,E=l||v,x=n.useRef(null),S=n.useRef(null),k=n.useRef(d),I=null!=c,A=fu(c),C=fu(i),P=fu(u),F=n.useCallback(()=>{if(!x.current||!S.current)return;const e={placement:t,strategy:r,middleware:p};C.current&&(e.platform=C.current),lu(x.current,S.current,e).then(e=>{const t={...e,isPositioned:!1!==P.current};$.current&&!cu(k.current,t)&&(k.current=t,n.flushSync(()=>{f(t)}))})},[p,t,r,C,P]);au(()=>{!1===u&&k.current.isPositioned&&(k.current.isPositioned=!1,f(e=>({...e,isPositioned:!1})))},[u]);const $=n.useRef(!1);au(()=>($.current=!0,()=>{$.current=!1}),[]),au(()=>{if(w&&(x.current=w),E&&(S.current=E),w&&E){if(A.current)return A.current(w,E,F);F()}},[w,E,F,A,I]);const O=n.useMemo(()=>({reference:x,floating:S,setReference:b,setFloating:y}),[b,y]),N=n.useMemo(()=>({reference:w,floating:E}),[w,E]),R=n.useMemo(()=>{const e={position:r,left:0,top:0};if(!N.floating)return e;const t=du(N.floating,d.x),n=du(N.floating,d.y);return a?{...e,transform:"translate("+t+"px, "+n+"px)",...uu(N.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}},[r,a,N.floating,d.x,d.y]);return n.useMemo(()=>({...d,update:F,refs:O,elements:N,floatingStyles:R}),[d,F,O,N,R])}({...e,elements:{...i,...a&&{reference:a}}}),h=n.useCallback(e=>{const t=da(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;c(t),p.refs.setReference(t)},[p.refs]),m=n.useCallback(e=>{(da(e)||null===e)&&(d.current=e,l(e)),(da(p.refs.reference.current)||null===p.refs.reference.current||null!==e&&!da(e))&&p.refs.setReference(e)},[p.refs]),_=n.useMemo(()=>({...p.refs,setReference:m,setPositionReference:h,domReference:d}),[p.refs,m,h]),v=n.useMemo(()=>({...p.elements,domReference:u}),[p.elements,u]),g=n.useMemo(()=>({...p,...o,refs:_,elements:v,nodeId:t}),[p,_,v,t,o]);return Nu(()=>{o.dataRef.current.floatingContext=g;const e=null==f?void 0:f.nodesRef.current.find(e=>e.id===t);e&&(e.context=g)}),n.useMemo(()=>({...p,context:g,refs:_,elements:v}),[p,_,v,g])}const $d="active",Od="selected";function Nd(e,t,r){const n=new Map,o="item"===r;let i=e;if(o&&e){const{[$d]:t,[Od]:__,...r}=e;i=r}return{..."floating"===r&&{tabIndex:-1,[_d]:""},...i,...t.map(t=>{const n=t?t[r]:null;return"function"==typeof n?e?n(e):null:n}).concat(e).reduce((e,t)=>t?(Object.entries(t).forEach(t=>{let[r,i]=t;var s;o&&[$d,Od].includes(r)||(0===r.indexOf("on")?(n.has(r)||n.set(r,[]),"function"==typeof i&&(null==(s=n.get(r))||s.push(i),e[r]=function(){for(var e,t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return null==(e=n.get(r))?void 0:e.map(e=>e(...o)).find(e=>void 0!==e)})):e[r]=i)}),e):e,{})}}function Rd(e){void 0===e&&(e=[]);const t=e.map(e=>null==e?void 0:e.reference),r=e.map(e=>null==e?void 0:e.floating),o=e.map(e=>null==e?void 0:e.item),i=n.useCallback(t=>Nd(t,e,"reference"),t),s=n.useCallback(t=>Nd(t,e,"floating"),r),l=n.useCallback(t=>Nd(t,e,"item"),o);return n.useMemo(()=>({getReferenceProps:i,getFloatingProps:s,getItemProps:l}),[i,s,l])}let Ld=!1;function Dd(e,t,r){switch(e){case"vertical":return t;case"horizontal":return r;default:return t||r}}function jd(e,t){return Dd(t,e===wu||e===Eu,e===xu||e===Su)}function Td(e,t,r){return Dd(t,e===Eu,r?e===xu:e===Su)||"Enter"===e||" "===e||""===e}function Md(e,t,r){return Dd(t,r?e===Su:e===xu,e===wu)}function Vd(e,t){const{open:r,onOpenChange:o,elements:i}=e,{listRef:s,activeIndex:l,onNavigate:a=()=>{},enabled:c=!0,selectedIndex:u=null,allowEscape:d=!1,loop:f=!1,nested:p=!1,rtl:h=!1,virtual:m=!1,focusItemOnOpen:_="auto",focusItemOnHover:v=!0,openOnArrowKeyDown:g=!0,disabledIndices:b,orientation:y="vertical",cols:w=1,scrollItemIntoView:E=!0,virtualItemRef:x,itemSizes:S,dense:k=!1}=t,I=zu(vd(i.floating)),A=Bu(),C=Uu(),P=yu(a),F=Ka(i.domReference),$=n.useRef(_),O=n.useRef(null!=u?u:-1),N=n.useRef(null),R=n.useRef(!0),L=n.useRef(P),D=n.useRef(!!i.floating),j=n.useRef(r),T=n.useRef(!1),M=n.useRef(!1),V=zu(b),B=zu(r),U=zu(E),H=zu(u),[z,J]=n.useState(),[q,W]=n.useState(),K=yu(function(e,t,r){function n(e){m?(J(e.id),null==C||C.events.emit("virtualfocus",e),x&&(x.current=e)):Ku(e,{preventScroll:!0,sync:!(!Ba()||!Ma())&&(Ld||T.current)})}void 0===r&&(r=!1);const o=e.current[t.current];o&&n(o),requestAnimationFrame(()=>{const i=e.current[t.current]||o;if(!i)return;o||n(i);const s=U.current;s&&Y&&(r||!R.current)&&(null==i.scrollIntoView||i.scrollIntoView("boolean"==typeof s?{block:"nearest",inline:"nearest"}:s))})});Nu(()=>{document.createElement("div").focus({get preventScroll(){return Ld=!0,!1}})},[]),Nu(()=>{c&&(r&&i.floating?$.current&&null!=u&&(M.current=!0,O.current=u,P(u)):D.current&&(O.current=-1,L.current(null)))},[c,r,i.floating,u,P]),Nu(()=>{if(c&&r&&i.floating)if(null==l){if(T.current=!1,null!=H.current)return;if(D.current&&(O.current=-1,K(s,O)),(!j.current||!D.current)&&$.current&&(null!=N.current||!0===$.current&&null==N.current)){let e=0;const t=()=>{null==s.current[0]?(e<2&&(e?requestAnimationFrame:queueMicrotask)(t),e++):(O.current=null==N.current||Td(N.current,y,h)||p?Au(s,V.current):Cu(s,V.current),N.current=null,P(O.current))};t()}}else Iu(s,l)||(O.current=l,K(s,O,M.current),M.current=!1)},[c,r,i.floating,l,H,p,s,y,h,P,K,V]),Nu(()=>{var e;if(!c||i.floating||!C||m||!D.current)return;const t=C.nodesRef.current,r=null==(e=t.find(e=>e.id===A))||null==(e=e.context)?void 0:e.elements.floating,n=Na(Ha(i.floating)),o=t.some(e=>e.context&&Ra(e.context.elements.floating,n));r&&!o&&R.current&&r.focus({preventScroll:!0})},[c,i.floating,C,A,m]),Nu(()=>{if(c&&C&&m&&!A)return C.events.on("virtualfocus",e),()=>{C.events.off("virtualfocus",e)};function e(e){W(e.id),x&&(x.current=e)}},[c,C,m,A,x]),Nu(()=>{L.current=P,D.current=!!i.floating}),Nu(()=>{r||(N.current=null)},[r]),Nu(()=>{j.current=r},[r]);const X=null!=l,Y=n.useMemo(()=>{function e(e){if(!r)return;const t=s.current.indexOf(e);-1!==t&&P(t)}return{onFocus(t){let{currentTarget:r}=t;e(r)},onClick:e=>{let{currentTarget:t}=e;return t.focus({preventScroll:!0})},...v&&{onMouseMove(t){let{currentTarget:r}=t;e(r)},onPointerLeave(e){let{pointerType:t}=e;R.current&&"touch"!==t&&(O.current=-1,K(s,O),P(null),m||Ku(I.current,{preventScroll:!0}))}}}},[r,I,K,v,s,P,m]),Z=yu(e=>{if(R.current=!1,T.current=!0,229===e.which)return;if(!B.current&&e.currentTarget===I.current)return;if(p&&Md(e.key,y,h))return Wa(e),o(!1,e.nativeEvent,"list-navigation"),void(fa(i.domReference)&&(m?null==C||C.events.emit("virtualfocus",i.domReference):i.domReference.focus()));const t=O.current,n=Au(s,b),l=Cu(s,b);if(F||("Home"===e.key&&(Wa(e),O.current=n,P(O.current)),"End"===e.key&&(Wa(e),O.current=l,P(O.current))),w>1){const t=S||Array.from({length:s.current.length},()=>({width:1,height:1})),r=function(e,t,r){const n=[];let o=0;return e.forEach((e,i)=>{let{width:s,height:l}=e,a=!1;for(r&&(o=0);!a;){const e=[];for(let r=0;r<s;r++)for(let n=0;n<l;n++)e.push(o+r+n*t);o%t+s<=t&&e.every(e=>null==n[e])?(e.forEach(e=>{n[e]=i}),a=!0):o++}}),[...n]}(t,w,k),o=r.findIndex(e=>null!=e&&!Ou(s.current,e,b)),i=r.reduce((e,t,r)=>null==t||Ou(s.current,t,b)?e:r,-1),a=r[function(e,t){let{event:r,orientation:n,loop:o,rtl:i,cols:s,disabledIndices:l,minIndex:a,maxIndex:c,prevIndex:u,stopEvent:d=!1}=t,f=u;if(r.key===wu){if(d&&Wa(r),-1===u)f=c;else if(f=Pu(e,{startingIndex:f,amount:s,decrement:!0,disabledIndices:l}),o&&(u-s<a||f<0)){const e=u%s,t=c%s,r=c-(t-e);f=t===e?c:t>e?r:r-s}Iu(e,f)&&(f=u)}if(r.key===Eu&&(d&&Wa(r),-1===u?f=a:(f=Pu(e,{startingIndex:u,amount:s,disabledIndices:l}),o&&u+s>c&&(f=Pu(e,{startingIndex:u%s-s,amount:s,disabledIndices:l}))),Iu(e,f)&&(f=u)),"both"===n){const t=Qa(u/s);r.key===(i?xu:Su)&&(d&&Wa(r),u%s!==s-1?(f=Pu(e,{startingIndex:u,disabledIndices:l}),o&&ku(f,s,t)&&(f=Pu(e,{startingIndex:u-u%s-1,disabledIndices:l}))):o&&(f=Pu(e,{startingIndex:u-u%s-1,disabledIndices:l})),ku(f,s,t)&&(f=u)),r.key===(i?Su:xu)&&(d&&Wa(r),u%s!==0?(f=Pu(e,{startingIndex:u,decrement:!0,disabledIndices:l}),o&&ku(f,s,t)&&(f=Pu(e,{startingIndex:u+(s-u%s),decrement:!0,disabledIndices:l}))):o&&(f=Pu(e,{startingIndex:u+(s-u%s),decrement:!0,disabledIndices:l})),ku(f,s,t)&&(f=u));const n=Qa(c/s)===t;Iu(e,f)&&(f=o&&n?r.key===(i?Su:xu)?c:Pu(e,{startingIndex:u-u%s-1,disabledIndices:l}):u)}return f}({current:r.map(e=>null!=e?s.current[e]:null)},{event:e,orientation:y,loop:f,rtl:h,cols:w,disabledIndices:$u([...b||s.current.map((e,t)=>Ou(s.current,t)?t:void 0),void 0],r),minIndex:o,maxIndex:i,prevIndex:Fu(O.current>l?n:O.current,t,r,w,e.key===Eu?"bl":e.key===(h?xu:Su)?"tr":"tl"),stopEvent:!0})];if(null!=a&&(O.current=a,P(O.current)),"both"===y)return}if(jd(e.key,y)){if(Wa(e),r&&!m&&Na(e.currentTarget.ownerDocument)===e.currentTarget)return O.current=Td(e.key,y,h)?n:l,void P(O.current);Td(e.key,y,h)?O.current=f?t>=l?d&&t!==s.current.length?-1:n:Pu(s,{startingIndex:t,disabledIndices:b}):Math.min(l,Pu(s,{startingIndex:t,disabledIndices:b})):O.current=f?t<=n?d&&-1!==t?s.current.length:l:Pu(s,{startingIndex:t,decrement:!0,disabledIndices:b}):Math.max(n,Pu(s,{startingIndex:t,decrement:!0,disabledIndices:b})),Iu(s,O.current)?P(null):P(O.current)}}),Q=n.useMemo(()=>m&&r&&X&&{"aria-activedescendant":q||z},[m,r,X,q,z]),G=n.useMemo(()=>({"aria-orientation":"both"===y?void 0:y,...!Ka(i.domReference)&&Q,onKeyDown:Z,onPointerMove(){R.current=!0}}),[Q,Z,i.domReference,y]),ee=n.useMemo(()=>{function e(e){"auto"===_&&ja(e.nativeEvent)&&($.current=!0)}return{...Q,onKeyDown(e){R.current=!1;const t=e.key.startsWith("Arrow"),n=["Home","End"].includes(e.key),i=t||n,l=function(e,t,r){return Dd(t,r?e===xu:e===Su,e===Eu)}(e.key,y,h),a=Md(e.key,y,h),c=jd(e.key,y),d=(p?l:c)||"Enter"===e.key||""===e.key.trim();if(m&&r){const t=null==C?void 0:C.nodesRef.current.find(e=>null==e.parentId),r=C&&t?function(e,t){let r,n=-1;return function t(o,i){i>n&&(r=o,n=i),Xu(e,o).forEach(e=>{t(e.id,i+1)})}(t,0),e.find(e=>e.id===r)}(C.nodesRef.current,t.id):null;if(i&&r&&x){const t=new KeyboardEvent("keydown",{key:e.key,bubbles:!0});if(l||a){var f,_;const n=(null==(f=r.context)?void 0:f.elements.domReference)===e.currentTarget,o=a&&!n?null==(_=r.context)?void 0:_.elements.domReference:l?s.current.find(e=>(null==e?void 0:e.id)===z):null;o&&(Wa(e),o.dispatchEvent(t),W(void 0))}var v;if((c||n)&&r.context&&r.context.open&&r.parentId&&e.currentTarget!==r.context.elements.domReference)return Wa(e),void(null==(v=r.context.elements.domReference)||v.dispatchEvent(t))}return Z(e)}(r||g||!t)&&(d&&(N.current=p&&c?null:e.key),p?l&&(Wa(e),r?(O.current=Au(s,V.current),P(O.current)):o(!0,e.nativeEvent,"list-navigation")):c&&(null!=u&&(O.current=u),Wa(e),!r&&g?o(!0,e.nativeEvent,"list-navigation"):Z(e),r&&P(O.current)))},onFocus(){r&&!m&&P(null)},onPointerDown:function(e){$.current=_,"auto"===_&&Ta(e.nativeEvent)&&($.current=!0)},onMouseDown:e,onClick:e}},[z,Q,Z,V,_,s,p,P,o,r,g,y,h,u,C,m,x]);return n.useMemo(()=>c?{reference:ee,floating:G,item:Y}:{},[c,ee,G,Y])}const Bd=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Ud(e,t){var r;void 0===t&&(t={});const{open:o,floatingId:i}=e,{enabled:s=!0,role:l="dialog"}=t,a=null!=(r=Bd.get(l))?r:l,c=Tu(),u=null!=Bu(),d=n.useMemo(()=>"tooltip"===a||"label"===l?{["aria-"+("label"===l?"labelledby":"describedby")]:o?i:void 0}:{"aria-expanded":o?"true":"false","aria-haspopup":"alertdialog"===a?"dialog":a,"aria-controls":o?i:void 0,..."listbox"===a&&{role:"combobox"},..."menu"===a&&{id:c},..."menu"===a&&u&&{role:"menuitem"},..."select"===l&&{"aria-autocomplete":"none"},..."combobox"===l&&{"aria-autocomplete":"list"}},[a,i,u,o,c,l]),f=n.useMemo(()=>{const e={id:i,...a&&{role:a}};return"tooltip"===a||"label"===l?e:{...e,..."menu"===a&&{"aria-labelledby":c}}},[a,i,c,l]),p=n.useCallback(e=>{let{active:t,selected:r}=e;const n={role:"option",...t&&{id:i+"-option"}};switch(l){case"select":return{...n,"aria-selected":t&&r};case"combobox":return{...n,...t&&{"aria-selected":!0}}}return{}},[i,l]);return n.useMemo(()=>s?{reference:d,floating:f,item:p}:{},[s,d,f,p])}function Hd(e,t){const[r,n]=e;let o=!1;const i=t.length;for(let e=0,s=i-1;e<i;s=e++){const[i,l]=t[e]||[0,0],[a,c]=t[s]||[0,0];l>=n!=c>=n&&r<=(a-i)*(n-l)/(c-l)+i&&(o=!o)}return o}function zd(e){void 0===e&&(e={});const{buffer:t=.5,blockPointerEvents:r=!1,requireIntent:n=!0}=e;let o,i=!1,s=null,l=null,a=performance.now();const c=e=>{let{x:r,y:c,placement:u,elements:d,onClose:f,nodeId:p,tree:h}=e;return function(e){function m(){clearTimeout(o),f()}if(clearTimeout(o),!d.domReference||!d.floating||null==u||null==r||null==c)return;const{clientX:_,clientY:v}=e,g=[_,v],b=Ja(e),y="mouseleave"===e.type,w=Ra(d.floating,b),E=Ra(d.domReference,b),x=d.domReference.getBoundingClientRect(),S=d.floating.getBoundingClientRect(),k=u.split("-")[0],I=r>S.right-S.width/2,A=c>S.bottom-S.height/2,C=function(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}(g,x),P=S.width>x.width,F=S.height>x.height,$=(P?x:S).left,O=(P?x:S).right,N=(F?x:S).top,R=(F?x:S).bottom;if(w&&(i=!0,!y))return;if(E&&(i=!1),E&&!y)return void(i=!0);if(y&&da(e.relatedTarget)&&Ra(d.floating,e.relatedTarget))return;if(h&&Xu(h.nodesRef.current,p).some(e=>{let{context:t}=e;return null==t?void 0:t.open}))return;if("top"===k&&c>=x.bottom-1||"bottom"===k&&c<=x.top+1||"left"===k&&r>=x.right-1||"right"===k&&r<=x.left+1)return m();let L=[];switch(k){case"top":L=[[$,x.top+1],[$,S.bottom-1],[O,S.bottom-1],[O,x.top+1]];break;case"bottom":L=[[$,S.top+1],[$,x.bottom-1],[O,x.bottom-1],[O,S.top+1]];break;case"left":L=[[S.right-1,R],[S.right-1,N],[x.left+1,N],[x.left+1,R]];break;case"right":L=[[x.right-1,R],[x.right-1,N],[S.left+1,N],[S.left+1,R]]}if(!Hd([_,v],L)){if(i&&!C)return m();if(!y&&n){const t=function(e,t){const r=performance.now(),n=r-a;if(null===s||null===l||0===n)return s=e,l=t,a=r,null;const o=e-s,i=t-l,c=Math.sqrt(o*o+i*i);return s=e,l=t,a=r,c/n}(e.clientX,e.clientY);if(null!==t&&t<.1)return m()}Hd([_,v],function(e){let[r,n]=e;switch(k){case"top":return[[P?r+t/2:I?r+4*t:r-4*t,n+t+1],[P?r-t/2:I?r+4*t:r-4*t,n+t+1],[S.left,I||P?S.bottom-t:S.top],[S.right,I?P?S.bottom-t:S.top:S.bottom-t]];case"bottom":return[[P?r+t/2:I?r+4*t:r-4*t,n-t],[P?r-t/2:I?r+4*t:r-4*t,n-t],[S.left,I||P?S.top+t:S.bottom],[S.right,I?P?S.top+t:S.bottom:S.top+t]];case"left":{const e=[r+t+1,F?n+t/2:A?n+4*t:n-4*t],o=[r+t+1,F?n-t/2:A?n+4*t:n-4*t];return[[A||F?S.right-t:S.left,S.top],[A?F?S.right-t:S.left:S.right-t,S.bottom],e,o]}case"right":return[[r-t,F?n+t/2:A?n+4*t:n-4*t],[r-t,F?n-t/2:A?n+4*t:n-4*t],[A||F?S.left+t:S.right,S.top],[A?F?S.left+t:S.right:S.left+t,S.bottom]]}}([r,c]))?!i&&n&&(o=window.setTimeout(m,40)):m()}}};return c.__options={blockPointerEvents:r},c}const Jd=(0,n.createContext)(null),qd=()=>{const e=(0,i.NT)(Jd);if(null===e)throw new Error("Tooltip components must be wrapped in <Tooltip />");return e};function Wd({children:e,...t}){const r=function(e){var t;const{initialOpen:r=!1,placement:o="top"}=e,[s,l]=(0,i.J0)(r),a=(0,i.li)(null),c=s,u=l,d=Fd({placement:o,open:c,onOpenChange:u,whileElementsMounted:tu,middleware:[hu(8),_u({crossAxis:o.includes("-"),fallbackAxisSideDirection:"start",padding:5}),mu({padding:5}),(f={element:a},{...pu(f),options:[f,void 0]})]});var f;const p=d.context,h=function(e,t){void 0===t&&(t={});const{open:r,onOpenChange:o,dataRef:i,events:s,elements:l}=e,{enabled:a=!0,delay:c=0,handleClose:u=null,mouseOnly:d=!1,restMs:f=0,move:p=!0}=t,h=Uu(),m=Bu(),_=zu(u),v=zu(c),g=zu(r),b=n.useRef(),y=n.useRef(-1),w=n.useRef(),E=n.useRef(-1),x=n.useRef(!0),S=n.useRef(!1),k=n.useRef(()=>{}),I=n.useRef(!1),A=n.useCallback(()=>{var e;const t=null==(e=i.current.openEvent)?void 0:e.type;return(null==t?void 0:t.includes("mouse"))&&"mousedown"!==t},[i]);n.useEffect(()=>{if(a)return s.on("openchange",e),()=>{s.off("openchange",e)};function e(e){let{open:t}=e;t||(clearTimeout(y.current),clearTimeout(E.current),x.current=!0,I.current=!1)}},[a,s]),n.useEffect(()=>{if(!a)return;if(!_.current)return;if(!r)return;function e(e){A()&&o(!1,e,"hover")}const t=Ha(l.floating).documentElement;return t.addEventListener("mouseleave",e),()=>{t.removeEventListener("mouseleave",e)}},[l.floating,r,o,a,_,A]);const C=n.useCallback(function(e,t,r){void 0===t&&(t=!0),void 0===r&&(r="hover");const n=qu(v.current,"close",b.current);n&&!w.current?(clearTimeout(y.current),y.current=window.setTimeout(()=>o(!1,e,r),n)):t&&(clearTimeout(y.current),o(!1,e,r))},[v,o]),P=yu(()=>{k.current(),w.current=void 0}),F=yu(()=>{if(S.current){const e=Ha(l.floating).body;e.style.pointerEvents="",e.removeAttribute(Ju),S.current=!1}}),$=yu(()=>!!i.current.openEvent&&["click","mousedown"].includes(i.current.openEvent.type));n.useEffect(()=>{if(a&&da(l.domReference)){var e;const o=l.domReference;return r&&o.addEventListener("mouseleave",s),null==(e=l.floating)||e.addEventListener("mouseleave",s),p&&o.addEventListener("mousemove",t,{once:!0}),o.addEventListener("mouseenter",t),o.addEventListener("mouseleave",n),()=>{var e;r&&o.removeEventListener("mouseleave",s),null==(e=l.floating)||e.removeEventListener("mouseleave",s),p&&o.removeEventListener("mousemove",t),o.removeEventListener("mouseenter",t),o.removeEventListener("mouseleave",n)}}function t(e){if(clearTimeout(y.current),x.current=!1,d&&!Ua(b.current)||f>0&&!qu(v.current,"open"))return;const t=qu(v.current,"open",b.current);t?y.current=window.setTimeout(()=>{g.current||o(!0,e,"hover")},t):r||o(!0,e,"hover")}function n(e){if($())return;k.current();const t=Ha(l.floating);if(clearTimeout(E.current),I.current=!1,_.current&&i.current.floatingContext){r||clearTimeout(y.current),w.current=_.current({...i.current.floatingContext,tree:h,x:e.clientX,y:e.clientY,onClose(){F(),P(),$()||C(e,!0,"safe-polygon")}});const n=w.current;return t.addEventListener("mousemove",n),void(k.current=()=>{t.removeEventListener("mousemove",n)})}("touch"!==b.current||!Ra(l.floating,e.relatedTarget))&&C(e)}function s(e){$()||i.current.floatingContext&&(null==_.current||_.current({...i.current.floatingContext,tree:h,x:e.clientX,y:e.clientY,onClose(){F(),P(),$()||C(e)}})(e))}},[l,a,e,d,f,p,C,P,F,o,r,g,h,v,_,i,$]),Nu(()=>{var e;if(a&&r&&null!=(e=_.current)&&e.__options.blockPointerEvents&&A()){S.current=!0;const e=l.floating;if(da(l.domReference)&&e){var t;const r=Ha(l.floating).body;r.setAttribute(Ju,"");const n=l.domReference,o=null==h||null==(t=h.nodesRef.current.find(e=>e.id===m))||null==(t=t.context)?void 0:t.elements.floating;return o&&(o.style.pointerEvents=""),r.style.pointerEvents="none",n.style.pointerEvents="auto",e.style.pointerEvents="auto",()=>{r.style.pointerEvents="",n.style.pointerEvents="",e.style.pointerEvents=""}}}},[a,r,m,l,h,_,A]),Nu(()=>{r||(b.current=void 0,I.current=!1,P(),F())},[r,P,F]),n.useEffect(()=>()=>{P(),clearTimeout(y.current),clearTimeout(E.current),F()},[a,l.domReference,P,F]);const O=n.useMemo(()=>{function e(e){b.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){const{nativeEvent:t}=e;function n(){x.current||g.current||o(!0,t,"hover")}d&&!Ua(b.current)||r||0===f||I.current&&e.movementX**2+e.movementY**2<2||(clearTimeout(E.current),"touch"===b.current?n():(I.current=!0,E.current=window.setTimeout(n,f)))}}},[d,o,r,g,f]),N=n.useMemo(()=>({onMouseEnter(){clearTimeout(y.current)},onMouseLeave(e){$()||C(e.nativeEvent,!1)}}),[C,$]);return n.useMemo(()=>a?{reference:O,floating:N}:{},[a,O,N])}(p,{move:!1,enabled:!0,delay:{open:null!==(t=e.delay)&&void 0!==t?t:300,close:0},handleClose:zd()}),m=function(e,t){void 0===t&&(t={});const{open:r,onOpenChange:o,events:i,dataRef:s,elements:l}=e,{enabled:a=!0,visibleOnly:c=!0}=t,u=n.useRef(!1),d=n.useRef(),f=n.useRef(!0);n.useEffect(()=>{if(!a)return;const e=aa(l.domReference);function t(){!r&&fa(l.domReference)&&l.domReference===Na(Ha(l.domReference))&&(u.current=!0)}function n(){f.current=!0}return e.addEventListener("blur",t),e.addEventListener("keydown",n,!0),()=>{e.removeEventListener("blur",t),e.removeEventListener("keydown",n,!0)}},[l.domReference,r,a]),n.useEffect(()=>{if(a)return i.on("openchange",e),()=>{i.off("openchange",e)};function e(e){let{reason:t}=e;"reference-press"!==t&&"escape-key"!==t||(u.current=!0)}},[i,a]),n.useEffect(()=>()=>{clearTimeout(d.current)},[]);const p=n.useMemo(()=>({onPointerDown(e){Ta(e.nativeEvent)||(f.current=!1)},onMouseLeave(){u.current=!1},onFocus(e){if(u.current)return;const t=Ja(e.nativeEvent);if(c&&da(t))try{if(Ma()&&Ba())throw Error();if(!t.matches(":focus-visible"))return}catch(e){if(!f.current&&!qa(t))return}o(!0,e.nativeEvent,"focus")},onBlur(e){u.current=!1;const t=e.relatedTarget,r=e.nativeEvent,n=da(t)&&t.hasAttribute(Hu("focus-guard"))&&"outside"===t.getAttribute("data-type");d.current=window.setTimeout(()=>{var e;const i=Na(l.domReference?l.domReference.ownerDocument:document);(t||i!==l.domReference)&&(Ra(null==(e=s.current.floatingContext)?void 0:e.refs.floating.current,i)||Ra(l.domReference,i)||n||o(!1,r,"focus"))})}}),[s,l.domReference,o,c]);return n.useMemo(()=>a?{reference:p}:{},[a,p])}(p,{enabled:!0}),_=Rd([h,m,Pd(p),Ud(p,{role:"tooltip"})]);return(0,i.Kr)(()=>({open:c,setOpen:u,arrowRef:a,..._,...d}),[c,u,a,_,d])}(t);return(0,n.createElement)(Jd.Provider,{value:r},e)}const Kd=(0,n.forwardRef)(function({children:e,disabled:t,asChild:r=!1,...o},i){const s=qd(),l=e.ref,a=vu([s.refs.setReference,i,l]);return t?e:r&&(0,n.isValidElement)(e)?(0,n.cloneElement)(e,s.getReferenceProps({ref:a,...o,...e.props,"data-state":s.open?"open":"closed"})):(0,n.createElement)("button",{ref:a,"data-state":s.open?"open":"closed",...s.getReferenceProps(o)},e)}),Xd=(0,n.forwardRef)(function({style:e,...t},r){var o,i;const s=qd(),l=vu([s.refs.setFloating,r]),{x:a,y:c}=null!==(o=s.middlewareData.arrow)&&void 0!==o?o:{},u=null!==(i={top:"bottom",right:"left",bottom:"top",left:"right"}[s.placement.split("-")[0]])&&void 0!==i?i:"";return s.open?(0,n.createElement)("div",{ref:l,style:{...s.floatingStyles,...e},...s.getFloatingProps(t)},t.htmlContent?(0,n.createElement)("div",{className:"fibofilters-tooltip__content",dangerouslySetInnerHTML:{__html:t.htmlContent}}):(0,n.createElement)("div",{className:"fibofilters-tooltip__content"},t.children),(0,n.createElement)("div",{ref:s.arrowRef,style:{position:"absolute",width:"10px",height:"10px",background:"inherit",left:null!==a?`${a}px`:"",top:null!==c?`${c}px`:"",[u]:"-5px",transform:"rotate(45deg)"}})):null}),Yd=({type:e,beforeLabel:t,label:r,afterLabel:o,beforeChildren:l,children:a,afterChildren:c,showLabel:u,isCollapsible:d,isInitiallyCollapsed:f,source:p="",urlSlug:h="",tooltip:m=""})=>{const[_,v]=(0,i.J0)(f);let g=Mo({type:e,source:p,urlSlug:h},[`${ho}-block`]);return d&&(g=[...g,mo.filterCollapsible],_&&(g=[...g,mo.filterCollapsed])),(0,n.createElement)("div",{className:g.join(" ")},(0,n.createElement)("div",{className:`${mo.headline}`},t,r&&u&&(0,n.createElement)("div",{className:`${ho}-block__headline-box`,onClick:d?()=>v(!_):()=>{},onKeyPress:d?()=>v(!_):()=>{}},(0,n.createElement)(({children:e})=>{let t=vo("filter_headline_tag","h3");return t=["h1","h2","h3","h4","h5","h6","span","div","p"].includes(t)?t:"h3",(0,Go.h)(t,{className:`${mo.headline}-box-inner`},e)},null,Qo(r)),m?.length>0&&(0,n.createElement)(Wd,null,(0,n.createElement)(Kd,{asChild:!0},(0,n.createElement)("span",{className:`${mo.headline}-box-icon`},(0,n.createElement)(s,{icon:ia,width:18,height:18}))),(0,n.createElement)(Xd,{className:`${ho}-tooltip`,htmlContent:m})),d?(0,n.createElement)("div",{className:`${ho}-block__chevron-btn`},(0,n.createElement)(s,{className:`${ho}-block__chevron-btn-icon`,icon:ea,width:14,height:8})):null),o?(0,n.createElement)("div",{className:`${ho}-block__headline-desc`},o):null),(0,n.createElement)("div",{className:`${mo.content}`},(0,n.createElement)("div",{className:`${mo.content}-inner`},l,a,c)))},Zd=e=>{const[t,r]=(0,i.J0)(!1);return(0,i.vJ)(()=>{if(e?.current){r(e.current.scrollHeight>e.current.clientHeight);const t=new ResizeObserver(e=>{for(const t of e)r(t.target.scrollHeight>t.target.clientHeight)});return t.observe(e.current),()=>t.disconnect()}},[]),t},Qd=({beforeLabel:e,label:t,afterLabel:r,beforeChildren:o,children:s,afterChildren:l,type:a,showLabel:u,isCollapsible:d,isInitiallyCollapsed:f,role:p,source:h="",urlSlug:m="",groupedValues:_,className:v,tooltip:g=""})=>{const b=(0,i.li)(null),y=Zd(b);return(0,n.createElement)(Yd,{beforeLabel:e,label:t,afterLabel:r,beforeChildren:o,afterChildren:l,type:a,showLabel:u,isCollapsible:d,isInitiallyCollapsed:f,source:h,urlSlug:m,tooltip:g},(0,n.createElement)("div",{ref:b,className:c(v,y&&"string"==typeof v&&v.includes(`${ho}-block__items-list-wrapper--limited`)?`${ho}-block__items-list-wrapper--has-scrollbar`:null),role:"undefined"!==p?p:null},(0,n.createElement)("ul",{className:`${ho}-block__items-list`},s)),_&&(0,n.createElement)("div",{className:`${ho}-items-grouped`},_))},Gd=({item:e,position:t})=>{const r=e?.label_image_position||"before-label";return e?.label_image&&r===t&&(0,n.createElement)("img",{className:c(`${mo.item}__label_image`,`${mo.item}__label_image--${t}`),src:e.label_image,alt:""})},ef=({item:e,filterID:t,onStateChange:r,type:o})=>{const i=()=>{e.disabled||e.selected||r({filterID:t,index:e.index,newState:!e.selected,unselectOthers:!0,type:o})},s=[mo.item,`${mo.item}--radio`];return e.selected&&s.push(mo.selected),e.disabled&&s.push(mo.disabled),(0,n.createElement)("li",{className:s.join(" ")},(0,n.createElement)("div",{className:`${mo.item}__interactive`,title:Qo(e?.title?e.title:e.label),role:"radio","aria-checked":e.selected?"true":"false",onClick:i,onKeyPress:i,tabIndex:"0"},(0,n.createElement)("div",{className:`${mo.item}__control`}," "),(0,n.createElement)(Gd,{item:e,position:"before-label"}),(0,n.createElement)("div",{className:`${mo.item}__label`},(0,n.createElement)("span",{dangerouslySetInnerHTML:{__html:e.label}})),(0,n.createElement)(Gd,{item:e,position:"after-label"}),vo("show_count")&&null!==e.counter?(0,n.createElement)(Gl,{counter:e.counter}):null))},tf=({updateSearchPhrase:e})=>{const[t,r]=(0,i.J0)(""),o=(0,i.li)(null);return(0,n.createElement)("div",{className:`${ho}-items-search`},(0,n.createElement)("input",{type:"search",onChange:t=>{r(t.target.value),e(t.target.value.toLowerCase())},value:t,placeholder:Ko("Search…","[front]","fibofilters"),autoComplete:"off"}),(0,n.createElement)("div",{className:`${ho}-items-search__controls`},t.length>0&&(0,n.createElement)(ti,{className:c(`${ho}-items-search__controls--close`,t.length>0&&`${ho}-items-search__controls--close-show`),"aria-label":Ko("Clear","[front]","fibofilters"),ref:o,onClick:()=>{r(""),e("")}},(0,n.createElement)(n.Fragment,null,"×"))))},rf=(0,n.createElement)(f,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(d,{d:"M5 11.25h14v1.5H5z"})),nf=(0,n.createElement)(f,{fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.createElement)(d,{d:"m9 1.5-5.5 8L1 5.864",stroke:"#fff",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),of=({item:e,filterID:t,onStateChange:r,type:o,isHierarchical:l,parentItemIndexes:a,children:u,expandedOnInit:d=!1,expandToLevel:f=1})=>{const p=Ql(u,t,l),[h,m]=(0,i.J0)(!1),[_,v]=(0,i.J0)(!e.indeterminate);(0,i.vJ)(()=>{l&&(d||f>=0)&&v(!1)},[d]);const g=()=>{e.disabled||(l&&!e.selected&&(v(!1),a.length>0&&a.forEach(e=>{r({filterID:t,index:e,newState:!1,unselectOthers:!1,type:o,skipProcess:!0})}),Do(u).forEach(e=>{r({filterID:t,index:e,newState:!1,unselectOthers:!1,type:o,skipProcess:!0})})),r({filterID:t,index:e.index,newState:!e.selected,unselectOthers:!1,type:o}))},b=[mo.item,`${mo.item}--checkbox`];return e.selected&&b.push(mo.selected),e.disabled&&b.push(mo.disabled),e.alwaysSelected&&b.push(mo.alwaysSelected),(0,n.createElement)("li",{className:b.join(" ")},(0,n.createElement)(ta,{setIsCollapsed:v,isCollapsed:_,parentChildren:u,isHierarchical:l},(0,n.createElement)("div",{className:`${mo.item}__interactive`,title:Qo(e.label),role:"checkbox","aria-checked":e.selected||e.alwaysSelected?"true":"false",onClick:g,onKeyPress:g,tabIndex:"0"},(0,n.createElement)("div",{className:`${mo.item}__control`},e.selected||e.alwaysSelected?(0,n.createElement)(s,{width:10,height:11,icon:nf}):null,!e.selected&&e.indeterminate?(0,n.createElement)(s,{width:10,height:11,icon:rf}):null),(0,n.createElement)(Gd,{item:e,position:"before-label"}),(0,n.createElement)("div",{className:`${mo.item}__label`},(0,n.createElement)("span",null,Qo(e.label))),(0,n.createElement)(Gd,{item:e,position:"after-label"}),vo("show_count")&&(0,n.createElement)(Gl,{counter:e.counter}))),u.length>0&&(0,n.createElement)("ul",{className:c(`${ho}-block__items-list`,_&&`${ho}-block__items-list--hidden`)},u.filter(h?()=>!0:(e,r)=>Zl(e,r,t,l)).map(e=>(0,n.createElement)(of,{key:`${t}-${e.value}`,item:e,type:o,filterID:t,onStateChange:r,isHierarchical:l,children:Pr(u.filter(t=>t.value===e.value),"[0].children",[]),parentItemIndexes:[...a,e.index],expandedOnInit:d,expandToLevel:f-1})),p>0?(0,n.createElement)(ra,{numberOfValues:p,showHiddenValues:h,onClick:()=>m(!h)}):null))},sf=of,lf=({item:e,filterID:t,onStateChange:r,type:o,showCounters:i})=>{const s=()=>{e.disabled||r({filterID:t,index:e.index,newState:!e.selected,unselectOthers:!1,type:o})},l=[mo.item,`${mo.item}--button`];return e.selected&&l.push(mo.selected),e.disabled&&l.push(mo.disabled),(0,n.createElement)("li",{className:l.join(" ")},(0,n.createElement)("div",{className:`${mo.item}__interactive`,title:Qo(e?.title?e.title:e.label),role:"checkbox","aria-checked":e.selected?"true":"false",onClick:s,onKeyPress:s,tabIndex:"0"},(0,n.createElement)("div",{className:`${mo.item}__label`},(0,n.createElement)("span",{dangerouslySetInnerHTML:{__html:e.label}})),vo("show_count")&&null!==e.counter&&i?(0,n.createElement)(Gl,{counter:e.counter}):null))},af=200,cf=({filter:e,onStateChange:t,role:r,type:o})=>{const[s,l]=(0,i.J0)(""),a=(0,i.li)(null),u=Zd(a),d=vo("show_all_grouping_by_first_char",!0,e.id);let f=[],p=[],h={};if(e.values.length>1&&-1===e.values[0].value_id?(f=[e.values[0]],p=e.values.slice(1,e.values.length)):p=e.values,d){const e=p.filter(e=>0===s.length||e.label.toLowerCase().includes(s.toLowerCase())),t=0===s.length?e.slice(0,af):e;h=cs(t,e=>e.label[0].toUpperCase())}else{const e=[...f,...p].filter(e=>0===s.length||e.label.toLowerCase().includes(s.toLowerCase()));f=0===s.length?e.slice(0,af):e}return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(tf,{filter:e,updateSearchPhrase:e=>{l(e)}}),(0,n.createElement)("div",{ref:a,className:c(`${ho}-items-grouped__groups-wrapper`,u&&`${ho}-items-grouped__groups-wrapper--has-scrollbar`)},f.length>0&&(0,n.createElement)("div",{className:`${ho}-items-grouped__group`,role:"undefined"!==r?r:null},(0,n.createElement)("ul",{className:`${ho}-block__items-list`},f.map(r=>(0,n.createElement)(n.Fragment,null,"radio"===o&&(0,n.createElement)(ef,{key:`${e.id}-non-sortable-group-${r.value}`,item:r,filterID:e.id,onStateChange:t,type:e.type}),"checkbox"===o&&(0,n.createElement)(sf,{key:`${e.id}-${r.value}`,item:r,filterID:e.id,onStateChange:t,type:e.type,isHierarchical:e.is_hierarchical,parentItemIndexes:[r.index],children:[]}),"button"===o&&(0,n.createElement)(lf,{key:`${e.id}-${r.value}`,item:r,filterID:e.id,onStateChange:t,type:e.type,showCounters:e.show_counters}),"category-link"===o&&(0,n.createElement)(oa,{key:`${e.id}-${r.value}`,item:r,isHierarchical:e.is_hierarchical,children:[]}))))),d&&Object.keys(h).sort((e,t)=>e.localeCompare(t)).map((i,s)=>(0,n.createElement)("div",{className:`${ho}-items-grouped__group`,key:`${e.id}-sortable-group-${s}`,role:"undefined"!==r?r:null},(0,n.createElement)("div",{className:`${ho}-items-grouped__group-name`},i),(0,n.createElement)("ul",{className:`${ho}-block__items-list`},h[i].map(r=>(0,n.createElement)(n.Fragment,null,"radio"===o&&(0,n.createElement)(ef,{key:`${e.id}-${r.value}`,item:r,filterID:e.id,onStateChange:t,type:e.type}),"checkbox"===o&&(0,n.createElement)(sf,{key:`${e.id}-${r.value}`,item:r,filterID:e.id,onStateChange:t,type:e.type,isHierarchical:e.is_hierarchical,parentItemIndexes:[r.index],children:[]}),"button"===o&&(0,n.createElement)(lf,{key:`${e.id}-${r.value}`,item:r,filterID:e.id,onStateChange:t,type:e.type,showCounters:e.show_counters}),"category-link"===o&&(0,n.createElement)(oa,{key:`${e.id}-${r.value}`,item:r,isHierarchical:e.is_hierarchical,children:[]})))))),0===s.length&&p.length>af&&(0,n.createElement)("div",{className:`${ho}-items-grouped__more-values-info`},Yo(/* translators: %s: number of hidden filter values */
Ko("There are %s more filter values, but they've been hidden. Use the search bar within this filter to find the remaining options.","[front] Message about hidden filter values in filter group","fibofilters"),(p.length-af).toLocaleString("en-US")))))},uf=({path:e,className:t})=>{let r="";const o=vo("extra_html",{key:"value"});if("string"==typeof e)r=Pr(o,e,"");else if(Array.isArray(e))for(const t of e)if(r=Pr(o,t,""),""!==r)break;return""===r?null:(0,n.createElement)("div",{className:a("fibofilters-custom-html",t),dangerouslySetInnerHTML:{__html:r}})},df=({filter:e,showLabel:t=!0,location:r=""})=>{var o;const{label:s,type:l,is_collapsible:a,is_initially_collapsed:c,source:u,url_slug:d}=e,f=vo("organize_values_force_search",!1,e.id),p=Ql(e.values,e.id),[h,m]=(0,i.J0)(!1),[_,v]=(0,i.J0)(f),g=f?0:vo("show_all_number",15,e.id),b=ql(!1,1);return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(Qd,{beforeLabel:e.is_subcategory?(0,n.createElement)("span",{className:"fibofilters-block__pre-headline"},Qo(e.label_subcategory)):e.parent?(0,n.createElement)("span",{className:"fibofilters-block__pre-headline"},Qo(e.label_category)):null,beforeChildren:e.parent?(0,n.createElement)("span",{className:`${ho}-block__breadcrumbs`},Ko("go back to","[front]","fibofilters")," ",(0,n.createElement)("a",{title:Qo(e.parent.name),href:b.queryString.length>0?`${e.parent.url}?${b.queryString}`:e.parent.url},Qo(e.parent.name))):null,label:e.is_subcategory||e.parent?e.current.name:s,type:l,showLabel:t,isCollapsible:a.includes(r),isInitiallyCollapsed:c.includes(r),source:u,urlSlug:d,groupedValues:_?(0,n.createElement)(cf,{type:"category-link",filter:e}):null,afterLabel:(0,n.createElement)(uf,{path:`filter=${e.id}/description`}),tooltip:null!==(o=e.tooltip)&&void 0!==o?o:""},e.values.filter(h?()=>!0:(t,r)=>Zl(t,r,e.id)).map(t=>(0,n.createElement)(oa,{key:`${e.id}-${t.value}`,item:t,queryString:b.queryString})),p>0&&e.values.length<g?(0,n.createElement)(ra,{numberOfValues:p,showHiddenValues:h,onClick:()=>m(!h)}):null,p>0&&e.values.length>=g?(0,n.createElement)(ra,{numberOfValues:e.values.length,showHiddenValues:_,onClick:()=>v(!_),showAll:!0}):null))},ff=({filter:e,onStateChange:t,showLabel:r=!0,location:o=""})=>{var s;const{label:l,type:a,is_collapsible:c,is_initially_collapsed:u,source:d,url_slug:f}=e,p=vo("organize_values_force_search",!1,e.id),[h,m]=(0,i.J0)(!1),[_,v]=(0,i.J0)(p),[g,b]=(0,i.J0)(""),y=p?0:vo("show_all_number",15,e.id),w=vo("expand_to_level",0,e.id),E=!e.is_hierarchical&&e.values.length>=y,x=e.is_hierarchical&&e.values.length>=y;let S=[],k=[],I=0;if(x&&g.length>0){const t=e.values.filter(e=>e.label.toLowerCase().includes(g.toLowerCase())).map(e=>e.value),r=Lo(e.values,t),n=[...t,...r],o=e.values.filter(e=>n.includes(e.value));S=o.filter(e=>"0"===e.parent_value),I=Ql(S,e.id),k=Oo(o)}else S=e.values.filter(e=>"0"===e.parent_value),I=Ql(S,e.id),k=Oo(e.values);const A=ql(!1,1);return(0,n.createElement)(Qd,{label:l,type:a,showLabel:r,source:d,urlSlug:f,isCollapsible:c.includes(o),isInitiallyCollapsed:u.includes(o),beforeChildren:x&&(0,n.createElement)(tf,{filter:e,updateSearchPhrase:e=>{b(e)}}),groupedValues:E&&_?(0,n.createElement)(cf,{onStateChange:t,type:"category-link",filter:e}):null,className:x?`${ho}-block__items-list-wrapper--limited`:"",afterLabel:(0,n.createElement)(uf,{path:`filter=${e.id}/description`}),tooltip:null!==(s=e.tooltip)&&void 0!==s?s:""},S.filter(h||x?()=>!0:(t,r)=>Zl(t,r,e.id)).map(t=>(0,n.createElement)(oa,{key:`${e.id}-${t.value}`,item:t,filterID:e.id,queryString:A.queryString,isHierarchical:e.is_hierarchical,children:Pr(k.filter(e=>e.value===t.value),"[0].children",[]),expandedOnInit:x&&g.length>0,expandToLevel:w-1})),!E&&!x&&I>0?(0,n.createElement)(ra,{numberOfValues:I,showHiddenValues:h,onClick:()=>m(!h)}):null,E&&I>0?(0,n.createElement)(ra,{numberOfValues:e.values.length,showHiddenValues:_,onClick:()=>v(!_),showAll:!0}):null)},pf=({filter:e,onStateChange:t,showLabel:r=!0,location:o=""})=>{var s;const{label:l,type:a,is_collapsible:c,is_initially_collapsed:u,source:d,url_slug:f}=e,p=vo("organize_values_force_search",!1,e.id),[h,m]=(0,i.J0)(!1),[_,v]=(0,i.J0)(p),[g,b]=(0,i.J0)(""),y=p?0:vo("show_all_number",15,e.id),w=vo("expand_to_level",0,e.id),E=!e.is_hierarchical&&e.values.length>=y,x=e.is_hierarchical&&e.values.length>=y;let S=[],k=[],I=0;if(x&&g.length>0){const t=e.values.filter(e=>e.label.toLowerCase().includes(g.toLowerCase())).map(e=>e.value),r=Lo(e.values,t),n=[...t,...r],o=e.values.filter(e=>n.includes(e.value));S=o.filter(e=>"0"===e.parent_value),I=Ql(S,e.id),k=Oo(o)}else S=e.values.filter(e=>"0"===e.parent_value),I=Ql(S,e.id),k=Oo(e.values);return(0,n.createElement)(Qd,{label:l,type:a,showLabel:r,source:d,urlSlug:f,isCollapsible:c.includes(o),isInitiallyCollapsed:u.includes(o),beforeChildren:x&&(0,n.createElement)(tf,{filter:e,updateSearchPhrase:e=>{b(e)}}),groupedValues:E&&_?(0,n.createElement)(cf,{onStateChange:t,type:"checkbox",filter:e}):null,className:x?`${ho}-block__items-list-wrapper--limited`:"",afterLabel:(0,n.createElement)(uf,{path:`filter=${e.id}/description`}),tooltip:null!==(s=e.tooltip)&&void 0!==s?s:""},S.filter(h||x?()=>!0:(t,r)=>Zl(t,r,e.id)).map(r=>(0,n.createElement)(sf,{key:`${e.id}-${r.value}`,item:r,filterID:e.id,onStateChange:t,type:e.type,isHierarchical:e.is_hierarchical,children:Pr(k.filter(e=>e.value===r.value),"[0].children",[]),parentItemIndexes:[r.index],expandedOnInit:x&&g.length>0,expandToLevel:w-1})),!E&&!x&&I>0?(0,n.createElement)(ra,{numberOfValues:I,showHiddenValues:h,onClick:()=>m(!h)}):null,E&&I>0?(0,n.createElement)(ra,{numberOfValues:e.values.length,showHiddenValues:_,onClick:()=>v(!_),showAll:!0}):null)},hf=({filter:e,onStateChange:t,showLabel:r=!0,location:o=""})=>{var s;const{label:l,type:a,is_collapsible:c,is_initially_collapsed:u,source:d,url_slug:f}=e,p=vo("organize_values_force_search",!1,e.id),h=Ql(e.values,e.id),[m,_]=(0,i.J0)(!1),[v,g]=(0,i.J0)(p),b=vo("show_all_number",15,e.id);return(0,n.createElement)(Qd,{label:l,type:a,showLabel:r,isCollapsible:c.includes(o),isInitiallyCollapsed:u.includes(o),source:d,urlSlug:f,groupedValues:v?(0,n.createElement)(cf,{onStateChange:t,type:"button",filter:e,role:"radiogroup"}):null,afterLabel:(0,n.createElement)(uf,{path:`filter=${e.id}/description`}),tooltip:null!==(s=e.tooltip)&&void 0!==s?s:""},e.values.filter(m?()=>!0:(t,r)=>Zl(t,r,e.id)).map(r=>(0,n.createElement)(lf,{key:`${e.id}-${r.value}`,item:r,filterID:e.id,onStateChange:t,type:e.type,showCounters:e.show_counters})),h>0&&e.values.length<b?(0,n.createElement)(ra,{numberOfValues:h,showHiddenValues:m,onClick:()=>_(!m)}):null,h>0&&e.values.length>=b?(0,n.createElement)(ra,{numberOfValues:e.values.length,showHiddenValues:v,onClick:()=>g(!v),showAll:!0}):null)},mf=(0,n.createElement)(f,{fill:"none",className:"fibofilters-icon-checkmark-stroke",xmlns:"http://www.w3.org/2000/svg",width:14,height:12.25,viewBox:"0 0 14 12.25","aria-hidden":"true"},(0,n.createElement)(d,{d:"M10.938 2.188 5.25 10.063 2.188 6.125",stroke:"black",strokeWidth:3.5,strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.createElement)(d,{d:"M10.938 2.188 5.25 10.063 2.188 6.125",stroke:"white",strokeWidth:2.625,strokeLinecap:"round",strokeLinejoin:"round"})),_f=({item:e,filterID:t,onStateChange:r,type:o,multipleSelection:i})=>{const l=()=>{e.disabled||r({filterID:t,index:e.index,newState:!e.selected,unselectOthers:!i,type:o})},a=[mo.item,`${mo.item}--color`];e.selected&&a.push(mo.selected),e.disabled&&a.push(mo.disabled);let u={};e.color.length>0&&(u={background:e.color}),e.img_url.length>0&&(u={backgroundImage:`url(${e.img_url})`});let d=Qo(e.label);return vo("show_count")&&(d=`${d} (${e.counter})`),(0,n.createElement)("li",{className:a.join(" ")},(0,n.createElement)(Wd,{delay:100},(0,n.createElement)("div",{className:`${mo.item}__interactive-wrapper`},(0,n.createElement)("div",{className:`${mo.item}__interactive`,role:i?"checkbox":"radio","aria-checked":e.selected?"true":"false",onClick:l,onKeyPress:l,tabIndex:"0"},(0,n.createElement)("div",{className:c(`${mo.item}__color`),"aria-label":d},(0,n.createElement)(Kd,{asChild:!0,disabled:e.disabled},(0,n.createElement)("div",{className:`${mo.item}__color-inner`,style:u},e.selected?(0,n.createElement)(s,{width:14,height:12.25,icon:mf}):null,!e.selected&&e.indeterminate?(0,n.createElement)(s,{width:14,height:12.25,icon:rf}):null))))),(0,n.createElement)(Xd,{className:`${ho}-tooltip`,htmlContent:d})))},vf=({filter:e,onStateChange:t,showLabel:r=!0,location:o=""})=>{var s;const{label:l,type:a,is_collapsible:c,is_initially_collapsed:u,source:d,url_slug:f}=e,p=Ql(e.values,e.id),[h,m]=(0,i.J0)(!1);return(0,n.createElement)(Qd,{label:l,type:a,showLabel:r,source:d,urlSlug:f,isCollapsible:c.includes(o),isInitiallyCollapsed:u.includes(o),afterLabel:(0,n.createElement)(uf,{path:`filter=${e.id}/description`}),tooltip:null!==(s=e.tooltip)&&void 0!==s?s:""},e.values.filter(h?()=>!0:(t,r)=>Zl(t,r,e.id)).map(r=>{var o;return(0,n.createElement)(_f,{key:`${e.id}-${r.value}`,item:r,filterID:e.id,onStateChange:t,type:e.type,multipleSelection:null!==(o=e.multiple_selection)&&void 0!==o&&o})}),p>0&&(0,n.createElement)(ra,{numberOfValues:p,showHiddenValues:h,onClick:()=>m(!h)}))},gf=({filter:e,onStateChange:t,showLabel:r=!0,location:o=""})=>{var s;const{label:l,type:a,is_collapsible:c,is_initially_collapsed:u,source:d,url_slug:f}=e,p=Ql(e.values,e.id),h=vo("organize_values_force_search",!1,e.id),[m,_]=(0,i.J0)(!1),[v,g]=(0,i.J0)(h),b=h?0:vo("show_all_number",15,e.id);return(0,n.createElement)(Qd,{label:l,type:a,showLabel:r,source:d,urlSlug:f,isCollapsible:c.includes(o),isInitiallyCollapsed:u.includes(o),role:"radiogroup",groupedValues:v?(0,n.createElement)(cf,{onStateChange:t,type:"radio",filter:e,role:"radiogroup"}):null,afterLabel:(0,n.createElement)(uf,{path:`filter=${e.id}/description`}),tooltip:null!==(s=e.tooltip)&&void 0!==s?s:""},e.values.filter(m?()=>!0:(t,r)=>Zl(t,r,e.id)).map(r=>(0,n.createElement)(ef,{key:`${e.id}-${r.value}`,item:r,filterID:e.id,onStateChange:t,type:e.type})),p>0&&e.values.length<b?(0,n.createElement)(ra,{numberOfValues:p,showHiddenValues:m,onClick:()=>_(!m)}):null,p>0&&e.values.length>=b?(0,n.createElement)(ra,{numberOfValues:e.values.length,showHiddenValues:v,onClick:()=>g(!v),showAll:!0}):null)},bf=({onClick:e,className:t})=>(0,n.createElement)(ti,{onClick:e,className:`${ho}-clear-filter-btn ${t}`},(0,n.createElement)(s,{icon:p,size:12})),yf=({filter:e,onStateChange:t})=>{const[r,o]=(0,i.J0)(!1),[s,l]=(0,i.J0)(!1),a=(0,i.li)(null),c=(0,i.li)(null),u=e=>{"Enter"===e.key&&f()},d=(e,t)=>(e=parseFloat(e),t=parseFloat(t),(e=isNaN(e)?-1:e)===(isNaN(t)?-1:t)),f=()=>{if(a.current&&c.current){if(d(e.range.min,a.current.value)&&d(e.range.max,c.current.value))return;t({filterID:e.id,value:{min:a.current.value,max:c.current.value},type:e.type})}};return(0,n.createElement)("div",{className:"fibofilters-range__inputs-wrapper"},(0,n.createElement)("div",{className:"fibofilters-input__wrapper"},(0,n.createElement)("label",{htmlFor:`${e.id}-inputs-min`,className:"fibofilters-input__label "+(e.range.min>0||r?"fibofilters-input__label--active":"")},"price"===e.source?Ko("min.","[front] Abbreviation for minimal. Related to price.","fibofilters"):Ko("min.","[front] Abbreviation for minimal. Related to number.","fibofilters")),(0,n.createElement)("input",{id:`${e.id}-inputs-min`,className:"fibofilters-input__element",ref:a,type:"number",onKeyPress:e=>u(e),value:e.range.min>=0?e.range.min:"",min:"0",onFocus:()=>{o(!0)},onBlur:()=>{o(!1),f()}})),(0,n.createElement)("div",{className:"fibofilters-input__wrapper"},(0,n.createElement)("label",{htmlFor:`${e.id}-inputs-max`,className:"fibofilters-input__label "+(e.range.max>0||s?"fibofilters-input__label--active":"")},"price"===e.source?Ko("max.","[front] Abbreviation for maximum. Related to price.","fibofilters"):Ko("max.","[front] Abbreviation for maximum. Related to number.","fibofilters")),(0,n.createElement)("input",{id:`${e.id}-inputs-max`,className:"fibofilters-input__element",ref:c,type:"number",onKeyPress:e=>u(e),value:e.range.max>=0?e.range.max:"",min:"0",onFocus:()=>{l(!0)},onBlur:()=>{l(!1),f()}})),(0,n.createElement)(bf,{className:e.range.min>0||e.range.max>0?"":`${ho}-clear-filter-btn--hidden`,onClick:()=>{a.current&&c.current&&t({filterID:e.id,value:{min:null,max:null},type:e.type})}}))};function wf(){return wf=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},wf.apply(this,arguments)}function Ef(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}var xf=function(e){return[].concat(e).sort(function(e,t){return Number(e)-Number(t)})},Sf={getPercentageForValue:function(e,t,r){return Math.max(0,Math.min(100,(e-t)/(r-t)*100))},getValueForClientX:function(e,t,r,n){return(n-r)*((e-t.left)/t.width)+r}};var kf=Math.ceil,If=Math.max;const Af=function(e,t,r){return r&&"number"!=typeof r&&function(e,t,r){if(!Vt(r))return!1;var n=typeof t;return!!("number"==n?dn(r)&&Wr(t,r.length):"string"==n&&t in r)&&sr(r[t],e)}(e,t,r)&&(t=r=void 0),e=es(e),void 0===t?(t=e,e=0):t=es(t),function(e,t,r,n){for(var o=-1,i=If(kf((t-e)/(r||1)),0),s=Array(i);i--;)s[n?i:++o]=e,e+=r;return s}(e,t,r=void 0===r?e<t?1:-1:es(r),void 0)};var Cf=It.isFinite,Pf=Math.min;const Ff=(Lf=Math.floor,function(e,t){if(e=Qi(e),(t=null==t?0:Pf(ts(t),292))&&Cf(e)){var r=(kr(e)+"e").split("e"),n=Lf(r[0]+"e"+(+r[1]+t));return+((r=(kr(n)+"e").split("e"))[0]+"e"+(+r[1]-t))}return Lf(e)}),$f=({filter:e,onStateChange:t})=>{const[r,o]=(0,i.J0)([]),s=(0,i.li)(null),l=vo("range_slider_histogram_ranges_limit"),{slider_data:a,range:u,source:d}=e,f=Pr(e,"number_precision",0),p=Pr(e,"number_prefix",""),h=Pr(e,"number_suffix","");(0,i.vJ)(()=>(""===u.min&&""===u.max||-1===u.min&&-1===u.max?o([a.min,a.max]):parseFloat(u.min)>0&&parseFloat(u.max)>0?o([parseFloat(u.min),parseFloat(u.max)]):parseFloat(u.min)>0&&(""===u.max||-1===u.max)?o([parseFloat(u.min),parseFloat(a.max)]):(""===u.min||-1===u.min)&&parseFloat(u.max)>0&&o([parseFloat(a.min),parseFloat(u.max)]),()=>{}),[u]);const m=r=>{o([parseFloat(r[0]),parseFloat(r[1])]),t({filterID:e.id,value:{min:parseFloat(r[0])===parseFloat(a.min)?"":r[0],max:parseFloat(r[1])===parseFloat(a.max)?"":r[1]},type:e.type})};let _=parseFloat(vo("range_slider_step",1,e.id)),v=parseInt(vo("range_slider_step_precision",0,e.id));if(_=Number.isNaN(_)?1:_,v=Number.isNaN(v)?0:v,a.min>=0&&1===_&&0===v){a.min<1&&(v=1,_=.1),a.min<.1&&(v=2,_=.01),a.min<.01&&(v=3,_=.001);const e=[{limit:1e3,step:10},{limit:1e4,step:100},{limit:1e5,step:1e3},{limit:1e6,step:1e4},{limit:1e7,step:1e5},{limit:1e8,step:1e6}],t=a.max-a.min;for(let r=0;r<e.length;r++)t>e[r].limit&&(v=1,_=e[r].step)}let g=Af(Math.ceil(a.min/_)*_,Ff(a.max,v),_);v>=1&&(g=g.map(e=>parseFloat(e.toFixed(v))));const{getTrackProps:b,handles:y,segments:w}=function(e){var t,r,o=e.interpolator,i=void 0===o?Sf:o,s=e.tickSize,l=void 0===s?10:s,a=e.values,c=e.min,u=e.max,d=e.ticks,f=e.steps,p=e.onChange,h=e.onDrag,m=e.stepSize,_=n.default.useState(null),v=_[0],g=_[1],b=n.default.useState(),y=b[0],w=b[1],E=(t={activeHandleIndex:v,onChange:p,onDrag:h,values:a,tempValues:y},(r=n.default.useRef(t)).current=t,n.default.useCallback(function(){return r.current},[])),x=n.default.useRef(),S=n.default.useCallback(function(e){var t,r=(t=x.current.getBoundingClientRect(),{left:Math.ceil(t.left),width:Math.ceil(t.width)});return i.getValueForClientX(e,r,c,u)},[i,u,c]),k=n.default.useCallback(function(e,t){if(f){var r=f.indexOf(e)+t;return r>=0&&r<f.length?f[r]:e}var n=e+m*t;return n>=c&&n<=u?n:e},[u,c,m,f]),I=n.default.useCallback(function(e){var t=c,r=u;if(f)f.forEach(function(n){n<=e&&n>t&&(t=n),n>=e&&n<r&&(r=n)});else{for(;t<e&&t+m<e;)t+=m;r=Math.min(t+m,u)}return e-t<r-e?t:r},[u,c,m,f]),A=n.default.useCallback(function(e){var t=E(),r=t.activeHandleIndex,n=t.onDrag,o="touchmove"===e.type?e.changedTouches[0].clientX:e.clientX,i=S(o),s=I(i),l=[].concat(a.slice(0,r),[s],a.slice(r+1));n?n(l):w(l)},[E,S,I,a]),C=n.default.useCallback(function(e,t){var r=E(),n=r.values,o=r.onChange,i=void 0===o?function(){}:o;if(37===e.keyCode||39===e.keyCode){g(t);var s=37===e.keyCode?-1:1,l=k(n[t],s),a=[].concat(n.slice(0,t),[l],n.slice(t+1));i(xf(a))}},[E,k]),P=n.default.useCallback(function(e,t){g(t);var r=function e(t){var r=E(),n=r.tempValues,o=r.values,i=r.onChange,s=void 0===i?function(){}:i,l=r.onDrag,a=void 0===l?function(){}:l;document.removeEventListener("mousemove",A),document.removeEventListener("touchmove",A),document.removeEventListener("mouseup",e),document.removeEventListener("touchend",e);var c=xf(n||o);s(c),a(c),g(null),w()};document.addEventListener("mousemove",A),document.addEventListener("touchmove",A),document.addEventListener("mouseup",r),document.addEventListener("touchend",r)},[E,A]),F=n.default.useCallback(function(e){return i.getPercentageForValue(e,c,u)},[i,u,c]),$=n.default.useMemo(function(){var e=d||f;if(!e){for(e=[c];e[e.length-1]<u-l;)e.push(e[e.length-1]+l);e.push(u)}return e.map(function(e,t){return{value:e,getTickProps:function(r){var n=void 0===r?{}:r,o=n.key,i=void 0===o?t:o,s=n.style,l=void 0===s?{}:s,a=Ef(n,["key","style"]);return wf({key:i,style:wf({position:"absolute",width:0,left:F(e)+"%",transform:"translateX(-50%)"},l)},a)}}})},[d,F,u,c,f,l]),O=n.default.useMemo(function(){var e=xf(y||a);return[].concat(e,[u]).map(function(t,r){return{value:t,getSegmentProps:function(n){var o=void 0===n?{}:n,i=o.key,s=void 0===i?r:i,l=o.style,a=void 0===l?{}:l,u=Ef(o,["key","style"]),d=F(e[r-1]?e[r-1]:c);return wf({key:s,style:wf({position:"absolute",left:d+"%",width:F(t)-d+"%"},a)},u)}}})},[F,u,c,y,a]),N=n.default.useMemo(function(){return(y||a).map(function(e,t){return{value:e,active:t===v,getHandleProps:function(r){var n=void 0===r?{}:r,o=n.key,i=void 0===o?t:o,s=(n.ref,n.innerRef,n.onKeyDown),l=n.onMouseDown,a=n.onTouchStart,d=n.style,f=void 0===d?{}:d,p=Ef(n,["key","ref","innerRef","onKeyDown","onMouseDown","onTouchStart","style"]);return wf({key:i,onKeyDown:function(e){e.persist(),C(e,t),s&&s(e)},onMouseDown:function(e){e.persist(),P(e,t),l&&l(e)},onTouchStart:function(e){e.persist(),P(e,t),a&&a(e)},role:"slider","aria-valuemin":c,"aria-valuemax":u,"aria-valuenow":e,style:wf({position:"absolute",top:"50%",left:F(e)+"%",zIndex:t===v?"1":"0",transform:"translate(-50%, -50%)"},f)},p)}}})},[v,F,C,P,c,u,y,a]);return{activeHandleIndex:v,getTrackProps:function(e){var t=void 0===e?{}:e,r=t.style,n=void 0===r?{}:r,o=t.ref,i=Ef(t,["style","ref"]);return wf({ref:function(e){x.current=e,o&&("function"==typeof o?o(e):o.current=e)},style:wf({position:"relative",userSelect:"none"},n)},i)},ticks:$,segments:O,handles:N}}({min:a.min,max:a.max,steps:g,values:r,onChange:m}),E=y.map(e=>e.value),x=(0,i.Kr)(()=>{if(2===E.length){const e=Math.min(Math.floor((E[0]-a.min)/(a.max-a.min)*l),l-1),t=Math.min(Math.floor((E[1]-a.min)/(a.max-a.min)*l),l-1);return a.histogramValues.map((r,n)=>({active:n>=e&&n<=t,value:r}))}return[]},[E]),S=({index:e,getSegmentProps:t})=>{const r=["fibofilters-range__segment"];return r.push(1===e?"fibofilters-range__segment--active":"fibofilters-range__segment--inactive"),(0,n.createElement)("div",{...t(),className:r.join(" ")})},k=[],I=vo("range_slider_min_value_label","min",e.id),A=vo("range_slider_max_value_label","max",e.id);return y.forEach(({value:t},r)=>{0===r?"price"===d?t===a.min&&"min"===I?k.push(Ko("min.","[front] Abbreviation for minimal. Related to price.","fibofilters")):t===a.min&&"dynamic"!==I&&"min"!==I?k.push(Po(I)):k.push(Po(t)):"price"!==d&&(t===a.min&&"min"===I?k.push(Ko("min.","[front] Abbreviation for minimal. Related to number.","fibofilters")):t===a.min&&"dynamic"!==I&&"min"!==I?k.push($o(I,e.id,f,p,h).replaceAll("&nbsp;"," ")):k.push($o(t,e.id,f,p,h).replaceAll("&nbsp;"," "))):1===r&&("price"===d?t===a.max&&"max"===A?k.push(Ko("max.","[front] Abbreviation for maximum. Related to price.","fibofilters")):t===a.max&&"dynamic"!==A&&"max"!==A?k.push(Po(A)):k.push(Po(t)):"price"!==d&&(t===a.max&&"max"===A?k.push(Ko("max.","[front] Abbreviation for maximum. Related to number.","fibofilters")):t===a.max&&"dynamic"!==A&&"max"!==A?k.push($o(A,e.id,f,p,h).replaceAll("&nbsp;"," ")):k.push($o(t,e.id,f,p,h).replaceAll("&nbsp;"," "))))}),0===a.histogramValues.length?null:(0,n.createElement)("div",{className:"fibofilters-range__slider-wrapper"},x.length>0&&(0,n.createElement)("div",{className:"fibofilters-slider-histogram"},x.map((t,r)=>(0,n.createElement)("span",{style:{height:`${t.value}%`,width:`calc(${100/l}% - 2px)`},className:c("fibofilters-slider-histogram__item",t.active&&"fibofilters-slider-histogram__item--active"),key:`${e.id}-slider-histogram-value-${r}`}))),(0,n.createElement)("div",{...b({className:"fibofilters-range__track",ref:s,onClick:e=>{if(e.preventDefault(),!m||!s.current)return;if(e.target.classList.contains("fibofilters-range__handle"))return;const t=e.clientX-s.current.getBoundingClientRect().left,n=s.current.getBoundingClientRect().width,o=Math.max(a.min,Math.round(t/n*a.max)),i=r.sort((e,t)=>Math.abs(e-o)-Math.abs(t-o))[0],l=r.filter(e=>e!==i).concat(o).sort((e,t)=>e-t);m(l)}})},w.map(({getSegmentProps:t},r)=>(0,n.createElement)(S,{key:`${e.id}-slider-segment-${r}`,getSegmentProps:t,index:r})),y.map(({getHandleProps:e},t)=>(0,n.createElement)(ti,{className:"fibofilters-range__handle",key:0,"aria-label":k[t],...e()}))),(0,n.createElement)("div",{className:"fibofilters-range__label-wrapper"},k.map((t,r)=>(0,n.createElement)("span",{className:c("fibofilters-range__label","fibofilters-range__label--"+(0===r?"min":"max")),key:`${e.id}-slider-range-label-${r}`},t))))},Of=({filter:e,onStateChange:t})=>{const[r,o]=(0,i.J0)([]),{radio_range:s,range:l}=e;return(0,i.vJ)(()=>(o(s),()=>{}),[s]),(0,i.vJ)(()=>{if(r.length>0){const e=oi()(r,{$apply:e=>e.map(e=>{let t=!1;return parseFloat(l.min)===e.min&&parseFloat(l.max)===e.max?t=!0:(""!==l.min&&-1!==l.min||""!==e.min||parseFloat(l.max)!==e.max)&&(""!==l.max&&-1!==l.max||""!==e.max||parseFloat(l.min)!==e.min)||(t=!0),e.selected=t,e})});o(e)}return()=>{}},[]),(0,n.createElement)("div",{className:"fibofilters-range__radio-ranges-wrapper",role:"radiogroup"},(0,n.createElement)("ul",{className:`${ho}-block__items-list`},r.map((i,s)=>(0,n.createElement)(ef,{key:`${e.id}-radio-range-${s}`,item:i,index:s,filterID:e.id,onStateChange:()=>((n,i)=>{let s=oi()(r,{$apply:e=>e.map(e=>(e.selected=!1,e))});s=oi()(s,{[i]:{selected:{$set:!0}}}),o(s),t({filterID:e.id,value:{min:n.min,max:n.max},type:e.type})})(i,s),type:e.type}))))},Nf=({filter:e,onStateChange:t,showLabel:r=!0,location:o=""})=>{var i;const{label:s,type:l,show_inputs:a,show_radio_ranges:c,show_slider:u,is_collapsible:d,is_initially_collapsed:f,source:p,url_slug:h}=e;return(0,n.createElement)(Yd,{label:s,type:l,showLabel:r,isCollapsible:d.includes(o),isInitiallyCollapsed:f.includes(o),source:p,urlSlug:h,afterLabel:(0,n.createElement)(uf,{path:`filter=${e.id}/description`}),tooltip:null!==(i=e.tooltip)&&void 0!==i?i:""},a&&(0,n.createElement)(yf,{filter:e,onStateChange:t}),u&&(0,n.createElement)($f,{filter:e,onStateChange:t}),c&&(0,n.createElement)(Of,{filter:e,onStateChange:t}))},Rf=(0,n.createElement)(f,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(d,{d:"M12,4V2A10,10 0 0,0 2,12H4A8,8 0 0,1 12,4Z",stroke:"#767676",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}));var Lf;let Df=!1;const jf=({filter:e,onStateChange:t,showLabel:r=!0,location:o=""})=>{var l;const{label:a,type:u,is_collapsible:d,is_initially_collapsed:f,source:p,url_slug:h}=e,[_,v]=(0,i.J0)(""),g=(0,i.li)(null),b=Pr(e,"phrase","");(0,i.vJ)(()=>{Df&&(g.current?.focus(),Df=!1)},[]),(0,i.vJ)(()=>{const e=g.current;return()=>{e&&e.ownerDocument.activeElement===e&&(Df=!0)}},[]),(0,i.vJ)(()=>(null!==b&&v(b),()=>{}),[e.phrase]);const y=r=>{t({filterID:e.id,phrase:r,type:u,clearBaseData:"search-fibosearch-pro"===e.logic&&""===r})},w=(0,i.Kr)(()=>Cl((e,t)=>{(e.trim()!==t.trim()||e===e.trim()&&e.trim()+" "===t)&&y(e)},250),[]);return(0,n.createElement)(Yd,{label:a,type:u,showLabel:r,isCollapsible:d.includes(o),isInitiallyCollapsed:f.includes(o),source:p,urlSlug:h,afterLabel:(0,n.createElement)(uf,{path:`filter=${e.id}/description`}),tooltip:null!==(l=e.tooltip)&&void 0!==l?l:""},(0,n.createElement)("div",{className:`${ho}-items-search`},(0,n.createElement)("input",{type:"search",ref:g,onChange:e=>{var t;t=e.target.value,v(t),w(t,_)},name:`search-${e.id}`,value:_,placeholder:Ko("Search for products…","[front]","fibofilters"),autoComplete:"off"}),(0,n.createElement)("div",{className:`${ho}-items-search__controls`},(0,m.lD)()&&(0,n.createElement)("div",{className:`${ho}-items-search__controls--loading`},(0,n.createElement)(s,{icon:Rf,width:14,height:14})),_.length>0&&(0,n.createElement)(ti,{className:c(`${ho}-items-search__controls--close`,_.length>0&&`${ho}-items-search__controls--close-show`),"aria-label":Ko("Clear","[front]","fibofilters"),onClick:()=>{v(""),y("")}},(0,n.createElement)(n.Fragment,null,"×")))))},Tf=(0,n.forwardRef)(({children:e,active:t,level:r,selected:o,disabled:i,...s},l)=>(0,n.createElement)("div",{className:c(`${ho}__select-suggestions-item`,`${ho}__select-suggestions-item--level-${r}`,!i&&t&&`${ho}__select-suggestions-item--active`,i&&`${ho}__select-suggestions-item--disabled`,o&&`${ho}__select-suggestions-item--selected`),ref:l,role:"option",id:Tu(),"aria-selected":t,...s,style:s.style,disabled:i},e)),Mf=({filter:e,onStateChange:t,location:r=""})=>{const{type:o}=e,[l,a]=(0,i.J0)(!1),[u,d]=(0,i.J0)(""),[f,p]=(0,i.J0)(""),[h,m]=(0,i.J0)(null),_=(0,i.li)(null),v=(0,i.li)([]),g=(0,i.li)(null),b=(0,i.li)(null),y=(e=>{const t=Oo(e);return No(t)})(e.values),w=Pr(y.filter(e=>e.selected),"[0]",null);(0,i.vJ)(()=>(null!==w&&(p(w.label),d(w.label)),()=>{}),[]),(0,i.vJ)(()=>(null===w&&(d(""),p("")),()=>{}),[w]),(0,i.vJ)(()=>(l||f===u||p(u),()=>{}),[l]);const{refs:E,floatingStyles:x,context:S}=Fd({whileElementsMounted:tu,open:l,onOpenChange(e,t,r){(e||void 0!==r)&&a(e)},middleware:[_u({padding:10,fallbackAxisSideDirection:"none"}),(k={apply({rects:e,availableHeight:t,elements:r}){Object.assign(r.floating.style,{width:`${_?_.current.offsetWidth:e.reference.width}px`,maxHeight:`${t}px`})},padding:10},{...iu(k),options:[k,undefined]})],placement:"bottom-start"});var k;const I=kd(S),A=Ud(S,{role:"listbox"}),C=Pd(S,{outsidePress:e=>e.target!==g.current}),P=Vd(S,{listRef:v,activeIndex:h,onNavigate:m,virtual:!0,loop:!0}),{getReferenceProps:F,getFloatingProps:$,getItemProps:O}=Rd([I,A,C,P]);function N(r){t(null===r?{filterID:e.id,index:!1,unselectOthers:!0,type:o}:{filterID:e.id,index:r.index,newState:!0,unselectOthers:!0,type:o})}const R=f===u||""===f?y:y.filter(e=>e.label.toLowerCase().includes(f?f.toLowerCase():""));return(0,n.createElement)(n.Fragment,null,(0,n.createElement)("div",{className:c(`${mo.item}--select`,l&&`${mo.item}--select-opened`),ref:_},(0,n.createElement)("input",{...F({ref:E.setReference,onChange:function(e){const t=e.target.value;p(t),t||""===t?(a(!0),m(0)):a(!1)},value:f,placeholder:Ko("Select…","[front]","fibofilters"),"aria-autocomplete":"list",onKeyDown(e){"Enter"===e.key&&null!==h&&R[h]&&(p(R[h].label),d(R[h].label),N(R[h]),m(null),a(!1))}})}),(0,n.createElement)("div",{className:`${ho}__select-controls`},(0,n.createElement)(ti,{className:c(`${ho}__select-controls--close`,w&&`${ho}__select-controls--close-show`),"aria-label":Ko("Clear","[front]","fibofilters"),ref:b,onClick:()=>{d(""),p(""),N(null)}},(0,n.createElement)(n.Fragment,null,"×")),(0,n.createElement)("span",{className:`${ho}__select-controls--sep`}),(0,n.createElement)(ti,{className:`${ho}__select-controls--toggle`,"aria-label":Ko("Toggle","[front]","fibofilters"),ref:g,role:"button",onClick:()=>{a(!l)}},l?(0,n.createElement)(s,{className:`${ho}__select-chevron`,icon:ea,width:14,height:8}):(0,n.createElement)(s,{className:c(`${ho}__select-chevron`,`${ho}__select-chevron--rev`),icon:ea,width:14,height:8})))),r!==yl&&l&&(0,n.createElement)(hd,null,(0,n.createElement)(Ed,{context:S,initialFocus:-1,visuallyHiddenDismiss:!0},(0,n.createElement)("div",{className:`${ho}__select-suggestions`,...$({ref:E.setFloating,style:x})},R.map((t,r)=>{var o;return(0,n.createElement)(Tf,{key:"",...O({key:`${e.id}-${t.value}`,ref(e){v.current[r]=e},onClick(){t.disabled||(p(t.label),d(t.label),N(t),a(!1),To||E.domReference.current?.focus())}}),active:h===r,selected:null!==w&&w.value===t.value,level:null!==(o=t.level)&&void 0!==o?o:0,disabled:t.disabled},(0,n.createElement)("span",null,Qo(t.label)),vo("show_count")&&(0,n.createElement)(Gl,{counter:t.counter}))})))),r===yl&&l&&(0,n.createElement)(Ed,{context:S,initialFocus:-1,visuallyHiddenDismiss:!0},(0,n.createElement)("div",{className:`${ho}__select-suggestions`,...$({ref:E.setFloating,style:x})},R.map((t,r)=>{var o;return(0,n.createElement)(Tf,{key:"",...O({key:`${e.id}-${t.value}`,ref(e){v.current[r]=e},onClick(){t.disabled||(p(t.label),d(t.label),N(t),a(!1),To||E.domReference.current?.focus())}}),active:h===r,selected:null!==w&&w.value===t.value,level:null!==(o=t.level)&&void 0!==o?o:0,disabled:t.disabled},(0,n.createElement)("span",null,Qo(t.label)),vo("show_count")&&(0,n.createElement)(Gl,{counter:t.counter}))}))))},Vf=({filter:e,onStateChange:t,showLabel:r=!0,location:o=""})=>{var i;const{label:s,type:l,is_collapsible:a,is_initially_collapsed:c,source:u,url_slug:d}=e;return(0,n.createElement)(Yd,{label:s,type:l,showLabel:r,isCollapsible:a.includes(o),isInitiallyCollapsed:c.includes(o),source:u,urlSlug:d,afterLabel:(0,n.createElement)(uf,{path:`filter=${e.id}/description`}),tooltip:null!==(i=e.tooltip)&&void 0!==i?i:""},(0,n.createElement)(Mf,{filter:e,onStateChange:t,location:o}))},Bf=({item:e,index:t,filterID:r,onStateChange:o,type:i})=>{const s=()=>{e.disabled||o({filterID:r,index:t,newState:!e.selected,unselectOthers:!1,type:i})},l=[mo.item,`${mo.item}--toggle`];return e.selected&&l.push(mo.selected),e.disabled&&l.push(mo.disabled),(0,n.createElement)("li",{className:l.join(" ")},(0,n.createElement)("div",{className:`${mo.item}__interactive`,title:e.label,role:"checkbox","aria-checked":e.selected?"true":"false",onClick:s,onKeyPress:s,tabIndex:"0"},(0,n.createElement)("div",{className:`${mo.item}__toggle`},(0,n.createElement)("span",{className:`${mo.item}__toggle-track`}),(0,n.createElement)("span",{className:`${mo.item}__toggle-thumb`}),(0,n.createElement)("span",{className:`${mo.item}__toggle-thumb ${mo.item}__toggle-thumb--shadow`})),(0,n.createElement)("div",{className:`${mo.item}__label`},(0,n.createElement)("span",null,e.label)),vo("show_count")&&(0,n.createElement)(Gl,{counter:e.counter})))},Uf=({filter:e,onStateChange:t,showLabel:r=!0,location:o=""})=>{var i;const{label:s,type:l,is_collapsible:a,is_initially_collapsed:c,source:u,url_slug:d}=e;return(0,n.createElement)(Qd,{label:s,type:l,showLabel:r,isCollapsible:a.includes(o),isInitiallyCollapsed:c.includes(o),source:u,urlSlug:d,afterLabel:(0,n.createElement)(uf,{path:`filter=${e.id}/description`}),tooltip:null!==(i=e.tooltip)&&void 0!==i?i:""},e.values.map(r=>(0,n.createElement)(Bf,{key:`${e.id}-${r.value}`,item:r,index:r.index,filterID:e.id,onStateChange:t,type:e.type})))},Hf=()=>null,zf=({filter:e,showLabel:t=!0,location:r=""})=>"category"===e.type?(0,n.createElement)(df,{filter:e,onStateChange:Tl,showLabel:t,location:r}):"category-hierarchical"===e.type?(0,n.createElement)(ff,{filter:e,onStateChange:Tl,showLabel:t,location:r}):"checkboxes"===e.type?(0,n.createElement)(pf,{filter:e,onStateChange:Tl,showLabel:t,location:r}):"buttons"===e.type?(0,n.createElement)(hf,{filter:e,onStateChange:Tl,showLabel:t,location:r}):"color"===e.type?(0,n.createElement)(vf,{filter:e,onStateChange:Tl,showLabel:t,location:r}):"radio"===e.type?(0,n.createElement)(gf,{filter:e,onStateChange:Tl,showLabel:t,location:r}):"range"===e.type?(0,n.createElement)(Nf,{filter:e,onStateChange:Tl,showLabel:t,location:r}):"search"===e.type?(0,n.createElement)(jf,{filter:e,onStateChange:Tl,showLabel:t,location:r}):"select"===e.type?(0,n.createElement)(Vf,{filter:e,onStateChange:Tl,showLabel:t,location:r}):"toggle"===e.type?(0,n.createElement)(Uf,{filter:e,onStateChange:Tl,showLabel:t,location:r}):"data-picker"===e.type?(0,n.createElement)(Hf,{filter:e,onStateChange:Tl,showLabel:t,location:r}):null,Jf=new Map,qf=(e,t)=>{const r=`${e}-${t}`,n=(0,i.Kr)(()=>(Jf.has(r)||Jf.set(r,(0,o.vP)(!1)),Jf.get(r)),[r]);return(0,i.Nf)(()=>{const r=()=>{n.value=window.innerWidth>=e&&window.innerWidth<=t};return r(),window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)},[n]),n},Wf=()=>0===(0,m.r3)().length?null:vo("can_show_critical_errors_warning",!1)?(0,n.createElement)("div",{style:{marginBottom:"1em",borderLeftColor:"#cc1818",backgroundColor:"#f4a2a2",borderLeftWidth:"4px",color:"#000",padding:"5px 5px 5px 10px",fontSize:"13px",borderRadius:"5px"}},(0,n.createElement)("p",{style:{marginBottom:"0.5em",fontSize:"17px"}},(0,n.createElement)("strong",null,Ko("FiboFilters warning","[admin]","fibofilters"))),(0,n.createElement)("p",{style:{marginBottom:"0.5em"}},(0,n.createElement)("strong",null,Ko("This warning is only visible to logged-in users with the Administrator role.","[admin]","fibofilters"))),(0,n.createElement)("p",{style:{marginBottom:0}},Ko("We ran into an issue while initializing FiboFilters.","[admin]","fibofilters")," ",Ko("Please enable the","[admin]","fibofilters")," ",(0,n.createElement)("a",{href:"https://fibofilters.com/documentation/troubleshooting/debugging/#front-end-filters-debugger",target:"_blank",rel:"noreferrer",style:{color:"#000",textDecoration:"underline",fontWeight:"normal"}},Ko("Filters Front-end Debugger","[admin]","fibofilters"))," ",Ko("to check what’s going wrong.","[admin]","fibofilters"))):null,Kf=({index:e,minScreen:t,maxScreen:r,includedFilters:o,excludedFilters:s,showAppliedFilters:l=!0,location:a=""})=>{const{filtersState:c}=(0,Kl.$U)(),u=al(c.value.filters,o,s),d=qf(Number.isInteger(parseInt(t))?parseInt(t):99999,Number.isInteger(parseInt(r))?parseInt(r):99999).value;return(0,i.vJ)(()=>{d&&Object.keys(u).length>0&&Jo.J.doAction("fiboFilters.renderer.filters_displayed","vertical")},[d]),d?(0,n.createElement)(n.Fragment,null,(0,n.createElement)(Wf,null),(0,n.createElement)(uf,{path:`${a}/before_first_filter`}),l&&["top","both"].includes(vo("applied_filters_position_sidebar"))?(0,n.createElement)(Xl,null):null,Object.keys(u).map(t=>(0,n.createElement)(n.Fragment,null,(0,n.createElement)(uf,{path:[`${a}/filter=${t}/before`,`filter=${t}/before`]}),(0,n.createElement)(zf,{key:`filters-verical-${e}-${t}`,filter:u[t],location:a}),(0,n.createElement)(uf,{path:[`${a}/filter=${t}/after`,`filter=${t}/after`]}))),(0,n.createElement)(uf,{path:`${a}/after_last_filter`}),l&&["bottom","both"].includes(vo("applied_filters_position_sidebar"))?(0,n.createElement)(Xl,null):null):null},Xf=()=>{const{appState:e}=(0,h.N$)(),{filtersState:t}=(0,Kl.$U)(),[r,o]=(0,i.J0)([`${ho}-offcanvas-bg`]),l=vo("offcanvas_position","right"),[a,c]=(0,i.J0)([`${ho}-offcanvas`,"left"===l?`${ho}-offcanvas--position-left`:""]),u=()=>{o([`${ho}-offcanvas-bg`]),c([`${ho}-offcanvas`,"left"===l?`${ho}-offcanvas--position-left`:""]),setTimeout(()=>{b({}),Jo.J.doAction("fiboFilters.renderer.offcanvas_closed")},200)};if(((e,t)=>{const[r,n]=(0,i.J0)(!1);function o({key:r}){(Array.isArray(e)&&e.includes(r)||r===e)&&(n(!0),"function"==typeof t&&t())}const s=({key:t})=>{(Array.isArray(e)&&e.includes(t)||t===e)&&n(!1)};(0,i.vJ)(()=>(window.addEventListener("keydown",o),window.addEventListener("keyup",s),()=>{window.removeEventListener("keydown",o),window.removeEventListener("keyup",s)}),[])})(["Escape","Esc"],()=>{e.value.offcanvasIsVisible&&u()}),(0,i.vJ)(()=>{e.value.offcanvasIsVisible&&(o([`${ho}-offcanvas-bg`,`${ho}-offcanvas-bg--active`]),c([`${ho}-offcanvas`,`${ho}-offcanvas--active`,"left"===l?`${ho}-offcanvas--position-left`:""]),Jo.J.doAction("fiboFilters.renderer.offcanvas_opened"))},[e.value.offcanvasIsVisible]),!e.value.offcanvasIsVisible)return null;const d=e.value.appliedFiltersValues,f=t.value.total_products_count;return(0,n.createElement)(n.Fragment,null,(0,n.createElement)("div",{className:r.join(" "),onClick:()=>u()}),(0,n.createElement)("div",{className:a.join(" ")},(0,n.createElement)("div",{className:`${ho}-offcanvas-header`},(0,n.createElement)(ti,{className:`${ho}-offcanvas-close`,onClick:()=>{u()}},(0,n.createElement)(s,{icon:p,size:12})),"right"===l?(0,n.createElement)(n.Fragment,null,(0,n.createElement)("p",null,Ko("Filters","[front]","fibofilters")),e.value.appliedFiltersCount>0&&(0,n.createElement)(ti,{className:`${ho}-offcanvas-clear`,onClick:()=>{Vl(d,!0)}},Ko("Clear","[front]","fibofilters"))):(0,n.createElement)(n.Fragment,null,e.value.appliedFiltersCount>0&&(0,n.createElement)(ti,{className:`${ho}-offcanvas-clear`,onClick:()=>{Vl(d,!0)}},Ko("Clear","[front]","fibofilters")),(0,n.createElement)("p",null,Ko("Filters","[front]","fibofilters")))),(0,n.createElement)("div",{className:`${ho}-offcanvas-content`},(0,n.createElement)(Kf,{index:0,minScreen:1,maxScreen:99999,showAppliedFilters:!1,location:bl})),(0,n.createElement)("div",{className:`${ho}-offcanvas-footer`},f>0?(0,n.createElement)(ti,{className:`${ho}-offcanvas-btn`,onClick:()=>{u()}},vo("show_count")?Yo(/* translators: %d: number of products. */
Xo("See %d product","See %d products",f,"[front]","fibofilters"),f):Ko("See products","[front]","fibofilters")):(0,n.createElement)(ti,{className:`${ho}-offcanvas-btn`,onClick:()=>{u()}},Ko("See all products","[front]","fibofilters")))))},Yf=({filter:e})=>{const{type:t,source:r,url_slug:o}=e,[l,a]=(0,i.J0)(!1),c=Mo({type:t,source:r,urlSlug:o},["filter-button",`${ho}-filter-button`],"button");sl(e)&&c.push(`${ho}-filter-button-selected`);let u=!1;"category"===e.type&&!1!==e.current&&(u=!0);const{refs:d,floatingStyles:f,context:p}=Fd({open:l,onOpenChange:a,placement:"bottom-start",strategy:"fixed",middleware:[hu(10),_u({fallbackAxisSideDirection:"none"}),mu()],whileElementsMounted:tu}),h=kd(p),m=Pd(p),_=Ud(p),{getReferenceProps:v,getFloatingProps:g}=Rd([h,m,_]);return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(ti,{ref:d.setReference,...v(),className:c.join(" ")},e.label),l&&(0,n.createElement)(hd,null,(0,n.createElement)(Ed,{context:p,modal:!1},(0,n.createElement)("div",{className:`${ho}-popover`,ref:d.setFloating,style:f,...g()},(0,n.createElement)("div",{className:`${ho}-popover__top-bar`},(0,n.createElement)(s,{className:`${ho}-popover-chevron`,onClick:()=>{a(e=>!e)},icon:ea,width:14,height:8}),e?.tooltip?.length>0&&(0,n.createElement)(Wd,null,(0,n.createElement)(Kd,{asChild:!0},(0,n.createElement)("span",{className:`${ho}-popover__tooltip-icon`},(0,n.createElement)(s,{icon:ia,width:18,height:18}))),(0,n.createElement)(Xd,{className:`${ho}-tooltip`,htmlContent:e.tooltip}))),(0,n.createElement)(uf,{path:[`${yl}/filter=${e.id}/before`,`filter=${e.id}/before`]}),(0,n.createElement)(zf,{filter:e,showLabel:u,location:yl}),(0,n.createElement)(uf,{path:[`${yl}/filter=${e.id}/after`,`filter=${e.id}/after`]})))))},Zf=(0,n.createElement)(f,{width:17,height:22,viewBox:"0 0 17 22",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.createElement)(u,{cx:12.5,cy:4.5,r:4.5,fill:"#D9D9D9"}),(0,n.createElement)(d,{d:"M1 4.5H16",stroke:"#363636",strokeWidth:1.5,strokeLinecap:"round"}),(0,n.createElement)(d,{d:"M1 11.5H16",stroke:"#363636",strokeWidth:1.5,strokeLinecap:"round"}),(0,n.createElement)(d,{d:"M1 18.5H16",stroke:"#363636",strokeWidth:1.5,strokeLinecap:"round"}),(0,n.createElement)(u,{cx:12.5,cy:4.5,r:3,fill:"white",stroke:"#363636"}),(0,n.createElement)(u,{cx:4.5,cy:11.5,r:3,fill:"white",stroke:"#363636"}),(0,n.createElement)(u,{cx:9.5,cy:18.5,r:3,fill:"white",stroke:"#363636"})),Qf=({index:e,minScreen:t,maxScreen:r,includedFilters:o,excludedFilters:l})=>{const{filtersState:a}=(0,Kl.$U)(),c=al(a.value.filters,o,l),u=qf(Number.isInteger(parseInt(t))?parseInt(t):99999,Number.isInteger(parseInt(r))?parseInt(r):99999).value;return(0,i.vJ)(()=>{u&&Object.keys(c).length>0&&Jo.J.doAction("fiboFilters.renderer.filters_displayed","horizontal")},[u]),u?(0,n.createElement)("div",{className:`${ho}-horizontal-filters`},(0,n.createElement)(Wf,null),(0,n.createElement)(uf,{path:"horizontal/before_first_button"}),Object.keys(c).map(t=>"category"===c[t].type||"category-hierarchical"===c[t].type?(0,n.createElement)("div",{key:`filters-horizontal-hidden-${e}-${t}`,style:{display:"none"}},(0,n.createElement)(zf,{filter:c[t]})):null),Object.keys(c).map((t,r)=>r>=vo("horizontal_max_buttons",5)?null:(0,n.createElement)(n.Fragment,null,(0,n.createElement)(uf,{path:`horizontal/filter=${t}/before_button`}),(0,n.createElement)(Yf,{key:`filter-button-${e}-${t}`,filter:c[t]}),(0,n.createElement)(uf,{path:`horizontal/filter=${t}/after_button`}))),(Object.keys(c).length>vo("horizontal_max_buttons",5)||vo("always_display_all_filters_button",!1))&&(0,n.createElement)(ti,{className:`${ho}-filter-button js-${ho}-filter-button-all-filters`,onClick:()=>{g()},icon:(0,n.createElement)(s,{size:15,icon:Zf})},Ko("All filters","[front]","fibofilters")),(0,n.createElement)(uf,{path:"horizontal/after_last_button"})):null},Gf=({filter:e})=>{const{type:t,source:r,url_slug:o}=e,i=Mo({type:t,source:r,urlSlug:o},[`${ho}-filter-button`],"button");return sl(e)&&i.push(`${ho}-filter-button-selected`),(0,n.createElement)(ti,{className:i.join(" "),onClick:()=>{x(e.id,{})}},e.label)},ep=({index:e,minScreen:t,maxScreen:r,includedFilters:o,excludedFilters:l})=>{const{filtersState:a}=(0,Kl.$U)(),c=al(a.value.filters,o,l),u=qf(Number.isInteger(parseInt(t))?parseInt(t):99999,Number.isInteger(parseInt(r))?parseInt(r):99999).value;return(0,i.vJ)(()=>{u&&Object.keys(c).length>0&&Jo.J.doAction("fiboFilters.renderer.filters_displayed","mobile")},[u]),u?(0,n.createElement)("div",{className:`${ho}-mobile-filters`},(0,n.createElement)(uf,{path:"mobile/before_first_button"}),Object.keys(c).map(t=>"category"===c[t].type||"category-hierarchical"===c[t].type?(0,n.createElement)("div",{key:`filters-mobile-hidden-${e}-${t}`,style:{display:"none"}},(0,n.createElement)(zf,{filter:c[t]})):null),Object.keys(c).map((t,r)=>r>=vo("mobile_max_buttons",2)?null:(0,n.createElement)(n.Fragment,null,(0,n.createElement)(uf,{path:`mobile/filter=${t}/before_button`}),(0,n.createElement)(Gf,{key:`filter-button-mobile-${e}-${t}`,filter:c[t]}),(0,n.createElement)(uf,{path:`mobile/filter=${t}/after_button`}))),(Object.keys(c).length>vo("mobile_max_buttons",2)||vo("always_display_all_filters_button",!1))&&(0,n.createElement)(ti,{className:`${ho}-filter-button js-${ho}-filter-button-all-filters`,onClick:()=>{S(!0,{})},icon:(0,n.createElement)(s,{size:15,icon:Zf})},Ko("All filters","[front]","fibofilters")),(0,n.createElement)(uf,{path:"mobile/after_last_button"})):null},tp=(0,n.createElement)(f,{fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.createElement)(e=>(0,n.createElement)("g",e),{clipPath:"url(#a)",stroke:"#767676",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"},(0,n.createElement)(d,{d:"M15 8H1M8 15 1 8l7-7"})),(0,n.createElement)(e=>(0,n.createElement)("defs",e),null,(0,n.createElement)("clipPath",{id:"a"},(0,n.createElement)(d,{fill:"#fff",d:"M0 0h16v16H0z"})))),rp=()=>{const{appState:e}=(0,h.N$)(),t=e.value.currentMobileFilter,r=e.value.appliedFiltersValues,{filtersState:o}=(0,Kl.$U)(),l=o.value.filters,a=o.value.total_products_count;if((0,i.vJ)(()=>{t&&Jo.J.doAction("fiboFilters.renderer.mobile_overlay_opened")},[t]),!1===t)return null;const c=l[t],u=r.filter(e=>e._filterID===t);let d=!1;"category"===c.type&&!1!==c.current&&(d=!0);const f=()=>{x(!1,{}),Jo.J.doAction("fiboFilters.renderer.mobile_overlay_closed")};return(0,n.createElement)("div",{className:`${ho}-mobile-overlay`},(0,n.createElement)("div",{className:`${ho}-mobile-overlay__header`},(0,n.createElement)(ti,{className:`${ho}-mobile-overlay__header-close`,onClick:f},(0,n.createElement)(s,{icon:tp,size:16})),(0,n.createElement)("p",{className:`${ho}-mobile-overlay__header-title`},c.label),c?.tooltip?.length>0&&(0,n.createElement)(Wd,null,(0,n.createElement)(Kd,{asChild:!0},(0,n.createElement)("span",{className:`${ho}-mobile-overlay__header-tooltip-icon`},(0,n.createElement)(s,{icon:ia,width:18,height:18}))),(0,n.createElement)(Xd,{className:`${ho}-tooltip`,htmlContent:c.tooltip})),u.length>0&&(0,n.createElement)(ti,{className:`${ho}-mobile-overlay__header-clear`,onClick:()=>{Vl(u)}},Ko("Clear","[front]","fibofilters"))),(0,n.createElement)("div",{className:`${ho}-mobile-overlay__content`},(0,n.createElement)(uf,{path:[`${El}/filter=${c.id}/before`,`filter=${c.id}/before`]}),(0,n.createElement)(zf,{filter:c,showLabel:d,location:El}),(0,n.createElement)(uf,{path:[`${El}/filter=${c.id}/after`,`filter=${c.id}/after`]})),(0,n.createElement)("div",{className:`${ho}-mobile-overlay__footer`},a>0?(0,n.createElement)(ti,{onClick:f},vo("show_count")?Yo(/* translators: %d: number of products. */
Xo("See %d product","See %d products",a,"[front]","fibofilters"),a):Ko("See products","[front]","fibofilters")):(0,n.createElement)(ti,{onClick:f},Ko("See all products","[front]","fibofilters"))))},np=()=>{const{appState:e}=(0,h.N$)(),t=e.value.appliedFiltersValues,r=e.value.mobileOverlayAllIsVisible,{filtersState:o}=(0,Kl.$U)(),l=o.value.total_products_count;if((0,i.vJ)(()=>{r&&Jo.J.doAction("fiboFilters.renderer.mobile_overlay_opened")},[r]),!1===r)return null;const a=()=>{S(!1,{}),Jo.J.doAction("fiboFilters.renderer.mobile_overlay_closed")};return(0,n.createElement)("div",{className:`${ho}-mobile-overlay`},(0,n.createElement)("div",{className:`${ho}-mobile-overlay__header`},(0,n.createElement)(ti,{className:`${ho}-mobile-overlay__header-close`,onClick:a},(0,n.createElement)(s,{icon:tp,size:16})),(0,n.createElement)("p",{className:`${ho}-mobile-overlay__header-title`},Ko("Filters","[front]","fibofilters")),e.value.appliedFiltersCount>0&&(0,n.createElement)(ti,{className:`${ho}-mobile-overlay__header-clear`,onClick:()=>{Vl(t,!0)}},Ko("Clear","[front]","fibofilters"))),(0,n.createElement)("div",{className:`${ho}-mobile-overlay__content`},(0,n.createElement)(Kf,{index:0,minScreen:1,maxScreen:99999,showAppliedFilters:!1,location:wl})),(0,n.createElement)("div",{className:`${ho}-mobile-overlay__footer`},l>0?(0,n.createElement)(ti,{onClick:a},vo("show_count")?Yo(/* translators: %d: number of products. */
Xo("See %d product","See %d products",l,"[front]","fibofilters"),l):Ko("See products","[front]","fibofilters")):(0,n.createElement)(ti,{onClick:a},Ko("See all products","[front]","fibofilters"))))},op=()=>{const e=(0,i.li)(null),{appState:t}=(0,h.N$)(),r=e=>{e[0].intersectionRatio<1||Rl.triggerFetchMissingProducts()};if((0,i.vJ)(()=>{const t=e.current,n=new IntersectionObserver(r,{root:null,rootMargin:"500px",threshold:1});return t&&n.observe(t),()=>{t&&n.unobserve(t)}},[e,t.value.showMoreButtonIsVisible,t.value.pageCounter]),!t.value.showMoreButtonIsVisible)return null;let o=Rl.visibleProductIds.length;return(0,m.sB)()>1&&(o+=((0,m.sB)()-1)*vo("products_per_page",12)),(0,n.createElement)(n.Fragment,null,vo("show_more_button_counter")&&(0,n.createElement)("div",{className:"fibofilters-show-more-count",dangerouslySetInnerHTML:{__html:Yo(/* translators: %1$d: visible number of products %2$d total number of products */
Ko("Viewed <b>%1$d</b> of <b>%2$d</b>","[front]","fibofilters"),o,dl.A.getOutputProductIds().length)}}),(0,n.createElement)(ti,{ref:e,className:a("button fibofilters-show-more",vo("show_more_extra_classes",[])),onClick:()=>{Rl.showMoreProductsClicked()},nodeName:vo("show_more_as_button")?"button":"div"},Ko("Show more products","[front]","fibofilters")))},ip=()=>{const e=(0,i.li)(null),{appState:t}=(0,h.N$)();return t.value.showPreviousButtonIsVisible?(0,n.createElement)(n.Fragment,null,(0,n.createElement)(ti,{ref:e,className:a("button fibofilters-show-more fibofilters-show-more__previous",vo("show_more_extra_classes",[])),onClick:()=>{Rl.showPreviousProductsClicked()},nodeName:vo("show_more_as_button")?"button":"div"},Ko("Show previous products","[front]","fibofilters"))):null},sp=()=>{const e=(0,i.Bi)(),t=vo("catalog_orderedby",{}),r=vo("default_catalog_orderby","menu_order"),o=(0,m.UV)();return(0,n.createElement)("select",{className:"fibofilters-orderby orderby",onChange:e=>{Rl.orderbyChanged(e.target.value)},name:"orderby","aria-label":Ko("Shop order","[front] Sorting of products in the shop.","fibofilters")},Object.keys(t).map(i=>(0,n.createElement)("option",{selected:o===i||0===o.length&&i===r,key:`${e}-${i}`,value:i},t[i])))},lp=()=>{const{appState:e}=(0,h.N$)(),t=(0,i.Bi)();if(!e.value.currentPage||!e.value.totalPages)return null;const r={end_size:3,mid_size:3,show_all:!1,type:"list",wrapper_class:"",...vo("pagination_args"),current:e.value.currentPage,total:e.value.totalPages},o={prev_item:"page-numbers prev",next_item:"page-numbers next",current_item:"page-numbers current",link_item:"page-numbers",dots_item:"page-numbers dots",...vo("pagination_item_classes")};if(parseInt(r.total)<2)return null;r.end_size<1&&(r.end_size=1),r.mid_size<0&&(r.mid_size=2);const s=[],l=({n:e})=>(0,n.createElement)("span",{className:o.current_item},r.before_page_number,e,r.after_page_number),a=({n:e})=>(0,n.createElement)("a",{onClick:t=>{Rl.paginationClicked({page:e}),t.preventDefault()},className:o.link_item,href:Jl(e)},r.before_page_number,e,r.after_page_number),c=()=>(0,n.createElement)("span",{className:o.dots_item},"…");r.prev_text.length>0&&r.current&&r.current>1&&s.push((0,n.createElement)(({n:e})=>(0,n.createElement)("a",{onClick:e=>{Rl.paginationPrevPageClicked(),e.preventDefault()},href:Jl(e),"aria-current":"page",className:o.prev_item,dangerouslySetInnerHTML:{__html:r.prev_text}}),{n:r.current-1}));let u=!1;for(let e=1;e<=r.total;e++)e===r.current?(s.push((0,n.createElement)(l,{n:e})),u=!0):r.show_all||e<=r.end_size||r.current&&e>=r.current-r.mid_size&&e<=r.current+r.mid_size||e>r.total-r.end_size?(s.push((0,n.createElement)(a,{n:e})),u=!0):u&&!r.show_all&&(s.push((0,n.createElement)(c,null)),u=!1);r.next_text.length>0&&r.current&&r.current<r.total&&s.push((0,n.createElement)(({n:e})=>(0,n.createElement)("a",{onClick:e=>{Rl.paginationNextPageClicked(),e.preventDefault()},href:Jl(e),"aria-current":"page",className:o.next_item,dangerouslySetInnerHTML:{__html:r.next_text}}),{n:r.current+1}));const d=({children:e})=>r.wrapper_class.length>0?(0,n.createElement)("div",{className:r.wrapper_class},e):e;return"list"===r.type?(0,n.createElement)(d,null,(0,n.createElement)("ul",{className:"page-numbers nav-pagination links text-center"},s.map((e,r)=>(0,n.createElement)("li",{key:`${t}-page-link-${r}`},e)))):(0,n.createElement)(d,null,s)},ap=()=>{const e=(0,i.li)(null),t=e=>{e[0].intersectionRatio<1||(Rl.loadNextPageImmediately=!0,Rl.showMoreProductsClicked(),Rl.triggerFetchMissingProducts())};return(0,i.vJ)(()=>{const r=e.current,n=new IntersectionObserver(t,{root:null,rootMargin:"500px",threshold:1});return r&&n.observe(r),()=>{r&&n.unobserve(r)}},[e]),(0,n.createElement)("div",{ref:e})},cp=()=>{const[e,t]=(0,i.J0)(!0),r=qf(1,parseInt(vo("mobile_breakpoint",450))).value,{appState:s}=(0,h.N$)(),{filtersState:l}=(0,Kl.$U)(),a=l.value.filters,c=a.constructor===Object&&Object.entries(a).length>0,u=s.value.globalAppVisibility;if((0,i.vJ)(()=>(t(!1),()=>{}),[]),(0,o.R0)(()=>{r?b({peek:!0}):(S(!1,{peek:!0}),x(!1,{peek:!0}))}),!u)return null;const d=Ao(".fibofilters-applied-filters-container"),f=Ao(".fibofilters-vertical-filters-container"),p=Ao(".fibofilters-horizontal-filters-container"),m=Ao(".fibofilters-mobile-filters-container"),_=Ao(".fibofilters-show-more-button-container"),v=Ao(".fibofilters-show-previous-button-container");let g=[];vo("pagination_selectors",[]).every(e=>{const t=Ao(e);return!(t.length>0&&(g=t,1))});let y=[];vo("ordering_selectors",[]).every(e=>{const t=Ao(e);return!(t.length>0&&(y=t,1))});const w=Ao(".fibofilters-infinite-scroll-trigger-container");return e&&vo("override_ordering_enabled",!1)&&y.length>0&&y.forEach(e=>{(0,st.A)(e).children().remove()}),e?null:(0,n.createElement)(n.Fragment,null,c&&(0,n.createElement)(rp,null),c&&(0,n.createElement)(np,null),c&&m.length>0?m.map((e,t)=>{const r=(0,st.A)(e).data("min-screen"),o=(0,st.A)(e).data("max-screen"),i=(0,st.A)(e).data("include"),s=(0,st.A)(e).data("exclude");return(0,n.createPortal)((0,n.createElement)(ep,{index:t,minScreen:r,maxScreen:o,includedFilters:i,excludedFilters:s}),e)}):null,c&&(0,n.createElement)(Xf,null),c&&f.length>0?f.map((e,t)=>{const r=(0,st.A)(e).data("min-screen"),o=(0,st.A)(e).data("max-screen"),i=(0,st.A)(e).data("include"),s=(0,st.A)(e).data("exclude");return(0,n.createPortal)((0,n.createElement)(Kf,{index:t,minScreen:r,maxScreen:o,location:gl,includedFilters:i,excludedFilters:s}),e)}):null,c&&p.length>0?p.map((e,t)=>{const r=(0,st.A)(e).data("min-screen"),o=(0,st.A)(e).data("max-screen"),i=(0,st.A)(e).data("include"),s=(0,st.A)(e).data("exclude");return(0,n.createPortal)((0,n.createElement)(Qf,{index:t,minScreen:r,maxScreen:o,includedFilters:i,excludedFilters:s}),e)}):null,c&&d.length>0?d.map(e=>(0,n.createPortal)((0,n.createElement)(Xl,null),e)):null,_.length>0?_.map(e=>(0,n.createPortal)((0,n.createElement)(op,null),e)):null,v.length>0?v.map(e=>(0,n.createPortal)((0,n.createElement)(ip,null),e)):null,"pagination"===vo("pagination_strategy")&&g.length>0?g.map(e=>((0,st.A)(e).children().remove(),(0,n.createPortal)((0,n.createElement)(lp,null),e))):null,w.length>0?w.map(e=>(0,n.createPortal)((0,n.createElement)(ap,null),e)):null,vo("override_ordering_enabled",!1)&&y.length>0?y.map(e=>(0,n.createPortal)((0,n.createElement)(sp,null),e)):null,"undefined"!=typeof SnackbarProvider?(0,n.createElement)(SnackbarProvider,null):null)},up="undefined"!=typeof fiboFiltersData?window.fiboFiltersData.filters_data:{},dp=({firstLoad:e,clearProductsCache:t})=>{jl(up||{filters:{}});const r=_o("index_valid"),o=_o("filters"),i=o&&o.constructor===Array&&o.length>0,s=new URL(document.location.href),l=["1","2","5"],a=l.includes(vo("nofibofilters",""))||l.includes(s.searchParams.get("nofibofilters"));if(v({offcanvasIsVisible:!1,appliedFiltersCount:0,appliedFiltersValues:[],totalProductsCount:0,currentMobileFilter:!1,mobileOverlayAllIsVisible:!1,showMoreButtonIsVisible:!1,showPreviousButtonIsVisible:!1,currentPage:1,totalPages:1,firstVisiblePage:1,pageCounter:1,orderby:"",globalAppVisibility:!0,criticalErrors:[],searchInProgress:!1}),!r||!i||a)return null;const{filtersState:c}=(0,si.f)(),{appState:u}=(0,m.BV)();return Ll.handleRequest({firstLoad:e,clearProductsCache:t}),window.onpopstate=()=>{"show-more-button"!==Rl.paginationStrategy&&"infinite-scroll"!==Rl.paginationStrategy||A(1),Ll.handleRequest({firstLoad:!1})},(0,n.createElement)(h.mY,{value:{appState:u}},(0,n.createElement)(Kl.q8,{value:{filtersState:c}},(0,n.createElement)(cp,null)))}},868:(e,t,r)=>{"use strict";r.d(t,{FF:()=>p,se:()=>h,Eo:()=>x});const n=function(e){return"string"!=typeof e||""===e?(console.error("The namespace must be a non-empty string."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.\-\/]*$/.test(e)||(console.error("The namespace can only contain numbers, letters, dashes, periods, underscores and slashes."),!1)},o=function(e){return"string"!=typeof e||""===e?(console.error("The hook name must be a non-empty string."),!1):/^__/.test(e)?(console.error("The hook name cannot begin with `__`."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(e)||(console.error("The hook name can only contain numbers, letters, dashes, periods and underscores."),!1)},i=function(e,t){return function(r,i,s,l=10){const a=e[t];if(!o(r))return;if(!n(i))return;if("function"!=typeof s)return void console.error("The hook callback must be a function.");if("number"!=typeof l)return void console.error("If specified, the hook priority must be a number.");const c={callback:s,priority:l,namespace:i};if(a[r]){const e=a[r].handlers;let t;for(t=e.length;t>0&&!(l>=e[t-1].priority);t--);t===e.length?e[t]=c:e.splice(t,0,c),a.__current.forEach(e=>{e.name===r&&e.currentIndex>=t&&e.currentIndex++})}else a[r]={handlers:[c],runs:0};"hookAdded"!==r&&e.doAction("hookAdded",r,i,s,l)}},s=function(e,t,r=!1){return function(i,s){const l=e[t];if(!o(i))return;if(!r&&!n(s))return;if(!l[i])return 0;let a=0;if(r)a=l[i].handlers.length,l[i]={runs:l[i].runs,handlers:[]};else{const e=l[i].handlers;for(let t=e.length-1;t>=0;t--)e[t].namespace===s&&(e.splice(t,1),a++,l.__current.forEach(e=>{e.name===i&&e.currentIndex>=t&&e.currentIndex--}))}return"hookRemoved"!==i&&e.doAction("hookRemoved",i,s),a}},l=function(e,t){return function(r,n){const o=e[t];return void 0!==n?r in o&&o[r].handlers.some(e=>e.namespace===n):r in o}},a=function(e,t,r=!1){return function(n,...o){const i=e[t];i[n]||(i[n]={handlers:[],runs:0}),i[n].runs++;const s=i[n].handlers;if(!s||!s.length)return r?o[0]:void 0;const l={name:n,currentIndex:0};for(i.__current.push(l);l.currentIndex<s.length;){const e=s[l.currentIndex].callback.apply(null,o);r&&(o[0]=e),l.currentIndex++}return i.__current.pop(),r?o[0]:void 0}},c=function(e,t){return function(){var r;const n=e[t];return null!==(r=n.__current[n.__current.length-1]?.name)&&void 0!==r?r:null}},u=function(e,t){return function(r){const n=e[t];return void 0===r?void 0!==n.__current[0]:!!n.__current[0]&&r===n.__current[0].name}},d=function(e,t){return function(r){const n=e[t];if(o(r))return n[r]&&n[r].runs?n[r].runs:0}};class f{constructor(){this.actions=Object.create(null),this.actions.__current=[],this.filters=Object.create(null),this.filters.__current=[],this.addAction=i(this,"actions"),this.addFilter=i(this,"filters"),this.removeAction=s(this,"actions"),this.removeFilter=s(this,"filters"),this.hasAction=l(this,"actions"),this.hasFilter=l(this,"filters"),this.removeAllActions=s(this,"actions",!0),this.removeAllFilters=s(this,"filters",!0),this.doAction=a(this,"actions"),this.applyFilters=a(this,"filters",!0),this.currentAction=c(this,"actions"),this.currentFilter=c(this,"filters"),this.doingAction=u(this,"actions"),this.doingFilter=u(this,"filters"),this.didAction=d(this,"actions"),this.didFilter=d(this,"filters")}}const p=function(){return new f},h=p(),{addAction:m,addFilter:_,removeAction:v,removeFilter:g,hasAction:b,hasFilter:y,removeAllActions:w,removeAllFilters:E,doAction:x,applyFilters:S,currentAction:k,currentFilter:I,doingAction:A,doingFilter:C,didAction:P,didFilter:F,actions:$,filters:O}=h},999:(e,t,r)=>{"use strict";r.d(t,{N$:()=>a,mY:()=>l});var n=r(525),o=r(181),i=r(817);const s=(0,o.q6)(!1);function l({value:e,children:t}){return(0,n.createElement)(s.Provider,{value:e},t)}const a=()=>(0,i.NT)(s)}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.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.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};(()=>{"use strict";r.r(n),r.d(n,{getCriticalErrors:()=>f,hooks:()=>u,queryDataStore:()=>d,showDebugger:()=>h,v:()=>p});var e=r(525),t=r(181),o=r(420),i=r(698),s=(r(343),r(999),r(383),r(367)),l=r(659);const a=(n=!0,o=!1)=>{const i=r(826).A;(0,t.XX)((0,e.createElement)(i,{firstLoad:n,clearProductsCache:o}),document.getElementById(window.fiboFiltersData.config.app_selector))};var c;c=function(){const e=document.getElementById("fibofilters-data");if(!e)return;try{window.fiboFiltersData=JSON.parse(e.text.substring(e.text.indexOf("{"),e.text.lastIndexOf("}")+1)),o.J.doAction("fiboFilters.core.config_loaded")}catch(e){return}const t=document.createElement("div");t.style.position="absolute",t.style.zIndex="999995",t.setAttribute("id",window.fiboFiltersData.config.app_selector),(0,i.A)("body").append(t),a(),o.J.doAction("fiboFilters.core.init")},"undefined"!=typeof document&&("complete"!==document.readyState&&"interactive"!==document.readyState?document.addEventListener("DOMContentLoaded",c):c()),o.J.addAction("fiboFilters.core.rerender","fibofilters",(e={})=>{const{clearProductsCache:t}={clearProductsCache:!1,...e};a(!1,t)});const u=o.J,d={getStoreProductDescriptors:()=>l.A.getStoreProductDescriptors(),getBaseProductIds:()=>l.A.getBaseProductIds(),getFilteredProductIds:()=>l.A.getFilteredProductIds(),getBaseProductDescriptors:()=>l.A.getBaseProductDescriptors(),getOutputProductIds:()=>l.A.getOutputProductIds(),getDescriptorsOfFilteredProducts:()=>l.A.getDescriptorsOfFilteredProducts()},f=()=>(0,s.r3)(),p=()=>void 0!==window.fiboFiltersData.config.v?atob(window.fiboFiltersData.config.v):"Unknown",h=()=>document.dispatchEvent(new Event("fibofilters-show-filters-debugger"))})(),fiboFilters=n})();